@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,450;0,9..144,550;0,9..144,600;0,9..144,700;1,9..144,450;1,9..144,600&family=Inter:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@500;600;700&family=Rozha+One&display=swap');

:root {
  /* brand: deep navy + warm terracotta-orange, in place of the old maroon/gold pass */
  --maroon: #101828;
  --maroon-dark: #0b1220;
  --maroon-light: #33415c;
  --gold: #b47c43;
  --gold-dark: #986a37;
  --gold-light: #f5ede1;
  --navy: var(--maroon);
  --navy-dark: var(--maroon-dark);
  --navy-light: var(--maroon-light);
  --orange: var(--gold);
  --orange-dark: var(--gold-dark);
  --orange-light: var(--gold-light);
  --ivory: #faf7f2;
  --surface: #ffffff;
  --ink: #191c2b;
  --muted: #726f80;
  --border: #e7e3db;
  --success: #2f7a55;
  --success-bg: #e7f4ec;
  --danger: #b23a2e;
  --danger-bg: #fbebe9;
  --font-devanagari: 'Noto Sans Devanagari', var(--font-body);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(32, 26, 24, 0.07);
  --shadow-md: 0 10px 30px -10px rgba(32, 26, 24, 0.18), 0 2px 8px rgba(32, 26, 24, 0.06);
  --shadow-lg: 0 24px 60px -16px rgba(32, 26, 24, 0.28);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------------- Layered design tokens (semantic + scales) -----------------
 * Kept additive: legacy variables above still exist for all older components.
 * New components should reference these semantic tokens so a theme swap is a
 * one-file change later.
 * ---------------------------------------------------------------------------*/
:root {
  /* Neutral ramp */
  --ink-2: #2a2c3d;
  --muted-2: #55536a;
  --faint: #b4b0a8;
  --border-strong: #d8d0bf;
  --surface-2: #fbf8f2;

  /* Brand ramps */
  --navy-900: #0b1220;
  --navy-800: #101828;
  --navy-700: #172033;
  --navy-600: #1d2939;
  --navy-500: #33415c;
  --navy-tint: #eef1f6;

  --gold-700: #7d5a2f;
  --gold-600: #986a37;
  --gold-500: #b47c43;
  --gold-400: #c99f66;
  --gold-300: #ddc79c;
  --gold-tint: #f5ede1;

  /* Semantic aliases */
  --color-primary: var(--navy-700);
  --color-primary-hover: var(--navy-600);
  --color-accent: var(--gold-500);
  --color-accent-hover: var(--gold-600);
  --color-success: var(--success);
  --color-danger: var(--danger);
  --bg-app: var(--ivory);
  --bg-card: var(--surface);
  --text-strong: var(--ink);
  --text-body: var(--ink-2);
  --text-muted: var(--muted);

  /* Focus ring — visible, brand-tinted, never harsh */
  --color-focus-ring: rgba(180, 124, 67, 0.3);
  --focus-ring: 0 0 0 3px var(--color-focus-ring);

  /* Elevation (soft, cool-tinted) */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);

  /* Radius + spacing scale */
  --radius-xs: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 56px;

  /* Type scale */
  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-16: 16px;
  --fs-18: 18px; --fs-20: 20px; --fs-24: 24px; --fs-30: 30px; --fs-38: 38px; --fs-48: 48px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 320ms;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
::selection { background: var(--gold); color: white; }

/* Tabular numbers everywhere they belong: stats, prices, counts. */
.tnum, .stat-value, .kpi-value, .earn-stat-value, .pt-value, .pcard-name .badge,
.count-badge, .n, .call-number, td.ta-r {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "cv11" 1;
}

/* Consistent, visible focus ring — respects reduced motion. */
:where(a, button, [role="button"], input, select, textarea, summary):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-xs);
}

/* Keyboard-only skip link — first Tab lands here. */
.skip-to-content {
  position: absolute; top: 8px; left: 8px;
  background: var(--color-primary); color: #fff;
  padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 0.85rem;
  transform: translateY(-200%); transition: transform var(--dur) var(--ease-out); z-index: 9999;
}
.skip-to-content:focus { transform: translateY(0); }

/* Reduced-motion respects users' preference — kill non-essential animation. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ----------------------------- Toast component ---------------------------- */
#mb-toast-host {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 4000; pointer-events: none;
}
.mb-toast {
  pointer-events: auto; cursor: pointer;
  background: var(--navy-800, #101828); color: #fff;
  padding: 11px 18px; border-radius: 999px; font-size: 0.88rem; font-weight: 600;
  box-shadow: 0 20px 40px -20px rgba(16, 24, 40, 0.5), 0 4px 12px rgba(16, 24, 40, 0.15);
  opacity: 0; transform: translateY(12px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  max-width: 92vw;
}
.mb-toast.show { opacity: 1; transform: translateY(0); }
.mb-toast-success { background: var(--color-success); }
.mb-toast-error { background: var(--color-danger); }

/* Action row inside settings accordions — space above (separator from the last
   input), room below (so the CTA doesn't crash into the accordion edge). */
.settings-actions {
  margin-top: 24px;
  padding-top: 20px;
  padding-bottom: 4px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.settings-actions .btn { min-width: 160px; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }

a { color: var(--maroon); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 460px; margin: 0 auto; padding: 0 24px; }

/* ---------- Top nav (public site) ---------- */
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; background: rgba(16, 24, 40, 0.92); color: white;
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topnav .brand {
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: white;
  text-decoration: none; letter-spacing: -0.01em;
}
.topnav .brand span { color: var(--gold); }
.topnav .links { display: flex; align-items: center; }
.topnav .links a {
  color: rgba(255,255,255,0.82); text-decoration: none; margin-left: 26px; font-size: 0.88rem;
  font-weight: 500; letter-spacing: 0.01em; transition: color 0.2s ease;
}
.topnav .links a:hover { color: white; }
.topnav .links a.btn-outline {
  border: 1px solid rgba(255,255,255,0.4); padding: 8px 18px; border-radius: 999px;
  transition: all 0.2s ease;
}
.topnav .links a.btn-outline:hover { border-color: var(--gold); background: rgba(180, 124, 67,0.12); color: white; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 24px; border-radius: 999px; border: none;
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-light) 100%);
  color: white; font-weight: 600; cursor: pointer;
  font-family: var(--font-body); font-size: 0.92rem; letter-spacing: 0.01em;
  text-decoration: none; text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn.secondary { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%); color: white; }
.btn.outline { background: transparent; border: 1.5px solid var(--maroon); color: var(--maroon); box-shadow: none; }
.btn.outline:hover { background: rgba(107, 23, 48, 0.06); }
.btn.danger { background: linear-gradient(135deg, var(--danger) 0%, #8f2a21 100%); }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.small { padding: 7px 16px; font-size: 0.82rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
  color: white; padding: 56px 24px 0; text-align: left;
}
.hero-art { position: absolute; inset: 0; z-index: 0; opacity: 0.9; }
.hero-inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; text-align: center; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 30px; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.22);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.92); backdrop-filter: blur(6px);
}
.badge-pill svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--gold); }
.badge-pill .deva { color: var(--gold); font-family: var(--font-devanagari); font-weight: 700; text-transform: none; letter-spacing: 0; font-size: 0.85rem; }

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem); margin: 0 0 20px; font-weight: 600; line-height: 1.1;
  max-width: 760px; margin-left: auto; margin-right: auto;
}
.hero h1 em {
  font-style: italic; font-weight: 450; color: var(--gold); display: block; margin-top: 4px;
}
.hero p.tagline {
  font-size: 1.12rem; color: rgba(255,255,255,0.75); margin: 0 auto 34px; max-width: 560px;
  font-weight: 400;
}
.hero .cta { margin-top: 4px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .cta .btn.outline { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.5); color: white; }
.hero .cta .btn.outline:hover { background: rgba(255,255,255,0.12); }

.stat-bar {
  position: relative; z-index: 1; max-width: 900px; margin: 56px auto 0;
  border-top: 1px solid rgba(255,255,255,0.15); padding: 28px 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; text-align: center;
}
.stat-bar .stat-num {
  font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.9rem; color: white;
  display: block;
}
.stat-bar .stat-label {
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.55);
  margin-top: 4px; display: block;
}

.hero-divider { display: block; width: 100%; height: 56px; margin-top: 24px; position: relative; z-index: 1; }
.hero-divider path { fill: var(--ivory); }

/* ---------- Icon tiles (dark tile + badge overlay) ---------- */
.icon-tile {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 100%);
  display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0;
  box-shadow: var(--shadow-sm); position: relative;
}
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile.sm { width: 44px; height: 44px; border-radius: 12px; }
.icon-tile.sm svg { width: 20px; height: 20px; }
.icon-tile .badge-dot {
  position: absolute; bottom: -8px; right: -8px; width: 30px; height: 30px; border-radius: 10px;
  background: linear-gradient(150deg, var(--gold) 0%, var(--gold-dark) 100%);
  display: flex; align-items: center; justify-content: center; color: white;
  box-shadow: var(--shadow-sm); border: 2px solid var(--ivory);
}
.icon-tile .badge-dot svg { width: 14px; height: 14px; }

.accent-italic { font-family: var(--font-display); font-style: italic; font-weight: 450; color: var(--gold); }
.deva-label {
  font-family: var(--font-devanagari); font-weight: 600; color: var(--gold-dark); letter-spacing: 0.02em;
}

/* ---------- Promise feature block ---------- */
.promise-block {
  display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: center;
  max-width: 980px; margin: 0 auto;
}
.promise-visual {
  width: 100%; aspect-ratio: 1; border-radius: 28px;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 100%);
  display: flex; align-items: center; justify-content: center; position: relative;
  box-shadow: var(--shadow-lg);
}
.promise-visual svg.main-icon { width: 34%; height: 34%; color: rgba(255,255,255,0.55); }
.promise-visual .badge-dot {
  position: absolute; bottom: -14px; right: -14px; width: 60px; height: 60px; border-radius: 18px;
  background: linear-gradient(150deg, var(--gold) 0%, var(--gold-dark) 100%);
  display: flex; align-items: center; justify-content: center; color: white;
  box-shadow: var(--shadow-md); border: 4px solid var(--ivory);
}
.promise-visual .badge-dot svg { width: 26px; height: 26px; }
.promise-copy h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 10px 0 16px; }
.promise-copy p { color: var(--muted); font-size: 1rem; max-width: 520px; }
.promise-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.promise-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px;
  background: var(--gold-light); color: var(--navy); font-size: 0.83rem; font-weight: 600;
}
.promise-chip svg { width: 15px; height: 15px; color: var(--gold-dark); }

@media (max-width: 720px) {
  .promise-block { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .promise-visual { max-width: 220px; margin: 0 auto; }
  .promise-copy p { margin-left: auto; margin-right: auto; }
  .promise-chips { justify-content: center; }
}

/* ---------- Heritage / region cards ---------- */
.heritage-wrap { position: relative; }
.region-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; max-width: 1000px; margin: 0 auto; }
.region-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 32px;
  box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.region-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.region-card .region-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.region-card .deva-label { display: block; font-size: 0.85rem; margin-bottom: 2px; }

@media (max-width: 400px) {
  .region-grid { grid-template-columns: 1fr; }
}
.region-card h3 { font-size: 1.5rem; font-style: italic; font-weight: 500; margin: 0; }
.region-card p { color: var(--muted); font-size: 0.94rem; }
.region-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.region-chip {
  background: var(--gold-light); color: var(--navy-dark); font-size: 0.79rem; font-weight: 600;
  padding: 6px 13px; border-radius: 999px;
}
.region-card.kumaon .region-chip { background: #e6e9f7; color: var(--navy); }
.region-caption { font-style: italic; font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; }

/* ---------- Process grid (numbered cards) ---------- */
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.process-card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.process-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.process-card.featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow-sm); }
.process-card .ghost-num {
  position: absolute; top: 12px; right: 20px; font-family: var(--font-display); font-style: italic;
  font-size: 2.6rem; color: var(--border); font-weight: 500; line-height: 1;
}
.process-card h3 { font-size: 1.05rem; margin: 16px 0 8px; font-family: var(--font-body); font-weight: 700; }
.process-card p { color: var(--muted); font-size: 0.9rem; margin: 0; }

@media (max-width: 400px) {
  .process-grid { grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
section.page-section { padding: 72px 24px; }
section.page-section.alt { background: var(--surface); }
.section-eyebrow {
  display: block; text-align: center; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold-dark); margin-bottom: 10px;
}
h2.section-title {
  text-align: center; font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 42px; color: var(--ink);
  font-weight: 600;
}
.steps { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; max-width: 900px; margin: 0 auto; }
.step { flex: 1; min-width: 220px; max-width: 280px; text-align: center; }
.step .num {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%); color: var(--maroon-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 14px;
  font-family: var(--font-display); font-size: 1.1rem; box-shadow: var(--shadow-sm);
}
.step strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.step p { color: var(--muted); font-size: 0.92rem; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.grid-3 .card:hover, .table-wrap:hover { box-shadow: var(--shadow-sm); }
.grid-3 .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--gold-light);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px; color: var(--maroon);
}
.card .icon svg { width: 22px; height: 22px; }
.card h3 { font-family: var(--font-display); font-size: 1.12rem; margin: 0 0 8px; font-weight: 600; }
.card p { color: var(--muted); margin: 0; font-size: 0.93rem; }

.testimonial { font-style: normal; color: var(--ink); font-size: 0.96rem; position: relative; }
.testimonial::before {
  content: '"'; font-family: var(--font-display); font-size: 2.6rem; color: var(--gold); line-height: 0;
  display: block; margin-bottom: 6px;
}
.testimonial .who { font-style: normal; font-weight: 600; color: var(--maroon); margin-top: 14px; font-size: 0.88rem; }

.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; max-width: 700px; margin: 0 auto; }
.faq-item summary {
  cursor: pointer; font-weight: 600; font-family: var(--font-display); font-size: 1.02rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-family: var(--font-body); font-weight: 400; font-size: 1.3rem; color: var(--gold-dark);
  margin-left: 12px; transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--muted); margin-top: 12px; font-size: 0.93rem; }

