/* GSK Field App — FE screens. Palette from gstsuvidhakendra design-4. */
:root{
  --saffron:#F7941D; --saffron-deep:#E27F06; --saffron-tint:#FEF3E6; --saffron-ink:#9A5406;
  --leaf:#3AAA35; --leaf-deep:#2B8C27; --leaf-tint:#EAF6E9; --leaf-ink:#1F6B1C;
  --amber:#D99A06; --amber-tint:#FFF4D6; --amber-ink:#7A5600;
  --red:#D64545; --red-tint:#FDECEC; --red-ink:#8F2323;
  --ink:#2E2F33; --body:#55575C; --muted:#80828A;
  --line:#E6E8EC; --line-strong:#CBD3DE;
  --ground:#F6F7F9; --surface:#FFFFFF; --surface-2:#F1F3F6; --page:#E9ECF1;
  --fd:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --fb:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  --r:14px; --rs:10px;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --saffron-tint:rgba(247,148,29,.16); --saffron-ink:#FFC27A;
    --leaf-tint:rgba(58,170,53,.18); --leaf-ink:#8FDB8B;
    --amber-tint:rgba(217,154,6,.18); --amber-ink:#FFD56A;
    --red-tint:rgba(214,69,69,.18); --red-ink:#FF9A9A;
    --ink:#F2F3F5; --body:#C9CCD3; --muted:#8E929B;
    --line:#34363C; --line-strong:#464950;
    --ground:#1C1D21; --surface:#26272C; --surface-2:#2E3036; --page:#141518;
    color-scheme:dark;
  }
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--page);color:var(--ink);font-family:var(--fb);font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
h1,h2,h3,h4{font-family:var(--fd);margin:0;letter-spacing:-.01em}
button{font:inherit;color:inherit;cursor:pointer}
input,select,textarea{font:inherit;color:inherit}
a{color:inherit}
:focus-visible{outline:2px solid var(--saffron);outline-offset:2px}
.num{font-family:var(--fd);font-variant-numeric:tabular-nums}
[hidden]{display:none!important}

