:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --sidebar-bg: #16142b;
  --sidebar-bg-2: #211d45;
  --sidebar-active: #6d5ef8;
  --body-bg: #f6f7fb;
  --text-main: #1f2333;
  --text-muted: #6b7280;
  --border-soft: #edeef6;
  --card-radius: 16px;
  --shadow-sm: 0 1px 3px rgba(30, 27, 75, .04);
  --shadow-md: 0 6px 20px rgba(30, 27, 75, .07);
  --shadow-lg: 0 12px 34px rgba(30, 27, 75, .12);
}

* { box-sizing: border-box; }

body {
  background: var(--body-bg);
  font-family: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { letter-spacing: -0.01em; }
h4.fw-bold { font-size: 1.28rem; }

.app-wrapper { display: flex; min-height: 100vh; }

/* ---------------- Sidebar ---------------- */
.sidebar {
  width: 258px;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
  color: #fff;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  transition: transform .25s ease;
  z-index: 1030;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px; font-weight: 800; font-size: 1rem; letter-spacing: -.01em;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand i {
  color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent));
  width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-size: .82rem;
}
.sidebar-nav { padding: 10px 10px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 12px; margin-bottom: 1px; color: #b9bbe6; text-decoration: none;
  font-size: .85rem; font-weight: 500; border-radius: 8px;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.sidebar-nav a i { width: 16px; text-align: center; font-size: .87rem; transition: transform .2s ease; }
.sidebar-nav a:hover i { transform: translateX(2px) scale(1.1); }
.sidebar-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-nav a.active {
  background: linear-gradient(135deg, var(--primary), #7c6cf6);
  color: #fff; box-shadow: 0 4px 14px rgba(79,70,229,.35);
}
.sidebar-section-label {
  font-size: .64rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700;
  color: #6f72a8; padding: 12px 12px 4px; opacity: .8;
}
.sidebar-nav .sidebar-section-label:first-child { padding-top: 4px; }

.app-content { margin-left: 258px; flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------------- Topbar ---------------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  background: #fff; padding: 10px 22px;
  border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; z-index: 1020;
  transition: box-shadow .2s ease, background .2s ease;
}
.topbar.is-scrolled {
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px); box-shadow: var(--shadow-sm);
}
.sidebar-toggle { display: none; background: none; border: none; font-size: 1.1rem; color: var(--text-main); }
.topbar-search { position: relative; flex: 1; max-width: 380px; }
.topbar-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: .8rem; }
.topbar-search input {
  width: 100%; padding: 8px 14px 8px 36px; border-radius: 20px;
  border: 1px solid var(--border-soft); background: var(--body-bg); font-size: .84rem;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.topbar-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); background: #fff; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.btn-icon { position: relative; background: var(--body-bg); border: none; width: 36px; height: 36px; border-radius: 50%; transition: background .15s ease; color: var(--text-main); }
.btn-icon:hover { background: var(--primary-light); color: var(--primary); }
.badge-dot { position: absolute; top: -2px; right: -2px; background: var(--danger); color: #fff; font-size: .6rem; padding: 1px 5px; border-radius: 10px; box-shadow: 0 0 0 2px #fff; }
.btn-user { display: flex; align-items: center; gap: 7px; background: none; border: none; padding: 4px 8px 4px 4px; border-radius: 22px; transition: background .15s ease; }
.btn-user:hover { background: var(--body-bg); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; }
.user-name { font-weight: 600; font-size: .84rem; }

.main-container { padding: 20px; flex: 1; }

/* ---------------- Cards ---------------- */
.stat-card {
  background: #fff; border-radius: var(--card-radius); padding: 16px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border-soft);
  transition: box-shadow .18s ease, transform .18s ease;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.stat-card .icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: .98rem; margin-bottom: 9px; transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.stat-card:hover .icon { transform: scale(1.1) rotate(-6deg); }
.stat-card .value { font-size: 1.42rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-card .label { color: var(--text-muted); font-size: .79rem; font-weight: 500; }

.card {
  border-radius: 13px; border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm); transition: box-shadow .18s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  background: #fff; border-bottom: 1px solid var(--border-soft);
  font-weight: 700; font-size: .87rem; padding: 11px 16px;
}
.card-body { padding: 16px; }
.card-footer { border-top: 1px solid var(--border-soft); padding: 10px 16px; }

.table thead th {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); border-bottom-width: 1px; font-weight: 700;
  background: #fafbfe; padding: .55rem .75rem;
}
.table td { vertical-align: middle; font-size: .84rem; padding: .5rem .75rem; }
.table-hover tbody tr:hover { background: var(--primary-light); }
.table a { text-decoration: none; font-weight: 600; color: var(--text-main); }
.table a:hover { color: var(--primary); }

.badge { font-weight: 600; font-size: .69rem; padding: .36em .75em; border-radius: 20px; letter-spacing: .01em; }
.bg-purple { background: #8b5cf6; color: #fff; }

/* ---------------- Buttons ---------------- */
.btn { font-weight: 600; font-size: .84rem; border-radius: 9px; padding: .5rem .95rem; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; position: relative; overflow: hidden; }
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #7c6cf6); border: none;
  box-shadow: 0 2px 10px rgba(79,70,229,.28);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); box-shadow: 0 8px 20px rgba(79,70,229,.38); transform: translateY(-2px); }
