/* TillOwl Office: one token sheet, one shell, four modules. IBM Plex Sans with Noto Sans Bengali behind it. */
:root { --bg:#f7f7f7; --surface:#ffffff; --raised:#e8f5e3; --border:#e4e5e7; --fg:#001e00; --muted:#5e6d55; --accent:#14a800; --on-accent:#fff; --ok:#137a08; --focus:#108a00; --danger:#b91c1c; --warn:#b45309; --info:#1d4ed8; --side:#0f1a13; --side-fg:#eef5ee; --side-muted:#94a597; --side-on:#173b18; --shadow:0 10px 30px rgba(20,40,20,.12); --radius:14px; --gap:16px; color-scheme:light; }
:root[data-theme="dark"] { --bg:#0f1412; --surface:#171d1a; --raised:#173b18; --border:#2a332e; --fg:#f2f5f2; --muted:#9aa79a; --accent:#3fcb3a; --on-accent:#04200a; --ok:#6fdc6a; --focus:#3fcb3a; --danger:#f28b7f; --warn:#e3b65f; --info:#9bbdf0; --side:#0a0f0c; --side-fg:#eef5ee; --side-muted:#8a9a8d; --side-on:#173b18; --shadow:0 10px 30px rgba(0,0,0,.5); color-scheme:dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg:#0f1412; --surface:#171d1a; --raised:#173b18; --border:#2a332e; --fg:#f2f5f2; --muted:#9aa79a; --accent:#3fcb3a; --on-accent:#04200a; --ok:#6fdc6a; --focus:#3fcb3a; --danger:#f28b7f; --warn:#e3b65f; --info:#9bbdf0; --side:#0a0f0c; --side-fg:#eef5ee; --side-muted:#8a9a8d; --side-on:#173b18; --shadow:0 10px 30px rgba(0,0,0,.5); color-scheme:dark; } }
/* palettes: no data-palette = Clean green (the tokens above); the rest below, light and dark each */
:root[data-palette="midnight"] { --bg:#f6f2e9; --surface:#fffdf7; --raised:#fbf0d9; --border:#e5ddcb; --fg:#352c1d; --muted:#776a54; --accent:#805510; --on-accent:#fff; --ok:#2f6b3a; --focus:#805510; --danger:#a93227; --warn:#825915; --info:#2f5a8a; --side:#1f1a12; --side-fg:#efe7d6; --side-muted:#a99d85; --side-on:#3a2f1b; --shadow:0 10px 30px rgba(40,30,10,.14); --radius:14px; --gap:16px; color-scheme:light; }
:root[data-palette="midnight"][data-theme="dark"] { --bg:#100f0c; --surface:#191713; --raised:#302719; --border:#393225; --fg:#f5f0e4; --muted:#bdb29d; --accent:#dda94f; --on-accent:#20180c; --ok:#8fd0a0; --focus:#dda94f; --danger:#f28b7f; --warn:#e3b65f; --info:#9bbdf0; --side:#0b0a08; --side-fg:#efe7d6; --side-muted:#8f846c; --side-on:#2e2515; --shadow:0 10px 30px rgba(0,0,0,.5); color-scheme:dark; }
@media (prefers-color-scheme: dark) { :root[data-palette="midnight"]:not([data-theme="light"]) { --bg:#100f0c; --surface:#191713; --raised:#302719; --border:#393225; --fg:#f5f0e4; --muted:#bdb29d; --accent:#dda94f; --on-accent:#20180c; --ok:#8fd0a0; --focus:#dda94f; --danger:#f28b7f; --warn:#e3b65f; --info:#9bbdf0; --side:#0b0a08; --side-fg:#efe7d6; --side-muted:#8f846c; --side-on:#2e2515; --shadow:0 10px 30px rgba(0,0,0,.5); color-scheme:dark; } }
:root[data-palette="forest"] { --bg:#f3f5f3;--surface:#ffffff;--raised:#edf6f2;--border:#e3e8e5;--fg:#233b32;--muted:#63756b;--accent:#176658;--on-accent:#ffffff;--focus:#176658;--side:#141916;--side-fg:#edf4ef;--side-muted:#98a59d;--side-on:#edf6f2;color-scheme:light; }
:root[data-palette="forest"][data-theme="dark"] { --bg:#181e1b;--surface:#202723;--raised:#203a33;--border:#35413c;--fg:#edf4ef;--muted:#b3c3b9;--accent:#8bd7bf;--on-accent:#102c24;--focus:#8bd7bf;--side:#0e1210;--side-fg:#edf4ef;--side-muted:#8f9c94;--side-on:#203a33;color-scheme:dark; }
@media (prefers-color-scheme: dark) { :root[data-palette="forest"]:not([data-theme="light"]) { --bg:#181e1b;--surface:#202723;--raised:#203a33;--border:#35413c;--fg:#edf4ef;--muted:#b3c3b9;--accent:#8bd7bf;--on-accent:#102c24;--focus:#8bd7bf;--side:#0e1210;--side-fg:#edf4ef;--side-muted:#8f9c94;--side-on:#203a33;color-scheme:dark; } }
:root[data-palette="cobalt"] { --bg:#f3f5fa;--surface:#ffffff;--raised:#edf1ff;--border:#e0e5ef;--fg:#24324c;--muted:#64718a;--accent:#304fca;--on-accent:#ffffff;--focus:#304fca;--side:#131721;--side-fg:#edf2ff;--side-muted:#97a0b4;--side-on:#edf1ff;color-scheme:light; }
:root[data-palette="cobalt"][data-theme="dark"] { --bg:#171c27;--surface:#202735;--raised:#27334c;--border:#374257;--fg:#edf2ff;--muted:#b2bdd4;--accent:#abc0ff;--on-accent:#162750;--focus:#abc0ff;--side:#0d1017;--side-fg:#edf2ff;--side-muted:#8e97a9;--side-on:#27334c;color-scheme:dark; }
@media (prefers-color-scheme: dark) { :root[data-palette="cobalt"]:not([data-theme="light"]) { --bg:#171c27;--surface:#202735;--raised:#27334c;--border:#374257;--fg:#edf2ff;--muted:#b2bdd4;--accent:#abc0ff;--on-accent:#162750;--focus:#abc0ff;--side:#0d1017;--side-fg:#edf2ff;--side-muted:#8e97a9;--side-on:#27334c;color-scheme:dark; } }
:root[data-palette="aubergine"] { --bg:#f7f3ef;--surface:#fffdf9;--raised:#f5edf3;--border:#e9e0e4;--fg:#392b36;--muted:#796c76;--accent:#704568;--on-accent:#ffffff;--focus:#704568;--side:#1c171b;--side-fg:#f5ecf2;--side-muted:#aa9ea7;--side-on:#f5edf3;color-scheme:light; }
:root[data-palette="aubergine"][data-theme="dark"] { --bg:#211c20;--surface:#2b242a;--raised:#402d3d;--border:#473b45;--fg:#f5ecf2;--muted:#c9bac5;--accent:#e1b7d6;--on-accent:#35202e;--focus:#e1b7d6;--side:#131013;--side-fg:#f5ecf2;--side-muted:#a0949d;--side-on:#402d3d;color-scheme:dark; }
@media (prefers-color-scheme: dark) { :root[data-palette="aubergine"]:not([data-theme="light"]) { --bg:#211c20;--surface:#2b242a;--raised:#402d3d;--border:#473b45;--fg:#f5ecf2;--muted:#c9bac5;--accent:#e1b7d6;--on-accent:#35202e;--focus:#e1b7d6;--side:#131013;--side-fg:#f5ecf2;--side-muted:#a0949d;--side-on:#402d3d;color-scheme:dark; } }
:root[data-palette="graphite"] { --bg:#f5f4f0;--surface:#fffefa;--raised:#fff4dc;--border:#e5e3dc;--fg:#343538;--muted:#70716f;--accent:#8b5700;--on-accent:#ffffff;--focus:#8b5700;--side:#161718;--side-fg:#f2f2ef;--side-muted:#a3a49e;--side-on:#fff4dc;color-scheme:light; }
:root[data-palette="graphite"][data-theme="dark"] { --bg:#1b1c1d;--surface:#252628;--raised:#3d3320;--border:#41413b;--fg:#f2f2ef;--muted:#c0c1bb;--accent:#f0c36c;--on-accent:#302307;--focus:#f0c36c;--side:#101011;--side-fg:#f2f2ef;--side-muted:#999a95;--side-on:#3d3320;color-scheme:dark; }
@media (prefers-color-scheme: dark) { :root[data-palette="graphite"]:not([data-theme="light"]) { --bg:#1b1c1d;--surface:#252628;--raised:#3d3320;--border:#41413b;--fg:#f2f2ef;--muted:#c0c1bb;--accent:#f0c36c;--on-accent:#302307;--focus:#f0c36c;--side:#101011;--side-fg:#f2f2ef;--side-muted:#999a95;--side-on:#3d3320;color-scheme:dark; } }
.pop .palopt { font-weight: 500; } .pop .palopt[aria-checked="true"] { background: var(--raised); } .pop .palopt .i:last-child { margin-left: auto; color: var(--accent); }
.swatch { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border); display: grid; place-items: end start; overflow: hidden; } .swatch i { display: block; width: 100%; height: 55%; }
#pal-pop { right: 52px; width: 270px; } @media (max-width: 760px) { #pal-pop { right: 8px; } }
.pop .palrow { padding: 6px 10px; } .pop .palrow select { width: 100%; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); padding: 0 8px; font-weight: 500; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: "IBM Plex Sans", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-x: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; }
h1 { font-size: 24px; letter-spacing: -.01em; } h2 { font-size: 17px; } h3 { font-size: 15px; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i.sm { width: 16px; height: 16px; }
.mut { color: var(--muted); } .r { text-align: right; } .nowrap { white-space: nowrap; } .small { font-size: 13px; } .b { font-weight: 600; }
.neg { color: var(--danger); } .pos { color: var(--ok); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.stack { display: grid; gap: var(--gap); }
.grid2 { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid3 { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- shell ---------- */
.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.top .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; margin-right: 6px; }
.top .brand .mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.top .search { flex: 1; max-width: 520px; position: relative; }
.top .search input { width: 100%; height: 38px; padding: 0 12px 0 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); }
.top .search .i { position: absolute; left: 11px; top: 9px; color: var(--muted); }
.top .search kbd { position: absolute; right: 10px; top: 9px; font: 500 11px/20px "IBM Plex Sans", sans-serif; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; }
.top .sp { flex: 1; }
.ib { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; min-width: 38px; padding: 0 8px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; position: relative; color: inherit; }
.ib:hover { background: var(--raised); }
.ib .cnt { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.brsel { height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); padding: 0 10px; font-weight: 600; max-width: 150px; }
.me { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; }
.me .av { width: 30px; height: 30px; border-radius: 50%; background: var(--raised); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.pop { position: absolute; right: 12px; top: 54px; z-index: 50; width: 300px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; }
.pop h4 { padding: 8px 10px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pop a, .pop button.item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; border: 0; background: none; text-align: left; text-decoration: none; cursor: pointer; }
.pop a:hover, .pop button.item:hover { background: var(--raised); }
.pop .seg { display: flex; gap: 4px; padding: 6px 10px; }
.pop .seg button { flex: 1; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; }
.pop .seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.side { position: fixed; left: 0; top: 56px; bottom: 0; width: 248px; overflow-y: auto; background: var(--side); color: var(--side-fg); padding: 14px 10px 24px; z-index: 30; }
.side .grp { margin: 14px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--side-muted); font-weight: 600; }
.side .grp:first-child { margin-top: 2px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; text-decoration: none; color: var(--side-fg); font-weight: 500; }
.side a:hover { background: rgba(255,255,255,.07); }
.side a[aria-current="page"] { background: var(--focus); color: var(--on-accent); }
.side a .cnt { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: rgba(255,255,255,.16); font-size: 12px; font-weight: 600; text-align: center; line-height: 20px; }
.side a[aria-current="page"] .cnt { background: rgba(0,0,0,.18); }
.side .foot { margin: 22px 10px 0; font-size: 12px; color: var(--side-muted); }
.side .foot a { display: inline; padding: 0; color: var(--side-muted); text-decoration: underline; }
.content { margin-left: 248px; padding: 22px 24px 48px; max-width: 1180px; }
.content > .pg { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.bottom { display: none; }
.sheet { display: none; }

/* page head */
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head .sub { color: var(--muted); margin-top: 2px; }
.head .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 13px; margin-bottom: 6px; }
.back:hover { color: var(--fg); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs button { padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; margin-bottom: -1px; }
.tabs a[aria-current="page"], .tabs button[aria-pressed="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.tabs .n { margin-left: 4px; font-size: 12px; background: var(--raised); color: var(--accent); border-radius: 9px; padding: 0 6px; font-weight: 600; }
.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg button { padding: 6px 12px; border: 0; background: none; cursor: pointer; color: var(--muted); font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* cards, kpis */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.card > h2, .card > h3 { margin-bottom: 10px; }
.card .more { display: block; margin-top: 10px; font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 500; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; display: block; }
.kpi:hover { border-color: var(--accent); }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi .v { font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin-top: 2px; }
.kpi .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.attn .v { color: var(--warn); } .kpi.bad .v { color: var(--danger); }

/* lists and tables */
.wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.card .wrap { border: 0; border-radius: 0; margin: 0 -18px; width: calc(100% + 36px); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th, .t td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.t th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.t tbody tr:last-child td { border-bottom: 0; }
.t tr.link { cursor: pointer; } .t tr.link:hover td { background: var(--raised); }
.t td.r, .t th.r { text-align: right; white-space: nowrap; }
.t .sub { display: block; font-size: 12px; color: var(--muted); }
.t tfoot td { font-weight: 600; border-top: 2px solid var(--border); }
.list { display: grid; }
.list .li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; align-items: center; }
.list .li:last-child { border-bottom: 0; }
.list .li .p { font-weight: 500; } .list .li .s { font-size: 13px; color: var(--muted); grid-column: 1; }
.list .li .v { font-weight: 600; text-align: right; } .list .li .v2 { grid-column: 2; font-size: 12px; color: var(--muted); text-align: right; }
.list .li:hover .p { color: var(--accent); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.empty .i { width: 32px; height: 32px; margin-bottom: 6px; color: var(--muted); }
.empty h3 { color: var(--fg); margin-bottom: 4px; }

/* pills, tags */
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--raised); color: var(--fg); line-height: 20px; }
.pill.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.pill.warn, .pill.attn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill.info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.pill.mute { color: var(--muted); }
.tg { display: none; margin-left: 6px; padding: 0 6px; border-radius: 5px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 17px; vertical-align: middle; cursor: help; }
[data-tags="on"] .tg { display: inline-block; }
.tg.new { background: #2f6b3a; color: #fff; } .tg.changed { background: #825915; color: #fff; } .tg.built { background: var(--raised); color: var(--muted); }
.made { font-size: 11px; color: var(--muted); border: 1px dashed var(--border); border-radius: 4px; padding: 0 4px; margin-left: 4px; }

/* buttons, forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; color: inherit; }
.btn:hover { background: var(--raised); }
.btn.p { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.p:hover { filter: brightness(1.08); }
.btn.d { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.g { border-color: transparent; background: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 46px; padding: 0 20px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }
.in, .sel, .ta { height: 40px; width: 100%; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); }
.ta { height: auto; padding: 8px 12px; min-height: 72px; resize: vertical; }
.in:focus, .sel:focus, .ta:focus, .btn:focus-visible, .top .search input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.in.r { text-align: right; }
.in.money { font-weight: 600; font-size: 17px; }
.f { display: grid; gap: 4px; }
.f > label, .f > .lbl { font-size: 13px; color: var(--muted); font-weight: 500; }
.f .hint { font-size: 12px; color: var(--muted); }
.form { display: grid; gap: 14px; }
.form .cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.chk { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--accent); }
.radios { display: grid; gap: 6px; }
.radios label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.radios label:has(input:checked) { border-color: var(--accent); background: var(--raised); }
.radios input { accent-color: var(--accent); }
.note { padding: 10px 12px; border-radius: 10px; background: var(--raised); font-size: 13px; }
.note.warn { border-left: 3px solid var(--warn); } .note.bad { border-left: 3px solid var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); } .note.ok { border-left: 3px solid var(--ok); }
.totals { display: grid; gap: 4px; margin-left: auto; max-width: 340px; width: 100%; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals .big { font-size: 20px; font-weight: 700; border-top: 1px solid var(--border); padding-top: 6px; margin-top: 4px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.ev { display: grid; gap: 6px; font-size: 13px; }
.ev div { display: grid; grid-template-columns: 88px 1fr; gap: 10px; } .ev .w { color: var(--muted); }
.menu { position: relative; }

/* item picker */
.pick { position: relative; }
.pick .res { position: absolute; left: 0; right: 0; top: 42px; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; }
.pick .res button { display: flex; width: 100%; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 0; background: none; text-align: left; cursor: pointer; }
.pick .res button:hover, .pick .res button[aria-selected="true"] { background: var(--raised); }
.pick .res .m { font-size: 12px; color: var(--muted); display: block; }
.lines { display: grid; gap: 8px; }
.line { display: grid; grid-template-columns: 1fr 84px 120px 120px 34px; gap: 8px; align-items: center; }
.line .nm { font-weight: 500; } .line .nm .m { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; height: 38px; }
.qty button { width: 32px; height: 100%; border: 0; background: var(--bg); cursor: pointer; font-size: 18px; }
.qty input { width: 48px; height: 100%; border: 0; text-align: center; background: var(--surface); }
.tenders { display: grid; gap: 8px; }
.tender { display: grid; grid-template-columns: 130px 1fr 1fr 34px; gap: 8px; align-items: center; }
.ways { display: flex; gap: 6px; flex-wrap: wrap; }
.ways button { height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 500; }
.ways button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.sale-grid { display: grid; grid-template-columns: 1fr 360px; gap: var(--gap); align-items: start; }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(20,14,4,.42); z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 100vw; background: var(--surface); z-index: 61; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer .dh { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.drawer .db { padding: 16px 18px; overflow-y: auto; flex: 1; }
.drawer .df { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.drawer .df .btn.left { margin-right: auto; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 12px; z-index: 90; box-shadow: var(--shadow); font-weight: 500; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--danger); color: #fff; }

/* search results */
.sres { display: grid; gap: 14px; }
.sres .grp h3 { margin-bottom: 6px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* needs you */
.need { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: center; }
.need:last-child { border-bottom: 0; }
.need .t { font-weight: 500; } .need .m { font-size: 13px; color: var(--muted); grid-column: 1; }
.need .a { grid-row: 1 / span 2; display: flex; gap: 6px; align-items: center; }
.mod { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 0 6px; border-radius: 5px; background: var(--raised); color: var(--muted); line-height: 18px; }
.mod.sales { color: #2f5a8a; } .mod.inventory { color: #2f6b3a; } .mod.purchase { color: #825915; } .mod.accounting { color: #704568; } .mod.office { color: var(--accent); }

/* reports */
.rep .t td:first-child { padding-left: 12px; }
.rep .t tr.h td { font-weight: 600; background: var(--raised); }
.rep .t tr.ind td:first-child { padding-left: 28px; }
.rep .t tr.tot td { font-weight: 700; border-top: 2px solid var(--border); }
.bar { height: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--accent); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 48px; } .spark i { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .85; }

/* print */
.print-bg { position: fixed; inset: 0; background: rgba(20,14,4,.5); z-index: 70; overflow-y: auto; padding: 24px 12px; }
.print-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.paper { background: #fff; color: #111; margin: 0 auto; padding: 14mm 14mm; box-shadow: 0 10px 40px rgba(0,0,0,.4); font-family: "IBM Plex Sans", "Noto Sans Bengali", sans-serif; font-size: 13px; line-height: 1.4; }
.paper.a4 { width: 210mm; min-height: 297mm; }
.paper.roll { width: 80mm; padding: 6mm 4mm; font-size: 12px; font-family: "IBM Plex Mono", "IBM Plex Sans", "Noto Sans Bengali", monospace; }
.paper.roll58 { width: 58mm; padding: 4mm 3mm; font-size: 11px; }
.paper h1 { font-size: 20px; } .paper h2 { font-size: 15px; margin: 10px 0 4px; }
.paper .ph { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 10px; }
.paper table { width: 100%; border-collapse: collapse; } .paper th, .paper td { padding: 5px 6px; border-bottom: 1px solid #ddd; text-align: left; vertical-align: top; }
.paper th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #555; } .paper td.r, .paper th.r { text-align: right; }
.paper .tot { margin-top: 10px; margin-left: auto; width: 60%; } .paper .tot div { display: flex; justify-content: space-between; padding: 2px 0; } .paper .tot .big { font-size: 16px; font-weight: 700; border-top: 1px solid #111; margin-top: 4px; padding-top: 4px; }
.paper .c { text-align: center; } .paper .dash { border-top: 1px dashed #333; margin: 6px 0; }
.paper .roll-l { display: flex; justify-content: space-between; gap: 6px; }
.paper .foot { margin-top: 18px; font-size: 11px; color: #555; }
.paper .sign { display: flex; justify-content: space-between; margin-top: 40px; } .paper .sign div { border-top: 1px solid #111; padding-top: 4px; width: 40%; text-align: center; font-size: 11px; }
.paper .box { border: 1px solid #333; padding: 6px 8px; } .paper .cell { width: 60px; height: 22px; border: 1px solid #333; display: inline-block; }
@media print {
  body > *:not(.print-bg) { display: none !important; }
  .print-bg { position: static; background: none; padding: 0; }
  .print-bar { display: none; }
  .paper { box-shadow: none; margin: 0; }
  @page { margin: 8mm; }
}

/* module map page */
.map { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.map ul { list-style: none; margin: 0; padding: 0; } .map li a { display: block; padding: 5px 0; text-decoration: none; } .map li a:hover { color: var(--accent); }
.map li .s { color: var(--muted); font-size: 12px; margin-left: 6px; }

/* ---------- phone ---------- */
@media (max-width: 900px) {
  .seg { display: flex; gap: 1px; background: var(--border); } .seg button { flex: 1 1 auto; background: var(--surface); }
  .seg button[aria-pressed="true"] { background: var(--accent); }
  .side { display: none; }
  .content { margin-left: 0; padding: 16px 16px 92px; }
  .top { padding: 0 8px; gap: 6px; }
  .top .brand .nm { display: none; }
  .top .search { max-width: none; min-width: 0; } .top .search kbd { display: none; }
  .top .brsel { max-width: 92px; padding: 0 6px; }
  .top .me .nm { display: none; }
  .top .hide-ph { display: none; }
  .head { margin-bottom: 14px; } h1 { font-size: 21px; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 12px 14px; } .kpi .v { font-size: 19px; }
  .card { padding: 14px 14px; border-radius: 12px; }
  .card .wrap { margin: 0 -14px; width: calc(100% + 28px); }
  .sale-grid { grid-template-columns: 1fr; }
  .line { grid-template-columns: 1fr 1fr; } .line .nm { grid-column: 1 / -1; }
  .tender { grid-template-columns: 1fr 1fr; }
  .drawer { top: auto; left: 0; right: 0; width: auto; max-height: 92vh; border-radius: 18px 18px 0 0; animation: up .22s ease-out; }
  @keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .bottom { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom a, .bottom button { display: grid; justify-items: center; gap: 2px; padding: 4px 0; font-size: 11px; font-weight: 500; text-decoration: none; color: var(--muted); border: 0; background: none; }
  .bottom a[aria-current="page"] { color: var(--accent); }
  .bottom .i { width: 22px; height: 22px; }
  .sheet { display: block; position: fixed; inset: 0; z-index: 55; background: var(--surface); overflow-y: auto; padding: 12px 16px 24px; }
  .sheet[hidden] { display: none !important; }
  .sheet .grp { margin: 16px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
  .sheet .items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .sheet a { display: flex; align-items: center; gap: 8px; padding: 10px 10px; border-radius: 10px; border: 1px solid var(--border); text-decoration: none; font-weight: 500; font-size: 14px; }
  .sheet a[aria-current="page"] { border-color: var(--accent); background: var(--raised); }
  .sheet a .cnt { margin-left: auto; font-size: 12px; background: var(--raised); color: var(--accent); border-radius: 9px; padding: 0 6px; font-weight: 600; }
  .pop { right: 8px; }
  .t th, .t td { padding: 8px 10px; }
}
@media (max-width: 420px) {
  .content { padding-left: 16px; padding-right: 16px; }
  .top .brsel { max-width: 80px; font-size: 13px; }
}

/* till status: top-bar button, popup, strip, notes, late marks (office-tills) */
.tdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); vertical-align: baseline; margin-right: 6px; }
.tdot.ok { background: var(--ok); } .tdot.warn { background: var(--warn); } .tdot.bad { background: var(--danger); }
#till-btn .tdot { margin-right: 0; box-shadow: 0 0 0 2px var(--surface); } #till-btn .i { width: 20px; height: 20px; }
#till-btn[data-state="bad"] .tdot { animation: tpulse 2s ease-in-out infinite; }
@keyframes tpulse { 50% { opacity: .45; } } @media (prefers-reduced-motion: reduce) { #till-btn[data-state="bad"] .tdot { animation: none; } }
#till-pop { right: 100px; width: 320px; } @media (max-width: 900px) { #till-pop { right: 8px; } }
.pop .trow { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 4px; padding: 8px 10px; border-radius: 9px; text-decoration: none; color: inherit; font-size: 14px; }
.pop a.trow:hover { background: var(--raised); } .pop .trow .nm { font-weight: 600; } .pop .trow .w { color: var(--muted); font-size: 13px; text-align: right; }
.pop .trow .sub { grid-column: 2 / -1; color: var(--danger); font-size: 12px; font-weight: 600; } .pop .trow.more { color: var(--accent); border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; margin-top: 6px; }
.pop .trow.more { grid-template-columns: 1fr; }
.tillstrip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tchip { display: inline-flex; align-items: center; gap: 0; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13px; text-decoration: none; color: inherit; flex-wrap: wrap; max-width: 100%; }
.tchip strong { margin-right: 6px; } .tchip .mut { overflow-wrap: anywhere; } .tchip:hover { background: var(--raised); }
.tillnote a { font-weight: 600; margin-left: 4px; }
.sub.late, .late { color: var(--warn); font-weight: 600; }
/* Module approval (Setup) and case screens */
.ap-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0; font-size: 14px; }
.ap-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.ap-filters a.pill { text-decoration: none; }
.ap-q { height: 32px; min-width: 0; flex: 1 1 160px; max-width: 280px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; }
.ap-list { display: grid; gap: 8px; }
.ap-row { border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface, var(--bg)); min-width: 0; }
.ap-row.d-approve { border-left-color: var(--ok); }
.ap-row.d-change { border-left-color: var(--warn); }
.ap-row.d-drop { border-left-color: var(--danger); }
.ap-row .ap-t { overflow-wrap: anywhere; }
.ap-w, .ap-p { margin-top: 4px; overflow-wrap: anywhere; }
.ap-a { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.ap-n { flex: 1 1 200px; min-width: 0; height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; }
.ap-warn { border-color: var(--warn); }
.case-card.hit { outline: 2px solid var(--accent); outline-offset: 2px; }
.ap-mods { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0; }
.ap-sample { white-space: normal; }

/* review menu: module headers, Small/Big switch */
.side .mgrp { margin-bottom: 6px; }
.side .mhd, #sheet .mhd { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: 10px; padding: 8px 10px; border: 0; border-radius: 9px; background: rgba(255,255,255,.06); color: inherit; font: 700 13px/1.2 "IBM Plex Sans", sans-serif; letter-spacing: .02em; cursor: pointer; }
#sheet .mhd { background: var(--bg); color: var(--fg); }
.mhd .chev { font-weight: 500; opacity: .7; }
.side .grp { margin-left: 14px; }
/* Setup > Views picker */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.vcard h2 { margin: 0 0 2px; font-size: 16px; }
.vbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.vbtn span { overflow-wrap: anywhere; }
.vbtn:hover { border-color: var(--accent); }
.vbtn.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* All screens mode of the review menu */
.allbar { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; margin: 4px 0 8px; padding: 10px; border-radius: 9px; background: rgba(255,255,255,.08); }
#sheet .allbar { background: var(--bg); }
.allbar .btn { margin-top: 4px; }
.side a .tys, #sheet .items a .tys { margin-left: auto; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; opacity: .65; white-space: nowrap; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--side-muted); font: inherit; text-decoration: underline; cursor: pointer; }