/* ---------- app shell ---------- */
.app{max-width:520px;margin:0 auto;min-height:100vh;min-height:100dvh;background:var(--ground);display:flex;flex-direction:column;position:relative}
.app.has-nav{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
@media (min-width:521px){.app{box-shadow:0 0 0 1px var(--line)}}
.appbar{display:flex;align-items:center;gap:10px;padding:calc(10px + env(safe-area-inset-top)) 16px 10px;min-height:56px;position:sticky;top:0;background:var(--ground);z-index:5}
.appbar h1{font-size:19px;font-weight:700}
.appbar .back{width:36px;height:36px;border-radius:50%;border:1px solid var(--line);background:var(--surface);display:grid;place-items:center;flex:none;text-decoration:none}
.appbar .spacer{flex:1}
.content{flex:1;padding:4px 16px 24px;display:flex;flex-direction:column;gap:14px}
.content>*{flex-shrink:0}
.bottomnav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:520px;display:grid;grid-template-columns:repeat(5,1fr);border-top:1px solid var(--line);background:var(--surface);padding:6px 6px calc(10px + env(safe-area-inset-bottom));z-index:10}
.bottomnav a{display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 2px;font-size:10.5px;font-weight:500;color:var(--muted);text-decoration:none;border-radius:var(--rs);position:relative}
.bottomnav a svg{width:22px;height:22px}
.bottomnav a.on{color:var(--saffron-deep)}
.bottomnav a.on svg{stroke:var(--saffron)}
.bottomnav .fab{margin-top:-22px}
.bottomnav .fab i{width:48px;height:48px;border-radius:50%;background:var(--saffron);display:grid;place-items:center;box-shadow:0 8px 18px -8px rgba(247,148,29,.9)}
.bottomnav .fab svg{stroke:#fff;width:24px;height:24px}
.bottomnav .fab.on i{background:var(--saffron-deep)}
svg.i{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
svg.tick{width:13px;height:13px;stroke-width:3}

/* ---------- flash + toast ---------- */
.flash{margin:10px 16px 0;padding:11px 40px 11px 14px;border-radius:var(--rs);font-size:13.5px;font-weight:500;position:relative;line-height:1.4}
.flash.leaf{background:var(--leaf-tint);color:var(--leaf-ink)}
.flash.amber{background:var(--amber-tint);color:var(--amber-ink)}
.flash.red{background:var(--red-tint);color:var(--red-ink)}
.flash button{position:absolute;right:6px;top:6px;width:28px;height:28px;border:0;background:transparent;font-size:18px;line-height:1;color:inherit;opacity:.7;border-radius:50%}
.toast{position:fixed;left:50%;bottom:calc(96px + env(safe-area-inset-bottom));transform:translateX(-50%);background:var(--ink);color:var(--ground);padding:10px 16px;border-radius:12px;font-size:13.5px;font-weight:500;z-index:50;max-width:90vw;box-shadow:0 10px 30px -10px rgba(0,0,0,.5)}
.toast.error{background:var(--red);color:#fff}

/* ---------- components ---------- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px}
.card.flat{background:var(--surface-2);border-color:transparent}
.card h3{font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:600;margin-bottom:10px}
.form-card{display:flex;flex-direction:column;gap:14px}
.form-card h3{margin:0}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;padding:0 18px;border-radius:var(--r);border:1px solid transparent;font-weight:600;font-size:15px;text-decoration:none;width:100%;transition:transform .08s}
.btn:active{transform:scale(.985)}
.btn.p{background:var(--saffron);color:#fff}
.btn.p:active{background:var(--saffron-deep)}
.btn.g{background:var(--leaf);color:#fff}
.btn.o{background:var(--surface);border-color:var(--line-strong);color:var(--ink)}
.btn.q{background:var(--saffron-tint);color:var(--saffron-ink)}
.btn.sm{height:38px;font-size:13px;padding:0 12px;border-radius:var(--rs);width:auto}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.btn svg.i{color:currentColor}
.linkbtn{border:0;background:transparent;color:var(--saffron-deep);font-weight:600;font-size:13px;padding:4px 2px}
.row{display:flex;align-items:center;gap:10px}
.row.between{justify-content:space-between}
.grow{flex:1;min-width:0}
.chip{display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 9px;border-radius:12px;font-size:11.5px;font-weight:600;white-space:nowrap}
.chip.leaf{background:var(--leaf-tint);color:var(--leaf-ink)}
.chip.saff{background:var(--saffron-tint);color:var(--saffron-ink)}
.chip.amber{background:var(--amber-tint);color:var(--amber-ink)}
.chip.red{background:var(--red-tint);color:var(--red-ink)}
.chip.grey{background:var(--surface-2);color:var(--body)}
.chip .dot{width:7px;height:7px;border-radius:50%;background:currentColor}
.pulse .dot{animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.25}}
@media (prefers-reduced-motion:reduce){.pulse .dot,.step.now .d::after{animation:none}}
.muted{color:var(--muted)}.small{font-size:12px}.semi{font-weight:600}
.hint{font-size:11.5px;color:var(--muted);line-height:1.45}
.bar{height:8px;border-radius:4px;background:var(--surface-2);overflow:hidden}
.bar i{display:block;height:100%;border-radius:4px;background:var(--saffron);transition:width .4s}
.bar.leaf i{background:var(--leaf)}
.kpi{display:flex;flex-direction:column;gap:4px;text-decoration:none;color:inherit}
.kpi .v{font-family:var(--fd);font-weight:800;font-size:26px;line-height:1;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.kpi .v .of{color:var(--muted);font-size:15px;font-weight:600}
.kpi .l{font-size:12px;color:var(--muted)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.tile{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px 12px;display:flex;flex-direction:column;gap:10px;text-decoration:none;color:var(--ink);position:relative}
.tile.disabled{opacity:.5;pointer-events:none}
.tile .ic{width:38px;height:38px;border-radius:11px;background:var(--saffron-tint);color:var(--saffron-deep);display:grid;place-items:center}
.tile b{font-size:14px;font-weight:600}
.tile .cnt{position:absolute;top:12px;right:12px}
.list{display:flex;flex-direction:column;gap:10px}
.item{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:12px 14px;display:flex;flex-direction:column;gap:9px;text-decoration:none;color:inherit}
.item .t,.card .t{font-weight:600;font-size:15px;font-family:var(--fd)}
.item .s{font-size:12.5px;color:var(--body)}
.avatar{width:40px;height:40px;border-radius:12px;background:var(--saffron-tint);color:var(--saffron-ink);font-family:var(--fd);font-weight:700;display:grid;place-items:center;flex:none;font-size:14px}
.avatar.lg{width:48px;height:48px;font-size:16px}
.thumb{width:44px;height:44px;border-radius:12px;object-fit:cover;flex:none;background:var(--surface-2)}
.actions{display:flex;gap:8px;border-top:1px solid var(--line);padding-top:9px}
.actions .btn{height:36px;font-size:13px;flex:1;border-radius:var(--rs);padding:0 8px}
.tabs{display:flex;background:var(--surface-2);padding:4px;border-radius:var(--r);gap:4px}
.tabs button{flex:1;height:36px;border:0;border-radius:var(--rs);background:transparent;font-weight:600;font-size:13px;color:var(--body);display:flex;align-items:center;justify-content:center;gap:6px}
.tabs button.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.tabs button em{font-style:normal;font-family:var(--fd);font-size:11px;background:var(--surface-2);border-radius:9px;padding:1px 6px;color:var(--muted)}
.tabs button.on em{background:var(--saffron-tint);color:var(--saffron-ink)}
.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none;flex-wrap:wrap}
.chipbtn{flex:none;height:32px;padding:0 13px;border-radius:16px;border:1px solid var(--line-strong);background:var(--surface);font-weight:500;font-size:13px;color:var(--body);text-decoration:none;display:inline-flex;align-items:center}
.chipbtn.on{background:var(--ink);color:var(--ground);border-color:var(--ink)}
.banner{display:flex;gap:10px;padding:11px 12px;border-radius:var(--rs);font-size:12.5px;line-height:1.4;align-items:flex-start}
.banner.amber{background:var(--amber-tint);color:var(--amber-ink)}
.banner.leaf{background:var(--leaf-tint);color:var(--leaf-ink)}
.banner.saff{background:var(--saffron-tint);color:var(--saffron-ink)}
.banner.red{background:var(--red-tint);color:var(--red-ink)}
.banner svg{margin-top:1px}
.empty{text-align:center;padding:34px 16px;display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--muted)}
.empty svg{width:34px;height:34px;color:var(--line-strong)}
.empty b{color:var(--body);font-size:15px}
.dayhead{font-family:var(--fd);font-weight:700;font-size:13px;color:var(--body);padding:6px 2px 0}

/* ---------- forms ---------- */
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:12.5px;font-weight:600;color:var(--body)}
.field label i{font-style:normal;color:var(--red);margin-left:2px}
.field label small{font-weight:400;color:var(--muted);margin-left:6px}
.inp{height:46px;border:1px solid var(--line-strong);border-radius:var(--rs);background:var(--surface);padding:0 12px;width:100%;font-size:16px}
.inp:focus{border-color:var(--saffron);outline:none;box-shadow:0 0 0 3px var(--saffron-tint)}
.inp.gstin{letter-spacing:.08em;text-transform:uppercase}
textarea.inp{height:auto;min-height:72px;padding:10px 12px;resize:vertical;line-height:1.4}
select.inp{appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 18px) 20px,calc(100% - 13px) 20px;background-size:5px 5px;background-repeat:no-repeat}
.pre{display:flex;align-items:center;border:1px solid var(--line-strong);border-radius:var(--rs);background:var(--surface);overflow:hidden}
.pre:focus-within{border-color:var(--saffron);box-shadow:0 0 0 3px var(--saffron-tint)}
.pre span{padding:0 12px;height:46px;display:flex;align-items:center;border-right:1px solid var(--line);color:var(--body);font-weight:600;background:var(--surface-2)}
.pre input{border:0;height:46px;flex:1;padding:0 12px;font-size:16px;letter-spacing:.06em;background:transparent;min-width:0;outline:none}
.ferr{font-size:12px;color:var(--red);font-weight:500}
.seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:6px}
.seg label{position:relative}
.seg input{position:absolute;opacity:0;inset:0;margin:0}
.seg span{display:flex;align-items:center;justify-content:center;height:42px;border:1px solid var(--line-strong);border-radius:var(--rs);background:var(--surface);font-weight:600;font-size:13px;color:var(--body);text-align:center;padding:0 6px}
.seg input:checked+span{border-color:var(--saffron);background:var(--saffron-tint);color:var(--saffron-ink)}
.seg input:focus-visible+span{outline:2px solid var(--saffron);outline-offset:2px}
.seg.outcome input[value="onboarding"]:checked+span{border-color:var(--leaf);background:var(--leaf-tint);color:var(--leaf-ink)}
.seg.outcome input[value="not_interested"]:checked+span{border-color:var(--line-strong);background:var(--surface-2);color:var(--ink)}
.check{display:flex;gap:10px;align-items:flex-start;font-size:13.5px;color:var(--ink)}
.check input{width:20px;height:20px;margin:1px 0 0;accent-color:var(--saffron);flex:none}
.photo-input{position:relative;display:grid;place-items:center;aspect-ratio:4/3;border-radius:var(--rs);overflow:hidden;background:var(--surface-2);border:1.5px dashed var(--line-strong);cursor:pointer}
.photo-input.small-tile{aspect-ratio:3/1}
.photo-input.has-err{border-color:var(--red)}
.photo-input.has-img{border-style:solid;border-color:var(--leaf)}
.photo-input input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.photo-input img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.photo-input b{display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--body);font-weight:600;font-size:13px;text-align:center;padding:10px;pointer-events:none}
.photo-input.has-img b{position:absolute;right:8px;top:8px;height:28px;padding:0 10px;border-radius:14px;background:rgba(0,0,0,.55);color:#fff;font-size:12px;flex-direction:row;gap:5px}
.photo-input.has-img b svg{display:none}
.photo-input .wm{position:absolute;left:10px;bottom:8px;color:#fff;font-size:10.5px;font-family:var(--fd);font-weight:600;line-height:1.3;text-shadow:0 1px 2px rgba(0,0,0,.7);pointer-events:none}
.gps{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:var(--rs);background:var(--surface-2)}
.gps svg{color:var(--muted)}
.gps[data-state="ok"] svg{color:var(--leaf)}
.gps[data-state="low"] svg{color:var(--amber)}
.gps[data-state="err"] svg{color:var(--red)}
.gps .num{font-size:13px}
.sticky{position:sticky;bottom:calc(84px + env(safe-area-inset-bottom));padding:10px 0 0;background:linear-gradient(180deg,transparent,var(--ground) 30%);margin-top:auto;z-index:4}
.otp-input{text-align:center;font-family:var(--fd);font-size:28px;font-weight:700;letter-spacing:.45em;height:60px;padding-left:.45em}

/* ---------- home ---------- */
.greet{display:flex;align-items:center;gap:12px;padding:calc(12px + env(safe-area-inset-top)) 0 2px}
.greet h1{font-size:21px;font-weight:700}
.greet .sub{font-size:12.5px;color:var(--muted)}
.code{font-family:var(--fd);font-weight:700;font-size:12px;letter-spacing:.06em;background:var(--saffron-tint);color:var(--saffron-ink);border-radius:8px;padding:5px 9px;text-decoration:none}
.day{background:var(--ink);color:var(--ground);border-radius:var(--r);padding:16px;display:flex;flex-direction:column;gap:12px;position:relative;overflow:hidden}
.day::after{content:"";position:absolute;right:-30px;top:-40px;width:150px;height:150px;border-radius:50%;background:radial-gradient(circle,rgba(247,148,29,.35),transparent 65%)}
.day .l{font-size:12px;color:var(--line-strong);text-transform:uppercase;letter-spacing:.07em;font-weight:600}
.day .v{font-family:var(--fd);font-size:22px;font-weight:700;letter-spacing:-.01em}
.day .daysub{color:var(--line-strong)}
.day .btn{height:44px}
.day .btn.o{background:transparent;border-color:rgba(255,255,255,.3);color:#fff}
.day .btn.p{box-shadow:0 10px 20px -10px rgba(247,148,29,.9)}
@media (prefers-color-scheme:dark){.day{background:#0F1012;color:#F2F3F5}}

/* ---------- onboarding ---------- */
.qr{display:flex;flex-direction:column;align-items:center;gap:10px;padding:12px 0 4px}
.qr #qr{background:#fff;padding:12px;border-radius:12px;border:1px solid var(--line)}
.qr #qr img,.qr #qr canvas{display:block;width:200px;height:200px}
.steps{display:flex;flex-direction:column}
.step{display:grid;grid-template-columns:22px 1fr;gap:12px;padding:0 0 16px;position:relative}
.step::before{content:"";position:absolute;left:10px;top:22px;bottom:0;width:2px;background:var(--line)}
.step:last-child::before{display:none}
.step:last-child{padding-bottom:0}
.step .d{width:22px;height:22px;border-radius:50%;border:2px solid var(--line-strong);background:var(--surface);display:grid;place-items:center;color:#fff}
.step.done .d{background:var(--leaf);border-color:var(--leaf)}
.step.now .d{border-color:var(--saffron);background:var(--saffron-tint)}
.step.now .d::after{content:"";width:8px;height:8px;border-radius:50%;background:var(--saffron);animation:pulse 1.4s infinite}
.step b{display:block;font-weight:600;font-size:14px}
.step span{font-size:12.5px;color:var(--body)}

/* ---------- ledger / money ---------- */
.money{font-family:var(--fd);font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.money.neg{color:var(--red)}
.ledger{display:flex;flex-direction:column}
.ledger .r{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;padding:11px 0;border-top:1px solid var(--line)}
.ledger .r:first-child{border-top:0}
.ledger .n{font-family:var(--fd);font-weight:700;font-size:12px;color:var(--muted);background:var(--surface-2);border-radius:8px;height:34px;display:grid;place-items:center;font-variant-numeric:tabular-nums}
.ledger .r.live .n{background:var(--saffron-tint);color:var(--saffron-ink)}
.ledger .t{font-weight:600;font-size:13.5px;font-family:var(--fb)}
.ledger .s{font-size:12px;color:var(--muted)}
.ledger .amt{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:3px}
.month{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none}
.month a{flex:none;height:36px;padding:0 14px;border-radius:var(--rs);border:1px solid var(--line-strong);background:var(--surface);font-weight:600;font-size:13px;color:var(--body);text-decoration:none;display:inline-flex;align-items:center}
.month a.on{background:var(--saffron);border-color:var(--saffron);color:#fff}
.dl{display:grid;grid-template-columns:1fr auto;gap:6px 14px;font-size:13.5px;margin:0}
.dl dt{color:var(--muted)}.dl dd{margin:0;text-align:right;font-weight:600}

/* ---------- login ---------- */
/* brand mark: the real app icon, so it matches the launcher icon and the favicon */
.mark{width:34px;height:34px;flex:none;display:block;background:url("icons/icon-192.png") center/contain no-repeat}
.login-hero{padding:34px 4px 10px;display:flex;flex-direction:column;gap:14px}
.login-hero .mark{width:88px;height:88px;border-radius:20px;box-shadow:0 6px 18px -8px rgba(46,47,51,.35)}
.login-hero h1{font-size:26px;font-weight:800;line-height:1.15}
.login-hero p{margin:0;color:var(--body);font-size:14px;max-width:32ch}
.login-hero a{color:var(--saffron-deep);font-weight:600;text-decoration:none}
.legal{font-size:11.5px;color:var(--muted);text-align:center;padding:0 10px;line-height:1.5}

/* ---------- order cards ---------- */
.orders{display:flex;flex-direction:column}
.order{display:grid;grid-template-columns:30px 1fr auto;gap:10px;align-items:center;padding:11px 0;border-top:1px solid var(--line);text-decoration:none;color:inherit}
.order:first-child{border-top:0}
.order .n{font-weight:700;font-size:12px;color:var(--muted);background:var(--surface-2);border-radius:8px;height:32px;display:grid;place-items:center}
.order.credited .n{background:var(--leaf-tint);color:var(--leaf-ink)}
.order .t{font-weight:600;font-size:13.5px;font-family:var(--fb)}
.order .s{font-size:12px;color:var(--muted)}
.order .s.note{color:var(--amber-ink)}
.order.blocked .s.note,.order.reversed .s.note{color:var(--red-ink)}
.order .amt{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:3px}
.order .price{font-weight:700;font-size:14px}
.order .earn{font-size:11.5px;font-weight:600}
.order .earn.pos{color:var(--leaf-ink)}
.order .earn.zero{color:var(--muted);text-decoration:line-through}
.summary .kpi .v{font-size:20px}
.notebox{margin-top:12px;background:var(--surface-2);border-radius:var(--rs);padding:10px 12px;font-size:13px;color:var(--body)}
.ph{margin:0}
.ph img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--rs);display:block;background:var(--surface-2)}
.ph-empty{aspect-ratio:4/3;border-radius:var(--rs);background:var(--surface-2);display:grid;place-items:center;color:var(--muted);font-size:12px}
.ph figcaption{font-size:11.5px;color:var(--muted);margin-top:4px;text-align:center}

/* explicit dark choice wins over the phone setting */
:root[data-theme="dark"]{
  --saffron-tint:rgba(247,148,29,.16); --saffron-ink:#FFC27A;
  --leaf-tint:rgba(58,170,53,.18); --leaf-ink:#8FDB8B;
  --amber-tint:rgba(217,154,6,.18); --amber-ink:#FFD56A;
  --red-tint:rgba(214,69,69,.18); --red-ink:#FF9A9A;
  --ink:#F2F3F5; --body:#C9CCD3; --muted:#8E929B;
  --line:#34363C; --line-strong:#464950;
  --ground:#1C1D21; --surface:#26272C; --surface-2:#2E3036; --page:#141518;
  color-scheme:dark;
}
:root[data-theme="dark"] .day{background:#0F1012;color:#F2F3F5}

/* ---------- header: bell + profile menu ---------- */
.hdr-actions{display:flex;align-items:center;gap:6px;flex:none}
.bell{position:relative;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;color:var(--body);text-decoration:none;background:var(--surface);border:1px solid var(--line)}
.bell svg{width:20px;height:20px}
.bell-dot{position:absolute;top:-3px;right:-3px;min-width:17px;height:17px;border-radius:9px;background:var(--red);color:#fff;font-size:10px;font-weight:700;font-family:var(--fd);display:grid;place-items:center;padding:0 4px;border:2px solid var(--ground)}
.bell-dot.hide{display:none}
.profile-menu{position:relative}
.profile-menu > summary{list-style:none;cursor:pointer;display:block}
.profile-menu > summary::-webkit-details-marker{display:none}
.pm-avatar{width:38px;height:38px;border-radius:50%;object-fit:cover;display:block;border:1px solid var(--line)}
.pm-avatar.initials{background:var(--saffron-tint);color:var(--saffron-ink);font-family:var(--fd);font-weight:700;font-size:13px;display:grid;place-items:center;border:1px solid var(--line)}
.pm-avatar.lg{width:48px;height:48px;font-size:16px}
.profile-menu[open] > summary .pm-avatar{box-shadow:0 0 0 3px var(--saffron-tint)}
.pm-sheet{position:absolute;right:0;top:46px;width:264px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:0 18px 40px -16px rgba(0,0,0,.35);z-index:30;overflow:hidden}
.pm-head{display:flex;align-items:center;gap:10px;padding:14px;border-bottom:1px solid var(--line)}
.pm-head b{display:block;font-family:var(--fd);font-size:14px;font-weight:700}
.pm-head span{font-size:11.5px;color:var(--muted)}
.pm-theme{padding:12px 14px;border-bottom:1px solid var(--line);display:flex;flex-direction:column;gap:8px}
.pm-label{font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:600}
.seg.sm span{height:32px;font-size:12px}
.pm-links{display:flex;flex-direction:column;padding:6px}
.pm-links a{display:flex;align-items:center;gap:10px;padding:10px 10px;border-radius:var(--rs);text-decoration:none;color:var(--ink);font-size:14px;font-weight:500}
.pm-links a:active{background:var(--surface-2)}
.pm-links a.danger{color:var(--red-ink)}
.pm-count{margin-left:auto;font-style:normal;font-size:11px;font-weight:700;font-family:var(--fd);background:var(--red);color:#fff;border-radius:9px;padding:1px 7px}
.pm-foot{padding:8px 14px 12px;font-size:11px;color:var(--muted);border-top:1px solid var(--line)}

/* ---------- notifications ---------- */
.tabs a{flex:1;height:36px;border-radius:var(--rs);display:flex;align-items:center;justify-content:center;gap:6px;font-weight:600;font-size:13px;color:var(--body);text-decoration:none}
.tabs a.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.tabs a em{font-style:normal;font-family:var(--fd);font-size:11px;background:var(--red);color:#fff;border-radius:9px;padding:1px 6px}
.notes{display:flex;flex-direction:column;gap:8px}
.note-row{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.note-row.unread{border-color:var(--saffron);background:linear-gradient(90deg,var(--saffron-tint),var(--surface) 42%)}
.note-main{display:flex;gap:11px;padding:12px 14px;text-decoration:none;color:inherit;align-items:flex-start}
.note-ic{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:none;background:var(--surface-2);color:var(--body)}
.note-ic svg{width:18px;height:18px}
.note-ic.leaf{background:var(--leaf-tint);color:var(--leaf-ink)}
.note-ic.saffron{background:var(--saffron-tint);color:var(--saffron-ink)}
.note-ic.amber{background:var(--amber-tint);color:var(--amber-ink)}
.note-ic.red{background:var(--red-tint);color:var(--red-ink)}
.note-main .t{display:block;font-weight:600;font-size:14px;font-family:var(--fd)}
.note-main .s{display:block;font-size:12.5px;color:var(--body);margin-top:2px;line-height:1.4}
.note-main .when{display:block;font-size:11.5px;color:var(--muted);margin-top:4px}
.note-main .dot{width:9px;height:9px;border-radius:50%;background:var(--saffron);flex:none;margin-top:5px}
.note-toggle{width:100%;border:0;border-top:1px solid var(--line);background:transparent;color:var(--saffron-deep);font-size:12.5px;font-weight:600;padding:8px;text-align:center}
.note-row:not(.unread) .note-toggle{color:var(--muted)}

/* ---------- settings ---------- */
.avatar-edit{flex:none}
.av-tap{position:relative;display:block;width:64px;height:64px;cursor:pointer}
.av-tap img,.av-tap .initials{width:64px;height:64px;border-radius:50%;object-fit:cover;display:grid;place-items:center}
.av-tap .initials{background:var(--saffron-tint);color:var(--saffron-ink);font-family:var(--fd);font-weight:700;font-size:20px}
.av-tap input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.av-cam{position:absolute;right:-2px;bottom:-2px;width:24px;height:24px;border-radius:50%;background:var(--saffron);color:#fff;display:grid;place-items:center;border:2px solid var(--ground)}
.av-cam svg{width:13px;height:13px}
.switch{position:relative;width:46px;height:28px;flex:none}
.switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer;z-index:1}
.switch span{position:absolute;inset:0;border-radius:14px;background:var(--line-strong);transition:background .2s}
.switch span::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.switch input:checked + span{background:var(--leaf)}
.switch input:checked + span::after{transform:translateX(18px)}
.btn.danger-text{color:var(--red-ink)}

/* ---------- update sheet ---------- */
.update-sheet{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:100;display:flex;align-items:flex-end;justify-content:center;padding:16px}
.us-card{background:var(--surface);border-radius:20px;padding:22px 18px 18px;width:100%;max-width:420px;display:flex;flex-direction:column;gap:10px;text-align:center}
.us-icon{width:52px;height:52px;border-radius:50%;background:var(--saffron-tint);color:var(--saffron-deep);display:grid;place-items:center;margin:0 auto 4px}
.us-icon svg{width:26px;height:26px}
.us-card h2{font-size:19px;font-weight:800}
.us-card p{margin:0 0 6px;font-size:13.5px;color:var(--body);line-height:1.5}
.update-sheet.forced #usLater{display:none}