footer.site-footer {
  background: linear-gradient(180deg, var(--navy-dark) 0%, #080c26 100%);
  color: rgba(255,255,255,0.6); padding: 56px 24px 0; font-size: 0.86rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px;
}
.footer-brand .brand-lockup {
  display: flex; align-items: center; gap: 10px; font-family: var(--font-display);
  font-size: 1.25rem; color: white; margin-bottom: 14px;
}
.footer-brand .brand-lockup em { font-style: italic; font-weight: 450; color: var(--gold); }
.footer-brand .mark {
  width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center;
  color: var(--gold); flex-shrink: 0;
}
.footer-brand .mark svg { width: 18px; height: 18px; }
.footer-brand p { max-width: 320px; line-height: 1.6; margin: 0 0 14px; }
.footer-brand .deva-label { color: var(--gold); opacity: 0.85; }
.footer-col h5 {
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.45); margin: 4px 0 16px;
}
.footer-col a {
  display: block; color: rgba(255,255,255,0.8); text-decoration: none; padding: 5px 0;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--gold); }
.footer-bar {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0 24px; font-size: 0.8rem;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Motion: hero stars + scroll reveal ---------- */
.hero-art .stars circle { animation: twinkle 4s ease-in-out infinite; }
.hero-art .stars circle:nth-child(3n) { animation-delay: 1.3s; }
.hero-art .stars circle:nth-child(3n+1) { animation-delay: 2.6s; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

.hero-inner { animation: heroIn 0.9s ease both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art .stars circle { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-inner { animation: none; }
}

/* ---------- Doc pages (About / Privacy / Terms) ---------- */
.doc-page { max-width: 720px; margin: 0 auto; padding: 56px 24px 80px; }
.doc-page h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 8px; }
.doc-page .doc-updated { color: var(--muted); font-size: 0.83rem; margin-bottom: 36px; display: block; }
.doc-page h2 { font-size: 1.15rem; margin: 34px 0 10px; color: var(--navy); }
.doc-page p, .doc-page li { color: #4b4756; font-size: 0.95rem; line-height: 1.75; }
.doc-page ul { padding-left: 22px; }
.doc-page li { margin-bottom: 6px; }
.doc-page .doc-note {
  background: var(--gold-light); border-radius: var(--radius-sm); padding: 14px 18px;
  font-size: 0.87rem; color: var(--maroon-dark); margin-top: 36px;
}

/* ---------- Forms / auth ---------- */
.auth-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); padding: 34px; margin: 56px auto;
}
.auth-card h2 { font-size: 1.4rem; }
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tabs button {
  flex: 1; background: none; border: none; padding: 12px 6px; font-weight: 600; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; font-size: 0.88rem; font-family: var(--font-body);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.tabs button.active { color: var(--maroon); border-bottom-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

label { display: block; font-weight: 600; font-size: 0.82rem; margin: 16px 0 6px; color: var(--ink); }
input, select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.94rem; font-family: inherit; background: var(--surface); color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder, textarea::placeholder { color: #b3a89d; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(180, 124, 67,0.22);
}
.checkbox-row { display: flex; align-items: center; gap: 9px; margin: 14px 0; }
.checkbox-row input { width: auto; flex-shrink: 0; accent-color: var(--maroon); }
/* Long, wrapping consent/declaration labels read better top-aligned. */
.checkbox-row.consent-row { align-items: flex-start; }
.checkbox-row.consent-row input { margin-top: 3px; }
.checkbox-row label { margin: 0; font-weight: 400; }
.check-group { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.check-chip {
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px; font-size: 0.85rem;
  cursor: pointer; user-select: none; transition: all 0.15s ease; background: var(--surface);
}
.check-chip:hover { border-color: var(--gold); }
.check-chip.selected { background: var(--maroon); color: white; border-color: var(--maroon); }

.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 0.87rem; margin: 14px 0; }
.alert.error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f1c6c3; }
.alert.success { background: var(--success-bg); color: var(--success); border: 1px solid #bfe3cd; }
.alert.info { background: var(--gold-light); color: var(--maroon-dark); border: 1px solid var(--gold); }

.helper { font-size: 0.79rem; color: var(--muted); margin-top: 5px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.verified { background: var(--success-bg); color: var(--success); }
.badge.active { background: var(--success-bg); color: var(--success); }
.badge.deactivated, .badge.revoked { background: var(--danger-bg); color: var(--danger); }
.badge.matched { background: var(--gold-light); color: var(--maroon-dark); }
.badge.pending { background: #fdf1d6; color: #93650a; }
.badge.calculated { background: #f0eef5; color: #6b6280; }
.badge.ready_to_pay { background: #e3eef9; color: #2563a0; }
.badge.processing { background: #ede3f9; color: #6e3fa5; }
.badge.paid { background: var(--success-bg); color: var(--success); }
.badge.failed { background: var(--danger-bg); color: var(--danger); }
.badge.on_hold { background: #fef0e0; color: #a06420; }
.badge.cancelled { background: #f0eeec; color: #807870; }
.badge.not_submitted { background: #f0eeec; color: #807870; }
.badge.pending_verification { background: #fdf1d6; color: #93650a; }
.badge.rejected { background: var(--danger-bg); color: var(--danger); }

/* ---- Earning tabs (quick filter pills) ---- */
.earn-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.earn-tabs::-webkit-scrollbar { display: none; }
.earn-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); cursor: pointer;
  white-space: nowrap; transition: all 0.15s ease; flex-shrink: 0;
}
.earn-tab:hover { border-color: var(--border-strong); background: var(--surface-2); }
.earn-tab.active { background: var(--navy); border-color: var(--navy); color: white; }
.earn-tab .tab-count {
  background: rgba(0,0,0,0.08); border-radius: 999px; padding: 1px 7px;
  font-size: 0.72rem; font-weight: 700; min-width: 20px; text-align: center;
}
.earn-tab.active .tab-count { background: rgba(255,255,255,0.2); }

/* ---- Earn summary grid ---- */
.earn-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin: 16px 0 20px;
}
.earn-stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
}
.earn-stat-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.earn-stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--navy); line-height: 1; }
.earn-stat-value.success { color: var(--success); }
.earn-stat-value.danger { color: var(--danger); }
.earn-stat-value.warn { color: #93650a; }

/* ---- Formula breakdown row ---- */
.formula-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px dashed var(--border);
  font-size: 0.86rem; color: var(--ink);
}
.formula-row:last-child { border-bottom: none; }
.formula-label { color: var(--ink-soft); }
.formula-calc { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.formula-amount { font-weight: 700; font-family: var(--font-display); white-space: nowrap; }
.formula-amount.total { font-size: 1.05rem; color: var(--navy); }
.formula-amount.deduction { color: var(--danger); }
.formula-amount.bonus { color: var(--success); }

/* ---- Detail drawer (wider variant for payments) ---- */
.detail-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 540px; max-width: 95vw; z-index: 56;
  background: var(--surface); box-shadow: -20px 0 60px -20px rgba(32,26,24,0.35);
  transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.3, 0.9, 0.3, 1);
  display: flex; flex-direction: column;
}
.detail-drawer.open { transform: translateX(0); }
.detail-drawer .drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.detail-drawer .drawer-head h3 { margin: 0; font-size: 1.08rem; }
.detail-drawer .drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 32px; }
.detail-drawer .drawer-section { margin-bottom: 24px; }
.detail-drawer .drawer-section h4 { font-size: 0.88rem; font-weight: 700; color: var(--ink); margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.detail-drawer .drawer-foot { flex-shrink: 0; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--ivory); display: flex; gap: 10px; flex-wrap: wrap; }
.detail-drawer .drawer-foot .btn { flex: 1; min-width: 120px; }

/* ---- Search + sort bar ---- */
.earn-toolbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
}
.earn-toolbar .search-input {
  flex: 1; min-width: 200px; padding: 9px 14px 9px 36px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.85rem; background: var(--surface);
  font-family: var(--font-body); color: var(--ink);
}
.earn-toolbar .search-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(44,42,79,0.08); }
.earn-toolbar .search-wrap { position: relative; flex: 1; min-width: 200px; }
.earn-toolbar .search-wrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.earn-toolbar select {
  padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.82rem; background: var(--surface); color: var(--ink); font-family: var(--font-body);
  cursor: pointer;
}
.earn-toolbar select:focus { outline: none; border-color: var(--navy); }

/* ---- Bank detail card ---- */
.bank-card {
  background: var(--ivory); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px;
}
.bank-card .bank-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.84rem; }
.bank-card .bank-row .bank-label { color: var(--muted); font-weight: 500; }
.bank-card .bank-row .bank-value { color: var(--ink); font-weight: 600; text-align: right; }

/* ---- Audit trail ---- */
.audit-trail { display: flex; flex-direction: column; gap: 8px; }
.audit-entry {
  display: flex; gap: 10px; padding: 8px 12px; background: var(--surface-2);
  border-radius: var(--radius-sm); font-size: 0.8rem;
}
.audit-entry .audit-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; margin-top: 5px; }
.audit-entry .audit-body { flex: 1; min-width: 0; }
.audit-entry .audit-action { font-weight: 600; color: var(--ink); }
.audit-entry .audit-meta { color: var(--muted); font-size: 0.74rem; margin-top: 2px; }

/* ---- Payment confirm modal ---- */
.pay-confirm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.pay-confirm-item { display: flex; flex-direction: column; gap: 2px; }
.pay-confirm-item .pc-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }
.pay-confirm-item .pc-value { font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.pay-confirm-item.full { grid-column: 1 / -1; }
.pay-total { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--navy); color: white; border-radius: var(--radius-sm); margin: 16px 0; }
.pay-total .pt-label { font-size: 0.82rem; font-weight: 500; opacity: 0.8; }
.pay-total .pt-amount { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }

@media (max-width: 700px) {
  .detail-drawer { width: 100%; max-width: 100vw; }
  .earn-summary { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .pay-confirm-grid { grid-template-columns: 1fr; }
}

/* ---------- App shell (agent/member/admin) ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-nav {
  width: 240px; background: linear-gradient(190deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  color: white; padding: 22px 0; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.app-nav .brand {
  display: flex; align-items: center; gap: 10px; padding: 0 20px 20px; font-family: var(--font-display);
  font-weight: 600; font-size: 1.08rem; color: white; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.12); margin-bottom: 10px;
}
.app-nav .brand .mark {
  width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.app-nav .brand .mark svg { width: 15px; height: 15px; color: var(--gold); }
.app-nav .nav-scroll { flex: 1; padding-top: 4px; }
.app-nav button.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: none;
  color: rgba(255,255,255,0.75); padding: 11px 20px; cursor: pointer; font-size: 0.87rem; font-family: var(--font-body);
  border-left: 3px solid transparent; transition: all 0.15s ease;
}
.app-nav button.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.85; }
.app-nav button.nav-item:hover { color: white; background: rgba(255,255,255,0.05); }
.app-nav button.nav-item.active {
  background: rgba(255,255,255,0.1); color: white; font-weight: 600; border-left: 3px solid var(--gold);
}
.app-nav button.nav-item.active svg { opacity: 1; color: var(--gold); }
.app-nav .nav-foot { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 8px; margin-top: 8px; }
.app-main { flex: 1; padding: 32px; max-width: none; }
.app-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; gap: 12px; }
.app-topbar h1 { font-size: 1.5rem; margin: 0; }

@media (max-width: 620px) {
  .app-shell { flex-direction: column; }
  .app-nav {
    width: 100%; height: auto; position: sticky; bottom: 0; top: auto; order: 2;
    flex-direction: row; padding: 4px 2px; background: var(--maroon-dark);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.15); border-top: 1px solid rgba(255,255,255,0.1);
  }
  .app-nav .brand { display: none; }
  .app-nav .nav-scroll { flex: 1; display: flex; }
  .app-nav .nav-foot { border-top: none; margin-top: 0; padding-top: 0; display: flex; }
  .app-nav button.nav-item {
    flex: 1; flex-direction: column; gap: 3px; padding: 8px 2px; border-left: none;
    border-top: 3px solid transparent; white-space: nowrap; text-align: center; font-size: 0.62rem;
  }
  .app-nav button.nav-item span { line-height: 1; }
  .app-nav button.nav-item svg { width: 18px; height: 18px; }
  .app-nav button.nav-item.active { border-left: none; border-top: 3px solid var(--gold); background: rgba(255,255,255,0.08); }
  .app-main { order: 1; padding: 16px; padding-bottom: 90px; }
}

table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
table th, table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }
table th { color: var(--muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
table tbody tr { transition: background 0.15s ease; }
table tbody tr:hover { background: rgba(180, 124, 67,0.06); }
table tbody tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }

.profile-card { display: flex; gap: 18px; align-items: flex-start; }
.photo-placeholder {
  width: 92px; height: 92px; border-radius: var(--radius-sm);
  background: linear-gradient(160deg, var(--gold-light) 0%, #e9d6ac 100%);
  display: flex; align-items: center; justify-content: center; color: var(--maroon);
  flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(107,23,48,0.08);
}
.photo-placeholder svg { width: 30px; height: 30px; }
.photo-upload-grid { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.photo-slot {
  width: 120px; height: 120px; border-radius: var(--radius-sm); position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.photo-slot.add-slot {
  border: 2px dashed var(--border); cursor: pointer; gap: 4px;
  color: var(--muted); transition: border-color 0.2s, color 0.2s;
}
.photo-slot.add-slot:hover { border-color: var(--gold); color: var(--gold); }
.photo-slot.add-slot svg { width: 28px; height: 28px; }
.photo-slot.add-slot span { font-size: 0.72rem; }
.photo-slot.add-slot.hidden { display: none; }
.photo-slot.filled {
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.photo-slot.filled img {
  width: 100%; height: 100%; object-fit: cover;
}
.photo-slot .photo-remove {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border-radius: 50%; background: rgba(0,0,0,0.55); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  opacity: 0; transition: opacity 0.15s;
}
.photo-slot:hover .photo-remove { opacity: 1; }
.photo-slot .photo-remove svg { width: 12px; height: 12px; stroke: #fff; }

.wizard-step { display: none; }
.wizard-step.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.wizard-progress { display: flex; gap: 6px; margin-bottom: 26px; }
.wizard-progress .dot { flex: 1; height: 5px; border-radius: 3px; background: var(--border); transition: background 0.2s ease; }
.wizard-progress .dot.done { background: var(--gold); }
.wizard-progress .dot.current { background: var(--maroon); }
.wizard-actions { display: flex; justify-content: space-between; margin-top: 28px; }

.chat-window { display: flex; flex-direction: column; height: 60vh; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow: hidden; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 9px; background: var(--ivory); }
.msg { padding: 9px 14px; border-radius: 16px; font-size: 0.9rem; box-shadow: var(--shadow-sm); }
.msg.mine { align-self: flex-end; background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-light) 100%); color: white; border-bottom-right-radius: 4px; }
.msg.theirs { align-self: flex-start; background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); background: var(--surface); align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; line-height: 1.4; overflow-y: auto; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); font-size: 0.92rem; }
.request-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.spacer { height: 1px; }

/* ---------- Icons ---------- */
.icon-inline { display: inline-flex; vertical-align: -3px; margin-right: 4px; }

/* ---------- Auth page polish ---------- */
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head h2 { margin: 0 0 4px; font-size: 1.5rem; }
.auth-footnote {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; margin: -32px auto 56px; box-shadow: var(--shadow-sm);
}
.auth-trust + .auth-footnote { margin-top: 20px; }
.auth-footnote strong { display: block; font-size: 0.88rem; }
.auth-footnote span { font-size: 0.8rem; color: var(--muted); }
.auth-footnote .btn { flex-shrink: 0; }
@media (max-width: 520px) { .auth-footnote { flex-direction: column; align-items: flex-start; } }

/* ---------- Split page (registration) ---------- */
.split-page { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 71px); }
.split-aside {
  background: linear-gradient(170deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%);
  color: white; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center;
}
.split-aside h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 12px 0 16px; max-width: 460px; }
.split-aside > p { color: rgba(255,255,255,0.72); max-width: 440px; font-size: 0.98rem; }
.aside-steps { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-direction: column; gap: 20px; }
.aside-steps li { display: flex; gap: 14px; align-items: flex-start; }
.aside-steps li span {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: rgba(180, 124, 67,0.18); border: 1px solid var(--gold); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
}
.aside-steps strong { font-size: 0.94rem; }
.aside-steps p { margin: 2px 0 0; font-size: 0.83rem; color: rgba(255,255,255,0.6); }
.split-main { display: flex; align-items: center; justify-content: center; padding: 56px 32px; }
.form-panel { width: 100%; max-width: 400px; }
.form-panel h2 { font-size: 1.6rem; margin: 0 0 4px; }
.thanks-mark {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto;
  background: var(--success-bg); color: var(--success);
  display: flex; align-items: center; justify-content: center;
}
.thanks-mark svg { width: 30px; height: 30px; }
@media (max-width: 860px) {
  .split-page { grid-template-columns: 1fr; }
  .split-aside { padding: 44px 28px; }
  .aside-steps { display: none; }
  .split-main { padding: 36px 24px; }
}

