/* =====================================================================
   Vasavi Chits — website styles (no build step; edit directly)
   Palette: navy ink + temple gold on a cool paper background.
   ===================================================================== */
:root {
  --ink: #0e2340;
  --navy: #13305a;
  --navy-2: #1d4277;
  --gold: #c9a24b;
  --gold-deep: #9c7a2e;
  --gold-soft: #f3e8cb;
  --paper: #f6f7f9;
  --card: #ffffff;
  --text: #1b2433;
  --muted: #5b6678;
  --line: #dde3ec;
  --line-2: #eef1f5;
  --green: #1f7a55;
  --green-bg: #e6f4ed;
  --amber: #8a5a00;
  --amber-bg: #fdf1d8;
  --orange: #a3470e;
  --orange-bg: #fde7d9;
  --red: #b42318;
  --red-bg: #fde8e7;
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(14, 35, 64, .06), 0 8px 24px -12px rgba(14, 35, 64, .18);
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--navy-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
[x-cloak] { display: none !important; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; }
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .section { padding: 52px 0; } }

/* ----------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent; font: 600 .97rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #d8b45f; color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { background: #fff; color: var(--red); border-color: #f1c4c0; }
.btn-danger:hover { background: var(--red-bg); color: var(--red); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--navy-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:disabled { color: var(--muted); text-decoration: none; cursor: default; }

/* ----------------------------------------------------------- header */
.topbar { background: var(--ink); color: #c9d4e4; font-size: .82rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; min-height: 34px; align-items: center; }
.topbar a { color: #fff; text-decoration: none; }
@media (max-width: 640px) { .topbar .hide-sm { display: none; } }
.header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 24px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { height: 42px; width: auto; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: var(--gold); display: grid; place-items: center; font: 400 1.35rem/1 var(--serif); }
.brand-name { font: 400 1.3rem/1.1 var(--serif); }
.brand-name small { display: block; font: 500 .72rem/1.2 var(--sans); color: var(--muted); letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--line-2); }
.nav a.is-active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; color: var(--ink); }
@media (max-width: 900px) {
  .nav, .header-actions .hide-md { display: none; }
  .menu-toggle { display: grid; place-items: center; }
}
.mobile-menu { border-top: 1px solid var(--line); background: #fff; padding: 12px 20px 20px; }
.mobile-menu a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line-2); color: var(--text); text-decoration: none; font-weight: 500; }
.mobile-menu a.btn { display: flex; margin-top: 14px; border-bottom: 1.5px solid transparent; justify-content: center; text-align: center; font-weight: 600; }
.mobile-menu a.btn-primary, .mobile-menu a.btn-primary:hover { color: #fff; }
.mobile-menu a.btn-light { color: var(--ink); border-bottom-color: var(--line); }

/* ----------------------------------------------------------- alerts */
.flash-zone { position: fixed; top: 84px; right: 16px; left: 16px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.alert { pointer-events: auto; max-width: 440px; width: 100%; display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .95rem; }
.alert-success { border-left: 4px solid var(--green); }
.alert-error { border-left: 4px solid var(--red); }
.alert-info { border-left: 4px solid var(--gold); }
.alert button { margin-left: auto; background: none; border: 0; font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--muted); }
.notice { padding: 14px 16px; border-radius: var(--radius); background: var(--gold-soft); color: #5a4512; font-size: .95rem; }
.notice-red { background: var(--red-bg); color: var(--red); }
.notice-green { background: var(--green-bg); color: var(--green); }

/* ----------------------------------------------------------- pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-orange { background: var(--orange-bg); color: var(--orange); }
.pill-red { background: var(--red-bg); color: var(--red); }
.pill-navy { background: #e4ebf5; color: var(--navy); }
.pill-gold { background: var(--gold-soft); color: var(--gold-deep); }

/* ----------------------------------------------------------- hero */
.hero { position: relative; background: var(--ink); color: #dce5f2; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(900px 420px at 85% -10%, rgba(201,162,75,.22), transparent 60%),
  repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 64px); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.hero h1 { color: #fff; max-width: 13ch; }
.hero-lead { font-size: 1.15rem; max-width: 46ch; color: #c3cfe0; }
.hero .row { margin-top: 28px; }
.hero-facts { display: flex; gap: 28px; margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); flex-wrap: wrap; }
.hero-facts div { font-size: .88rem; color: #9fb0c8; }
.hero-facts strong { display: block; font: 400 1.5rem/1.2 var(--serif); color: var(--gold); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; } .hero h1 { max-width: none; } }

/* ----------------------------------------------------------- passbook (signature element) */
.passbook { position: relative; background: #fff; color: var(--text); border-radius: var(--radius-lg); box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); overflow: hidden; }
.passbook-spine { height: 10px; background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-deep)); }
.passbook-body { padding: 22px 24px 24px; }
.passbook-title { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.passbook-title h3 { margin: 0; }
.passbook-value { font: 400 2.1rem/1.1 var(--serif); color: var(--ink); margin: 14px 0 2px; }
.passbook-lines { margin-top: 16px; border-top: 1px dashed var(--line); }
.passbook-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.passbook-line span:first-child { color: var(--muted); }
.passbook-line span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.passbook-tilt { transform: rotate(1.5deg); }
@media (max-width: 900px) { .passbook-tilt { transform: none; } }

/* slot strip: one cell per month/slot */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 5px; margin-top: 14px; }
.slot { aspect-ratio: 1; border-radius: 6px; display: grid; place-items: center; font-size: .7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.slot-empty { background: #fff; border: 1.5px solid var(--gold); color: var(--gold-deep); }
.slot-filled { background: var(--navy); color: #c3d0e3; border: 1.5px solid var(--navy); }
.slot-mine { background: var(--gold); color: var(--ink); border: 1.5px solid var(--gold-deep); }
.slots-lg { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.slots-lg .slot { font-size: .85rem; border-radius: 8px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }

.meter { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--navy-2)); border-radius: 999px; }
.meter-gold > span { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }

/* ----------------------------------------------------------- chit cards */
.chit-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.chit-card:hover { border-color: var(--navy-2); box-shadow: var(--shadow); color: inherit; }
.chit-card .passbook-spine { height: 6px; }
.chit-card-body { padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.chit-card h3 { font-size: 1.15rem; margin: 0; }
.chit-card .value { font: 400 1.75rem/1.15 var(--serif); color: var(--ink); margin-top: 10px; }
.chit-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; padding: 12px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.chit-facts div { font-size: .78rem; color: var(--muted); }
.chit-facts strong { display: block; font-size: .98rem; color: var(--text); font-variant-numeric: tabular-nums; }
.chit-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; font-size: .85rem; }

/* ----------------------------------------------------------- generic panels */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.panel-flat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel h3 { margin-bottom: 6px; }
.band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-ink { background: var(--ink); color: #c3cfe0; }
.band-ink h2, .band-ink h3 { color: #fff; }

/* how-it-works: a true sequence, so it is numbered */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.step { counter-increment: step; padding: 22px 22px 8px 0; position: relative; }
.step + .step { padding-left: 22px; border-left: 1px solid var(--line); }
.step::before { content: counter(step); display: block; font: 400 2.4rem/1 var(--serif); color: var(--gold); margin-bottom: 14px; }
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } .step:nth-child(3) { border-left: 0; padding-left: 0; } .step:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .step + .step { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }

.feature { padding: 4px 0; }
.feature svg { width: 28px; height: 28px; color: var(--gold-deep); margin-bottom: 10px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-weight: 600; color: var(--ink); font-size: 1.02rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 1.6rem/1 var(--serif); color: var(--gold-deep); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 16px; margin: 0; max-width: 68ch; }

/* calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.calc-in { padding: 28px; }
.calc-out { background: var(--ink); color: #c3cfe0; padding: 28px; display: flex; flex-direction: column; justify-content: center; }
.calc-out .big { font: 400 2.5rem/1.1 var(--serif); color: var(--gold); margin: 4px 0 16px; }
.calc-out .passbook-line { border-color: rgba(255,255,255,.14); }
.calc-out .passbook-line span:first-child { color: #9fb0c8; }
.calc-out .passbook-line span:last-child { color: #fff; }
input[type=range] { width: 100%; accent-color: var(--navy); }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 16px; }
.label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.label .opt { font-weight: 400; color: var(--muted); }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; font: 400 1rem var(--sans); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 110px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 4px rgba(29,66,119,.12); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--red); }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; border: 1.5px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--line-2); color: var(--muted); font-weight: 600; }
.input-group .input { border-radius: 0 var(--radius) var(--radius) 0; }
.input-wrap { position: relative; }
.input-wrap .toggle-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; font-size: .82rem; font-weight: 600; }
.error { color: var(--red); font-size: .85rem; }
.hint { color: var(--muted); font-size: .82rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--navy); }
.otp-input { letter-spacing: .6em; text-align: center; font: 600 1.6rem var(--sans); font-variant-numeric: tabular-nums; }
.hp { position: absolute; left: -9999px; }

/* auth layout */
.auth { min-height: calc(100vh - 104px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--ink); color: #c3cfe0; padding: 56px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 64px); }
.auth-side > * { position: relative; max-width: 420px; }
.auth-side h2 { color: #fff; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 20px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 2rem; }
.auth-foot { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .95rem; color: var(--muted); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ----------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; padding: 12px 14px; background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 700; background: #fafbfc; border-top: 1px solid var(--line); }

/* ----------------------------------------------------------- account */
.page-head { background: #fff; border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: 32px; padding-bottom: 28px; }
.page-head h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.tabs { display: flex; gap: 4px; margin-top: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .93rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.is-active { color: var(--ink); border-bottom-color: var(--gold); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; }
.stat span { display: block; font-size: .85rem; color: var(--muted); }
.stat strong { display: block; font: 400 1.6rem/1.25 var(--serif); color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); }
.empty { text-align: center; padding: 48px 24px; background: #fff; border: 1.5px dashed var(--line); border-radius: var(--radius-lg); }
.empty h3 { margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 48ch; margin: 0 auto 18px; }

/* ----------------------------------------------------------- filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 24px; }
.filters .field { flex: 1 1 160px; margin: 0; }
.filters .field + .field { margin: 0; }
.filters .select { min-height: 44px; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--text); font-size: .9rem; }
.pager .is-current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager .is-disabled { color: #b5bdc9; }

/* ----------------------------------------------------------- footer */
.footer { background: var(--ink); color: #9fb0c8; padding: 56px 0 28px; margin-top: 0; font-size: .93rem; }
.footer a { color: #dce5f2; text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer h4 { color: #fff; font-family: var(--sans); font-weight: 600; font-size: .95rem; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: 8px; }
.footer .brand { color: #fff; }
.footer .brand-mark { background: var(--gold); color: var(--ink); }
.footer .brand-name small { color: #9fb0c8; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 56px; height: 56px; border-radius: 50%; background: #1fa855; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); }
.wa-float:hover { background: #178a45; color: #fff; }
.wa-float svg { width: 28px; height: 28px; }

/* ----------------------------------------------------------- admin */
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: #9fb0c8; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { color: #fff; margin: 0 6px 24px; }
.admin-side .brand-name small { color: #9fb0c8; }
.admin-side .brand-mark { background: var(--gold); color: var(--ink); }
.admin-side nav a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; color: #c3cfe0; text-decoration: none; font-weight: 500; font-size: .95rem; }
.admin-side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-side nav a.is-active { background: rgba(201,162,75,.16); color: var(--gold); }
.admin-side .count { background: var(--gold); color: var(--ink); border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 1px 8px; }
.admin-main { min-width: 0; }
.admin-top { background: #fff; border-bottom: 1px solid var(--line); padding: 16px 28px; display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; }
.admin-top h1 { font-size: 1.5rem; margin: 0; }
.admin-body { padding: 28px; }
.admin-mobile-nav { display: none; }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { display: none; }
  .admin-mobile-nav { display: flex; gap: 4px; overflow-x: auto; background: var(--ink); padding: 8px 12px; }
  .admin-mobile-nav a { color: #c3cfe0; text-decoration: none; padding: 8px 12px; border-radius: 8px; white-space: nowrap; font-size: .9rem; }
  .admin-mobile-nav a.is-active { background: rgba(201,162,75,.18); color: var(--gold); }
  .admin-body, .admin-top { padding-left: 16px; padding-right: 16px; }
}
.req { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; }
.req + .req { margin-top: 12px; }
.req-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: 20px; }
@media (max-width: 1000px) { .req-grid { grid-template-columns: 1fr; gap: 14px; } }
.req h3 { font-family: var(--sans); font-weight: 700; font-size: 1.02rem; margin: 0; }
.req .note { background: var(--paper); border-radius: 8px; padding: 8px 10px; font-size: .88rem; margin-top: 8px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form .select, .inline-form .input { min-height: 38px; padding: 6px 10px; width: auto; flex: 1 1 140px; font-size: .9rem; }
.logo-preview { width: 120px; height: 120px; border: 1px dashed var(--line); border-radius: 12px; display: grid; place-items: center; background: #fff; overflow: hidden; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* prose (legal/about) */
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose p, .prose li { color: #374255; }
.prose ul { padding-left: 1.2em; }

/* passbook cards inside page content use a quieter shadow than the hero one */
.stack > .passbook, .section-tight .passbook { box-shadow: var(--shadow); }

/* slot states (shared by home, chit page and legends) */
.slot-open { background: #fff; border: 1.5px solid var(--gold); color: var(--gold-deep); }
.slot-taken { background: var(--navy); color: #c3d0e3; border: 1.5px solid var(--navy); }
.slot-closed { background: var(--line-2); color: #a3adbb; border: 1.5px dashed #c9d1dc; }
.slot-company { background: var(--gold-soft); color: var(--gold-deep); border: 1.5px solid var(--gold-soft); }
.legend i.slot-open, .legend i.slot-taken, .legend i.slot-closed, .legend i.slot-company, .legend i.slot-mine { border-width: 1.5px; }
.prize-table td.state { white-space: nowrap; }
.prize-table tr.is-open td { background: #fffdf6; }
.prize-table tr.is-mine td { background: var(--gold-soft); }

.input::placeholder, .textarea::placeholder { text-transform: none; }
.admin { background: linear-gradient(90deg, var(--ink) 240px, var(--paper) 240px); }
@media (max-width: 900px) { .admin { background: var(--paper); } }

/* dues card */
.dues { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 20px 22px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; border-left: 6px solid var(--green); }
.dues-amber { border-left-color: var(--gold); }
.dues-red { border-left-color: var(--red); }
.dues-label { display: block; font-size: .82rem; color: var(--muted); font-weight: 600; }
.dues-amount { display: block; font: 400 2.2rem/1.15 var(--serif); color: var(--ink); margin: 2px 0 4px; }
.dues-red .dues-amount { color: var(--red); }
.dues-break { display: block; font-size: .88rem; color: var(--muted); }
.dues-break b { color: var(--red); }
.dues-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; }
.dues-side strong { font: 400 1.3rem/1.2 var(--serif); color: var(--ink); }
@media (max-width: 560px) { .dues-side { text-align: left; align-items: flex-start; } }

/* admin customer picker */
.pick-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 240px; overflow-y: auto; }
.pick-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; cursor: pointer; font: inherit; font-size: .9rem; }
.pick-item:hover { background: var(--line-2); }
.member-mask { font-weight: 600; letter-spacing: .02em; margin-right: 6px; }
.member-name { font-weight: 600; color: var(--ink, #1b2433); line-height: 1.3; }
.member-phone { font-size: .8rem; color: var(--muted, #5b6678); letter-spacing: .06em; margin-top: 2px; }
.my-prize { display: flex; gap: 16px; align-items: center; margin-top: 18px; padding: 16px 18px; border-radius: var(--radius); background: linear-gradient(135deg, var(--gold-soft), #fff8e6); border: 1px solid var(--gold); }
.my-prize-star { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; font-size: 1.5rem; }
.my-prize-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-deep); }
.my-prize-amount { font-family: var(--serif); font-size: 2rem; line-height: 1.15; color: var(--ink); }
.table tr.is-prize-row td { background: var(--gold-soft); }
.table tr.row-gold td { background: var(--gold-soft); }
/* KYC cards */
.kyc-progress { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.kyc-progress.is-done { background: var(--green-bg); border-color: #b9e0cb; }
.kyc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.kyc-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.kyc-card.is-locked { border-color: #b9e0cb; }
.kyc-card.is-rejected { border-color: #f3b6b1; }
.kyc-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.kyc-req { color: var(--red); margin-left: 3px; font-weight: 700; }
.kyc-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; min-height: 150px; padding: 16px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; }
.kyc-drop:hover, .kyc-drop.is-drag { border-color: var(--gold); background: var(--gold-soft); }
.kyc-drop-icon { font-size: 1.8rem; line-height: 1; }
.kyc-preview { border-radius: var(--radius); overflow: hidden; background: var(--line-2); border: 1px solid var(--line); }
.kyc-preview img { width: 100%; height: 190px; object-fit: contain; background: #fff; }
.kyc-file { display: flex; align-items: center; gap: 12px; padding: 18px 14px; color: var(--text); text-decoration: none; min-width: 0; }
.kyc-file .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kyc-file-icon { flex: none; width: 46px; height: 56px; border-radius: 6px; background: var(--navy); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.leave-box { margin-top: 28px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--card); }
.leave-box summary { cursor: pointer; font-weight: 600; color: var(--muted); font-size: .92rem; }
.pill-gray { background: var(--line-2); color: var(--muted); }
.chit-card.is-mine { border: 2px solid var(--gold); box-shadow: 0 0 0 4px var(--gold-soft), var(--shadow); }
.mine-flag { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; margin: -4px 0 12px; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--gold-soft); color: var(--gold-deep); font-size: .85rem; font-weight: 600; }
/* Pop-up document viewer */
.dv-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(10, 18, 32, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dv-box { width: min(980px, 100%); height: min(88vh, 900px); background: var(--card); border-radius: var(--radius-lg); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.dv-head, .dv-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dv-foot { border-bottom: 0; border-top: 1px solid var(--line); }
.dv-x { border: 0; background: var(--line-2); width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1; cursor: pointer; flex: none; }
.dv-body { flex: 1; overflow: auto; background: #1c2230; display: flex; align-items: center; justify-content: center; }
.dv-body img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .15s; transform-origin: center; cursor: zoom-in; }
.dv-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.dv-file { text-align: center; color: #fff; display: grid; justify-items: center; gap: 10px; }
.dv-file .muted { color: #c9d1de; }
.kyc-open { display: block; position: relative; width: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; font: inherit; text-align: left; }
.kyc-open.kyc-file { display: flex; padding: 18px 14px; cursor: pointer; }
.kyc-zoom { position: absolute; right: 8px; bottom: 8px; background: rgba(14,35,64,.78); color: #fff; font-size: .75rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; }
.slot-reserved { background: var(--navy); color: #c3d0e3; border: 1.5px solid var(--navy); }
.fslides { display: grid; }
.fslide { grid-area: 1 / 1; opacity: 0; transform: translateX(14px); transition: opacity .55s ease, transform .55s ease, visibility .55s; pointer-events: none; visibility: hidden; }
.fslide.on { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
.fdots { grid-area: 2 / 1; display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.fdot { width: 9px; height: 9px; border-radius: 999px; border: 0; padding: 0; background: var(--line); cursor: pointer; transition: width .3s, background .3s; }
.fdot.on { width: 26px; background: var(--gold); }
.admin-search .input { min-height: 38px; padding: 6px 12px; width: 300px; max-width: 46vw; font-size: .9rem; }
@media (max-width: 700px) { .admin-search .input { width: 160px; } }
.timeline { list-style: none; margin: 10px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 12px 12px; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: -23px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); border: 2px solid #fff; }
.timeline .tl-payment::before { background: var(--green); } .timeline .tl-chit::before { background: var(--navy); }
.timeline .tl-kyc::before { background: var(--gold); } .timeline .tl-prize::before { background: var(--gold-deep); } .timeline .tl-agent::before { background: var(--orange); }
.tl-time { display: block; font-size: .74rem; color: var(--muted); }
.agent-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.agent-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-family: var(--serif); font-size: 1.3rem; flex: none; }

/* ------------------------------------------------ tables on phones
   vc.js copies each column heading into data-label, so on small screens
   every row becomes a card of "label : value" lines instead of a wide
   table that must be scrolled sideways. Add data-no-stack to opt out. */
@media (max-width: 640px) {
  .table-wrap:has(> table.stack), div:has(> table.stack) { overflow: visible !important; border: 0; background: none; border-radius: 0; }
  table.table.stack, table.table.stack tbody, table.table.stack tfoot { display: block; width: 100%; }
  table.table.stack thead { display: none; }
  table.table.stack tr { display: block; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 4px 14px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(14,35,64,.04); }
  table.table.stack td { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); text-align: right; white-space: normal; background: none !important; min-width: 0; }
  table.table.stack td:last-child { border-bottom: 0; }
  table.table.stack td::before { content: attr(data-label); flex: 0 0 36%; text-align: left; color: var(--muted) !important; font-size: .8rem; font-weight: 600; padding-top: 2px; }
  table.table.stack td > .td-v { flex: 1 1 auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }
  table.table.stack td > .td-v .nowrap, table.table.stack td > .td-v.nowrap { white-space: normal; }
  table.table.stack td > .td-v .input, table.table.stack td > .td-v .select, table.table.stack td > .td-v input, table.table.stack td > .td-v select { max-width: 100%; min-width: 0; }
  table.table.stack td > .td-v .inline-form { flex-wrap: wrap; justify-content: flex-end; }
  table.table.stack td:not([data-label])::before, table.table.stack td[data-label=""]::before { display: none; }
  table.table.stack td:not([data-label]), table.table.stack td[data-label=""] { justify-content: flex-end; }
  table.table.stack td[colspan] { display: block; text-align: center; }
  table.table.stack td > * { max-width: 100%; }
  table.table.stack td .btn, table.table.stack td form { margin-left: auto; }
  table.table.stack tr.is-mine, table.table.stack tr.row-gold, table.table.stack tr.is-prize-row { background: var(--gold-soft); border-color: #ead9ae; }
  table.table.stack tr.is-open { background: #fffdf6; }
  table.table.stack tfoot tr { background: #fafbfc; font-weight: 700; }

  /* Public chit page: compact month rows */
  table.prize-table.stack tr { display: grid; grid-template-columns: 42px 1fr auto; grid-template-areas: "n d a" "n m m"; column-gap: 12px; row-gap: 2px; padding: 12px 14px; align-items: center; }
  table.prize-table.stack td { display: block; padding: 0; border: 0; text-align: left; }
  table.prize-table.stack td::before { display: none; }
  table.prize-table.stack td.num { grid-area: n; align-self: start; width: 38px; height: 38px; border-radius: 12px; background: var(--tint, #eef2f8); color: var(--ink); display: grid; place-items: center; font-weight: 700; }
  table.prize-table.stack td.nowrap { grid-area: d; color: var(--muted); font-size: .85rem; }
  table.prize-table.stack td.r { grid-area: a; text-align: right; }
  table.prize-table.stack td.state { grid-area: m; padding-top: 4px; }
  table.prize-table.stack td.state .member-name { display: inline; font-weight: 600; }
  table.prize-table.stack td.state .member-phone { display: inline; margin-left: 8px; }
  table.prize-table.stack tr:has(td.state:first-child), table.prize-table.stack tr:has(> td:nth-child(2):last-child) { grid-template-columns: 42px 1fr; grid-template-areas: "n m"; }
}

/* ------------------------------------------------ general phone fixes */
.input, .select, .textarea { max-width: 100%; }
.btn { max-width: 100%; }
.inline-form > * { min-width: 0; max-width: 100%; }
@media (max-width: 760px) {
  .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  aside.panel[style*="sticky"] { position: static !important; }
}
@media (max-width: 640px) {
  .btn { white-space: normal; line-height: 1.25; text-align: center; }
  details[open][style*="inline-block"] { display: block !important; margin-left: 0 !important; margin-top: 6px; }
}
