/* ==========================================================================
   Dhandho Valley Connect — design system
   Palette derived from Niveshaay's brand greens with a "dhandho gold" accent.
   ========================================================================== */
:root {
  --green-950: #04261A; --green-900: #063A24; --green-800: #0B4A2F; --green-700: #117640; --green-600: #1B8A4E;
  --green-500: #2E9A5E; --green-300: #8FCBA6; --green-200: #BFE3CC; --green-100: #DDF0E4; --green-50: #EEF7F1;
  --gold-700: #A8710F; --gold-600: #C98A1C; --gold-500: #E3A12B; --gold-200: #F5D89A; --gold-100: #FBEFD6; --gold-50: #FDF7EA;
  --cream: #F6F4EE; --cream-2: #EFECE3; --paper: #FFFFFF;
  --ink: #14201A; --ink-2: #2F3F37; --muted: #66756D; --muted-2: #8B978F;
  --line: #E4E7E2; --line-2: #CFD6D1;
  --red: #B42318; --red-100: #FEE4E2; --amber: #B54708; --amber-100: #FEF0C7; --blue: #175CD3; --blue-100: #D1E9FF;
  --shadow-sm: 0 1px 2px rgba(20, 32, 26, .06), 0 1px 1px rgba(20, 32, 26, .04);
  --shadow-md: 0 6px 20px -8px rgba(20, 32, 26, .18), 0 2px 6px rgba(20, 32, 26, .05);
  --shadow-lg: 0 24px 60px -20px rgba(6, 58, 36, .35);
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 26px;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar-w: 264px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; }
img, svg { display: inline-block; vertical-align: middle; max-width: 100%; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
code, .pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; }
code { background: var(--cream-2); padding: .1em .4em; border-radius: 6px; }
.pre { white-space: pre-wrap; background: var(--cream-2); padding: .75rem; border-radius: var(--r-sm); margin: .5rem 0; max-width: 420px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.spacer { flex: 1; }
.plain { margin: .5rem 0 0; padding-left: 1.2rem; }
.plain li { margin: .25rem 0; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; border-radius: 6px; }

/* Typography */
.display { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 2.6vw, 2.35rem); letter-spacing: -.02em; line-height: 1.1; color: var(--green-950); }
.display-xl { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.5rem, 5.5vw, 4.4rem); letter-spacing: -.025em; line-height: 1.02; }
.display-xl em, .display em { font-style: italic; color: var(--gold-500); }
.eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--green-700); margin-bottom: .5rem; }
.eyebrow-gold { color: var(--gold-500); }
.lede { font-size: 1.15rem; line-height: 1.6; color: rgba(255, 255, 255, .82); max-width: 40rem; }
.lede-sm { font-size: 1.05rem; color: var(--ink-2); }
.sub-head { font-family: var(--font-display); font-size: 1.15rem; margin: 1.5rem 0 .75rem; color: var(--green-900); }
.card-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--green-950); margin-bottom: .9rem; }
.link { font-weight: 600; font-size: .9rem; }
.link-arrow { font-weight: 600; }
.link-btn { background: none; border: 0; color: var(--green-700); font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; padding: 0; }
.back { display: inline-block; margin-bottom: 1rem; color: var(--muted); font-weight: 500; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .62rem 1.05rem; border-radius: 999px; border: 1.5px solid transparent; font: inherit; font-weight: 600; font-size: .92rem; line-height: 1.2; cursor: pointer; text-decoration: none !important; transition: transform .08s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--green-800); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-900); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--green-100); color: var(--green-900); border-color: var(--green-200); }
.btn-secondary:hover { background: var(--green-200); }
.btn-gold { background: var(--gold-500); color: var(--green-950); box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: var(--gold-600); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--paper); border-color: var(--muted-2); }
.btn-ghost-light { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .16); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #8f1c13; }
.btn-danger-text { color: var(--red) !important; }
.btn-whatsapp { background: #25D366; color: #073b1c; border-color: transparent; }
.btn-whatsapp:hover { background: #1fb956; }
.btn-sm { padding: .42rem .8rem; font-size: .84rem; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.btn-row.end { justify-content: flex-end; }
.btn-row.wrap { flex-wrap: wrap; }
.btn .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--green-50); }

/* Badges, chips, tags */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; line-height: 1.4; }
.badge-type { background: var(--green-100); color: var(--green-900); }
.badge-investor { background: var(--gold-100); color: var(--gold-700); }
.badge-entrepreneur { background: var(--green-100); color: var(--green-800); }
.badge-professional { background: var(--blue-100); color: var(--blue); }
.badge-advisor { background: #EDE9FE; color: #5B21B6; }
.badge-student { background: var(--cream-2); color: var(--ink-2); }
.badge-other { background: var(--cream-2); color: var(--ink-2); }
.badge-status { text-transform: none; font-size: .78rem; }
.badge-pending, .badge-queued { background: var(--amber-100); color: var(--amber); }
.badge-accepted, .badge-sent { background: var(--green-100); color: var(--green-800); }
.badge-declined, .badge-failed { background: var(--red-100); color: var(--red); }
.badge-cancelled, .badge-skipped { background: var(--cream-2); color: var(--muted); }
.badge-admin { background: var(--green-900); color: var(--gold-200); }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 500; }
.chip-soft { background: var(--cream-2); color: var(--ink-2); }
.chip-warn { background: var(--amber-100); color: var(--amber); }
.tag { display: inline-block; padding: .18rem .55rem; border-radius: 6px; font-size: .76rem; font-weight: 600; background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-100); }
.tag-gold { background: var(--gold-50); color: var(--gold-700); border-color: var(--gold-200); }
.tag-more { background: transparent; color: var(--muted); border-color: var(--line); }
.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold-500); color: var(--green-950); font-size: .72rem; font-weight: 800; }
.pill-soft { background: var(--cream-2); color: var(--ink-2); }