/* ---------- Portal overview ---------- */
.hero-panel {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: 20px; padding: 30px 32px; color: white; margin-bottom: 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
.hero-panel h1 { font-size: 1.7rem; margin: 0 0 6px; }
.hero-panel h1 em { font-style: italic; color: var(--gold); }
.hero-panel p { margin: 0; color: rgba(255,255,255,0.66); font-size: 0.88rem; }
.hero-panel .panel-id {
  font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 8px;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.stat-tile.clickable { cursor: pointer; }
.stat-tile.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-tile .stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stat-tile .stat-top svg { width: 17px; height: 17px; color: var(--gold-dark); }
.stat-tile .n { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1; }
.stat-tile .l { font-size: 0.78rem; color: var(--muted); margin-top: 5px; display: block; }
.stat-tile .pill { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--gold-light); color: var(--gold-dark); }

.overview-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
@media (max-width: 860px) { .overview-cols { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.panel h3 { font-size: 1.02rem; margin: 0 0 14px; }
.panel-list { display: flex; flex-direction: column; gap: 12px; }
.panel-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.85rem; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.panel-row:last-child { border-bottom: none; padding-bottom: 0; }
.quick-actions { display: flex; flex-direction: column; gap: 9px; }
.quick-action {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--ivory); cursor: pointer; text-align: left;
  font-family: var(--font-body); font-size: 0.87rem; font-weight: 600; color: var(--ink);
  transition: all 0.15s ease; width: 100%;
}
.quick-action:hover { border-color: var(--gold); background: var(--gold-light); }
.quick-action svg { width: 17px; height: 17px; color: var(--gold-dark); flex-shrink: 0; }
.quick-action .qa-sub { display: block; font-weight: 400; font-size: 0.76rem; color: var(--muted); }

/* ---------- Premium filter bar ---------- */
.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; flex: 1; padding-bottom: 2px; }
.chip-scroll::-webkit-scrollbar { height: 0; }
.category-tab {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 9px 18px; font-size: 0.83rem; font-weight: 600; color: var(--muted); cursor: pointer;
  white-space: nowrap; font-family: var(--font-body); transition: all 0.15s ease;
}
.category-tab:hover { border-color: var(--gold); color: var(--ink); }
.category-tab.active { background: var(--navy); border-color: var(--navy); color: white; }
.filter-toggle {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border);
  background: var(--surface); border-radius: 999px; padding: 9px 18px; cursor: pointer;
  font-size: 0.83rem; font-weight: 600; font-family: var(--font-body); color: var(--ink);
  transition: all 0.15s ease; flex-shrink: 0;
}
.filter-toggle:hover { border-color: var(--gold); }
.filter-toggle svg { width: 15px; height: 15px; }
.filter-toggle .count {
  background: var(--gold); color: white; border-radius: 999px; font-size: 0.68rem;
  padding: 1px 7px; font-weight: 700;
}
.result-count { font-size: 0.8rem; color: var(--muted); margin-bottom: 16px; }

/* Staff shield on the agent login page, to distinguish it from member login */
.staff-mark {
  width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 16px;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 100%);
  display: flex; align-items: center; justify-content: center; color: var(--gold);
  box-shadow: var(--shadow-sm);
}
.staff-mark svg { width: 24px; height: 24px; }

/* Clickable ID in admin tables */
.link-id { color: var(--navy); font-weight: 600; text-decoration: none; border-bottom: 1px dotted var(--gold); }
.link-id:hover { color: var(--gold-dark); }

/* Search-by-User-ID row */
.search-row { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.search-input { position: relative; flex: 1; display: flex; align-items: center; }
.search-input > svg { position: absolute; left: 14px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search-input input { padding-left: 42px; padding-right: 36px; height: 44px; border-radius: 999px; }
.q-clear {
  position: absolute; right: 12px; width: 20px; height: 20px; border-radius: 50%; border: none;
  background: var(--border); color: var(--ink); cursor: pointer; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.q-clear:hover { background: var(--gold-light); }

/* View Profile button on cards */
.view-btn { margin-bottom: 8px; }

/* Full profile modal — hidden until .open; the list stays visible but blurred behind.
   Both classes are used in the selector so this wins over the later .modal-overlay
   base rule, which sets display:flex. */
.modal-overlay.profile-modal { display: none; align-items: flex-start; padding: 40px 20px; overflow-y: auto; }
.modal-overlay.profile-modal.open { display: flex; }
.pm-card { max-width: 620px; width: 100%; position: relative; padding: 32px; margin: auto; }
.pm-close {
  position: absolute; top: 18px; right: 18px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s ease;
}
.pm-close svg { width: 15px; height: 15px; }
.pm-close:hover { background: var(--ivory); color: var(--ink); }

/* Hero block — photo + identity */
.pm-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 24px; }
.pm-hero-photo { width: 84px; height: 84px; border-radius: var(--radius); object-fit: cover; background: var(--navy-tint); flex-shrink: 0; cursor: zoom-in; }
.pm-hero-photo.locked { display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: default; }
.pm-hero-photo.locked svg { width: 28px; height: 28px; }
.pm-hero-text { min-width: 0; }
.pm-hero-text h2 { font-size: 1.5rem; margin: 0 0 8px; letter-spacing: -0.015em; line-height: 1.15; }
.pm-hero-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pm-hero-sub { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); }
.pm-hero-sub span { position: relative; }
.pm-hero-sub span + span::before { content: '·'; position: absolute; left: -9px; color: var(--faint); }

.pm-locked-note {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--gold-tint); color: var(--gold-dark); font-size: 0.82rem; margin-bottom: 22px;
}
.pm-locked-note svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Grouped sections — clean fixed-column grid, aligned values */
.pm-body { display: flex; flex-direction: column; gap: 22px; }
.pmsec { }
.pmsec h4 {
  font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold-dark); margin: 0 0 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.pmsec-grid { display: flex; flex-direction: column; gap: 2px; }
.pmrow { display: grid; grid-template-columns: 160px 1fr; column-gap: 16px; font-size: 0.88rem; line-height: 1.5; padding: 6px 0; align-items: baseline; min-width: 0; border-bottom: 1px solid rgba(232, 229, 223, 0.5); }
.pmrow:last-child { border-bottom: none; }
.pmrow .pmk { color: var(--muted); }
.pmrow .pmv { color: var(--ink); font-weight: 600; overflow-wrap: break-word; }
.pmrow .pmv-mobile { font-size: 1.02rem; font-weight: 700; letter-spacing: 0.03em; color: var(--navy); font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .search-row { flex-direction: column; align-items: stretch; }
  .pm-card { padding: 24px 20px; }
  .pm-hero { flex-direction: column; align-items: flex-start; gap: 14px; }
  .pmrow { grid-template-columns: 120px 1fr; column-gap: 12px; }
}

/* Request cards: actions, expiry countdown, sent-status */
.req-actions { display: flex; gap: 8px; }
.req-actions .btn { flex: 1; padding: 10px 12px; font-size: 0.85rem; }
.req-expiry {
  font-size: 0.74rem; font-weight: 600; color: var(--muted); text-align: center;
  margin-bottom: 12px; letter-spacing: 0.02em;
}
.req-expiry.urgent { color: var(--danger); }
.req-status {
  text-align: center; padding: 10px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  border: 1px dashed var(--border); color: var(--muted);
}
.req-status.ok { color: var(--success); border-color: #bfe3cd; background: var(--success-bg); border-style: solid; }
.req-status.no { color: var(--muted); background: var(--ivory); }
.req-status.wait { color: var(--gold-dark); border-color: var(--gold); }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.page-btn {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  font-family: var(--font-body); font-size: 0.83rem; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s ease;
}
.page-btn svg { width: 15px; height: 15px; }
.page-btn:hover:not(:disabled) { border-color: var(--gold); }
.page-btn.active { background: var(--navy); border-color: var(--navy); color: white; }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-gap { color: var(--muted); padding: 0 2px; font-size: 0.83rem; }

/* Collapsible settings rows */
.setting-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 12px; overflow: hidden; }
.setting-head {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 22px; cursor: pointer;
  background: none; border: none; text-align: left; font-family: var(--font-body); color: var(--ink);
  transition: background 0.14s ease;
}
.setting-head:hover { background: var(--ivory); }
.setting-head > svg:first-child { width: 18px; height: 18px; color: var(--gold-dark); flex-shrink: 0; }
.setting-head .setting-text { flex: 1; }
.setting-head strong { display: block; font-size: 0.93rem; font-weight: 600; }
.setting-head span { font-size: 0.79rem; color: var(--muted); }
.setting-chev { width: 16px; height: 16px; color: var(--muted); transition: transform 0.22s ease; flex-shrink: 0; }
.setting-item.open .setting-chev { transform: rotate(180deg); }
.setting-body { display: none; padding: 4px 22px 22px; border-top: 1px solid var(--border); }
.setting-item.open .setting-body { display: block; animation: fadeIn 0.2s ease; }
.setting-item.danger .setting-head > svg:first-child { color: var(--danger); }

/* Filter drawer */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(11,16,48,0.45); z-index: 55; opacity: 0;
  pointer-events: none; transition: opacity 0.22s ease; backdrop-filter: blur(2px);
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.filter-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 360px; max-width: 90vw; z-index: 56;
  background: var(--surface); box-shadow: -20px 0 60px -20px rgba(32,26,24,0.35);
  transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.3, 0.9, 0.3, 1);
  display: flex; flex-direction: column;
}
.filter-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { margin: 0; font-size: 1.15rem; }
.drawer-close { background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; display: flex; }
.drawer-close svg { width: 20px; height: 20px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; }
.drawer-foot { display: flex; gap: 10px; padding: 18px 24px; border-top: 1px solid var(--border); background: var(--ivory); }
.drawer-foot .btn { flex: 1; }
.filter-group { padding: 18px 0; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: none; }
.filter-group > label { margin: 0 0 10px; font-size: 0.8rem; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input { text-align: center; }
.range-row span { color: var(--muted); font-size: 0.8rem; flex-shrink: 0; }
.pill-select { display: flex; flex-wrap: wrap; gap: 7px; }
.pill-opt {
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px; font-size: 0.79rem;
  cursor: pointer; user-select: none; background: var(--surface); transition: all 0.14s ease;
}
.pill-opt:hover { border-color: var(--gold); }
.pill-opt.selected { background: var(--navy); color: white; border-color: var(--navy); }

/* ---------- Chat ---------- */
.chat-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; height: calc(100vh - 150px); min-height: 460px; }
@media (max-width: 800px) { .chat-layout { grid-template-columns: 1fr; height: auto; } .chat-layout.viewing .chat-list-panel { display: none; } }
.chat-list-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow-y: auto;
}
.chat-item {
  display: flex; gap: 11px; padding: 14px; border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background 0.14s ease; align-items: center;
}
.chat-item:hover { background: var(--ivory); }
.chat-item.active { background: var(--gold-light); }
.chat-item:last-child { border-bottom: none; }
.chat-avatar {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; position: relative;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 100%);
  display: flex; align-items: center; justify-content: center; color: white;
  font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.1rem;
}
.chat-avatar .presence {
  position: absolute; bottom: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%;
  background: #b9b3a8; border: 2px solid var(--surface);
}
.chat-avatar .presence.online { background: var(--success); }
.chat-item-body { flex: 1; min-width: 0; }
.chat-item-name { font-weight: 600; font-size: 0.87rem; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.chat-item-preview { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.unread-dot { background: var(--gold); color: white; border-radius: 999px; font-size: 0.66rem; font-weight: 700; padding: 1px 7px; flex-shrink: 0; }

.chat-panel { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.chat-header-info { flex: 1; }
.chat-header-name { font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; }
.chat-back { display: none; background: none; border: none; cursor: pointer; padding: 4px; color: var(--muted); }
.chat-back svg { width: 20px; height: 20px; }
@media (max-width: 800px) { .chat-back { display: flex; } .chat-panel { min-height: 70vh; } }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 4px; background: var(--ivory); }
.msg-row { display: flex; flex-direction: column; max-width: 74%; margin-bottom: 8px; }
.msg-row.mine { align-self: flex-end; align-items: flex-end; }
.msg-row.theirs { align-self: flex-start; align-items: flex-start; }
.msg {
  padding: 9px 14px; border-radius: 16px; font-size: 0.88rem; line-height: 1.45;
  box-shadow: var(--shadow-sm); word-break: break-word;
}
.msg-row.mine .msg { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); color: white; border-bottom-right-radius: 5px; }
.msg-row.theirs .msg { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg-time { font-size: 0.67rem; color: var(--muted); margin-top: 3px; padding: 0 4px; }
.chat-day { text-align: center; font-size: 0.7rem; color: var(--muted); margin: 12px 0 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); background: var(--surface); align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; line-height: 1.4; overflow-y: auto; }
.chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.9rem; padding: 40px 20px; text-align: center; }

/* ---------- Payment step ---------- */
.pay-box { text-align: center; padding: 10px 0; }
.pay-amount {
  font-family: var(--font-display); font-size: 3rem; font-weight: 600; color: var(--navy); line-height: 1;
}
.pay-amount small { font-size: 1.1rem; color: var(--muted); font-weight: 400; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 6px; }
.pay-method {
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 0.76rem;
  color: var(--muted); background: var(--ivory);
}
.pay-success {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--success-bg); color: var(--success); font-size: 0.86rem; font-weight: 600;
}
.pay-success svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Search toolbar: category tabs + collapsible filters ---------- */
.search-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.category-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.category-tab {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--ink); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.15s ease;
  font-family: var(--font-body);
}
.category-tab:hover { border-color: var(--navy-light); }
.category-tab.active { background: var(--navy); color: white; border-color: var(--navy); }
.filter-toggle {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-size: 0.85rem;
  font-weight: 600; cursor: pointer; transition: all 0.15s ease; flex-shrink: 0;
}
.filter-toggle:hover { border-color: var(--navy-light); }
.filter-toggle svg { width: 15px; height: 15px; }
.filter-toggle .count {
  background: var(--gold); color: white; border-radius: 999px; font-size: 0.68rem; font-weight: 700;
  padding: 1px 7px; margin-left: 2px;
}
.filter-panel {
  overflow: hidden; max-height: 0; opacity: 0; transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
}
.filter-panel.open { max-height: 400px; opacity: 1; margin-bottom: 20px; }
.filter-panel-inner {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 16px; align-items: end;
}
.filter-panel-inner label { margin: 0 0 6px; }
.filter-panel-inner .filter-apply-row { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Match cards (search results) ---------- */
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.match-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.match-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.match-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.monogram {
  width: 54px; height: 54px; border-radius: 16px; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.5rem; color: white;
  box-shadow: var(--shadow-sm);
}
.monogram img { width: 100%; height: 100%; object-fit: cover; }
.monogram.locked { background: linear-gradient(150deg, #e9e3d8 0%, #dcd4c6 100%); color: var(--muted); }
.nav-badge {
  margin-left: auto; background: var(--gold); color: white; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; padding: 1px 7px; display: none; align-items: center;
}
.match-name { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.match-sub { color: var(--muted); font-size: 0.83rem; margin-top: 3px; }
.match-mobile { display: inline-flex; align-items: center; font-size: 0.83rem; font-weight: 600; color: var(--gold-dark); text-decoration: none; margin-top: 4px; }
.match-mobile:hover { text-decoration: underline; }
.match-card.revealed { border-color: var(--gold-light); }
.match-active { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-top: 5px; }
.match-active .dot { width: 7px; height: 7px; border-radius: 50%; background: #b9b3a8; flex-shrink: 0; }
.match-active.online { color: var(--success); }
.match-active.online .dot { background: var(--success); box-shadow: 0 0 0 3px rgba(47,122,85,0.15); }
.match-actions { display: flex; gap: 8px; margin-top: 10px; }
.match-actions .btn { flex: 1; padding: 6px 8px; font-size: 0.74rem; }
.badge.engaged { background: var(--gold-light); color: var(--gold-dark); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(16, 24, 40, 0.6);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(3px); animation: fadeIn 0.18s ease;
}
.modal-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 28px; max-width: 440px; width: 100%;
}
.modal-card h3 { margin: 0 0 10px; font-size: 1.2rem; }
.modal-card p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

.match-info-grid { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; flex: 1; }
.match-info-grid .info-item { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--ink); }
.match-info-grid .info-item svg { width: 15px; height: 15px; color: var(--gold-dark); flex-shrink: 0; }
.match-info-grid .info-item .muted-part { color: var(--muted); }

/* =====================================================================
   REDESIGN 2026 · Premium design system layer
   Overrides refined tokens, elevates every core component. No JS-hooked
   class was removed — everything below is either a new token or a
   presentational refinement of an existing selector.
   ===================================================================== */

:root {
  /* Warm ivory canvas — premium print, not a web app */
  --ivory: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f6f3ee;      /* subtle warm tint for section alternates */

  /* Ink scale for real hierarchy (body, secondary, muted, faint) */
  --ink: #17202a;
  --ink-soft: #475467;
  --muted: #667085;
  --faint: #98a2b3;

  /* Refined brand tones: deep sophisticated navy + earthy copper */
  --navy: #101828;
  --navy-2: #172033;
  --navy-3: #33415c;
  --navy-tint: #eef1f6;      /* pale wash for backgrounds */
  --orange: #b47c43;         /* primary copper accent */
  --orange-2: #986a37;
  --orange-tint: #f5ede1;

  /* Premium gold — reserved for matches, engagement, selected states */
  --gold-true: #c7a15a;
  --gold-true-tint: #f7f0e0;

  /* Alias the old names so nothing breaks */
  --maroon: var(--navy);
  --maroon-dark: #0b1220;
  --maroon-light: var(--navy-3);
  --gold: var(--orange);
  --gold-dark: var(--orange-2);
  --gold-light: var(--orange-tint);

  --border: #e8e5df;
  --border-strong: #d5cfc5;

  /* Restrained shadow scale, tinted with brand ink */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 1px 4px rgba(16, 24, 40, 0.05), 0 1px 2px rgba(16, 24, 40, 0.03);
  --shadow-md: 0 8px 20px -8px rgba(16, 24, 40, 0.12), 0 3px 8px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 20px 44px -16px rgba(16, 24, 40, 0.2), 0 6px 16px rgba(16, 24, 40, 0.06);
  --shadow-xl: 0 32px 64px -20px rgba(16, 24, 40, 0.26);
  --ring: 0 0 0 3px rgba(180, 124, 67, 0.22);

  /* 8-point spacing, so every card breathes to the same rhythm */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 32px; --s-8: 40px; --s-9: 56px; --s-10: 72px;

  /* Radius scale — deliberately restrained */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius: 14px;
  --radius-lg: 16px;
  --radius-xl: 18px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 140ms;
  --dur: 200ms;
  --dur-slow: 320ms;
}

body {
  background: var(--ivory);
  color: var(--ink);
  font-feature-settings: 'ss01' on, 'cv11' on;  /* Inter niceties: single-story a, straight l */
  letter-spacing: -0.005em;
}

/* Typography — larger, more editorial headings; better body rhythm */
h1, h2, h3, h4 { letter-spacing: -0.02em; color: var(--ink); }
h1 { line-height: 1.05; }
h2 { line-height: 1.1; }
h3 { line-height: 1.2; }
p { color: var(--ink-soft); }
.helper, .muted { color: var(--muted); }

/* Global focus ring — one look, everywhere */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-xs);
}

/* -------- Section rhythm & alt colours -------- */
section.page-section { padding: var(--s-10) var(--s-6); }
section.page-section.alt { background: var(--surface); }
.section-eyebrow {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em;
  color: var(--orange-2); text-transform: uppercase;
}
h2.section-title { font-weight: 550; }

/* -------- Nav (public) -------- */
.topnav {
  background: rgba(16, 24, 40, 0.75);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 14px 28px;
}
.topnav .links a { transition: color var(--dur) var(--ease); }
.topnav .links a.btn-outline {
  border: 1px solid rgba(255,255,255,0.28);
  padding: 8px 18px;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.topnav .links a.btn-outline:hover { border-color: var(--orange); background: rgba(180, 124, 67,0.14); }

/* Nav never wraps: tighten at mid widths, collapse to brand + login on small */
.topnav .links a { white-space: nowrap; }
@media (max-width: 1020px) {
  .topnav { padding: 14px 20px; }
  .topnav .links a { margin-left: 15px; font-size: 0.82rem; }
}
@media (max-width: 760px) {
  .topnav .links a:not(.btn-outline) { display: none; }
}

/* -------- Buttons -------- */
.btn {
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.005em;
  background: var(--navy);
  color: white;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); background: var(--navy-2); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-xs); }

.btn.secondary { background: var(--orange); }
.btn.secondary:hover { background: var(--orange-2); }

.btn.outline {
  background: transparent; color: var(--ink); border: 1px solid var(--border-strong); box-shadow: none;
}
.btn.outline:hover { background: var(--surface-2); border-color: var(--ink); }

.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #8f2a21; }

.btn.small { padding: 8px 16px; font-size: 0.83rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }


/* -------- Hero polish -------- */
.hero { padding-top: 72px; }
.hero h1 { font-weight: 550; letter-spacing: -0.025em; }
.hero .tagline { font-size: 1.12rem; color: rgba(255,255,255,0.78); }
.badge-pill {
  padding: 8px 16px;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.badge-pill:hover { background: rgba(255,255,255,0.12); border-color: rgba(180, 124, 67,0.5); }
.stat-bar {
  border-top-color: rgba(255,255,255,0.14);
  padding-top: 32px;
}
.stat-bar .stat-num { font-weight: 500; }
.stat-bar .stat-label { letter-spacing: 0.14em; }

/* -------- Cards -------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-6);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.grid-3 .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

/* Match / profile cards — the workhorse of the browsing experience */
.match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  display: flex; flex-direction: column;
}
.match-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.match-card .monogram { border-radius: 18px; box-shadow: var(--shadow-xs); }
.match-card .match-name { font-weight: 600; letter-spacing: -0.015em; }
.match-card .match-sub { color: var(--muted); }
.match-card .view-btn { border-color: var(--border-strong); }

.search-sent-wrap { position: relative; }
.search-sent-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 600; color: var(--green);
  background: rgba(34,139,34,0.08); padding: 3px 10px; border-radius: 20px;
  margin-bottom: 6px; letter-spacing: 0.02em;
}
.decline-notice {
  font-size: 0.75rem; color: #b45309; background: #fef3c7; border: 1px solid #fcd34d;
  padding: 6px 12px; border-radius: var(--radius-sm); margin-bottom: 8px;
  text-align: center; line-height: 1.4;
}

/* -------- Forms -------- */
label { color: var(--ink); font-weight: 600; font-size: 0.83rem; letter-spacing: 0.01em; }
input, select, textarea {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus {
  border-color: var(--orange);
  box-shadow: var(--ring);
  outline: none;
}
input::placeholder, textarea::placeholder { color: var(--faint); }

.checkbox-row input { accent-color: var(--orange); }

/* -------- Auth cards -------- */
.auth-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
  padding: 36px;
}
.auth-head h2 { font-weight: 550; }
.tabs button { transition: color var(--dur) var(--ease); }
.tabs button.active { border-bottom-color: var(--orange); }

/* -------- App shell (member/agent/admin portals) -------- */
.app-shell { background: var(--ivory); }
.app-nav {
  background: linear-gradient(180deg, var(--navy) 0%, #0b1220 100%);
  box-shadow: 1px 0 0 rgba(0,0,0,0.04);
}
.app-nav button.nav-item {
  display: flex; align-items: center; gap: 12px;
  border-radius: 10px;
  margin: 2px 10px;
  padding: 10px 12px;
  border-left: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.app-nav button.nav-item.active {
  background: rgba(180, 124, 67,0.16);
  color: white;
  border-left: none;
  box-shadow: inset 0 0 0 1px rgba(180, 124, 67,0.28);
}
.app-nav button.nav-item.active svg { color: var(--orange); }
.app-nav .brand { padding-bottom: 24px; margin-bottom: 8px; }

/* Section titles in the portal */
.app-topbar h1 { font-weight: 550; letter-spacing: -0.02em; }

/* -------- Tables (admin/agent lists) -------- */
.table-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
table { font-size: 0.88rem; }
table th {
  background: var(--surface-2);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
table tbody tr { transition: background var(--dur-fast) var(--ease); }
table tbody tr:hover { background: var(--orange-tint); }
table td, table th { padding: 14px 12px; }

/* -------- Badges -------- */
.badge {
  padding: 4px 10px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  border-radius: 999px;
}
.badge.verified { background: var(--success-bg); color: var(--success); }
.badge.matched { background: var(--orange-tint); color: var(--orange-2); }

/* -------- Chat -------- */
.chat-panel, .chat-list-panel { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.chat-item { transition: background var(--dur-fast) var(--ease); border-radius: 10px; margin: 4px 6px; padding: 12px 14px; }
.chat-item:hover { background: var(--surface-2); }
.chat-item.active { background: var(--orange-tint); }
.msg { padding: 10px 14px; border-radius: 18px; box-shadow: var(--shadow-xs); line-height: 1.45; }
.msg.mine { background: var(--navy); color: white; border-bottom-right-radius: 6px; }
.msg.theirs { background: var(--surface); color: var(--ink); border-bottom-left-radius: 6px; }

/* Typing indicator (dot loop) — CSS-only, JS just toggles a class */
.typing-dots { display: inline-flex; gap: 4px; padding: 12px 16px; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted); display: inline-block;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* -------- Modals -------- */
.modal-overlay { background: rgba(16, 24, 40, 0.55); backdrop-filter: blur(6px); animation: fadeIn 0.22s var(--ease); }
.modal-card { border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); padding: 32px; }
.pm-card { animation: popIn 0.28s var(--ease) both; }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

/* -------- Overview / stat tiles -------- */
.stat-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-tile.clickable { cursor: pointer; }
.stat-tile .n { font-family: var(--font-display); font-weight: 550; font-size: 2rem; color: var(--navy); line-height: 1; margin-top: 6px; }
.stat-tile .l { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.02em; margin-top: 6px; display: block; }
.stat-tile .stat-top { display: flex; justify-content: space-between; align-items: flex-start; color: var(--orange-2); }
.stat-tile .stat-top svg { width: 18px; height: 18px; }
.stat-tile .pill { background: var(--orange-tint); color: var(--orange-2); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; padding: 3px 10px; border-radius: 999px; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-xs);
}
.panel h3 { font-weight: 600; letter-spacing: -0.01em; margin: 0 0 14px; font-size: 1.05rem; }

/* -------- Filter pills / chips -------- */
.pill-opt {
  padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: 999px;
  cursor: pointer; user-select: none; font-size: 0.83rem; font-weight: 500; color: var(--ink);
  background: var(--surface); transition: all var(--dur-fast) var(--ease);
}
.pill-opt:hover { border-color: var(--orange); color: var(--orange-2); }
.pill-opt.selected { background: var(--navy); color: white; border-color: var(--navy); }

/* -------- Empty & loading states -------- */
.empty-state {
  text-align: center; padding: 56px 20px; color: var(--muted);
  border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface);
}
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 0%, #eee6d5 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 8px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton-card {
  height: 220px; border-radius: var(--radius-lg); background: var(--surface); padding: 20px;
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
}
.skeleton-line { height: 12px; }