.btn-success { background: linear-gradient(135deg, var(--success), #059669); border: none; box-shadow: 0 2px 10px rgba(16,185,129,.28); }
.btn-success:hover { box-shadow: 0 8px 20px rgba(16,185,129,.38); transform: translateY(-2px); }
.btn-outline-primary { color: var(--primary); border-color: #dcdcfb; }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); transform: translateY(-1px); }
.btn-outline-secondary { border-color: var(--border-soft); color: var(--text-muted); }
.btn-outline-secondary:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-outline-danger:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(239,68,68,.22); }
.btn-sm { padding: .34rem .7rem; font-size: .8rem; }

/* Ripple micro-interaction (JS adds .ripple span on click) */
.btn .ripple {
  position: absolute; border-radius: 50%; background: rgba(255,255,255,.55);
  transform: scale(0); pointer-events: none; animation: rippleAnim .55s ease-out forwards;
}
.btn-outline-primary .ripple, .btn-outline-secondary .ripple, .btn-outline-danger .ripple { background: rgba(79,70,229,.18); }
@keyframes rippleAnim { to { transform: scale(3.2); opacity: 0; } }

/* Loading state for form submits — prevents double-clicks, feels modern */
.btn-loading { pointer-events: none; }
.btn-loading > * { visibility: hidden; }
.btn-loading::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px;
  border: 2px solid rgba(0,0,0,.15); border-top-color: currentColor; border-radius: 50%;
  animation: btnSpin .6s linear infinite; visibility: visible;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* ---------------- Forms ---------------- */
.form-control, .form-select {
  border-radius: 8px; border: 1px solid #e2e4f0; font-size: .85rem; padding: .48rem .7rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-label { color: #374151; margin-bottom: .3rem; font-size: .82rem; }
.form-control-sm, .form-select-sm { padding: .35rem .6rem; font-size: .8rem; }
.form-text { font-size: .74rem; }

/* Tighter grid gutters app-wide, without touching every page's markup */
.row { --bs-gutter-x: 1rem; }
.row.g-2 { --bs-gutter-x: .6rem; --bs-gutter-y: .6rem; }
.row.g-3 { --bs-gutter-x: .8rem; --bs-gutter-y: .8rem; }

/* ---------------- Searchable Select ---------------- */
.search-select { position: relative; }
.search-select-dropdown {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border-soft); border-radius: 10px;
  max-height: 240px; overflow-y: auto; z-index: 1050; box-shadow: var(--shadow-md);
}
.search-select-dropdown.show { display: block; }
.search-select-item { padding: 9px 14px; font-size: .86rem; cursor: pointer; }
.search-select-item:hover, .search-select-item.active { background: var(--primary-light); color: var(--primary); }

/* ---------------- Login page ---------------- */
.login-wrapper {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 20% 20%, #2c2570, transparent 45%),
              radial-gradient(circle at 80% 80%, #1a3a6e, transparent 45%),
              linear-gradient(135deg, #16142b, #322a70);
}
.login-card {
  background: #fff; border-radius: 18px; padding: 36px; width: 100%; max-width: 390px;
  box-shadow: 0 25px 60px rgba(0,0,0,.28);
}

/* ---------------- Pagination ---------------- */
.pagination .page-link { border-radius: 7px; margin: 0 2px; border-color: var(--border-soft); color: var(--text-main); font-weight: 600; font-size: .82rem; padding: .4rem .7rem; }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* ---------------- Alerts ---------------- */
.alert { border-radius: 12px; border: none; font-size: .87rem; }

/* ---------------- Task Timeline ---------------- */
.view-tabs { display: flex; gap: 6px; background: #fff; border: 1px solid var(--border-soft); border-radius: 10px; padding: 4px; }
.view-tabs a {
  padding: 7px 16px; border-radius: 7px; font-size: .84rem; font-weight: 600;
  color: var(--text-muted); text-decoration: none; transition: all .15s ease;
}
.view-tabs a.active { background: var(--primary); color: #fff; }
.view-tabs a:hover:not(.active) { background: var(--body-bg); color: var(--text-main); }

.task-timeline { position: relative; padding-left: 34px; }
.task-timeline::before {
  content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--primary-light), var(--border-soft));
}
.task-timeline-node { position: relative; margin-bottom: 28px; }
.task-timeline-node:last-child { margin-bottom: 0; }
.task-timeline-dot {
  position: absolute; left: -34px; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--primary); z-index: 1;
}
.task-timeline-dot.is-overdue { border-color: var(--danger); }
.task-timeline-dot.is-today { border-color: var(--success); box-shadow: 0 0 0 4px rgba(16,185,129,.15); }
.task-timeline-dot.is-none { border-color: #cbd0e0; }
.task-timeline-date-label { font-weight: 700; font-size: .94rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.task-timeline-date-label .badge { font-weight: 600; }

.task-card {
  background: #fff; border: 1px solid var(--border-soft); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, transform .15s ease;
}
.task-card:hover { box-shadow: var(--shadow-md); transform: translateX(2px); }
.task-card:last-child { margin-bottom: 0; }
.task-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.task-card-title { font-weight: 600; font-size: .89rem; text-decoration: none; color: var(--text-main); }
.task-card-title:hover { color: var(--primary); }
.task-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: .78rem; color: var(--text-muted); }
.coordination-note {
  margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: #fdf2f8; color: #be185d;
  font-size: .76rem; display: flex; align-items: center; gap: 6px;
}
.coordination-note i { color: #db2777; }

@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .sidebar.show { transform: translateX(0); }
  .app-content { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .topbar-search { max-width: 220px; }
  .main-container { padding: 16px; }
}

@media (max-width: 767px) {
  .topbar { padding: 10px 14px; gap: 10px; }
  .topbar-search { display: none; }
  .user-name { display: none !important; }
  .main-container { padding: 12px; }
  h4.fw-bold { font-size: 1.15rem; }
  .card-body { padding: 14px; }
  .card-header { padding: 12px 14px; }
  .stat-card { padding: 14px; }
  .stat-card .value { font-size: 1.35rem; }
  .btn-sm { padding: .45rem 1rem; font-size: .85rem; }
  /* Stack action-row buttons and toolbars vertically so nothing overflows */
  .d-flex.justify-content-between.align-items-center.mb-4 { flex-direction: column; align-items: stretch !important; gap: 10px; }
  .d-flex.justify-content-between.align-items-center.mb-4 > div { display: flex; flex-wrap: wrap; gap: 8px; }
  .table-responsive { border-radius: 10px; }
  .table td, .table th { white-space: nowrap; }
  .view-tabs { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .login-card { padding: 28px 22px; }
  .main-container { padding: 10px; }
  .stat-card .icon { width: 38px; height: 38px; font-size: .95rem; }
}

/* Sticky table headers on long, scrollable lists for a snappier feel */
.table-responsive { max-height: 70vh; overflow-y: auto; }
.table-responsive thead th { position: sticky; top: 0; background: #fafbfe; z-index: 2; }

/* Snappier perceived performance: subtle fade-in for page content */
.main-container { animation: fadeInPage .18s ease; }
@keyframes fadeInPage { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------- Modern touches ---------------- */

/* Slim, minimal scrollbars everywhere */
* { scrollbar-width: thin; scrollbar-color: #d1d5db transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
*::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Dimmed backdrop behind the mobile sidebar when open (created by JS) */
.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(15,13,35,.45);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  z-index: 1025; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.sidebar-backdrop.show { opacity: 1; pointer-events: auto; }

/* Alerts slide + fade in in a more "toast-like" way */
.alert {
  animation: alertIn .25s ease;
}
@keyframes alertIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* Card entrance — subtle, staggered by DOM order via animation-delay set inline where useful */
.card, .stat-card { animation: cardIn .35s ease both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Smooth scrolling for in-page anchors (e.g. #services, #notes, #replies) */
html { scroll-behavior: smooth; }

/* Respect users who've asked for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------------- Invoice document ---------------- */
.invoice-doc {
  background: #fff; border-radius: 14px; border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm);
  padding: 36px 40px; position: relative; overflow: hidden; max-width: 900px; margin: 0 auto;
}
.invoice-header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; border-bottom: 2px solid var(--body-bg); padding-bottom: 22px; margin-bottom: 22px; }
.invoice-logo { height: 46px; margin-bottom: 10px; display: block; }
.invoice-company-name { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 2px; }
.invoice-company-meta { font-size: .78rem; color: var(--text-muted); line-height: 1.5; }
.invoice-header-meta { text-align: right; min-width: 220px; }
.invoice-title { font-size: 1.5rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--primary); margin-bottom: 10px; }
.invoice-meta-table { margin-left: auto; font-size: .82rem; }
.invoice-meta-table td { padding: 2px 0 2px 14px; text-align: right; }
.invoice-meta-table td:first-child { color: var(--text-muted); text-align: right; padding-left: 0; }
.invoice-bill-to { background: var(--body-bg); border-radius: 10px; padding: 14px 18px; margin-bottom: 22px; font-size: .85rem; line-height: 1.6; max-width: 420px; }
.invoice-section-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--text-muted); display: block; margin-bottom: 6px; }
.invoice-items-table thead th { background: var(--body-bg); }
.invoice-summary-row { display: flex; justify-content: space-between; flex-wrap: wrap-reverse; gap: 20px; margin-top: 20px; }
.invoice-payment-info { flex: 1; min-width: 240px; font-size: .82rem; }
.invoice-bank-table td { padding: 2px 10px 2px 0; }
.invoice-bank-table td:first-child { color: var(--text-muted); white-space: nowrap; }
.invoice-totals-box { min-width: 260px; background: var(--body-bg); border-radius: 10px; padding: 16px 20px; font-size: .88rem; }
.invoice-totals-box > div { padding: 4px 0; }
.invoice-grand-total { border-top: 1px solid var(--border-soft); margin-top: 8px; padding-top: 10px !important; font-weight: 800; font-size: 1.05rem; color: var(--primary); }
.invoice-notes { border-top: 1px solid var(--border-soft); margin-top: 22px; padding-top: 16px; font-size: .82rem; color: var(--text-muted); }
.invoice-footer-note { text-align: center; margin-top: 28px; font-size: .8rem; color: var(--text-muted); font-style: italic; }

.invoice-stamp {
  position: absolute; top: 50px; right: 40px; font-size: 2.2rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; border: 4px solid currentColor; border-radius: 10px; padding: 6px 22px;
  transform: rotate(-12deg); opacity: .18; pointer-events: none; -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.invoice-stamp-paid { color: #10b981; }
.invoice-stamp-overdue { color: #ef4444; }
.invoice-stamp-cancelled { color: #6b7280; }

@media print {
  .no-print, .sidebar, .topbar, .alert { display: none !important; }
  .app-content { margin-left: 0 !important; }
  .main-container { padding: 0 !important; }
  .invoice-doc { box-shadow: none !important; border: none !important; padding: 0 !important; max-width: 100% !important; }
  .invoice-stamp { opacity: .25; }
}

@media (max-width: 767px) {
  .invoice-doc { padding: 22px 18px; }
  .invoice-header-meta { text-align: left; min-width: 0; }
  .invoice-meta-table { margin-left: 0; }
  .invoice-meta-table td, .invoice-meta-table td:first-child { text-align: left; padding-left: 0; }
  .invoice-stamp { font-size: 1.4rem; top: 20px; right: 20px; padding: 4px 14px; }
}

/* ---------------- Trial countdown pill ---------------- */
.trial-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-light); color: var(--primary);
  font-size: .76rem; font-weight: 600; padding: 6px 12px;
  border-radius: 20px; text-decoration: none; white-space: nowrap;
  transition: background .15s ease;
}
.trial-pill:hover { background: #e0e1fc; color: var(--primary-dark); }
.trial-pill-warn { background: #fef2f2; color: var(--danger); }
.trial-pill-warn:hover { background: #fde2e2; }

/* ---------------- Registration page ---------------- */
html:has(.reg-page) { height: 100%; }
.reg-page {
  height: 100vh; overflow: hidden; background: var(--body-bg);
  display: flex; flex-direction: column;
}
.reg-shell { flex: 1; min-height: 0; }
.reg-hero, .reg-form-col {
  height: 100%; overflow-y: auto;
}
.reg-hero {
  background: linear-gradient(160deg, var(--sidebar-bg) 0%, #241f52 55%, var(--primary-dark) 100%);
  color: #fff; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.reg-hero::before {
  content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109,94,248,.35), transparent 70%);
  top: -140px; right: -120px;
}
.reg-hero::after {
  content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,.25), transparent 70%);
  bottom: -100px; left: -90px;
}
.reg-hero-content { position: relative; z-index: 1; }
.reg-logo-badge {
  display: inline-flex; align-items: center; background: #fff; border-radius: 14px;
  padding: 8px 14px; box-shadow: 0 8px 22px rgba(0,0,0,.25);
}
.reg-logo-badge img { height: 34px; display: block; }
.reg-pill {
  display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2); padding: 5px 12px; border-radius: 30px;
  font-size: .72rem; font-weight: 600; color: #fff;
}
.reg-stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 8px 10px; }
.reg-stat .num { font-size: 1.15rem; font-weight: 800; line-height: 1.1; }
.reg-stat .lbl { font-size: .66rem; color: rgba(255,255,255,.7); }
.reg-industry-chip {
  display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: 4px 8px;
  font-size: .68rem; color: rgba(255,255,255,.9);
}
.reg-form-col { background: var(--body-bg); display: flex; align-items: center; justify-content: center; }
.reg-form-card {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-soft);
}
.reg-form-card .form-label { font-weight: 600; font-size: .74rem; color: var(--text-main); margin-bottom: .25rem; }
.reg-form-card .form-control, .reg-form-card .form-select {
  border-radius: 9px; border: 1px solid var(--border-soft); padding: 7px 11px; font-size: .84rem;
}
.reg-form-card .form-control:focus, .reg-form-card .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light);
}
.reg-form-card .form-text { font-size: .68rem; }
.reg-submit-btn {
  background: linear-gradient(135deg, var(--primary), #7c6cf6); border: none; font-weight: 700;
  border-radius: 10px; padding: 9px; box-shadow: 0 8px 20px rgba(79,70,229,.28); font-size: .88rem;
}
.reg-submit-btn:hover { filter: brightness(1.05); }
.reg-trust-row { font-size: .66rem; color: var(--text-muted); }
@media (max-width: 991px) {
  .reg-page { height: auto; overflow: visible; }
  .reg-hero, .reg-form-col { height: auto; overflow: visible; }
}

/* =====================================================================
   Project Management — role-clear, workflow-first components
   Design goals (ui-ux-pro-max priorities applied):
   - Layout & Responsive (P5): no horizontal scroll: tables collapse to
     stacked cards under 767px via the .table-cards data-label pattern;
     the kanban board wraps to single-column instead of scrolling sideways.
   - Touch & Interaction (P2): every actionable chip/step/card keeps a
     44px+ effective hit area on mobile.
   - Style Selection (P4) + Typography & Color (P6): status/role color is
     a semantic token reused consistently across stepper, chips, and
     kanban headers so "what stage is this in" reads at a glance.
   ===================================================================== */

/* ---- Role banner: tells an employee their job on this project up top ---- */
.role-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--primary-light); color: var(--primary-dark);
  border: 1px solid #dcdcfb; border-radius: 12px; padding: 10px 16px;
  font-size: .85rem; font-weight: 600; margin-bottom: 16px;
}
.role-banner i { font-size: .95rem; }
.role-banner .badge { font-size: .72rem; }

/* ---- Status stepper: Planning -> In Progress -> On Hold/Completed ---- */
.status-stepper { display: flex; align-items: flex-start; list-style: none; margin: 0; padding: 0; }
.status-stepper li {
  flex: 1; position: relative; text-align: center; font-size: .72rem; font-weight: 700;
  color: var(--text-muted); padding-top: 30px;
}
.status-stepper li::before {
  content: ''; position: absolute; top: 9px; left: 0; right: 0; height: 3px; background: var(--border-soft); z-index: 0;
}
.status-stepper li:first-child::before { left: 50%; }
.status-stepper li:last-child::before { right: 50%; }
.status-stepper li::after {
  content: ''; position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--border-soft); z-index: 1;
  transition: border-color .2s ease, background .2s ease;
}
.status-stepper li.is-done::before { background: var(--success); }
.status-stepper li.is-done::after { border-color: var(--success); background: var(--success); }
.status-stepper li.is-current::after { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.status-stepper li.is-current { color: var(--primary); }
.status-stepper li.is-done { color: var(--success); }
.status-stepper li.is-halted::after { border-color: var(--danger); background: var(--danger); }
.status-stepper li.is-halted { color: var(--danger); }
@media (max-width: 575px) {
  .status-stepper { flex-wrap: wrap; gap: 10px 0; }
  .status-stepper li { flex: 1 1 33%; }
}

/* ---- Team member avatar chips (replaces a dense table for the roster) ---- */
.team-chip-list { display: flex; flex-wrap: wrap; gap: 10px; }
.team-chip {
  display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 8px 10px 8px 8px; min-width: 0; box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, transform .15s ease;
}
.team-chip:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.team-chip .avatar { width: 34px; height: 34px; font-size: .72rem; flex-shrink: 0; }
.team-chip .info { min-width: 0; }
.team-chip .name { font-weight: 700; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.team-chip .role { font-size: .71rem; color: var(--primary); font-weight: 600; }
.team-chip .remove-btn {
  border: none; background: none; color: #c6c9de; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-left: 2px; flex-shrink: 0;
  transition: background .15s ease, color .15s ease;
}
.team-chip .remove-btn:hover { background: #fef2f2; color: var(--danger); }

/* ---- Empty states: friendlier than a bare "no rows" table message ---- */
.empty-state { text-align: center; padding: 34px 16px; color: var(--text-muted); }
.empty-state i { font-size: 1.8rem; color: #d7d9ec; margin-bottom: 10px; display: block; }
.empty-state p { font-size: .85rem; margin-bottom: 12px; }

/* ---- Responsive card-table: any table with class="table-cards" collapses
   into stacked labeled rows under 767px instead of forcing a horizontal
   scroll — each <td> needs a data-label="Column Name" attribute. ---- */
@media (max-width: 767px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr {
    border: 1px solid var(--border-soft); border-radius: 12px; padding: 10px 12px;
    margin-bottom: 10px; box-shadow: var(--shadow-sm);
  }
  .table-cards tr:last-child { margin-bottom: 0; }
  .table-cards td {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 6px 2px; border: none !important; text-align: right; white-space: normal !important;
  }
  .table-cards td::before {
    content: attr(data-label); font-weight: 700; font-size: .68rem; text-transform: uppercase;
    letter-spacing: .03em; color: var(--text-muted); text-align: left; margin-right: auto;
  }
  .table-cards td[data-label=""]::before, .table-cards td:not([data-label])::before { content: none; }
  .table-responsive .table-cards { max-height: none; }
}

/* ---- Progress summary tiles used on the project view header ---- */
.progress-tile { text-align: center; }
.progress-tile .num { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.progress-tile .lbl { font-size: .7rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }

