/* ==========================================================================
   Patna design system
   Brand (Brand Identity Guide 2026): Cobalt #1B4FD7 · Ink #0A0D1F · White · Patna Green #2EC27E
   Type: Ubuntu (display / numbers) + Plus Jakarta Sans (UI)
   Extended palette for status & data: Gold, Violet, Coral, Teal, Amber
   Light theme is the default; dark theme via [data-theme="dark"].
   ========================================================================== */

:root {
  --font-display: 'Ubuntu', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --cobalt: #1B4FD7;
  --cobalt-600: #1640B3;
  --cobalt-700: #0F2E86;
  --cobalt-400: #3B6BE8;
  --cobalt-50: #EEF3FE;
  --cobalt-100: #DCE6FD;
  --cobalt-200: #C7D7FB;

  --green: #2EC27E;
  --green-ink: #138A55;
  --green-50: #EAFAF2;
  --green-200: #BDEFD5;

  --gold: #B8872A;
  --gold-ink: #946A17;
  --gold-50: #FEF7EA;
  --gold-200: #F0D49A;

  --violet: #7C3AED;
  --violet-50: #F3EEFE;
  --violet-200: #DCCCFB;

  --coral: #E0457B;
  --coral-50: #FDEEF3;
  --coral-200: #F7C6D7;

  --teal: #0EA5B7;
  --teal-50: #E7F8FA;
  --teal-200: #B5E8EE;

  --amber: #D97706;
  --amber-50: #FFFBEB;
  --amber-200: #FDE68A;

  --red: #DC2626;
  --red-50: #FEF2F2;
  --red-200: #FECACA;

  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --surface-2: #F8FAFD;
  --surface-3: #EFF2F8;
  --border: #E5E9F2;
  --border-2: #EDF0F7;
  --ink: #0A0D1F;
  --ink-2: #374151;
  --muted: #6B7280;
  --subtle: #9CA3AF;
  --ring: rgba(27, 79, 215, .28);
  --shadow-sm: 0 1px 2px rgba(10, 13, 31, .05);
  --shadow: 0 4px 18px rgba(10, 13, 31, .07);
  --shadow-lg: 0 18px 48px rgba(10, 13, 31, .14);
  --cover: linear-gradient(135deg, #1B3AB0 0%, #1B4FD7 45%, #1E4FC9 70%, #0F2A80 100%);

  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 18px;
  --sidebar-w: 260px;
  color-scheme: light;
}

[data-theme="dark"] {
  --cobalt: #4C7BFF;
  --cobalt-600: #6A91FF;
  --cobalt-400: #6A91FF;
  --cobalt-50: rgba(76, 123, 255, .12);
  --cobalt-100: rgba(76, 123, 255, .18);
  --cobalt-200: rgba(76, 123, 255, .35);
  --green-ink: #3DDC93;
  --green-50: rgba(46, 194, 126, .12);
  --green-200: rgba(46, 194, 126, .35);
  --gold: #E0B252;
  --gold-ink: #E9C06A;
  --gold-50: rgba(224, 178, 82, .12);
  --gold-200: rgba(224, 178, 82, .35);
  --violet: #A78BFA;
  --violet-50: rgba(167, 139, 250, .12);
  --violet-200: rgba(167, 139, 250, .35);
  --coral: #F472A0;
  --coral-50: rgba(244, 114, 160, .12);
  --coral-200: rgba(244, 114, 160, .35);
  --teal: #2DD4E6;
  --teal-50: rgba(45, 212, 230, .12);
  --teal-200: rgba(45, 212, 230, .32);
  --amber: #FBBF24;
  --amber-50: rgba(251, 191, 36, .12);
  --amber-200: rgba(251, 191, 36, .35);
  --red: #F87171;
  --red-50: rgba(248, 113, 113, .12);
  --red-200: rgba(248, 113, 113, .35);

  --bg: #070A18;
  --surface: #0E1329;
  --surface-2: #121833;
  --surface-3: #18203F;
  --border: #212A4D;
  --border-2: #1A2242;
  --ink: #F1F4FF;
  --ink-2: #C9D1E8;
  --muted: #8C96B5;
  --subtle: #5F6A8C;
  --ring: rgba(76, 123, 255, .4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 4px 18px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
  --cover: linear-gradient(135deg, #0B1A5C 0%, #1B3AB0 50%, #0A1440 100%);
  color-scheme: dark;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--font-ui); font-size: 14.5px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--cobalt); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; } h4 { font-size: .9rem; }
p { color: var(--ink-2); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex-shrink: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

/* ── App shell ─────────────────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; z-index: 40;
}
.sidebar-top { padding: 18px 18px; min-height: 68px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.brand-logo { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.brand-logo img { height: 28px; width: auto; }
.brand-logo:hover { text-decoration: none; }
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
.ws-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.ws-name { font-size: .82rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.ws-meta { font-size: .68rem; color: var(--muted); }

.sidebar-trust {
  margin: 14px 14px 6px; padding: 12px 14px; border-radius: 12px; display: flex; gap: 11px; align-items: center;
  background: var(--gold-50); border: 1px solid var(--gold-200); color: inherit;
}
.sidebar-trust:hover { text-decoration: none; filter: brightness(.98); }
.sidebar-trust .t-grade { font-size: .72rem; font-weight: 700; color: var(--gold-ink); letter-spacing: .03em; }
.sidebar-trust .t-label { font-size: .66rem; color: var(--muted); }

.nav-section { padding: 14px 14px 4px; }
.nav-label { font-size: .6rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--subtle); padding: 0 12px 8px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: var(--muted);
  font-size: .88rem; font-weight: 500; margin-bottom: 3px; transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.nav-item.active { background: var(--cobalt-50); color: var(--cobalt); font-weight: 700; }
.nav-item.active::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--cobalt); }
.nav-item.active .icon { color: var(--cobalt); }
.nav-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Thin, quiet scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background-color: var(--subtle); }
*::-webkit-scrollbar-track { background: transparent; }

/* Desktop: collapsible sidebar (icon rail) */
.sidebar { transition: width .2s ease; }
.logo-icon { display: none; width: 34px; height: 34px; border-radius: 9px; }
@media (min-width: 961px) {
  html.sidebar-collapsed { --sidebar-w: 78px; }
  html.sidebar-collapsed .sidebar { overflow-x: hidden; }
  html.sidebar-collapsed .sidebar-top { justify-content: center; padding: 18px 10px; }
  html.sidebar-collapsed .brand-logo img:not(.logo-icon) { display: none !important; }
  html.sidebar-collapsed .brand-logo .logo-icon { display: block; }
  html.sidebar-collapsed .sidebar-top .nav-badge,
  html.sidebar-collapsed .nav-label,
  html.sidebar-collapsed .nav-text,
  html.sidebar-collapsed .nav-item .lock,
  html.sidebar-collapsed .ws-card > div,
  html.sidebar-collapsed .sidebar-trust > div:not(.ring),
  html.sidebar-collapsed .sb-user > :not(.avatar),
  html.sidebar-collapsed .sb-signout span { display: none; }
  html.sidebar-collapsed .nav-section { padding: 10px 12px 2px; }
  html.sidebar-collapsed .nav-section + .nav-section { border-top: 1px solid var(--border-2); }
  html.sidebar-collapsed .nav-item { justify-content: center; padding: 11px 0; }
  html.sidebar-collapsed .nav-item.active::before { left: -12px; }
  html.sidebar-collapsed .nav-badge { position: absolute; top: 4px; right: 6px; width: 9px; height: 9px; padding: 0; font-size: 0; border: 2px solid var(--surface); }
  html.sidebar-collapsed .ws-card, html.sidebar-collapsed .sb-user { justify-content: center; }
  html.sidebar-collapsed .sidebar-trust { justify-content: center; padding: 8px; margin: 12px 10px 4px; }
}
.nav-item .lock { margin-left: auto; font-size: .58rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); border: 1px dashed var(--border); padding: 1px 6px; border-radius: 99px; }
.nav-badge { margin-left: auto; font-size: .62rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--cobalt-50); color: var(--cobalt); border: 1px solid var(--cobalt-200); }
.nav-badge.green { background: var(--green-50); color: var(--green-ink); border-color: var(--green-200); }
.nav-badge.gold { background: var(--gold-50); color: var(--gold-ink); border-color: var(--gold-200); }
.nav-badge.red { background: var(--red-50); color: var(--red); border-color: var(--red-200); }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--border); padding: 10px; }
.sb-user { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; color: inherit; }
.sb-user:hover { background: var(--surface-3); text-decoration: none; }
.sb-name { font-size: .78rem; font-weight: 600; color: var(--ink); }
.sb-role { font-size: .66rem; color: var(--muted); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 11px 24px; background: var(--surface);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-size: .92rem; font-weight: 700; color: var(--ink); }
.topbar-crumb { font-size: .72rem; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; color: var(--subtle); }
.search-box input { border: 0; outline: 0; background: transparent; width: 220px; font-size: .8rem; color: var(--ink); }
.icon-btn {
  position: relative; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); background: var(--surface-3); text-decoration: none; }