/* -------- Footer polish -------- */
.footer-brand p { color: rgba(255,255,255,0.65); }
.footer-col a { transition: color var(--dur) var(--ease), padding var(--dur) var(--ease); }
.footer-col a:hover { color: var(--orange); padding-left: 4px; }

/* -------- Doc pages -------- */
.doc-page h1 { font-weight: 550; letter-spacing: -0.025em; }
.doc-page h2 { color: var(--navy); font-weight: 600; }

/* -------- Mobile refinements -------- */
@media (max-width: 800px) {
  .app-nav { padding: 8px 6px; background: linear-gradient(180deg, #0b1220 0%, #0b1220 100%); }
  .app-nav button.nav-item { margin: 0 4px; padding: 10px 14px; font-size: 0.86rem; border-radius: 999px; }
  .app-nav button.nav-item.active { background: var(--orange); color: white; box-shadow: 0 4px 12px -4px rgba(180, 124, 67,0.6); }
  .app-nav button.nav-item.active svg { color: white; }
  .app-nav button.nav-item.active { border-top: none; }
  .app-main { padding: 20px; }
  .auth-card { padding: 26px 22px; margin: 24px auto; }
  .btn { padding: 12px 20px; min-height: 44px; }   /* touch target */
  input, select, textarea { min-height: 44px; }
}

/* Print / dev polish */
@media (prefers-reduced-motion: reduce) {
  .btn::after, .pm-card, .modal-overlay { animation: none; transition: none; }
  .btn:hover { transform: none; }
  .skeleton { animation: none; }
}

/* -------- Hero contrast fixes -------- */
/* My generic "h1{color:var(--ink)}" override killed the hero's inherited white.
   Restore white for headings inside the dark hero. */
.hero, .hero h1, .hero h2, .hero h3, .hero h4 { color: white; }
.hero .tagline { color: rgba(255,255,255,0.82); }
.hero .cta .btn.outline {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.5);
  color: white;
}
.hero .cta .btn.outline:hover { background: rgba(255,255,255,0.14); border-color: white; }

/* Same for the dark portal sidebar brand */
.app-nav .brand, .app-nav .brand * { color: white; }

/* Portal hero panels are dark — the global "h1 { color: ink }" rule was
   killing the inherited white on the greeting. Restore it everywhere. */
.hero-panel h1 { color: #fff; }
.hero-panel h1 em { color: var(--orange); }

/* Dark topnav Member Login button */
.topnav .links a.btn-outline { color: white; }

/* =====================================================================
   MINIMAL HERO · calm, light, premium (overrides the loud dark hero)
   Appended last so it wins the cascade over all earlier .hero rules.
   ===================================================================== */

.hero-light {
  background: var(--ivory);
  color: var(--ink);
  text-align: center;
  padding: clamp(64px, 12vh, 130px) 24px 0;
  overflow: visible;
}
.hero-light .hero-inner { max-width: 760px; }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 26px;
}
.hero-eyebrow .deva {
  font-family: var(--font-devanagari);
  color: var(--orange-2);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.hero-light h1 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 450;                 /* lighter, more editorial */
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.028em;
  margin: 0 0 22px;
}
.hero-light h1 em {
  display: inline;
  font-style: italic;
  font-weight: 450;
  color: var(--orange-2);           /* the single warm accent */
}
.hero-light .tagline {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.65;
  max-width: 540px;
  margin: 0 auto 36px;
}

.hero-light .cta { gap: 12px; align-items: center; }

/* Ghost button — text only, the minimal counterpart to the one solid CTA */
.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border: none;
  padding: 12px 18px;
}
.btn.ghost::after { display: none; }
.btn.ghost:hover { background: var(--surface-2); transform: none; box-shadow: none; }

/* One warm accent: the primary CTA. Slightly deeper, not neon. */
.hero-light .btn.secondary { background: var(--orange-2); box-shadow: var(--shadow-sm); }
.hero-light .btn.secondary:hover { background: #7d5a2f; }

/* Stat bar recoloured for the light hero */
.hero-light .stat-bar {
  margin: clamp(56px, 9vh, 88px) auto 0;
  border-top: 1px solid var(--border);
  padding: 32px 24px 0;
  max-width: 760px;
}
.hero-light .stat-bar .stat-num { color: var(--navy); font-style: italic; font-weight: 500; font-size: 1.8rem; }
.hero-light .stat-bar .stat-label { color: var(--muted); }

/* Thin single-line mountain ridge instead of filled peaks */
.hero-ridge {
  display: block;
  width: 100%;
  height: 60px;
  margin-top: 40px;
  color: var(--navy-3);
}

/* -------- Calm the rest of the page's louder accents -------- */

/* Softer, smaller decorative quote on testimonials */
.testimonial::before { color: var(--border-strong); font-size: 2rem; }

/* Featured process card: hairline accent instead of a glowing ring */
.process-card.featured {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.process-card.featured::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--orange); border-radius: var(--radius) var(--radius) 0 0;
}

/* Section titles a touch lighter for the editorial feel */
h2.section-title { font-weight: 450; letter-spacing: -0.02em; }
.accent-italic { color: var(--orange-2); font-weight: 450; }

/* Promise visual: calmer, no heavy gradient block */
.promise-visual {
  background: var(--navy);
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .hero-light { padding-top: 56px; }
  .hero-light .cta { flex-direction: column; }
  .hero-light .cta .btn { width: 100%; }
}

/* Specificity fix: earlier ".hero p.tagline" (element selector) outranked
   ".hero-light .tagline". Match its specificity so the dark colour wins. */
.hero-light p.tagline { color: var(--ink-soft); }

/* Auth trust line — quiet reassurance under login cards */
.auth-trust {
  text-align: center; margin: 18px 0 0;
  font-size: 0.76rem; font-weight: 500; color: var(--muted);
  letter-spacing: 0.04em;
}
.auth-trust svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 5px; color: var(--gold-dark); }

/* Trust strip — quiet single line under the hero CTAs */
.trust-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 0;
  margin-top: 44px; padding-top: 24px;
  border-top: 1px solid var(--border);
  max-width: 760px; margin-left: auto; margin-right: auto;
}
.trust-strip span {
  font-size: 0.8rem; font-weight: 500; color: var(--muted);
  display: inline-flex; align-items: center;
}
.trust-strip span + span::before {
  content: '·'; margin: 0 14px; color: var(--faint);
}
@media (max-width: 640px) {
  .trust-strip { flex-direction: column; align-items: center; gap: 10px; }
  .trust-strip span + span::before { display: none; }
}

/* Privacy before/after composition (Our Promise visual) */
.privacy-demo { display: flex; flex-direction: column; gap: 10px; }
.pd-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px;
  box-shadow: var(--shadow-xs);
}
.pd-open { border-color: var(--gold-true); background: var(--gold-true-tint); }
/* Photo panel inside the privacy cards: blurred + locked vs revealed */
.pd-photo {
  position: relative; height: 110px; margin-bottom: 12px;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--navy-tint);
  display: flex; align-items: flex-end; justify-content: center;
}
.pd-sil { width: 92px; height: 92px; color: var(--navy-3); opacity: 0.75; filter: blur(4px); transform: scale(1.1); }
.pd-photo-open .pd-sil { filter: none; opacity: 0.9; color: var(--navy); transform: none; }
.pd-photo-veil {
  position: absolute; inset: 0;
  background: rgba(250, 248, 244, 0.35);
  backdrop-filter: blur(2px);
}
.pd-photo-tag {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px;
  font-size: 0.7rem; font-weight: 700; color: var(--ink-soft);
  box-shadow: var(--shadow-sm); white-space: nowrap;
}
.pd-photo-tag svg { width: 12px; height: 12px; }
.pd-photo-open { background: var(--gold-true-tint); }
.pd-photo-tag-open { border-color: var(--gold-true); color: var(--gold-dark); }

.pd-head { display: flex; align-items: center; gap: 12px; }
.pd-avatar {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--navy-tint); color: var(--navy-3);
  display: flex; align-items: center; justify-content: center;
}
.pd-avatar svg { width: 17px; height: 17px; }
.pd-avatar-open { background: var(--navy); color: #fff; font-weight: 600; font-size: 0.95rem; }
.pd-head strong { display: block; font-size: 0.86rem; color: var(--ink); letter-spacing: -0.01em; }
.pd-head span:not(.pd-avatar) { font-size: 0.72rem; color: var(--muted); }
.pd-open .pd-head span:not(.pd-avatar) { color: var(--gold-dark); font-weight: 600; }
.pd-lines { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.pd-lines i { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); }
.pd-open .pd-lines i { background: rgba(199, 161, 90, 0.22); }
.pd-arrow {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  color: var(--muted); font-size: 0.74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.pd-arrow svg { width: 15px; height: 15px; transform: rotate(90deg); }

@media (min-width: 721px) {
  .promise-block:has(.privacy-demo) { grid-template-columns: 300px 1fr; }
}

/* The FindMyByoli difference — six quiet cards, one idea each */
.diff-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-top: 8px;
}
.diff-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 22px;
  transition: border-color var(--dur) var(--ease);
}
.diff-card:hover { border-color: var(--border-strong); }
.diff-card .icon-tile.sm { margin-bottom: 14px; }
.diff-card h3 {
  font-size: 0.98rem; font-weight: 650; color: var(--ink);
  letter-spacing: -0.01em; margin: 0 0 8px;
}
.diff-card p { font-size: 0.865rem; line-height: 1.6; color: var(--ink-soft); margin: 0; }
.diff-foot {
  text-align: center; max-width: 560px; margin: 36px auto 0;
  font-family: var(--font-display); font-style: italic; font-weight: 450;
  font-size: 1.06rem; color: var(--navy-3); line-height: 1.55;
}
@media (max-width: 980px) { .diff-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .diff-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   ADMIN DASHBOARD · premium decision console
   ===================================================================== */

/* Give the admin console a bit more room than the narrow portal default */
#section-home { max-width: none; }
.app-main:has(#section-home) { max-width: 1220px; }

/* ---- Hero band ---- */
.dash-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(180, 124, 67,0.22) 0%, transparent 45%),
    linear-gradient(135deg, var(--navy) 0%, #0b1220 100%);
  overflow: hidden; position: relative;
}
.dash-hero::after {
  content: ''; position: absolute; right: -60px; bottom: -80px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 124, 67,0.16) 0%, transparent 70%);
  pointer-events: none;
}
.dash-hero-copy { position: relative; z-index: 1; }
.dash-hero h1 { color: #fff; }
.dash-hero h1 em { color: var(--orange); }
.dash-hero p { color: rgba(255,255,255,0.72); }
.dash-hero .panel-id { color: var(--orange); }
.dash-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; position: relative; z-index: 1; }
.hero-chip {
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1;
  padding: 12px 18px; border-radius: var(--radius); min-width: 160px;
  border: 1px solid rgba(255,255,255,0.12); backdrop-filter: blur(8px);
}
.hero-chip.warn { background: rgba(180, 124, 67,0.16); border-color: rgba(180, 124, 67,0.4); }
.hero-chip.ok { background: rgba(47,122,85,0.16); border-color: rgba(47,122,85,0.4); }
.hero-chip-n { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: white; }
.hero-chip-l { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 6px; color: rgba(255,255,255,0.7); }
.dash-hero-side .btn.small { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); }
.dash-hero-side .btn.small:hover { background: var(--orange); border-color: var(--orange); }

/* ---- KPI cards ---- */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin: 20px 0 22px;
}
.kpi-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  display: flex; flex-direction: column; gap: 8px;
}
.kpi-card.clickable { cursor: pointer; }
.kpi-card.clickable:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.kpi-top { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.kpi-top svg { width: 16px; height: 16px; color: var(--orange-2); flex-shrink: 0; }
.kpi-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em; }
.kpi-n { font-family: var(--font-display); font-size: 2.1rem; font-weight: 600; color: var(--navy); line-height: 1; letter-spacing: -0.02em; }
.kpi-meta { font-size: 0.75rem; color: var(--muted); }
.kpi-delta { font-size: 0.75rem; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }
.kpi-delta.flat { color: var(--muted); }

/* ---- Dashboard layout ---- */
.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; }
.dash-col-main, .dash-col-side { display: flex; flex-direction: column; gap: 18px; }
.dash-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h3 { margin: 0; }
.panel-note { font-size: 0.78rem; color: var(--muted); }
.panel-link { font-size: 0.78rem; font-weight: 600; color: var(--orange-2); cursor: pointer; white-space: nowrap; }
.panel-link:hover { text-decoration: underline; }

/* ---- Vertical bar chart (weekly registrations) ---- */
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 18px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bar-val { font-size: 0.72rem; font-weight: 700; color: var(--navy); height: 14px; }
.bar {
  width: 100%; max-width: 42px; min-height: 4px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--orange) 0%, var(--orange-2) 100%);
  transition: height var(--dur-slow) var(--ease), filter var(--dur) var(--ease);
}
.bar-col:last-child .bar { background: linear-gradient(180deg, var(--navy-3) 0%, var(--navy) 100%); }
.bar-col:hover .bar { filter: brightness(1.08); }
.bar-lab { font-size: 0.68rem; color: var(--muted); }

/* ---- Horizontal bars (region) ---- */
.hbar-chart { display: flex; flex-direction: column; gap: 13px; }
.hbar-row { display: grid; grid-template-columns: 70px 1fr 28px; align-items: center; gap: 10px; }
.hbar-lab { font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.hbar-track { height: 9px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--navy-3), var(--orange)); transition: width var(--dur-slow) var(--ease); }
.hbar-n { font-size: 0.8rem; font-weight: 700; color: var(--navy); text-align: right; }
.hbar-row.wide { grid-template-columns: 150px 1fr 32px; }
.hbar-row.wide .hbar-lab { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }

/* ---- Agent leaderboard ---- */
.leaderboard { display: flex; flex-direction: column; gap: 12px; }
.lb-row { display: grid; grid-template-columns: 22px 1fr 26px; align-items: center; gap: 10px; }
.lb-rank {
  width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--muted);
  font-size: 0.74rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.lb-rank.gold { background: var(--orange-tint); color: var(--orange-2); }