/* Avatars */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: var(--avatar-bg, var(--green-800)); color: #fff; font-weight: 700; letter-spacing: .02em; font-family: var(--font-display); }
.avatar-sm { width: 34px; height: 34px; font-size: .8rem; }
.avatar-md { width: 44px; height: 44px; font-size: .95rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.15rem; }
.avatar-xl { width: 84px; height: 84px; font-size: 1.7rem; box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--green-100); }

/* Cards & layout primitives */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.card-muted { background: var(--cream); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.card-head h2 { font-family: var(--font-display); font-size: 1.15rem; color: var(--green-950); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1.5rem; }
.section-block { margin-top: 1.5rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.page-head .muted { margin-top: .35rem; }
.page-narrow { max-width: 560px; }
.form-wide { max-width: 980px; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: .4rem; font-family: var(--font-display); }
.empty .btn { margin-top: .75rem; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.notice-gold { background: var(--gold-50); border-color: var(--gold-200); }
.notice-warn { background: var(--amber-100); border-color: #FDDC9A; display: block; }
.notice-warn summary { cursor: pointer; }
.notice-error { background: var(--red-100); border-color: #FDA29B; }
.alert { padding: .8rem 1rem; border-radius: var(--r); margin-bottom: 1rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-weight: 500; }
.alert-success { background: var(--green-100); color: var(--green-900); }
.alert-info { background: var(--blue-100); color: var(--blue); }
.alert-error { background: var(--red-100); color: var(--red); }
.alert-close { background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: inherit; line-height: 1; }
.progress-wrap { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.progress { flex: 1; height: 8px; background: var(--cream-2); border-radius: 999px; overflow: hidden; max-width: 320px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-600), var(--gold-500)); border-radius: 999px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0; font-size: .92rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }

/* Forms */
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field label, .field legend { font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.field fieldset, fieldset.field { border: 0; padding: 0; margin: 0; }
.req { color: var(--gold-600); }
.input, .select, .textarea { width: 100%; font: inherit; font-size: .95rem; padding: .68rem .9rem; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
.textarea { resize: vertical; min-height: 92px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2366756D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2.4rem; }
.input-sm { padding: .42rem .7rem; font-size: .88rem; }
.input-xs { width: 64px; flex: none; }
.input-code { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-family: ui-monospace, monospace; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 4.2rem; }
.eye { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); border: 0; background: var(--cream-2); border-radius: 6px; padding: .3rem .55rem; font: inherit; font-size: .75rem; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.field-help { font-size: .8rem; color: var(--muted); margin: 0; }
.field-error, .form-error { font-size: .82rem; color: var(--red); font-weight: 500; margin: 0; }
.field-foot { display: flex; justify-content: space-between; gap: 1rem; }
.counter { font-size: .75rem; color: var(--muted-2); }
.has-error .input, .has-error .select, .has-error .textarea { border-color: var(--red); }
.check-list { display: flex; flex-direction: column; gap: .55rem; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: .1rem; accent-color: var(--green-700); flex: none; }
.chip-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip-check span { display: inline-block; padding: .42rem .85rem; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--paper); font-size: .86rem; font-weight: 500; color: var(--ink-2); transition: all .12s; }
.chip-check.chip-sm span { padding: .3rem .65rem; font-size: .8rem; }
.chip-check input:checked + span { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.chip-check input:focus-visible + span { outline: 3px solid var(--gold-500); outline-offset: 1px; }
.chip-check:hover span { border-color: var(--green-500); }
.inline-form { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.inline-form .input { flex: 1; min-width: 180px; width: auto; }
.filter-bar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: .9rem 1rem; margin-bottom: 1rem; }
.filter-bar .input { flex: 2; min-width: 200px; width: auto; }
.filter-bar .select { flex: 1; min-width: 140px; width: auto; }

/* Multi-step register */
.stepper { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; padding: 0; margin: 1.5rem 0; counter-reset: step; }
.stepper li { display: flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 600; color: var(--muted); padding-bottom: .6rem; border-bottom: 3px solid var(--line); }
.stepper li span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--cream-2); font-size: .75rem; }
.stepper li.active { color: var(--green-900); border-color: var(--green-700); }
.stepper li.active span { background: var(--green-800); color: #fff; }
.stepper li.done { color: var(--green-700); border-color: var(--green-300); }
.stepper li.done span { background: var(--green-100); color: var(--green-800); }
.step { display: flex; flex-direction: column; gap: 1rem; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.step-actions { display: flex; align-items: center; gap: .75rem; padding-top: .5rem; border-top: 1px solid var(--line); }

/* Tables */
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; background: var(--cream); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--green-50); }
.table.compact th, .table.compact td { padding: .5rem .6rem; }
.table .request-who { padding: 0; }
.table details summary { cursor: pointer; }

/* Stats */
.stat-row { display: grid; gap: .9rem; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1.4rem; }
.stat-row-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-row.compact { margin: 1rem 0 0; gap: .6rem; }
.stat { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); color: inherit; text-decoration: none !important; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; }
a.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-n { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--green-950); line-height: 1; }
.stat-l { font-size: .84rem; color: var(--muted); font-weight: 500; }
.stat-sub { font-size: .76rem; color: var(--muted-2); }
.stat-hot { border-color: var(--gold-200); background: var(--gold-50); }
.stat-hot .stat-n { color: var(--gold-700); }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 140px; padding-top: .5rem; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar span { display: block; width: 100%; min-height: 3px; background: linear-gradient(180deg, var(--green-600), var(--green-800)); border-radius: 4px 4px 2px 2px; }
.bar small { font-size: .62rem; color: var(--muted-2); }
.hbar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.hbar-list li { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr auto; gap: .75rem; align-items: center; font-size: .86rem; }
.hbar { height: 8px; background: var(--cream-2); border-radius: 999px; overflow: hidden; }
.hbar span { display: block; height: 100%; background: var(--green-700); border-radius: 999px; }
.hbar-gold span { background: var(--gold-500); }

/* App shell */
.app-shell { background: var(--cream); }
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--green-950); color: #fff; padding: 1.2rem 1rem; gap: 1.25rem; background-image: radial-gradient(120% 60% at 0% 0%, rgba(227, 161, 43, .12), transparent 60%), radial-gradient(80% 60% at 100% 100%, rgba(17, 118, 64, .35), transparent 70%); }
.sidebar-admin { background: #0D1F17; }
.brand { display: flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none !important; }
.brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .1); color: var(--green-100); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-text small { font-size: .72rem; opacity: .7; letter-spacing: .06em; text-transform: uppercase; }
.brand-dark { color: var(--green-950); }
.brand-dark .brand-mark { background: var(--green-100); color: var(--green-900); }
.side-nav { display: flex; flex-direction: column; gap: .2rem; }
.side-nav a { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 10px; color: rgba(255, 255, 255, .78); font-weight: 500; font-size: .93rem; text-decoration: none !important; transition: background .12s, color .12s; }
.side-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-nav a.active { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 var(--gold-500); }
.side-nav .side-admin { margin-top: .75rem; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: .9rem; border-radius: 0 0 10px 10px; color: var(--gold-200); }
.nav-badge { margin-left: auto; background: var(--gold-500); color: var(--green-950); border-radius: 999px; font-size: .7rem; font-weight: 800; padding: .05rem .45rem; min-width: 20px; text-align: center; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: .75rem; }
.side-event { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: .8rem .9rem; display: flex; flex-direction: column; gap: .15rem; }
.side-event .eyebrow { color: var(--gold-200); margin: 0; }
.side-event small { opacity: .7; font-size: .78rem; }
.side-foot .btn-ghost { color: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .2); }
.side-foot .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .8rem 1.5rem; background: rgba(246, 244, 238, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.menu-btn { display: none; }
.topbar-search { flex: 1; display: flex; align-items: center; gap: .6rem; max-width: 520px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; color: var(--muted); }
.topbar-search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: .92rem; color: var(--ink); outline: none; min-width: 0; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .8rem; }
.topbar-user { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: none !important; }
.bell-wrap { position: relative; }
.bell-dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-500); border: 2px solid var(--paper); }
.bell-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; max-width: calc(100vw - 2rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); z-index: 30; overflow: hidden; }
.bell-panel-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.bell-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.bell-list li { border-bottom: 1px solid var(--line); }
.bell-list li.muted { padding: 1rem; }
.bell-list a { display: flex; flex-direction: column; gap: .1rem; padding: .7rem 1rem; color: var(--ink); text-decoration: none !important; font-size: .88rem; }
.bell-list a:hover { background: var(--green-50); }
.bell-list li.unread a { background: var(--gold-50); }
.bell-list time, .activity time { font-size: .75rem; color: var(--muted-2); }
.bell-all { display: block; text-align: center; padding: .7rem; font-weight: 600; font-size: .88rem; background: var(--cream); }
.content { padding: 1.5rem 1.5rem 5rem; max-width: 1280px; width: 100%; }
.bottom-nav { display: none; }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(4, 38, 26, .5); z-index: 39; }