.icon-btn .dot { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--coral); color: #fff; font-size: .6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }
.menu-toggle { display: inline-flex; }
.mobile-only { display: none !important; }
.content { padding: 34px 40px 72px; max-width: 1320px; width: 100%; margin: 0 auto; }
.content.narrow { max-width: 880px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.75rem; }
.page-head p { color: var(--muted); font-size: .95rem; margin-top: 6px; max-width: 680px; line-height: 1.6; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 15px; border-radius: 8px;
  font-size: .8rem; font-weight: 600; line-height: 1.2; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .15s, box-shadow .15s, border-color .15s, color .15s; text-decoration: none !important;
}
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-600); box-shadow: 0 4px 14px rgba(27, 79, 215, .28); }
.btn-green { background: var(--green); color: #05301C; }
.btn-green:hover { filter: brightness(.96); box-shadow: 0 4px 14px rgba(46, 194, 126, .3); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--subtle); }
.btn-soft { background: var(--cobalt-50); color: var(--cobalt); border-color: var(--cobalt-200); }
.btn-soft:hover { background: var(--cobalt-100); }
.btn-danger { background: var(--red-50); color: var(--red); border-color: var(--red-200); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-link { background: none; border: 0; color: var(--cobalt); padding: 0; font-weight: 600; cursor: pointer; font-size: .78rem; }
.btn-sm { padding: 5px 11px; font-size: .72rem; border-radius: 6px; }
.btn-lg { padding: 11px 20px; font-size: .9rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-success-state { background: var(--green) !important; color: #05301C !important; }

/* ── Cards & layout ────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-hdr { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border-2); }
.card-title { font-size: .95rem; display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); font-family: var(--font-ui); }
.card-sub { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.card-link { font-size: .8rem; white-space: nowrap; font-weight: 600; color: var(--cobalt); }
.card-body { padding: 22px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.card.ring-gold { border-color: var(--gold-200); background: linear-gradient(180deg, var(--gold-50), var(--surface) 60%); }
.card.ring-blue { border-color: var(--cobalt-200); }
.card.ring-green { border-color: var(--green-200); }
.card.pad { padding: 24px; }
.card + .card { margin-top: 20px; }
.stack > * + * { margin-top: 14px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.split-wide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 300px; gap: 20px; }
.col-span-2 { grid-column: span 2; }
.dash-trust { grid-column: 3; grid-row: 1 / span 2; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: .85rem; }
.tiny { font-size: .74rem; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 26px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.text-right { text-align: right; }
.center { text-align: center; }
.num { font-family: var(--font-display); font-weight: 700; }
.prose p { margin-bottom: 10px; line-height: 1.7; white-space: pre-line; }
.prose h2 { margin: 22px 0 8px; } .prose h3 { margin: 18px 0 6px; } .prose ul { margin: 0 0 12px 20px; color: var(--ink-2); } .prose li { margin: 4px 0; }

/* ── Profile header (mockup) ───────────────────────────────────────────── */
.profile-header { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; }
.profile-cover { height: 110px; background: var(--cover); background-size: cover; background-position: center; position: relative; }
.profile-cover::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 15% 50%, rgba(46, 194, 126, .22), transparent 45%), radial-gradient(circle at 85% 30%, rgba(255, 255, 255, .08), transparent 40%); }
.profile-cover.has-img::after { background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .25)); }
.profile-meta { display: flex; align-items: flex-start; gap: 16px; padding: 0 22px 14px; margin-top: -28px; position: relative; z-index: 1; flex-wrap: wrap; }
.profile-name { font-size: 1.4rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-tagline { font-size: .82rem; color: var(--muted); margin-top: 3px; }
.meta-pills { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 7px; }
.meta-pill { font-size: .72rem; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.profile-actions { margin-left: auto; display: flex; gap: 8px; padding-bottom: 4px; flex-wrap: wrap; }
.profile-stats { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--border); }
.pstat { padding: 12px 6px; text-align: center; border-right: 1px solid var(--border); color: inherit; }
.pstat:last-child { border-right: 0; }
.pstat:hover { background: var(--surface-2); text-decoration: none; }
.pstat-num { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1; color: var(--ink); }
.pstat-label { font-size: .62rem; color: var(--muted); margin-top: 4px; letter-spacing: .05em; text-transform: uppercase; }

/* ── Avatars & logos ───────────────────────────────────────────────────── */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; font-weight: 700; border-radius: 9px; overflow: hidden; font-family: var(--font-display); background-size: cover; background-position: center; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.round { border-radius: 50%; }
.av-xs { width: 24px; height: 24px; font-size: .6rem; border-radius: 6px; }
.av-sm { width: 32px; height: 32px; font-size: .72rem; }
.av-md { width: 40px; height: 40px; font-size: .85rem; }
.av-lg { width: 56px; height: 56px; font-size: 1.1rem; border-radius: 12px; }
.av-xl { width: 76px; height: 76px; font-size: 1.5rem; border-radius: 16px; border: 3px solid var(--surface); box-shadow: var(--shadow); }

/* ── Chips & badges ────────────────────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; border: 1px solid; white-space: nowrap; font-family: var(--font-ui); line-height: 1.3; }
.chip-blue { background: var(--cobalt-50); color: var(--cobalt); border-color: var(--cobalt-200); }
.chip-green { background: var(--green-50); color: var(--green-ink); border-color: var(--green-200); }
.chip-gold { background: var(--gold-50); color: var(--gold-ink); border-color: var(--gold-200); }
.chip-purple { background: var(--violet-50); color: var(--violet); border-color: var(--violet-200); }
.chip-coral { background: var(--coral-50); color: var(--coral); border-color: var(--coral-200); }
.chip-teal { background: var(--teal-50); color: var(--teal); border-color: var(--teal-200); }
.chip-amber { background: var(--amber-50); color: var(--amber); border-color: var(--amber-200); }
.chip-red { background: var(--red-50); color: var(--red); border-color: var(--red-200); }
.chip-muted { background: var(--surface-3); color: var(--muted); border-color: var(--border); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; color: var(--ink-2); background: var(--surface-3); border: 1px solid var(--border); padding: 2px 9px; border-radius: 99px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.match { font-family: var(--font-display); font-weight: 700; color: var(--green-ink); font-size: 1.05rem; line-height: 1; }
.match-label { font-size: .58rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.tone-blue { background: var(--cobalt); } .tone-green { background: var(--green); } .tone-gold { background: var(--gold); }
.tone-purple { background: var(--violet); } .tone-red { background: var(--red); } .tone-amber { background: var(--amber); }
.tone-muted { background: var(--subtle); } .tone-coral { background: var(--coral); } .tone-teal { background: var(--teal); }

/* ── Lists ─────────────────────────────────────────────────────────────── */
.list-item { display: flex; align-items: center; gap: 14px; padding: 15px 22px; border-bottom: 1px solid var(--border-2); color: inherit; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, .list-item.hover:hover { background: var(--surface-2); text-decoration: none; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-size: .9rem; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.li-meta { font-size: .78rem; color: var(--muted); margin-top: 3px; }
.li-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.feed-item { display: flex; gap: 14px; padding: 12px 22px; }
.feed-dot-col { display: flex; flex-direction: column; align-items: center; padding-top: 5px; }
.feed-line { flex: 1; width: 1px; background: var(--border); margin-top: 4px; }
.feed-item:last-child .feed-line { display: none; }
.feed-text { font-size: .86rem; color: var(--ink-2); }
.feed-time { font-size: .72rem; color: var(--subtle); margin-top: 2px; }

/* ── Business cards (directory) ────────────────────────────────────────── */
.biz-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.biz-card:hover { border-color: var(--cobalt-200); box-shadow: var(--shadow); transform: translateY(-1px); }
.biz-card-top { display: flex; gap: 11px; align-items: flex-start; }
.biz-card-name { font-size: .9rem; font-weight: 700; color: var(--ink); display: block; line-height: 1.3; }
.biz-card-name:hover { color: var(--cobalt); }
.biz-card p { font-size: .76rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.3em; }
.biz-card-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border-2); }

/* ── Trust ring ────────────────────────────────────────────────────────── */
.ring { position: relative; display: inline-block; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-track { stroke: var(--gold-200); }
.ring .ring-fill { stroke: var(--gold); transition: stroke-dashoffset .8s ease; }
.ring.blue .ring-track { stroke: var(--cobalt-100); } .ring.blue .ring-fill { stroke: var(--cobalt); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font-family: var(--font-display); font-weight: 700; color: var(--gold-ink); line-height: 1; }
.ring-of { font-size: .6rem; color: var(--muted); margin-top: 2px; }
.factor { display: flex; align-items: center; gap: 10px; }
.factor-label { flex: 1; font-size: .74rem; color: var(--muted); }
.bar { flex: 1.2; height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: var(--cobalt); }
.bar.thick { height: 8px; }
.factor-val { font-size: .72rem; font-weight: 700; min-width: 34px; text-align: right; }
.hint-box { padding: 10px 12px; border-radius: 8px; background: var(--cobalt-50); border: 1px solid var(--cobalt-200); font-size: .76rem; color: var(--ink-2); }
.hint-box strong { color: var(--cobalt); }
.hint-box.gold { background: var(--gold-50); border-color: var(--gold-200); }
.hint-box.gold strong { color: var(--gold-ink); }
.hint-box.green { background: var(--green-50); border-color: var(--green-200); }
.hint-box.amber { background: var(--amber-50); border-color: var(--amber-200); }

/* ── Checklist ─────────────────────────────────────────────────────────── */
.check-row { display: flex; align-items: center; gap: 9px; font-size: .76rem; padding: 4px 0; }
.check { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.check.done { background: var(--green-50); color: var(--green-ink); border: 1px solid var(--green-200); }
.check.todo { background: var(--surface-2); color: var(--subtle); border: 1px solid var(--border); }
.check-label.done { color: var(--subtle); text-decoration: line-through; }
.check-action { margin-left: auto; font-size: .7rem; font-weight: 600; }
.progress { height: 6px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--cobalt), var(--green)); border-radius: 4px; }

/* ── Kanban ────────────────────────────────────────────────────────────── */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 320px; }
.kanban-hdr { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.kanban-name { font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kanban-items { padding: 9px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 60px; }
.kanban-items.drag-over { background: var(--cobalt-50); outline: 2px dashed var(--cobalt-200); outline-offset: -4px; border-radius: 8px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 11px; cursor: grab; transition: box-shadow .15s, border-color .15s; color: inherit; display: block; }
.kcard:hover { border-color: var(--cobalt-200); box-shadow: 0 2px 10px rgba(27, 79, 215, .08); text-decoration: none; }
.kcard.dragging { opacity: .5; }
.kcard-name { font-size: .8rem; font-weight: 600; color: var(--ink); }
.kcard-meta { font-size: .66rem; color: var(--muted); margin-top: 2px; }
.kcard-foot { display: flex; justify-content: space-between; margin-top: 7px; font-size: .64rem; color: var(--subtle); }
.mini-pipeline { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); overflow-x: auto; }
.mini-col { border-right: 1px solid var(--border); }
.mini-col:last-child { border-right: 0; }
.mini-col-hdr { padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); display: flex; justify-content: space-between; align-items: center; }
.mini-col-items { padding: 9px; display: flex; flex-direction: column; gap: 6px; min-height: 70px; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.label { font-size: .74rem; font-weight: 600; color: var(--ink-2); }
.label .opt { font-weight: 400; color: var(--subtle); }
.hint { font-size: .68rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  font-size: .84rem; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--subtle); }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--ring); }
.is-invalid { border-color: var(--red) !important; }
.field-error { font-size: .7rem; color: var(--red); font-weight: 500; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px; }
.checkbox { display: flex; gap: 9px; align-items: flex-start; font-size: .8rem; color: var(--ink-2); cursor: pointer; }
.checkbox input { margin-top: 3px; accent-color: var(--cobalt); width: 15px; height: 15px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.check-tile { display: flex; gap: 9px; align-items: center; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: .78rem; background: var(--surface); }
.check-tile:has(input:checked) { border-color: var(--cobalt); background: var(--cobalt-50); color: var(--cobalt); font-weight: 600; }
.check-tile input { accent-color: var(--cobalt); }
.input-group { display: flex; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.form-section { padding: 18px; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
.form-section:last-child { border-bottom: 0; }
.form-section h3 { margin-bottom: 3px; }
.form-section > .hint { margin-bottom: 14px; display: block; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; background: var(--surface-2); border-top: 1px solid var(--border); position: sticky; bottom: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.filters .input, .filters .select { width: auto; min-width: 150px; padding: 7px 11px; font-size: .78rem; }
.filters .input.grow { flex: 1; min-width: 220px; }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars input { display: none; }
.stars label { cursor: pointer; color: var(--border); font-size: 1.5rem; line-height: 1; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--gold); }
.star-display { color: var(--gold); letter-spacing: 1px; }

/* ── Tabs ──────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 14px; font-size: .8rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.active { color: var(--cobalt); border-bottom-color: var(--cobalt); }
.tab-count { font-size: .62rem; padding: 1px 6px; border-radius: 99px; background: var(--cobalt-50); color: var(--cobalt); border: 1px solid var(--cobalt-200); }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.table th { text-align: left; font-size: .64rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border-2); vertical-align: middle; color: var(--ink-2); }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--surface-2); }
.table .strong { font-weight: 600; color: var(--ink); }

/* ── Stats ─────────────────────────────────────────────────────────────── */
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; position: relative; overflow: hidden; }
.stat-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-value { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; color: var(--ink); line-height: 1.1; margin-top: 6px; }
.stat-delta { font-size: .76rem; font-weight: 600; margin-top: 3px; }
.stat-delta.up { color: var(--green-ink); } .stat-delta.down { color: var(--red); } .stat-delta.flat { color: var(--muted); }
.stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent, var(--cobalt)); }
.stat.blue { --accent: var(--cobalt); } .stat.green { --accent: var(--green); } .stat.gold { --accent: var(--gold); }
.stat.purple { --accent: var(--violet); } .stat.coral { --accent: var(--coral); } .stat.teal { --accent: var(--teal); } .stat.amber { --accent: var(--amber); } .stat.red { --accent: var(--red); }