.lb-body { min-width: 0; }
.lb-name { font-size: 0.82rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-code { font-size: 0.72rem; font-weight: 500; color: var(--muted); }
.lb-track { height: 6px; background: var(--surface-2); border-radius: 999px; margin-top: 5px; overflow: hidden; }
.lb-fill { height: 100%; border-radius: 999px; background: var(--orange); transition: width var(--dur-slow) var(--ease); }
.lb-n { font-size: 0.85rem; font-weight: 700; color: var(--navy); text-align: right; }

/* ---- Priority queue ---- */
.attention-panel .quick-action {
  align-items: center; border-radius: var(--radius-sm); padding: 14px 14px; gap: 12px;
  position: relative;
}
.quick-action .qa-arrow { width: 16px; height: 16px; color: var(--muted); margin-left: auto; transition: transform var(--dur) var(--ease); }
.quick-action:hover .qa-arrow { transform: translateX(3px); color: var(--orange-2); }
.quick-action.urgent { border-color: rgba(178,58,46,0.3); background: var(--danger-bg); }
.quick-action.urgent:hover { border-color: var(--danger); }
.quick-action.urgent svg:first-child { color: var(--danger); }
.all-clear {
  display: flex; align-items: center; gap: 10px; padding: 8px 2px; color: var(--success);
  font-size: 0.86rem; font-weight: 500;
}
.all-clear svg { width: 20px; height: 20px; padding: 3px; background: var(--success-bg); border-radius: 50%; }

/* ---- Activity feeds ---- */
.feed { display: flex; flex-direction: column; }
.feed-row {
  display: flex; align-items: center; gap: 11px; padding: 9px 6px; border-radius: 10px;
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.feed-row:not(.static):hover { background: var(--surface-2); }
.feed-row.static { cursor: default; }
.feed-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--navy-3), var(--navy)); color: white;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
}
.feed-avatar img { width: 100%; height: 100%; object-fit: cover; }
.feed-avatar.ring { background: var(--orange-tint); }
.feed-avatar.ring svg { width: 18px; height: 18px; color: var(--orange-2); }
.feed-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.feed-name { font-size: 0.84rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-sub { font-size: 0.74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-time { font-size: 0.72rem; color: var(--faint); font-weight: 600; flex-shrink: 0; }

/* ---- Members table avatars ---- */
.mem-cell { display: flex; align-items: center; gap: 10px; }
.mem-avatar {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--navy-3), var(--navy)); color: white;
  font-family: var(--font-display); font-weight: 600; font-size: 0.8rem;
}
.mem-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Analytics visual cards ---- */
.chart-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.chart-panels .panel h3 { font-size: 1.02rem; }

/* =====================================================================
   MEMBER PORTAL · full-inbox alert + queue-depth UI
   ===================================================================== */

/* Portal-wide banner shown on every section when the request inbox is full */
.inbox-alert {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; margin-bottom: 22px;
  border-radius: var(--radius); border: 1px solid;
  animation: fadeIn 0.25s var(--ease);
}
.inbox-alert.warn { background: #fdf1d6; border-color: #f0d79a; color: #7a5209; }
.inbox-alert.urgent { background: var(--danger-bg); border-color: #f0c0ba; color: #8f2a21; }
.inbox-alert .ia-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.6);
}
.inbox-alert.urgent .ia-icon svg { animation: bellShake 2.4s var(--ease) infinite; }
.inbox-alert .ia-icon svg { width: 20px; height: 20px; }
.inbox-alert .ia-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.inbox-alert .ia-text strong { font-size: 0.9rem; font-weight: 600; }
.inbox-alert .ia-text span { font-size: 0.82rem; opacity: 0.9; }
.inbox-alert .btn.small { flex-shrink: 0; background: var(--navy); }
.inbox-alert.urgent .btn.small { background: var(--danger); }
.inbox-alert.warn .btn.small { background: #b5830f; }
@keyframes bellShake {
  0%, 92%, 100% { transform: rotate(0); }
  94% { transform: rotate(-12deg); } 96% { transform: rotate(10deg); } 98% { transform: rotate(-6deg); }
}

/* Nav badge turns red when the inbox is at cap */
.nav-badge.alert { background: var(--danger) !important; color: #fff !important; }

/* Queue-depth header at the top of the Received requests tab */
.inbox-status {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.inbox-status.full { border-color: #f0d79a; background: #fdf7ea; }
.inbox-status.urgent { border-color: #f0c0ba; background: var(--danger-bg); }
.is-meter { display: flex; gap: 6px; }
.is-slot { width: 26px; height: 8px; border-radius: 4px; background: var(--border); }
.is-slot.on { background: var(--gold); }
.inbox-status.urgent .is-slot.on { background: var(--danger); }
.is-text { font-size: 0.85rem; color: var(--ink-soft); }
.inbox-status.urgent .is-text strong { color: var(--danger); }

@media (max-width: 1000px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-two { grid-template-columns: 1fr; }
  .chart-panels { grid-template-columns: 1fr; }
}
/* Daily send-quota banner on the Search screen */
.send-quota {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; margin-bottom: 18px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
}
.send-quota.spent { background: var(--danger-bg); border-color: #f0c0ba; }
.send-quota .sq-dots { display: flex; gap: 6px; flex-shrink: 0; }
.send-quota .sq-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: inset 0 0 0 1.5px rgba(0,0,0,0.04); }
.send-quota .sq-dot.spent { background: var(--border-strong); }
.send-quota.spent .sq-dot { background: var(--danger); opacity: 0.35; }
.send-quota .sq-text { font-size: 0.86rem; color: var(--ink-soft); }
.send-quota.spent .sq-text strong { color: var(--danger); }
.send-quota .sq-sub { color: var(--muted); font-weight: 400; }

/* Send button once the daily quota is spent */
.btn.block.quota-locked { background: var(--border-strong); color: var(--muted); box-shadow: none; }

@media (max-width: 560px) {
  .inbox-alert { flex-wrap: wrap; }
  .inbox-alert .btn.small { width: 100%; }
  .send-quota { flex-wrap: wrap; }
}
@media (max-width: 800px) {
  .dash-hero { flex-direction: column; align-items: flex-start; }
  .dash-hero-side { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
}

/* ---- Agent detail panel ---- */
.agent-detail { border-left: 4px solid var(--orange); }
.agent-detail .kpi-card { padding: 14px 16px; min-width: 0; }
.agent-detail .kpi-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--navy); line-height: 1; }
.agent-detail .kpi-label { font-size: 0.72rem; color: var(--muted); margin-top: 4px; }
tr.clickable-row:hover { background: var(--surface-2); }

/* Lightbox */
.lightbox-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.92); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.lightbox-overlay.open { opacity: 1; pointer-events: auto; }
.lb-img {
  max-width: 90vw; max-height: 82vh;
  /* Scale SMALL images up to a proper viewing size too — without this, a
     low-resolution photo "opened big" still rendered at its tiny natural
     size. height:auto keeps the aspect ratio while min-width enlarges. */
  min-width: min(70vw, 420px); height: auto;
  border-radius: 8px; object-fit: contain;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5); user-select: none;
}
.lb-close { position: absolute; top: 16px; right: 20px; background: none; border: none; color: #fff; font-size: 2.4rem; cursor: pointer; line-height: 1; padding: 4px 10px; opacity: 0.7; transition: opacity 0.15s; }
.lb-close:hover { opacity: 1; }
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.12); border: none; color: #fff; font-size: 2.6rem; cursor: pointer; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0.7; transition: opacity 0.15s, background 0.15s; }
.lb-arrow:hover { opacity: 1; background: rgba(255,255,255,0.22); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.8); font-size: 0.85rem; font-weight: 500; }
.monogram.photo img, .pm-head .monogram img { cursor: pointer; }
.pm-photo-strip { display: flex; gap: 8px; margin: 12px 0 4px; }
.pm-photo-strip img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.pm-photo-strip img:hover { transform: scale(1.06); box-shadow: var(--shadow-sm); }

/* ============================================================= */
/* Member section — premium redesign (search, cards, matches)    */
/* ============================================================= */

/* Search toolbar: result count + sort */
.search-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 12px; flex-wrap: wrap; }
.search-toolbar .result-count { font-size: 0.9rem; color: var(--muted); font-weight: 500; margin: 0; }
.sort-control { display: flex; align-items: center; gap: 8px; }
.sort-control label { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap select { appearance: none; -webkit-appearance: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 34px 8px 12px; font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--ink); cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.select-wrap select:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring, 0 0 0 3px rgba(180, 124, 67,0.18)); }
.select-wrap svg { position: absolute; right: 11px; width: 15px; height: 15px; pointer-events: none; color: var(--muted); }

/* Active filter chips */
.active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.active-chips:empty { display: none; }
.active-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--gold-light); color: var(--gold-dark); border: 1px solid transparent; border-radius: 999px; padding: 5px 12px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.active-chip:hover { background: #f6d3ba; }
.active-chip span { font-size: 1rem; line-height: 1; opacity: 0.7; }
.active-chip.reset { background: transparent; color: var(--muted); border-color: var(--border); }
.active-chip.reset:hover { color: var(--ink); border-color: var(--muted); }

/* Profile list + premium horizontal card */
.profile-list { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 1180px) { .profile-list { grid-template-columns: 1fr 1fr; } }

.pcard { display: grid; grid-template-columns: 200px 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg, 20px); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow 0.2s var(--ease, ease), transform 0.2s var(--ease, ease), border-color 0.2s; }
.pcard:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong, #d8d0bf); }
.pcard.match { grid-template-columns: 240px 1fr; }