/* Person cards */
.people-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.person-card { display: flex; flex-direction: column; gap: .7rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s, border-color .15s; }
.person-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--green-200); }
.person-card-head { display: flex; gap: .8rem; align-items: center; color: inherit; text-decoration: none !important; }
.person-card-title h3 { font-family: var(--font-display); font-size: 1.1rem; color: var(--green-950); }
.person-card-title p { font-size: .86rem; margin: .1rem 0 0; }
.person-card-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.person-card-bio { font-size: .88rem; color: var(--ink-2); margin: 0; }
.person-card-tags { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.tags-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); font-weight: 700; margin-right: .15rem; }
.person-card-actions { margin-top: auto; padding-top: .4rem; }

/* Directory */
.directory { display: grid; grid-template-columns: 280px 1fr; gap: 1.25rem; align-items: start; }
.filters { position: sticky; top: 84px; display: flex; flex-direction: column; gap: .9rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem; }
.filter-group summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--ink-2); padding: .2rem 0; }
.filter-group .chip-group { margin-top: .6rem; }
.filter-actions { display: flex; flex-direction: column; gap: .5rem; }
.filters-toggle { display: none; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }

/* Profile page */
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.profile-main { padding: 1.6rem; }
.profile-head { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1.2rem; }
.profile-title { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: .35rem; }
.profile-title h1 { font-family: var(--font-display); font-size: 1.9rem; color: var(--green-950); letter-spacing: -.02em; }
.profile-cta { display: flex; gap: .5rem; align-items: center; }
.profile-section { padding: 1rem 0; border-top: 1px solid var(--line); }
.profile-section h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin-bottom: .55rem; }
.profile-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 84px; }
.shared-line { font-size: .88rem; color: var(--green-800); display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .75rem; }
.link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; word-break: break-all; }
.locked { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; color: var(--muted); }
.locked svg { color: var(--gold-600); }
.locked p { margin: 0; }
.contact-list { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.contact-list li { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: .6rem; font-size: .9rem; }
.contact-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.contact-value { font-weight: 600; word-break: break-all; }
.my-share { margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.my-share .tag { margin-left: .2rem; }
.conn-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.conn-card { display: flex; flex-direction: column; gap: .9rem; }

/* Requests */
.request-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.request-list.card { padding: 0 1.25rem; }
.request-item { display: flex; flex-direction: column; gap: .55rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.request-item:last-child { border-bottom: 0; }
.request-list.compact .request-item { flex-direction: row; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem 0; }
.request-who { display: flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none !important; min-width: 0; }
.request-who div { display: flex; flex-direction: column; min-width: 0; }
.request-who small { font-size: .82rem; }
.request-msg { font-style: italic; color: var(--ink-2); background: var(--cream); padding: .6rem .8rem; border-radius: var(--r-sm); margin: 0; font-size: .92rem; border-left: 3px solid var(--gold-500); }
.request-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: .4rem; padding: .65rem 1rem; border: 0; background: none; font: inherit; font-weight: 600; font-size: .92rem; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tab.active { color: var(--green-900); border-color: var(--green-700); }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li a { display: grid; grid-template-columns: 1fr auto; gap: .1rem .75rem; padding: .65rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; font-size: .9rem; }
.activity li:last-child a { border-bottom: 0; }
.activity li a strong { grid-column: 1; }
.activity li a .muted { grid-column: 1; font-size: .84rem; }
.activity li a time { grid-column: 2; grid-row: 1 / span 2; align-self: center; white-space: nowrap; }
.activity li.unread a strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); margin-right: .45rem; }
.activity.big li a { padding: .9rem 0; grid-template-columns: auto 1fr auto; }
.activity.big .act-icon { width: 10px; height: 10px; border-radius: 50%; background: var(--green-500); margin-top: .45rem; }
.activity.big .act-connection_request { background: var(--gold-500); }
.activity.big .act-request_declined { background: var(--muted-2); }
.activity.big li a div { display: flex; flex-direction: column; }
.activity.big li a time { grid-column: 3; grid-row: 1; }
.session-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.session-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem .8rem; background: var(--cream); border-radius: var(--r-sm); }
.session-list div { display: flex; flex-direction: column; }
.audit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; font-size: .86rem; }
.audit-list li { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.tax-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tax-list { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.tax-row { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.tax-row .input { flex: 1; min-width: 120px; width: auto; }
.tax-list li.inactive .input { opacity: .55; text-decoration: line-through; }
.details-card { margin-bottom: 1.25rem; }
.details-card summary { display: flex; align-items: baseline; gap: 1rem; cursor: pointer; list-style: none; }
.details-card summary::-webkit-details-marker { display: none; }
.details-card summary .card-title { margin: 0; }
.details-card[open] summary { margin-bottom: 1rem; }

/* Modals & toasts */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 38, 26, .55); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: 100%; max-width: 520px; background: var(--paper); border-radius: var(--r-xl); padding: 1.6rem; box-shadow: var(--shadow-lg); animation: pop .18s ease; max-height: calc(100vh - 2rem); overflow-y: auto; }
.modal-sm { max-width: 420px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: .9rem; right: .9rem; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--cream-2); font-size: 1.3rem; cursor: pointer; color: var(--ink-2); }
.modal-head { margin-bottom: 1rem; padding-right: 2rem; }
.modal-head h2 { font-family: var(--font-display); font-size: 1.45rem; color: var(--green-950); }
.modal form { display: flex; flex-direction: column; gap: 1rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .5rem; flex-wrap: wrap; }
.modal-actions.center { justify-content: center; }
.toast-root { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 80; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast { pointer-events: auto; background: var(--green-950); color: #fff; padding: .8rem 1.1rem; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .9rem; font-weight: 500; max-width: 360px; animation: pop .2s ease; border-left: 4px solid var(--gold-500); }
.toast-error { border-left-color: #F97066; }

/* Public / marketing */
.page-public { background: var(--cream); }
.public-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem clamp(1rem, 4vw, 3rem); background: var(--green-950); color: #fff; }
.public-links { display: flex; align-items: center; gap: 1.2rem; }
.public-links a:not(.btn) { color: rgba(255, 255, 255, .8); font-weight: 500; font-size: .92rem; }
.hero { background: var(--green-950); color: #fff; position: relative; overflow: hidden; background-image: radial-gradient(60% 80% at 80% 20%, rgba(17, 118, 64, .55), transparent 60%), radial-gradient(40% 50% at 10% 90%, rgba(227, 161, 43, .18), transparent 60%); }
.hero::after { content: ""; position: absolute; inset: auto -10% -40% -10%; height: 60%; background: radial-gradient(50% 100% at 50% 100%, rgba(255, 255, 255, .06), transparent 70%); pointer-events: none; }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; align-items: center; max-width: 1200px; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 3rem); }
.hero-copy .alert { max-width: 480px; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.75rem 0 2.25rem; }
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-size: 2rem; color: var(--gold-200); line-height: 1; }
.hero-stats span { font-size: .82rem; opacity: .75; }
.hero-art { position: relative; height: 380px; }
.art-card { position: absolute; display: flex; flex-direction: column; gap: .6rem; background: var(--paper); color: var(--ink); border-radius: var(--r-lg); padding: 1rem 1.1rem; box-shadow: var(--shadow-lg); width: 250px; }
.art-card div { display: flex; flex-direction: column; }
.art-card small { color: var(--muted); font-size: .8rem; }
.art-card .tag { align-self: flex-start; }
.art-card-a { top: 10px; left: 0; transform: rotate(-3deg); }
.art-card-b { bottom: 10px; right: 0; transform: rotate(2.5deg); }
.art-connect { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; }
.art-line { position: absolute; width: 230px; height: 2px; background: repeating-linear-gradient(90deg, var(--gold-500) 0 8px, transparent 8px 16px); transform: rotate(-32deg); opacity: .8; }
.art-badge { position: relative; display: inline-flex; align-items: center; gap: .4rem; background: var(--gold-500); color: var(--green-950); padding: .45rem .8rem; border-radius: 999px; font-size: .78rem; font-weight: 700; box-shadow: var(--shadow-md); white-space: nowrap; }
.section { padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 3rem); }
.section-alt { background: var(--green-50); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-inner.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; counter-reset: s; }
.steps li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem; display: flex; flex-direction: column; gap: .5rem; box-shadow: var(--shadow-sm); }
.steps h3 { font-family: var(--font-display); font-size: 1.15rem; color: var(--green-950); }
.steps p { color: var(--ink-2); font-size: .92rem; margin: 0; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green-900); color: var(--gold-200); font-family: var(--font-display); font-weight: 700; }
.check-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.check-points li { position: relative; padding-left: 2rem; font-size: 1rem; color: var(--ink-2); }
.check-points li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--green-800); color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 800; }
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: stretch; }
.about-card, .cta-card { border-radius: var(--r-xl); padding: 2rem; }
.about-card { background: var(--paper); border: 1px solid var(--line); }
.about-card p { color: var(--ink-2); }
.cta-card { background: var(--green-900); color: #fff; display: flex; flex-direction: column; justify-content: center; gap: .5rem; background-image: radial-gradient(80% 80% at 100% 0%, rgba(227, 161, 43, .25), transparent 60%); }
.cta-card h3 { font-family: var(--font-display); font-size: 1.6rem; }
.cta-card .btn { align-self: flex-start; margin-top: .75rem; background: var(--gold-500); color: var(--green-950); }
.public-footer { padding: 1.5rem clamp(1rem, 4vw, 3rem); border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.prose h3 { font-family: var(--font-display); margin: 1.5rem 0 .4rem; color: var(--green-950); }
.prose { max-width: 720px; }

/* Auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-side { background: var(--green-950); color: #fff; padding: clamp(1.5rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; background-image: radial-gradient(60% 60% at 100% 0%, rgba(17, 118, 64, .5), transparent 60%), radial-gradient(40% 40% at 0% 100%, rgba(227, 161, 43, .2), transparent 60%); }
.auth-side blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; font-weight: 500; letter-spacing: -.02em; max-width: 26ch; }
.auth-side blockquote footer { font-family: var(--font-body); font-size: .9rem; opacity: .7; margin-top: 1rem; font-weight: 500; }
.auth-side-note { opacity: .7; font-size: .88rem; }
.auth-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 5vw, 4rem); max-width: 560px; width: 100%; margin: 0 auto; }
.auth-card.center { align-items: center; text-align: center; justify-content: center; min-height: 100vh; }
.auth-card .display { margin-bottom: 1.25rem; }
.register-wrap { max-width: 900px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 4rem; }
.register-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.register-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.25rem, 4vw, 2.5rem); box-shadow: var(--shadow-md); }
.register-card .display { margin-bottom: .5rem; }

/* Responsive */
@media (max-width: 1100px) {
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tax-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); z-index: 40; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-grid; }
  .content { padding: 1.1rem 1rem 5.5rem; }
  .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--paper); border-top: 1px solid var(--line); padding: .35rem 0 max(.35rem, env(safe-area-inset-bottom)); }
  .bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem 0; color: var(--muted); font-size: .68rem; font-weight: 600; text-decoration: none !important; }
  .bottom-nav a.active { color: var(--green-800); }
  .bottom-nav .dot { position: absolute; top: 4px; right: calc(50% - 14px); width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); }
  .topbar-name { display: none; }
  .directory { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.open { display: flex; }
  .filters-toggle { display: inline-flex; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-side { position: static; }
  .dash-grid, .conn-grid, .section-inner.split, .about, .hero-inner { grid-template-columns: 1fr; }
  .hero-art { height: 320px; max-width: 460px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { min-height: 220px; }
  .stat-row, .stat-row-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stepper li { font-size: 0; gap: 0; justify-content: center; }
  .stepper li span { font-size: .75rem; }
  .public-links a:not(.btn) { display: none; }
  .hero-art { display: none; }
  .hero-stats { gap: 1.25rem; }
  .page-head { align-items: flex-start; }
  .page-head .btn { width: 100%; }
  .btn-row .btn { flex: 1; }
  .contact-list li { grid-template-columns: 1fr; gap: .2rem; }
  .contact-list li .btn { justify-self: start; }
  .toast-root { left: 1rem; right: 1rem; bottom: 4.5rem; }
  .toast { max-width: none; }
  .table { font-size: .82rem; }
  .filter-bar .input, .filter-bar .select { flex-basis: 100%; }
  .modal { padding: .5rem; align-items: end; }
  .modal-card { border-radius: var(--r-lg); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Respond page (WhatsApp Accept / Reject links) */
.respond-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
.respond-grid .highlight { border-color: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-100); }
.respond-reject .card-title { color: var(--red); }
