/* SHAADI BOOK - design tokens + components. Burgundy primary, champagne-gold accents, warm ivory canvas. */
:root {
  --maroon: #7B1428; --maroon-d: #5E0F1F; --maroon-l: #F7E9EC; --maroon-xl: #FBF3F5;
  --gold: #C9A45C; --gold-d: #9C7A33; --gold-l: #F6EEDC;
  --bg: #FAF8F3; --card: #FFFFFF; --ink: #24212A; --muted: #77717A; --line: #ECE7DD; --line2: #E0D9CB;
  --good: #2E7D5B; --good-l: #E5F3EC; --warn: #B7791F; --warn-l: #FBF1DC; --bad: #B0343C; --bad-l: #F9E6E7;
  --radius: 14px; --radius-s: 10px;
  --shadow: 0 1px 2px rgba(36,33,42,.05), 0 4px 14px rgba(36,33,42,.05);
  --shadow-l: 0 18px 50px rgba(36,33,42,.18);
  --side-w: 264px; --top-h: 64px; --bnav-h: 62px;
  --f-en: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-hi: 'Noto Sans Devanagari', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-hi); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.lang-en { font-family: var(--f-en); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.005em; }
p { margin: 0; }
a { color: var(--maroon); }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 70%, transparent); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: var(--radius-s); border: 1px solid transparent; font-weight: 600; font-size: .93rem; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--maroon); color: #fff; box-shadow: 0 2px 8px rgba(123,20,40,.22); }
.btn-primary:hover:not([disabled]) { background: var(--maroon-d); }
.btn-gold { background: var(--gold); color: #3a2a06; }
.btn-gold:hover:not([disabled]) { background: #d4b06a; }
.btn-ghost { background: var(--card); border-color: var(--line2); color: var(--ink); }
.btn-ghost:hover:not([disabled]) { border-color: var(--maroon); color: var(--maroon); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover:not([disabled]) { background: #8f2830; }
.btn-text { background: none; color: var(--maroon); padding: 0 8px; min-height: 36px; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .85rem; }
.btn-lg { min-height: 50px; padding: 0 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; font-size: 1.05rem; color: var(--muted); }
.icon-btn:hover { color: var(--maroon); border-color: var(--maroon); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > label, .lbl { font-size: .8rem; font-weight: 600; color: var(--muted); }
.field .req { color: var(--bad); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: var(--radius-s); background: #fff; color: var(--ink); font: inherit; font-size: .95rem; }
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px var(--maroon-l); }
.input.err { border-color: var(--bad); background: var(--bad-l); }
.err-msg { color: var(--bad); font-size: .8rem; }
.hint { color: var(--muted); font-size: .8rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.money { position: relative; }
.money > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.money .input { padding-left: 28px; font-variant-numeric: tabular-nums; }

/* ---------- chips / badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; cursor: pointer; font-size: .88rem; font-weight: 500; user-select: none; }
.chip:hover { border-color: var(--maroon); }
.chip.on { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.chip.gold.on { background: var(--gold-l); border-color: var(--gold); color: var(--gold-d); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--maroon-l); color: var(--maroon); }
.badge.gold { background: var(--gold-l); color: var(--gold-d); }
.badge.good { background: var(--good-l); color: var(--good); }
.badge.warn { background: var(--warn-l); color: var(--warn); }
.badge.grey { background: #EEEAE2; color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-h h3 { font-size: 1.02rem; }
.stat { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.stat .k { font-size: .78rem; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat .k i { color: var(--gold-d); font-size: 1rem; }
.stat .v { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .s { font-size: .78rem; color: var(--muted); }
a.card.stat:hover { border-color: var(--gold); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: var(--side-w); flex: none; position: sticky; top: 0; height: 100vh; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 60; }
.brand { display: flex; align-items: center; gap: 11px; padding: 18px 20px 14px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--maroon), var(--maroon-d)); color: var(--gold); display: grid; place-items: center; font-size: 1.1rem; }
.brand b { font-size: 1.02rem; letter-spacing: .04em; display: block; line-height: 1.1; }
.brand small { color: var(--muted); font-size: .72rem; }
.wsel { margin: 0 14px 10px; }
.wsel select { width: 100%; min-height: 42px; border-radius: var(--radius-s); border: 1px solid var(--line2); padding: 0 10px; background: var(--gold-l); font: inherit; font-weight: 600; font-size: .86rem; color: var(--ink); }
.side nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav-a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: #4a4552; font-weight: 500; font-size: .9rem; margin: 1px 0; }
.nav-a i { font-size: 1.05rem; width: 20px; text-align: center; color: var(--muted); }
.nav-a:hover { background: var(--maroon-xl); color: var(--maroon); }
.nav-a.on { background: var(--maroon-l); color: var(--maroon); font-weight: 700; }
.nav-a.on i { color: var(--maroon); }
.nav-a.soon { opacity: .5; cursor: default; }
.nav-a.soon:hover { background: none; color: #4a4552; }
.nav-a .badge { margin-left: auto; }
.nav-sep { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 14px 12px 4px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 50; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 28px; background: rgba(250,248,243,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .burger { display: none; }
.top .t-title { font-weight: 700; font-size: 1.02rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .sp { flex: 1; }
.page { padding: 26px 28px 40px; max-width: 1180px; width: 100%; margin: 0 auto; }
.page-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-h h1 { font-size: 1.5rem; }
.page-h p { color: var(--muted); margin-top: 4px; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-l); padding: 6px; display: none; z-index: 70; }
.menu.open .menu-pop { display: block; }
.menu-pop a, .menu-pop button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: 8px; text-decoration: none; color: var(--ink); cursor: pointer; font-size: .9rem; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--maroon-xl); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--maroon-l); color: var(--maroon); font-weight: 700; display: grid; place-items: center; border: 0; cursor: pointer; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.bnav { display: none; }
.fab { display: none; }
.scrim { display: none; }

/* ---------- hero / countdown ---------- */
.hero { background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-d) 100%); color: #fff; border-radius: 18px; padding: 24px 26px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -50px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(201,164,92,.18); }
.hero h1 { font-size: 1.45rem; }
.hero p { color: rgba(255,255,255,.82); margin-top: 4px; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: .85rem; color: rgba(255,255,255,.88); }
.hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero .meta i { color: var(--gold); }
.count { text-align: center; background: rgba(255,255,255,.1); border: 1px solid rgba(201,164,92,.55); border-radius: 16px; padding: 12px 24px; min-width: 130px; position: relative; z-index: 1; }
.count b { display: block; font-size: 2.6rem; font-weight: 800; line-height: 1.05; color: var(--gold); font-variant-numeric: tabular-nums; }
.count small { font-size: .78rem; letter-spacing: .04em; color: rgba(255,255,255,.85); }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 600; }
.row .m { color: var(--muted); font-size: .82rem; }
.dateblock { width: 52px; flex: none; text-align: center; border-radius: 10px; background: var(--gold-l); padding: 6px 0; }
.dateblock b { display: block; font-size: 1.2rem; line-height: 1.1; color: var(--maroon); }
.dateblock small { font-size: .68rem; text-transform: uppercase; color: var(--gold-d); font-weight: 700; }
.dateblock.none { background: #EEEAE2; color: var(--muted); font-size: 1.1rem; padding: 12px 0; }
.check { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.check:last-child { border-bottom: 0; }
.check .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; flex: none; font-size: .8rem; color: #fff; }
.check.done .dot { background: var(--good); border-color: var(--good); }
.check.done .tx { color: var(--muted); text-decoration: line-through; }
.progress { height: 8px; border-radius: 99px; background: #EEEAE2; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--maroon)); border-radius: 99px; transition: width .4s; }
.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty .ei { width: 64px; height: 64px; border-radius: 50%; background: var(--gold-l); color: var(--gold-d); display: grid; place-items: center; font-size: 1.7rem; margin: 0 auto 14px; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }
.qa { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.qa button, .qa a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; cursor: pointer; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .86rem; text-align: center; }
.qa i { font-size: 1.4rem; color: var(--maroon); }
.qa button:hover, .qa a:hover { border-color: var(--gold); background: var(--gold-l); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--gold-l); border: 1px solid #E9D9B2; font-size: .88rem; }
.notice i { color: var(--gold-d); font-size: 1.1rem; margin-top: 2px; }
.notice.bad { background: var(--bad-l); border-color: #EBC6C8; }
.notice.bad i { color: var(--bad); }

/* ---------- skeleton / toast / drawer / modal ---------- */
.sk { background: linear-gradient(90deg, #EFEBE2 25%, #F7F4EC 37%, #EFEBE2 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 10px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-line { height: 14px; margin: 10px 0; }
.sk-card { height: 96px; }
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 420px; }
.toast { pointer-events: auto; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-l); font-size: .9rem; display: flex; align-items: center; gap: 10px; animation: tin .2s ease; }
.toast.ok i { color: #7ee0b0; } .toast.err { background: var(--bad); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.overlay { position: fixed; inset: 0; background: rgba(36,33,42,.45); z-index: 150; display: flex; justify-content: flex-end; animation: fin .15s; }
@keyframes fin { from { opacity: 0; } }
.drawer { background: #fff; width: min(460px, 100%); height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow-l); animation: din .22s ease; }
@keyframes din { from { transform: translateX(40px); opacity: 0; } }
.drawer-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-h h3 { font-size: 1.05rem; }
.drawer-b { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.modal-wrap { position: fixed; inset: 0; background: rgba(36,33,42,.5); z-index: 180; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 16px; max-width: 420px; width: 100%; padding: 24px; box-shadow: var(--shadow-l); }
.modal h3 { margin-bottom: 8px; } .modal p { color: var(--muted); }
.modal .acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }

/* ---------- wizard ---------- */
.wiz { max-width: 720px; margin: 0 auto; padding: 22px 16px 60px; }
.wiz-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.wiz-steps { display: flex; gap: 5px; margin-bottom: 26px; }
.wiz-steps i { flex: 1; height: 5px; border-radius: 99px; background: #E6E0D2; }
.wiz-steps i.on { background: var(--maroon); } .wiz-steps i.cur { background: var(--gold); }
.wiz h1 { font-size: 1.6rem; margin-bottom: 6px; }
.wiz .sub { color: var(--muted); margin-bottom: 22px; }
.wiz-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice button { text-align: left; padding: 18px; border-radius: 14px; border: 1.5px solid var(--line2); background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.choice button i { font-size: 1.5rem; color: var(--maroon); }
.choice button b { font-size: 1rem; } .choice button span { color: var(--muted); font-size: .82rem; }
.choice button.on { border-color: var(--maroon); background: var(--maroon-xl); box-shadow: 0 0 0 3px var(--maroon-l); }
.welcome { text-align: center; padding: 30px 0 10px; }
.welcome .logo { width: 84px; height: 84px; border-radius: 24px; background: linear-gradient(135deg, var(--maroon), var(--maroon-d)); color: var(--gold); display: grid; place-items: center; font-size: 2.4rem; margin: 0 auto 22px; box-shadow: 0 12px 30px rgba(123,20,40,.3); }
.fnlist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fnopt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line2); border-radius: 12px; background: #fff; cursor: pointer; min-height: 52px; }
.fnopt.on { border-color: var(--maroon); background: var(--maroon-xl); }
.fnopt .bx { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line2); display: grid; place-items: center; color: #fff; font-size: .8rem; flex: none; }
.fnopt.on .bx { background: var(--maroon); border-color: var(--maroon); }
.linkrow { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: #fff; flex-wrap: wrap; }
.linkrow code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; color: var(--muted); }
.perm-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 10px; }
.sw { position: relative; width: 44px; height: 26px; flex: none; }
.sw input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.sw span { position: absolute; inset: 0; border-radius: 99px; background: #D9D3C6; transition: .15s; pointer-events: none; }
.sw span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .15s; }
.sw input:checked + span { background: var(--good); } .sw input:checked + span::after { left: 21px; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .side { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .22s; box-shadow: var(--shadow-l); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(36,33,42,.45); z-index: 55; }
  .top .burger { display: inline-grid; }
  .top, .page { padding-left: 18px; padding-right: 18px; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .page { padding-top: 18px; padding-bottom: calc(var(--bnav-h) + 90px); }
  .page-h h1 { font-size: 1.3rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .choice { grid-template-columns: 1fr; } .fnlist { grid-template-columns: 1fr; }
  .hero { padding: 20px; } .hero h1 { font-size: 1.2rem; }
  .count { width: 100%; display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 10px; }
  .count b { font-size: 2rem; }
  .bnav { display: flex; position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; height: var(--bnav-h); background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .68rem; font-weight: 600; }
  .bnav a i { font-size: 1.25rem; } .bnav a.on { color: var(--maroon); }
  .fab { display: grid; place-items: center; position: fixed; z-index: 95; right: 16px; bottom: calc(var(--bnav-h) + 16px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--maroon); color: #fff; font-size: 1.5rem; box-shadow: 0 8px 22px rgba(123,20,40,.4); cursor: pointer; }
  .overlay { align-items: flex-end; justify-content: stretch; }
  .drawer { width: 100%; height: auto; max-height: 92vh; border-radius: 18px 18px 0 0; animation: sheet .25s ease; }
  @keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
  .toasts { bottom: calc(var(--bnav-h) + 16px); }
  .top { padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
body.large-text { font-size: 17px; }

.btn[disabled] .bi-arrow-repeat { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- phase 2: money ---------- */
.toast-act { margin-left: 8px; background: rgba(255,255,255,.18); border: 0; color: #fff; font-weight: 700; padding: 4px 12px; border-radius: 8px; cursor: pointer; }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabbar button { background: none; border: 0; padding: 11px 16px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tabbar button.on { color: var(--maroon); border-bottom-color: var(--maroon); }
.stat .v.neg { color: var(--bad); } .stat .v.pos { color: var(--good); }
.bar { height: 10px; border-radius: 99px; background: #EEEAE2; overflow: hidden; position: relative; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--maroon); }
.bar > i.over { background: var(--bad); } .bar > i.good { background: var(--good); } .bar > i.gold { background: var(--gold); }
.cat-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr minmax(90px, auto); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.cat-row:last-child { border-bottom: 0; } .cat-row:hover { background: var(--maroon-xl); }
.cat-row .n { font-weight: 600; } .cat-row .nums { text-align: right; font-variant-numeric: tabular-nums; font-size: .86rem; }
.cat-row .nums small { display: block; color: var(--muted); }
.trend { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 8px; }
.trend > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.trend i { width: 100%; max-width: 38px; background: linear-gradient(180deg, var(--gold), var(--maroon)); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.trend small { font-size: .65rem; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters .input { width: auto; min-height: 38px; flex: 1 1 130px; max-width: 220px; font-size: .86rem; }
.amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.in { color: var(--good); } .amt.out { color: var(--maroon); }
.total-line { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--gold-l); border-radius: 10px; margin-bottom: 12px; font-size: .88rem; font-weight: 600; }
.qe { border: 1.5px solid var(--gold); background: linear-gradient(180deg, #fff, var(--gold-l)); }
.qe .big { font-size: 1.5rem; font-weight: 800; min-height: 56px; font-variant-numeric: tabular-nums; }
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line2); border-radius: 10px; box-shadow: var(--shadow-l); z-index: 20; max-height: 240px; overflow: auto; }
.ac-list button { display: flex; width: 100%; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 0; background: none; cursor: pointer; text-align: left; }
.ac-list button:hover { background: var(--maroon-xl); }
.hist { font-size: .8rem; color: var(--good); background: var(--good-l); padding: 6px 10px; border-radius: 8px; margin-top: 6px; }
.vcard { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.vcard .nums { display: flex; gap: 18px; flex-wrap: wrap; font-size: .84rem; } .vcard .nums b { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 14px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--maroon); color: #fff; }
.tight .row { padding: 10px 0; }
.lock { color: var(--gold-d); }
@media (max-width: 720px) { .cat-row { grid-template-columns: 1fr auto; } .cat-row .bar { grid-column: 1 / -1; order: 3; } .vcard { grid-template-columns: 1fr; } .filters .input { max-width: none; } }
@media print { .side, .top, .bnav, .fab, .toasts { display: none !important; } }

/* ---------- phase 4: checklist calendar ---------- */
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calday { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; min-height: 64px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; }
.calday[disabled] { cursor: default; background: #FBF9F4; color: var(--muted); }
.calday:not([disabled]):hover { border-color: var(--gold); }
.calday.today { border-color: var(--maroon); box-shadow: inset 0 0 0 1px var(--maroon); }
.calday.wed { background: var(--gold-l); }
@media (max-width: 720px) { .calday { min-height: 52px; } }