.pcard-media { position: relative; background: linear-gradient(155deg, var(--navy, #101828), var(--maroon-dark, #0b1220)); min-height: 210px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; cursor: zoom-in; }
.media-lock { display: flex; flex-direction: column; align-items: center; gap: 10px; color: rgba(255,255,255,0.72); font-size: 0.72rem; text-align: center; letter-spacing: 0.02em; padding: 12px; }
.media-lock svg { width: 26px; height: 26px; opacity: 0.8; }
.media-lock.big svg { width: 34px; height: 34px; }
.media-count { position: absolute; bottom: 10px; right: 10px; display: inline-flex; align-items: center; gap: 5px; background: rgba(11,16,48,0.72); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; backdrop-filter: blur(4px); }
.media-count svg { color: #fff; }

.pcard-body { padding: 18px 20px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pcard-headmain { min-width: 0; }
.pcard-name { font-family: var(--font-display); font-size: 1.22rem; font-weight: 600; line-height: 1.15; margin: 0; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcard-sub { font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
.pcard .match-active { margin-top: 5px; }

/* Relationship status badges */
.rel-badge { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.01em; white-space: nowrap; }
.rel-badge svg { width: 13px; height: 13px; }
.rel-badge.matched { background: var(--success-bg, #e7f4ec); color: var(--success, #2f7a55); }
.rel-badge.sent { background: var(--gold-light); color: var(--gold-dark); }
.rel-badge.recv { background: #e9edfb; color: var(--maroon-light, #33415c); }
.rel-badge.saved { background: #f3eee4; color: #8a6d2f; }

/* Fact chips (primary summary) */
.fact-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.fact-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--navy-tint, #eef1f6); border-radius: 8px; padding: 5px 10px; font-size: 0.78rem; color: var(--ink); font-weight: 500; }
.fact-chip svg { width: 14px; height: 14px; color: var(--gold); flex-shrink: 0; }
.fact-chip em { font-style: normal; font-weight: 600; }

/* Grouped sections */
.pcard-sections { display: flex; flex-direction: column; gap: 12px; }
.psec { }
.psec-title { display: flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 7px; }
.psec-title svg { width: 14px; height: 14px; color: var(--gold); }
.psec-items { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.pitem { display: flex; justify-content: space-between; gap: 10px; font-size: 0.85rem; padding: 3px 0; border-bottom: 1px dashed var(--border); }
.pitem:last-child { border-bottom: none; }
.pi-label { color: var(--muted); flex-shrink: 0; }
.pi-val { color: var(--ink); font-weight: 600; text-align: right; }
.pcard-more[hidden] { display: none; }
.show-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; background: none; border: none; color: var(--gold-dark); font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; padding: 4px 0; margin-top: 2px; }
.show-more svg { width: 15px; height: 15px; }
.show-more:hover { text-decoration: underline; }

/* Action area: primary + save + kebab */
.pcard-action-row { display: flex; align-items: stretch; gap: 8px; margin-top: auto; padding-top: 4px; }
.pcard-primary { flex: 1; min-width: 0; }
.pcard-primary .btn { width: 100%; }
.dual-actions { display: flex; gap: 8px; }
.dual-actions .btn { flex: 1; }
.save-btn, .kebab-btn { flex-shrink: 0; width: 42px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s; }
.save-btn svg, .kebab-btn svg { width: 19px; height: 19px; }
.save-btn:hover, .kebab-btn:hover { border-color: var(--muted); color: var(--ink); }
.save-btn.on { background: var(--gold-light); border-color: var(--gold); color: var(--gold-dark); }
.save-btn.on svg { fill: var(--gold-dark); }

.menu-wrap { position: relative; }
.menu-pop { position: absolute; right: 0; bottom: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 6px; min-width: 200px; display: none; z-index: 40; }
.menu-wrap.open .menu-pop { display: block; animation: menuIn 0.14s var(--ease, ease); }
@keyframes menuIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.menu-pop button { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: none; padding: 9px 10px; border-radius: 8px; font: inherit; font-size: 0.86rem; color: var(--ink); cursor: pointer; text-align: left; }
.menu-pop button svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.menu-pop button:hover { background: var(--navy-tint, #eef1f6); }
.menu-pop button.danger { color: var(--danger); }
.menu-pop button.danger svg { color: var(--danger); }

/* Match card extras */
.pcard.match .pcard-media { min-height: 260px; }
.match-media { position: relative; grid-row: span 1; }
.new-flag { position: absolute; top: 12px; left: 12px; background: var(--gold); color: #fff; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; box-shadow: var(--shadow-sm); z-index: 2; }
.gallery-open { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; background: rgba(11,16,48,0.78); color: #fff; border: none; font-size: 0.76rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(4px); white-space: nowrap; transition: background 0.15s; }
.gallery-open:hover { background: rgba(11,16,48,0.92); }
.gallery-open svg { width: 14px; height: 14px; }
.match-thumbs { display: none; }
.matched-on { font-size: 0.8rem; color: var(--success, #2f7a55); font-weight: 600; }
.match-cta { display: flex; gap: 8px; }
.match-cta .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.cta-unread { background: #fff; color: var(--gold-dark); font-size: 0.72rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.match-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.match-actions .btn.danger { color: var(--danger); border-color: transparent; }
.match-actions .btn.danger:hover { border-color: var(--danger); background: var(--danger-bg); }

/* Gallery grid inside the profile modal */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 14px 0 4px; }
.gallery-thumb { padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; background: var(--navy-tint, #eef1f6); cursor: zoom-in; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.gallery-thumb:hover img { transform: scale(1.07); }

/* States: skeleton / empty / error */
.state-block { grid-column: 1 / -1; text-align: center; padding: 56px 24px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius-lg, 20px); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.state-block .state-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--navy-tint, #eef1f6); display: flex; align-items: center; justify-content: center; color: var(--gold); margin-bottom: 6px; }
.state-block .state-ic svg { width: 26px; height: 26px; }
.state-block h3 { margin: 0; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.state-block p { margin: 0; color: var(--muted); font-size: 0.9rem; max-width: 380px; }
.state-block .btn { margin-top: 12px; }
.state-block.error .state-ic { color: var(--danger); background: var(--danger-bg); }

.pcard.skeleton { pointer-events: none; }
.pcard-media.sk, .pcard.skeleton .pcard-media { background: linear-gradient(100deg, #eee 30%, #f6f4f0 50%, #eee 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.sk-line { height: 12px; border-radius: 6px; background: linear-gradient(100deg, #ececec 30%, #f6f4f0 50%, #ececec 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; margin: 8px 0; }
.sk-line.tall { height: 40px; }
.sk-line.w35 { width: 35%; } .sk-line.w60 { width: 60%; } .sk-line.w70 { width: 70%; } .sk-line.w75 { width: 75%; } .sk-line.w80 { width: 80%; } .sk-line.w100 { width: 100%; }
.sk-chips { display: flex; gap: 7px; margin: 10px 0; }
.sk-chips span { width: 64px; height: 22px; border-radius: 8px; background: linear-gradient(100deg, #ececec 30%, #f6f4f0 50%, #ececec 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--maroon-dark, #0b1220); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; z-index: 3000; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Report modal reasons */
.report-reasons { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip-choice { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 0.82rem; cursor: pointer; transition: all 0.15s; }
.chip-choice:hover { border-color: var(--muted); }
.chip-choice.selected { background: var(--gold-light); border-color: var(--gold); color: var(--gold-dark); font-weight: 600; }
.modal-card textarea { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; font-size: 0.9rem; resize: vertical; margin-top: 4px; }
.modal-card textarea:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring, 0 0 0 3px rgba(180, 124, 67,0.18)); }

/* Responsive: stack into vertical cards on tablet/mobile */
@media (max-width: 760px) {
  .pcard, .pcard.match { grid-template-columns: 1fr; }
  .pcard-media, .pcard.match .pcard-media { min-height: 300px; aspect-ratio: 4/3; }
  .psec-items { grid-template-columns: 1fr; }
  .search-toolbar { align-items: flex-start; }
}
@media (max-width: 460px) {
  .pcard-body { padding: 16px; }
  .pcard-name { font-size: 1.1rem; }
  .match-cta { flex-direction: column; }
  .rel-badge { font-size: 0.68rem; padding: 3px 8px; }
}

/* ============================================================= */
/* Search Profiles — info-first card (.scard), no photo panel     */
/* ============================================================= */
.profile-list { gap: 14px; grid-template-columns: 1fr; }

.scard { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 20px; display: flex; flex-direction: column; gap: 11px; box-shadow: var(--shadow-sm); transition: box-shadow 0.18s var(--ease, ease), border-color 0.18s; }
.scard.seen { background: #f0f7ff; border-color: #c5ddfc; }
.scard:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong, #d8d0bf); }

/* Top row: identity + action cluster (wraps the cluster below when tight) */
.scard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.scard-idwrap { flex: 1 1 260px; }
.scard-idwrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.savatar { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.savatar.locked { background: var(--navy-tint, #eef1f6); color: var(--muted); }
.savatar.locked svg { width: 20px; height: 20px; opacity: 0.65; }
.savatar.photo { cursor: zoom-in; }
.savatar.photo img { width: 100%; height: 100%; object-fit: cover; }
.savatar.photo b { position: absolute; bottom: 0; right: 0; background: rgba(11,16,48,0.8); color: #fff; font-size: 0.6rem; font-weight: 700; padding: 1px 4px; border-top-left-radius: 6px; }
.scard-idtext { min-width: 0; }
.scard-idtext .idrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.scard-idtext .sid { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; color: var(--ink); line-height: 1.1; }
.scard-idtext .subrow { display: flex; align-items: center; gap: 10px; margin-top: 3px; }
.scard-idtext .sage { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.scard-idtext .match-active { font-size: 0.75rem; }
.saved-tick { display: inline-flex; color: var(--gold-dark); }
.saved-tick svg { width: 14px; height: 14px; fill: var(--gold-dark); }

/* Relationship status badges */
.rel-badge { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.rel-badge svg { width: 12px; height: 12px; }
.rel-badge.matched { background: var(--success-bg, #e7f4ec); color: var(--success, #2f7a55); }
.rel-badge.sent { background: var(--gold-light); color: var(--gold-dark); }
.rel-badge.recv { background: #e9edfb; color: var(--maroon-light, #33415c); }
.rel-badge.saved { background: #f3eee4; color: #8a6d2f; }

/* Action cluster (top-right) */
.scard-cta { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.cta-stack { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; }
.btn.compact { height: 42px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 0.86rem; white-space: nowrap; }
.scard-cta .status-sent { background: var(--success-bg, #e7f4ec); color: var(--success, #2f7a55); border: 1px solid transparent; cursor: default; }
.scard-cta .status-sent svg { width: 15px; height: 15px; }
.save-btn { flex-shrink: 0; width: 42px; height: 42px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s; }
.save-btn svg { width: 19px; height: 19px; }
.save-btn:hover { border-color: var(--muted); color: var(--ink); }
.save-btn.on { background: var(--gold-light); border-color: var(--gold); color: var(--gold-dark); }
.save-btn.on svg { fill: var(--gold-dark); }

button.savatar { border: none; padding: 0; cursor: zoom-in; font: inherit; }

/* ============================================================= */
/* My Matches — premium four-zone card (.mcard)                   */
/* ============================================================= */
/* Two-up grid at wide widths so a full-desktop screen isn't a lonely column */
.matches-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 16px; }
.matches-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 8px; background: var(--gold-true-tint); color: #8a6b2f; font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; vertical-align: 3px; margin-left: 8px; }

/* Compact match card: photo left, essentials right, details behind View button */
.mcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.mcard:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.mcard-compact { display: grid; grid-template-columns: auto 1fr; align-items: start; }

/* Square photo tile, edge-to-edge on the left of the card */
.mc-photo { position: relative; width: 160px; aspect-ratio: 1 / 1; background: var(--navy-tint); overflow: hidden; }
.mc-main { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.mc-main:focus-visible { outline: 2px solid var(--gold-true); outline-offset: -2px; }
.mc-photo-count { position: absolute; bottom: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(16, 24, 40, 0.72); color: #fff; font-size: 0.7rem; font-weight: 700; }
.mc-photo-count svg { width: 12px; height: 12px; color: #fff; }
.mc-nophoto { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 0.72rem; }
.mc-nophoto svg { width: 24px; height: 24px; opacity: 0.55; }

.mc-info { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; min-width: 0; }
.mc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mc-id-block { min-width: 0; }
.mc-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin: 0; color: var(--ink); line-height: 1.15; letter-spacing: -0.01em; }
/* Meta row: Mutual Match tag on the left, then a single fact sentence.
   Joining facts into one text node means wrapping happens between words,
   not between tokens — no orphan middot at the start of a line. */
.mc-meta { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; margin-top: 6px; }
.mc-meta-line { font-size: 0.78rem; color: var(--ink-soft); font-weight: 500; line-height: 1.4; }

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; letter-spacing: 0.01em; }
.tag svg { width: 11px; height: 11px; }
.tag.verified { background: var(--success-bg, #e7f4ec); color: var(--success, #2f7a55); }
.tag.mutual { background: var(--gold-true-tint); color: #8a6b2f; }
.tag.new { background: var(--gold); color: #fff; text-transform: uppercase; letter-spacing: 0.05em; }

/* Key–value facts grid — Age · Job · Height · Annual income.
   Auto-fit means 2 cols on roomy cards, 1 col when the value would truncate. */
.mc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 24px; }
.mc-fact { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: 0.82rem; line-height: 1.4; }
.mc-fact-k { color: var(--muted); flex-shrink: 0; font-weight: 500; }
.mc-fact-k::after { content: ' —'; color: var(--faint); }
.mc-fact-v { color: var(--ink); font-weight: 600; overflow-wrap: break-word; min-width: 0; }

.mc-cta-row { display: flex; gap: 8px; margin-top: 2px; }
.mc-cta-row .btn.compact { flex: 1; padding: 0 12px; height: 38px; }
.btn.compact svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn.compact.ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); font-weight: 600; }
.btn.compact.ghost:hover { border-color: var(--muted); background: var(--navy-tint); }


.mcard.skeleton .mc-main.sk { background: linear-gradient(100deg, #eee 30%, #f6f4f0 50%, #eee 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }

/* Mobile: photo becomes a modest header, then a stacked column */
@media (max-width: 520px) {
  .mcard-compact { grid-template-columns: 1fr; }
  .mc-photo { min-height: 0; height: 200px; }
  .mc-info { padding: 14px 16px 16px; }
}

/* Expiry pill — inline next to the Verified badge on Received Interest cards */
.req-expiry-pill {
  display: inline-flex; align-items: center;
  margin-left: 4px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em;
  color: var(--muted); background: var(--surface-2);
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border);
}
.req-expiry-pill.urgent { color: var(--danger); background: var(--danger-bg); border-color: transparent; }

/* Requests: sent status shown as a compact pill in the action slot */
.scard-cta .req-status { display: inline-flex; align-items: center; font-size: 0.76rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; white-space: nowrap; background: var(--navy-tint, #eef1f6); color: var(--maroon-light, #33415c); }
.scard-cta .req-status.ok { background: var(--success-bg, #e7f4ec); color: var(--success, #2f7a55); }
.scard-cta .req-status svg { width: 14px; height: 14px; margin-right: 5px; }
.scard-cta .req-status.no { background: var(--danger-bg); color: var(--danger); }
.scard-cta .cta-stack { align-items: center; }

/* Fact chips (headline facts) */
.fact-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fact-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--navy-tint, #eef1f6); border-radius: 8px; padding: 4px 10px; font-size: 0.78rem; color: var(--ink); font-weight: 500; }
.fact-chip svg { width: 14px; height: 14px; color: var(--gold); flex-shrink: 0; }
.fact-chip em { font-style: normal; font-weight: 600; }

/* Detail grid: every remaining field, wide multi-column, always visible */
.scard-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 3px 36px; align-items: baseline; }
.dsec { margin-bottom: 8px; break-inside: avoid; }
.dsec h5 { margin: 0 0 4px; font-size: 0.63rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--gold-dark); }
/* Fixed label column + left-aligned values: every value starts on the same
   vertical line, so the eye scans straight down instead of zig-zagging. */
.drow { display: grid; grid-template-columns: 130px 1fr; column-gap: 12px; font-size: 0.82rem; line-height: 1.5; padding: 2px 0; align-items: baseline; }
.drow .dl { color: var(--muted); }
.drow .dv { color: var(--ink); font-weight: 600; text-align: left; overflow-wrap: anywhere; }
/* Revealed mobile number on match cards — slightly larger, easy to read out */
.drow .dv-mobile {
  font-size: 0.98rem; font-weight: 700; letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums; color: var(--navy);
}

/* Footer safety links (report / block) — subtle, no clutter */
.scard-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 2px; }
.ghostlink { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; padding: 2px; font: inherit; font-size: 0.76rem; font-weight: 600; color: var(--faint, #b4b0a8); cursor: pointer; }
.ghostlink svg { width: 13px; height: 13px; }
.ghostlink:hover { color: var(--muted); text-decoration: underline; }
.ghostlink.danger:hover { color: var(--danger); }
.foot-sep { color: var(--border-strong, #d8d0bf); font-size: 0.7rem; }

.linkbtn { background: none; border: none; padding: 2px 0; font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--gold-dark); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.linkbtn.tiny { font-size: 0.72rem; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn svg { width: 14px; height: 14px; }
.linkbtn.danger { color: var(--danger); }

/* Mark-as-seen chip */
.seen-chip { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #dbeafe; color: #1e40af; white-space: nowrap; }

/* Modal safety actions */
.pm-safety { display: flex; gap: 18px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }

/* Skeleton */
.scard.skeleton .savatar.sk { display: block; background: linear-gradient(100deg, #ececec 30%, #f6f4f0 50%, #ececec 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }

/* Narrow: keep the action button compact, just let details go single-column */
@media (max-width: 460px) {
  .scard { padding: 14px 16px; }
  .scard-details { grid-template-columns: 1fr; }
  .scard-cta { width: 100%; }
  .scard-cta .btn.compact { flex: 1; }
}

/* ============================================================= */
/* Admin — Agent Payments (minimal payroll view)                 */
/* ============================================================= */
.pay-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.pay-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 16px); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.pay-tile.due { border-left: 3px solid var(--gold); }
.pay-tile.paid { border-left: 3px solid var(--success, #2f7a55); }
.pt-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.pt-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--ink); margin-top: 4px; line-height: 1.1; }
.pt-sub { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }

.pay-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pay-toolbar .search-wrap { position: relative; flex: 1; min-width: 200px; max-width: 320px; display: block; }
.pay-toolbar .search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.pay-toolbar .search-input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; font-size: 0.85rem; background: var(--surface); }
.pay-toolbar .search-input:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring, 0 0 0 3px rgba(180, 124, 67,0.18)); }
.seg { display: inline-flex; background: var(--navy-tint, #eef1f6); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-btn { border: none; background: transparent; padding: 7px 16px; border-radius: 999px; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: all 0.15s; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.pay-table th.ta-r, .pay-table td.ta-r { text-align: right; }
.pay-table tbody tr.clickable-row:hover { background: var(--navy-tint, #eef1f6); }

.pill-paid, .pill-due, .pill-none, .pill-processing, .pill-accruing { display: inline-flex; align-items: center; font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-paid { background: var(--success-bg, #e7f4ec); color: var(--success, #2f7a55); }
.pill-due { background: var(--gold-light, #f5ede1); color: var(--gold-dark, #986a37); }
.pill-none { background: var(--navy-tint, #eef1f6); color: var(--muted); }
/* Closed month awaiting payment */
.pill-processing, .pill-unpaid { background: #fdf1e3; color: #a3671b; }
.pill-unpaid::before, .pill-processing::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; }
/* Open month, figure still moving */
.pill-accruing { background: var(--navy-tint, #eef1f6); color: var(--navy-3, #33415c); }

/* ---- Agent Payments roster (scales to thousands) ---- */
.pay-roster-note { font-size: 0.82rem; color: var(--muted); max-width: 780px; margin: 2px 0 14px; line-height: 1.5; }
.pay-roster th .th-sub { font-weight: 500; color: var(--muted); font-size: 0.72rem; }
.pay-roster td, .pay-roster th { vertical-align: middle; }
.ta-c { text-align: center; }

/* Details modal: month-by-month for one agent */
.pay-detail-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.pay-detail-card { background: var(--surface-2, #f6f3ee); border: 1px solid var(--border); border-radius: var(--radius-sm, 10px); padding: 14px 16px; }
.pay-detail-card .pt-value { font-family: var(--font-display, Georgia, serif); font-size: 1.5rem; font-weight: 700; color: var(--ink); margin: 2px 0 6px; }
.pay-detail-card .pt-label { font-size: 0.74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.pay-detail-card .pt-sub { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.pay-lookup { background: var(--surface-2, #f6f3ee); border: 1px solid var(--border); border-radius: var(--radius-sm, 10px); padding: 14px 16px; margin-top: 4px; }
.pay-lookup label { display: block; font-size: 0.78rem; font-weight: 600; margin-bottom: 6px; }
.pay-lookup input[type="month"] { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm, 10px); font-size: 0.85rem; }
.pay-lookup-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm, 10px); padding: 12px 14px; margin-top: 10px; }
.pay-lookup-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pay-lookup-row + .pay-lookup-row { margin-top: 8px; }
@media (max-width: 560px) { .pay-detail-cards { grid-template-columns: 1fr; } }

/* Male/female split shown next to a registration count */
.reg-mf { color: var(--muted); font-size: 0.82em; font-weight: 500; white-space: nowrap; }

/* Amount calculation breakdown */
.pay-calc-section { margin: 14px 0 4px; }
.pay-calc-section h4 { margin: 0 0 8px; font-size: 0.9rem; }
.calc-block { background: var(--surface-2, #f6f3ee); border: 1px solid var(--border); border-radius: var(--radius-sm, 10px); padding: 6px 14px; }
.calc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 0.85rem; border-bottom: 1px dashed var(--border); }
.calc-row:last-child { border-bottom: none; }
.calc-dim { color: var(--muted); font-size: 0.82em; }
.calc-total { font-weight: 700; color: var(--ink); border-top: 1px solid var(--border-strong, #d5cfc5); border-bottom: none; margin-top: 2px; padding-top: 10px; font-size: 0.95rem; }
.calc-total span:last-child { font-family: var(--font-display, Georgia, serif); }

/* =====================================================================
   PREMIUM 2026 · Navy + copper-gold, futuristic polish (design-system layer)
   Appended overrides — refines the shared component system so the whole
   product (public + all three portals) reads as one high-end interface.
   ===================================================================== */
:root {
  --navy-ink: #0b1220;                 /* deepest surface (nav, hero contrast) */
  --copper: #b47c43;                   /* primary accent */
  --copper-strong: #986a37;
  --copper-tint: #f5ede1;
  --ring-copper: 0 0 0 3px rgba(180, 124, 67, 0.22);

  /* Softer, more layered premium elevation */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 6px -2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 6px 16px -8px rgba(16, 24, 40, 0.14), 0 2px 6px -2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 18px 40px -18px rgba(16, 24, 40, 0.24), 0 6px 16px -8px rgba(16, 24, 40, 0.10);
  --shadow-xl: 0 32px 64px -24px rgba(11, 18, 32, 0.34);
}

/* ---- Futuristic hero backdrop: a whisper-quiet dot grid that fades out ---- */
.hero-light {
  position: relative;
  background: radial-gradient(120% 78% at 50% -12%, #ffffff 0%, var(--ivory) 58%);
}
.hero-light::before {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(16, 24, 40, 0.05) 1px, transparent 0);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(68% 58% at 50% 4%, #000 0%, transparent 72%);
          mask-image: radial-gradient(68% 58% at 50% 4%, #000 0%, transparent 72%);
}
.hero-light .hero-inner, .hero-light .hero-ridge { position: relative; z-index: 1; }

/* ---- Buttons: premium depth + smooth micro-interaction ---- */
.btn {
  transition: transform var(--dur, 200ms) var(--ease, ease),
              box-shadow var(--dur, 200ms) var(--ease, ease),
              background var(--dur, 200ms) var(--ease, ease);
  letter-spacing: 0.01em;
}
.btn.secondary, .hero-light .btn.secondary {
  background: linear-gradient(180deg, #c08a4e 0%, var(--copper) 60%, var(--copper-strong) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, var(--shadow-sm);
  border: none;
}
.btn.secondary:hover, .hero-light .btn.secondary:hover {
  background: linear-gradient(180deg, #c8905288 0%, var(--copper) 55%, var(--copper-strong) 100%);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, var(--shadow-md);
}
.btn.secondary:active { transform: translateY(0); }

/* ---- Cards: sleeker border + subtle lift on hover ---- */
.card, .region-card, .diff-card, .process-card, .pd-card {
  transition: border-color var(--dur, 200ms) var(--ease, ease),
              box-shadow var(--dur, 200ms) var(--ease, ease),
              transform var(--dur, 200ms) var(--ease, ease);
}
.diff-card:hover, .region-card:hover, .process-card:hover {
  border-color: var(--border-strong, #d5cfc5);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ---- Inputs: elegant copper focus ring, refined resting state ---- */
input:not([type=checkbox]):not([type=radio]), select, textarea {
  transition: border-color var(--dur, 160ms) var(--ease, ease),
              box-shadow var(--dur, 160ms) var(--ease, ease),
              background var(--dur, 160ms) var(--ease, ease);
}
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: var(--ring-copper);
}

/* ---- Nav: refined glass + hairline, copper wordmark accent ---- */
.topnav {
  background: rgba(11, 18, 32, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* ---- Section eyebrow: refined tracked label ---- */
.section-eyebrow, .hero-eyebrow {
  font-variant: small-caps; letter-spacing: 0.16em;
}

/* ---- Trust strip chips read as quiet capsules ---- */
.trust-strip span { color: var(--muted); }

/* ---- Focus-visible: consistent copper ring across everything ---- */
:where(a, button, [role="button"], input, select, textarea, summary):focus-visible {
  outline: none;
  box-shadow: var(--ring-copper);
}

/* ---- Respect reduced motion for the added micro-interactions ---- */
@media (prefers-reduced-motion: reduce) {
  .btn.secondary:hover, .diff-card:hover, .region-card:hover, .process-card:hover { transform: none; }
}

/* =====================================================================
   AGENT · Member-detail modal — premium, aligned, navy + copper
   ===================================================================== */
/* Wide, dense layout so the whole profile fits on one screen — no scrolling. */
.cust-card { max-width: 1060px; padding: 22px 26px 24px; }
@media (max-width: 640px) { .cust-card { padding: 20px 16px 22px; } }

.cust-hero { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.cust-avatar {
  width: 56px; height: 56px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(150deg, var(--navy-2) 0%, var(--navy) 100%);
  color: #fff; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.cust-avatar.has-photo { background: var(--navy-tint); }
.cust-avatar img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.cust-hero-text { min-width: 0; }
.cust-hero-text h2 { font-size: 1.3rem; margin: 0 0 6px; letter-spacing: -0.015em; line-height: 1.1; }
.cust-hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cust-id {
  font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
  padding: 2px 9px; border-radius: var(--radius-sm);
}
.cust-verified {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; color: var(--success);
}
.cust-verified svg { width: 13px; height: 13px; }
/* Locked avatar (member view before a mutual match) */
.cust-avatar.locked { background: linear-gradient(150deg, var(--navy-2) 0%, var(--navy) 100%); }
.cust-avatar.locked svg { width: 22px; height: 22px; stroke: rgba(255,255,255,0.85); }
/* Admin actions sit on their own row below the hero (never under the close ✕) */
.cust-actionbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.cust-edited { font-size: 0.76rem; color: var(--muted); margin-left: auto; }
@media (max-width: 620px) { .cust-edited { margin-left: 0; width: 100%; } }
/* Keep hero content clear of the absolute close button */
.cust-hero { padding-right: 34px; }
/* Mutual-match tag reused inside the hero meta row */
.cust-hero-meta .tag.mutual { font-size: 0.72rem; }

/* Masonry-style column packing so uneven sections fill space tightly. */
.cust-sections { column-count: 3; column-gap: 12px; }
@media (max-width: 860px) { .cust-sections { column-count: 2; } }
@media (max-width: 560px) { .cust-sections { column-count: 1; } }

.cust-sec {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px;
  break-inside: avoid; -webkit-column-break-inside: avoid;
}
.cust-sec-h {
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--copper, var(--gold-dark)); margin-bottom: 7px;
}
.cust-rows { display: flex; flex-direction: column; }
.cust-row {
  display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: baseline;
  padding: 5px 0; border-bottom: 1px solid var(--border);
}
.cust-row:last-child { border-bottom: none; padding-bottom: 0; }
.cust-row:first-child { padding-top: 0; }
.cust-k { font-size: 0.76rem; color: var(--muted); font-weight: 500; }
.cust-v { font-size: 0.83rem; color: var(--ink); font-weight: 600; letter-spacing: -0.005em; word-break: break-word; }

.cust-pay {
  display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: capitalize;
  padding: 2px 9px; border-radius: 999px;
}
.cust-pay.paid { background: var(--success-bg); color: var(--success); }
.cust-pay.mock { background: var(--navy-tint); color: var(--navy-3); }
.cust-pay.unpaid { background: var(--danger-bg); color: var(--danger); }

/* Admin members filter bar */
.member-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.member-filters input, .member-filters select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 0.86rem; color: var(--ink); height: 38px;
}
.member-filters input { min-width: 220px; flex: 1 1 220px; max-width: 300px; }
.member-filters select { min-width: 150px; }
.member-filters input:focus, .member-filters select:focus { outline: none; border-color: var(--copper); box-shadow: var(--ring-copper); }
@media (max-width: 600px) { .member-filters input, .member-filters select { flex: 1 1 100%; max-width: none; } }

/* Month + year selects stay side by side on one row at every width. */
.member-filters .mf-row { display: flex; gap: 10px; flex: 1 1 100%; min-width: 0; }
.member-filters .mf-row select { flex: 1 1 0; min-width: 0; max-width: none; }

/* Admin members — searchable agent picker + count summary */
.member-stats-bar {
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center;
  padding: 12px 16px; margin-bottom: 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.member-stats-bar .ms-item { font-size: 0.85rem; color: var(--muted); display: inline-flex; align-items: baseline; gap: 6px; }
.member-stats-bar .ms-n { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.member-stats-bar .ms-male .ms-n { color: #2b5f9e; }
.member-stats-bar .ms-female .ms-n { color: #9a5b86; }
.member-stats-bar .ms-showing { margin-left: auto; color: var(--copper, var(--gold-dark)); font-weight: 600; }
.member-stats-bar .ms-showing .ms-n { color: var(--copper, var(--gold-dark)); font-size: 0.95rem; }

.agent-combo { position: relative; }
.agent-combo > input { min-width: 220px; }
.agent-combo-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--border-strong, #d5cfc5);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  max-height: 280px; overflow-y: auto; padding: 4px;
}
.agent-opt {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 8px 10px; border-radius: var(--radius-xs); font-size: 0.86rem; color: var(--ink);
}
.agent-opt:hover { background: var(--navy-tint); }
.agent-opt-code { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.agent-opt-more { padding: 8px 10px; font-size: 0.78rem; color: var(--faint); }

/* Optional-field hint on forms */
.opt-hint { font-size: 0.74rem; font-weight: 400; color: var(--muted); }

/* =====================================================================
   BRAND WORDMARK · सौंजड़्या — premium Devanagari display
   ===================================================================== */
.wordmark {
  font-family: 'Rozha One', var(--font-devanagari), Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1;
  color: var(--copper, #b47c43);
  white-space: nowrap;
}
/* On the dark navy nav/sidebar it needs to sit a touch larger and brighter. */
.brand .wordmark { font-size: 1.28em; }
.app-brand .wordmark, .brand-lockup .wordmark { font-size: 1.15em; }

/* =====================================================================
   ORNATE HERO BRAND LOCKUP · सौंजड़्या — lotus flourish + divider + peaks
   ===================================================================== */
.hero-mountains {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46%;
  color: var(--navy-3, #33415c); pointer-events: none; z-index: 0;
}
.hero-light .hero-inner { position: relative; z-index: 1; }

.hero-brand { text-align: center; margin: 0 auto 26px; color: var(--copper, #b47c43); }
.lotus-flourish { display: block; width: 168px; height: auto; margin: 0 auto 6px; opacity: 0.9; }
.hero-wordmark {
  font-family: 'Rozha One', var(--font-devanagari), Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1;
  /* Devanagari ink (matras above, nukta/halant below the baseline) extends
     past the 1-line-height box, and background-clip:text paints ONLY inside
     the box — anything outside renders transparent (letters looked cut).
     Pad the paint box and pull the same amount back with negative margins
     so the surrounding layout does not shift. */
  padding: 0.4em 0.15em;
  margin: -0.4em -0.15em;
  letter-spacing: 0.01em;
  color: var(--copper, #b47c43);
  /* soft engraved sheen, echoing the metallic copper artwork */
  background: linear-gradient(180deg, #cf9a5e 0%, #b47c43 52%, #8a5c30 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.orn-divider { display: block; width: 220px; height: auto; margin: 10px auto 0; opacity: 0.85; }

@media (max-width: 640px) {
  .lotus-flourish { width: 140px; }
  .orn-divider { width: 180px; }
  .hero-brand { margin-bottom: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-brand { animation: brandRise 0.7s var(--ease, ease) both; }
  @keyframes brandRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* ---- Reports & Disputes detail modal (horizontal sections) ---- */
.rpt-sec { margin-top: 16px; padding: 14px 16px; background: var(--bg-soft, #f8f7f4); border-radius: var(--radius-sm, 10px); }
.rpt-sec h4 { margin: 0 0 10px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--gold-dark, #9a6a2f); }
.rpt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 24px; align-items: start; }
.rpt-l { display: block; font-size: 0.72rem; color: var(--muted, #8a8577); margin-bottom: 2px; }
.rpt-v { display: block; font-size: 0.9rem; font-weight: 600; color: var(--ink, #241f18); overflow-wrap: anywhere; }
.badge.review { background: #ece7fb; color: #6b4bd8; }
.badge.muted { background: #eceae4; color: #6b6558; }
@media (max-width: 560px) { .rpt-grid { grid-template-columns: 1fr 1fr; } }