/* ── Charts (server-rendered SVG) ──────────────────────────────────────── */
.chart { width: 100%; height: 190px; }
.chart .grid-line { stroke: var(--border-2); }
.chart .area { fill: var(--cobalt-50); }
.chart .line { fill: none; stroke: var(--cobalt); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.green { stroke: var(--green); }
.chart .bar-rect { fill: var(--cobalt); }
.chart text { fill: var(--muted); font-size: 10px; font-family: var(--font-ui); }
.hbar { display: flex; align-items: center; gap: 10px; font-size: .74rem; padding: 5px 0; }
.hbar-label { width: 40%; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { flex: 1; height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.hbar-track span { display: block; height: 100%; border-radius: 4px; }
.hbar-val { width: 36px; text-align: right; font-weight: 700; color: var(--ink); }
.funnel-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.funnel-bar { height: 28px; border-radius: 6px; display: flex; align-items: center; padding: 0 10px; color: #fff; font-size: .72rem; font-weight: 700; min-width: 36px; }

/* ── Alerts / flash ────────────────────────────────────────────────────── */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 9px; font-size: .8rem; border: 1px solid; margin-bottom: 14px; }
.alert-success { background: var(--green-50); border-color: var(--green-200); color: var(--green-ink); }
.alert-error { background: var(--red-50); border-color: var(--red-200); color: var(--red); }
.alert-info { background: var(--cobalt-50); border-color: var(--cobalt-200); color: var(--cobalt); }
.alert-warn { background: var(--amber-50); border-color: var(--amber-200); color: var(--amber); }
.alert .close { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; opacity: .7; }
.toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: var(--surface); padding: 10px 14px; border-radius: 9px; font-size: .8rem; box-shadow: var(--shadow-lg); animation: toast-in .25s ease; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

.empty { text-align: center; padding: 38px 20px; }
.empty-icon { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; background: var(--cobalt-50); color: var(--cobalt); }
.empty h3 { margin-bottom: 4px; }
.empty p { font-size: .8rem; color: var(--muted); max-width: 380px; margin: 0 auto 14px; }

/* ── Dropdown ──────────────────────────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 60; display: none; overflow: hidden; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu .list-item { padding: 10px 14px; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt); flex-shrink: 0; }

/* ── Modal (native <dialog>) ───────────────────────────────────────────── */
dialog.modal { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); margin: auto; }
dialog.modal::backdrop { background: rgba(10, 13, 31, .55); backdrop-filter: blur(2px); }
.modal-hdr { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 18px; max-height: 70vh; overflow-y: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }

/* ── Messages ──────────────────────────────────────────────────────────── */
.inbox { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - 150px); min-height: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.inbox-list { border-right: 1px solid var(--border); overflow-y: auto; }
.inbox-list .list-item.active { background: var(--cobalt-50); }
.thread { display: flex; flex-direction: column; min-height: 0; }
.thread-hdr { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.thread-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.bubble { max-width: 72%; padding: 9px 13px; border-radius: 14px; font-size: .82rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.bubble.theirs { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble.mine { background: var(--cobalt); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.bubble-meta { font-size: .6rem; opacity: .7; margin-top: 3px; }
.thread-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.thread-form .textarea { min-height: 44px; height: 44px; }

/* ── Calendar ──────────────────────────────────────────────────────────── */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px; text-align: center; border-bottom: 1px solid var(--border); }
.cal-cell { min-height: 92px; border-right: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2); padding: 6px; font-size: .7rem; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.other { background: var(--surface-2); color: var(--subtle); }
.cal-cell.today .cal-day { background: var(--cobalt); color: #fff; }
.cal-day { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 3px; }
.cal-ev { display: block; padding: 2px 6px; border-radius: 4px; font-size: .64rem; font-weight: 600; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--cobalt-50); color: var(--cobalt); }
.cal-ev.pending { background: var(--amber-50); color: var(--amber); }
.date-badge { min-width: 44px; text-align: center; background: var(--surface-3); border-radius: 8px; padding: 5px 4px; line-height: 1.2; font-size: .62rem; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.date-badge b { display: block; font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); }

/* ── Quick actions ─────────────────────────────────────────────────────── */
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 13px 17px; }
.qa { display: flex; flex-direction: column; gap: 5px; padding: 11px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); color: inherit; }
.qa:hover { border-color: var(--cobalt-200); background: var(--cobalt-50); text-decoration: none; }
.qa-icon { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; }
.qa-label { font-size: .76rem; font-weight: 700; color: var(--ink); }
.qa-desc { font-size: .66rem; color: var(--muted); line-height: 1.35; }
.ico-blue { background: var(--cobalt-50); color: var(--cobalt); } .ico-green { background: var(--green-50); color: var(--green-ink); }
.ico-gold { background: var(--gold-50); color: var(--gold-ink); } .ico-purple { background: var(--violet-50); color: var(--violet); }
.ico-coral { background: var(--coral-50); color: var(--coral); } .ico-teal { background: var(--teal-50); color: var(--teal); } .ico-amber { background: var(--amber-50); color: var(--amber); }

/* ── Perks / products / events tiles ───────────────────────────────────── */
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.tile:hover { box-shadow: var(--shadow); border-color: var(--cobalt-200); }
.tile-media { aspect-ratio: 16/10; background: var(--surface-3); display: flex; align-items: center; justify-content: center; color: var(--subtle); overflow: hidden; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; }
.tile-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile-title { font-size: .88rem; font-weight: 700; color: var(--ink); }
.tile-foot { padding: 11px 14px; border-top: 1px solid var(--border-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.code-box { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--surface-3); border: 1px dashed var(--border); padding: 6px 10px; border-radius: 6px; font-size: .8rem; letter-spacing: .05em; }

/* ── Feature teaser (coming soon) ──────────────────────────────────────── */
.teaser { text-align: center; padding: 70px 24px; background: radial-gradient(circle at 50% 0%, var(--cobalt-50), transparent 60%), var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.teaser .empty-icon { width: 68px; height: 68px; border-radius: 18px; }

/* ── Auth & public layouts ─────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-side { background: #0A0D1F; color: #fff; padding: 40px 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-side::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(27, 79, 215, .55), transparent 50%), radial-gradient(circle at 85% 80%, rgba(46, 194, 126, .28), transparent 45%); }
.auth-side > * { position: relative; }
.auth-side h2 { color: #fff; font-size: 2.1rem; line-height: 1.15; margin-top: auto; }
.auth-side h2 span { color: var(--green); }
.auth-side p { color: rgba(255, 255, 255, .72); margin-top: 12px; max-width: 420px; }
.auth-points { margin-top: 26px; display: grid; gap: 12px; }
.auth-point { display: flex; gap: 11px; align-items: center; font-size: .86rem; color: rgba(255, 255, 255, .88); }
.auth-point .ico { width: 30px; height: 30px; border-radius: 8px; background: rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center; color: var(--green); }
.auth-main { display: flex; flex-direction: column; padding: 28px 40px; background: var(--surface); }
.auth-main-top { display: flex; justify-content: space-between; align-items: center; }
.auth-card { width: 100%; max-width: 440px; margin: auto; padding: 30px 0; }
.auth-card.wide { max-width: 720px; }
.auth-card h1 { font-size: 1.7rem; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 22px; font-size: .88rem; }
.auth-card form .field + .field { margin-top: 13px; }
.divider { display: flex; align-items: center; gap: 12px; font-size: .7rem; color: var(--subtle); margin: 18px 0; text-transform: uppercase; letter-spacing: .1em; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.otp { font-family: var(--font-display); letter-spacing: .5em; text-align: center; font-size: 1.4rem !important; }

.pub-nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.pub-nav-inner { max-width: 1180px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 18px; }
.pub-links { display: flex; gap: 22px; margin-left: 24px; }
.pub-links a { color: var(--ink-2); font-size: .84rem; font-weight: 500; }
.pub-section { max-width: 1180px; margin: 0 auto; padding: 64px 24px; }
.hero { text-align: center; padding: 84px 24px 56px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -40% -10% auto; height: 520px; background: radial-gradient(ellipse at center, var(--cobalt-50), transparent 65%); z-index: -1; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; max-width: 820px; margin: 18px auto 0; }
.hero h1 .hl { color: var(--cobalt); text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 4px; text-underline-offset: 6px; }
.hero h1 .soft { color: var(--muted); font-weight: 500; }
.hero p { max-width: 600px; margin: 18px auto 0; font-size: 1.02rem; color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 700; padding: 5px 12px; border-radius: 99px; background: var(--green-50); color: var(--green-ink); border: 1px solid var(--green-200); }
.section-label { font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--cobalt); }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.feature-card h3 { margin: 12px 0 6px; }
.feature-card p { font-size: .84rem; color: var(--muted); }
.pub-footer { border-top: 1px solid var(--border); background: var(--surface); }
.pub-footer-inner { max-width: 1180px; margin: 0 auto; padding: 32px 24px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }

/* ── Admin ─────────────────────────────────────────────────────────────── */
.admin .sidebar { background: #0A0D1F; border-right-color: #1A2242; }
.admin .sidebar .nav-item { color: #8C96B5; }
.admin .sidebar .nav-item:hover { background: #141A33; color: #fff; }
.admin .sidebar .nav-item.active { background: rgba(76, 123, 255, .16); color: #fff; }
.admin .sidebar .nav-label { color: #5F6A8C; }
.admin .sidebar-top, .admin .sidebar-bottom { border-color: #1A2242; }
.admin .sidebar .brand-logo { color: #fff; }
.admin .sidebar .sb-name { color: #fff; }
.admin .sidebar .sb-user:hover { background: #141A33; }
.admin-tag { font-size: .58rem; font-weight: 800; letter-spacing: .14em; color: var(--green); border: 1px solid rgba(46, 194, 126, .4); padding: 2px 7px; border-radius: 99px; }
.doc-frame { width: 100%; height: 560px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.flag-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px 170px; gap: 14px; align-items: center; padding: 13px 17px; border-bottom: 1px solid var(--border-2); }
.flag-row:last-child { border-bottom: 0; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg label { padding: 6px 10px; font-size: .72rem; font-weight: 600; cursor: pointer; color: var(--muted); border-right: 1px solid var(--border); }
.seg label:last-child { border-right: 0; }
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--cobalt); color: #fff; }
.seg label.s-soon:has(input:checked) { background: var(--amber); }
.seg label.s-off:has(input:checked) { background: var(--subtle); }

/* ── Pagination ────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--border); font-size: .78rem; font-weight: 600; color: var(--ink-2); background: var(--surface); }
.pagination .current { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.pagination a:hover { border-color: var(--cobalt-200); text-decoration: none; }

/* ── Loader ────────────────────────────────────────────────────────────── */
.page-loader { position: fixed; inset: 0; background: var(--surface); display: flex; align-items: center; justify-content: center; z-index: 999; opacity: 0; pointer-events: none; animation: loader-in .2s ease .45s forwards; }
@keyframes loader-in { to { opacity: 1; pointer-events: auto; } }
.page-loader.done { animation: none; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.page-loader img { width: 52px; height: 52px; border-radius: 13px; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.08) rotate(6deg); } }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dash-trust { grid-column: span 2; grid-row: auto; }
  .dash-grid .col-right { grid-column: span 2; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-stats { grid-template-columns: repeat(3, 1fr); }
  .pstat:nth-child(3) { border-right: 0; }
  .pstat:nth-child(-n+3) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(10, 13, 31, .45); z-index: 35; }
  .mobile-only { display: inline-flex !important; }
  .split, .split-wide { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .search-box { display: none; }
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox.has-thread .inbox-list { display: none; }
  .inbox:not(.has-thread) .thread { display: none; }
  .flag-row { grid-template-columns: 1fr; }
  .pub-links { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 13.5px; }
  .content { padding: 16px 16px 40px; }
  .topbar { padding: 10px 16px; }
  .topbar .hide-sm { display: none; }
  .dash-grid, .grid-2, .grid-3, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-grid .col-right { grid-template-columns: minmax(0, 1fr); grid-column: auto; }
  .col-span-2, .dash-trust { grid-column: auto; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-meta { padding: 0 16px 14px; }
  .profile-actions { margin-left: 0; width: 100%; }
  .auth-main { padding: 20px 16px; }
  .cal-cell { min-height: 58px; padding: 3px; }
  .cal-ev { font-size: 0; padding: 0; height: 6px; width: 6px; border-radius: 50%; display: inline-block; background: var(--cobalt); }
  .dropdown-menu { width: calc(100vw - 32px); right: -60px; }
  .bubble { max-width: 88%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── Calm dashboard & shared page components (v2) ─────────────────────── */
.notice { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); margin-bottom: 20px; }
.notice-blue { background: var(--cobalt-50); border-color: var(--cobalt-200); }
.notice-setup { background: linear-gradient(90deg, var(--cobalt-50), var(--surface) 70%); border-color: var(--cobalt-200); }
.notice-icon { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--cobalt); flex-shrink: 0; }
.notice > div:nth-child(2) { flex: 1; min-width: 200px; }
.tag-link { color: var(--cobalt); background: var(--surface); border-color: var(--cobalt-200); font-weight: 600; padding: 4px 11px; }
.tag-link:hover { background: var(--cobalt-50); text-decoration: none; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.kpi { display: flex; gap: 16px; align-items: flex-start; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.kpi:hover { text-decoration: none; border-color: var(--cobalt-200); box-shadow: var(--shadow); transform: translateY(-1px); }
.kpi-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kpi-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi-value { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; line-height: 1.15; color: var(--ink); margin-top: 2px; }
.kpi-of { font-size: .9rem; color: var(--subtle); font-weight: 500; margin-left: 2px; }
.kpi-sub { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.dash-main { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.dash-col > .card + .card { margin-top: 0; }
.li-reason { font-size: .76rem; color: var(--green-ink); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.match-pill { text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--green-ink); line-height: 1; padding: 0 6px; }
.match-pill span { display: block; font-family: var(--font-ui); font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 3px; }
.stack-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 3px; }
.stack-bar span { display: block; min-width: 8px; }
.stage-legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.stage-legend a { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.stage-legend a:hover { text-decoration: none; background: var(--cobalt-50); }
.stage-legend a .dot { margin-bottom: 2px; }
.stage-legend strong { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); }
.trust-mini { display: flex; gap: 20px; align-items: center; }
.fund-teaser { display: flex; gap: 14px; align-items: center; padding: 20px 22px; color: inherit; background: linear-gradient(135deg, var(--gold-50), var(--surface)); border-color: var(--gold-200); }
.fund-teaser:hover { text-decoration: none; box-shadow: var(--shadow); }
.fund-teaser > div { flex: 1; }

/* Section navigation with active state (profile editor etc.) */
.section-nav { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 4px; }
.section-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .88rem; }
.section-nav a:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.section-nav a.active { background: var(--cobalt-50); color: var(--cobalt); box-shadow: inset 3px 0 0 var(--cobalt); }
.section-nav .nav-progress { padding: 16px 14px; margin-top: 10px; border-top: 1px solid var(--border); }
.form-section { scroll-margin-top: 96px; padding: 26px 26px 28px; }
.form-section h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.form-section > .hint { margin-bottom: 18px; font-size: .8rem; }
.form-grid { gap: 18px 20px; }
.label { font-size: .82rem; }
.hint { font-size: .74rem; }
.input, .select, .textarea { padding: 11px 14px; font-size: .9rem; border-radius: 10px; }
.flash-target { animation: flash-target 1.8s ease; }
@keyframes flash-target { 0%, 30% { box-shadow: 0 0 0 3px var(--cobalt-200); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Profile page tabs */
.profile-tabs { display: flex; gap: 4px; padding: 0 26px; border-top: 1px solid var(--border-2); overflow-x: auto; }
.profile-tabs .tab { padding: 14px 16px; font-size: .88rem; }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.info-list { display: flex; flex-direction: column; gap: 14px; }
.info-row { display: flex; gap: 12px; align-items: flex-start; font-size: .88rem; }
.info-row .qa-icon { width: 34px; height: 34px; border-radius: 10px; }
.info-row .info-label { font-size: .74rem; color: var(--muted); }
.prose p { font-size: .95rem; line-height: 1.75; }
.public-banner { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 12px; background: var(--cobalt-50); border: 1px solid var(--cobalt-200); color: var(--ink-2); margin: 20px 0; font-size: .88rem; flex-wrap: wrap; }

@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .kpis { gap: 12px; }
  .kpi { padding: 16px; flex-direction: column; gap: 10px; }
  .kpi-value { font-size: 1.5rem; }
  .stage-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 22px 16px 48px; }
  .form-section { padding: 20px 18px; }
  .section-nav { display: none; }
}
[hidden] { display: none !important; }
:is(.split, .split-wide, .grid, .about-grid, .kpis, .dash-main) > .card { margin-top: 0; }
.ring { flex-shrink: 0; }
/* Auth pages: one logo — the side panel carries it on desktop; the top logo only appears on mobile. */
@media (min-width: 961px) { .auth-main-top .brand-logo { visibility: hidden; } }
/* Vendor logos sit on white in both themes so brand colours stay true. */
.perk-logo { background: #fff; border: 1px solid var(--border); padding: 5px; }
.perk-logo img { object-fit: contain; }
