/* BoiChitro Office Suite — shared navy / white design (launchpad, operations hub, admin pages). Same look as Ledger and Inventory. */
:root {
  --navy: #12305f; --navy-2: #0b1f40; --navy-soft: #e8eef8; --navy-btn: #12305f;
  --paper: #ffffff; --canvas: #f3f5f9; --ink: #0f1f3d; --muted: #5b6b86; --faint: #8a97ae; --line: #e1e6ef; --row-hover: #f8fafd;
  --saffron: #b86e0a; --saffron-soft: #fdf1de; --ok: #1a7f47; --ok-soft: #e4f5ec; --danger: #c0392b; --danger-soft: #fdecea;
  --teal: #0f6b78; --teal-soft: #e2f3f5;
  --shadow: 0 1px 2px rgba(15, 31, 61, .06), 0 12px 32px rgba(15, 31, 61, .14);
  --font: Inter, "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --navy: #8fb0e8; --navy-2: #b8cdf2; --navy-soft: #1a2742; --navy-btn: #3b64ad;
  --paper: #111a2d; --canvas: #0b1220; --ink: #e6ebf5; --muted: #9aa8c2; --faint: #6d7c98; --line: #1f2a42; --row-hover: #142038;
  --saffron: #f0b04f; --saffron-soft: #3a2c14; --ok: #3cc47a; --ok-soft: #12301f; --danger: #ef6b5d; --danger-soft: #3a1a17;
  --teal: #5cc6d3; --teal-soft: #11303a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 36px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--canvas); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: var(--navy); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden], [data-hide] { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mono { font-family: var(--mono); }
.r { text-align: right; } .c { text-align: center; } .nw { white-space: nowrap; }
.inl { display: inline; margin: 0; }
h1, h2, h3 { line-height: 1.25; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: var(--navy-btn); color: #fff; display: grid; place-items: center; }
.bt b { display: block; font-size: 16px; } .bt small { display: block; color: var(--muted); font-size: 11.5px; margin-top: -2px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 12px; }
.nv { position: relative; }
.nl { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 11px; border-radius: 9px; color: var(--muted); font-weight: 600; text-decoration: none; white-space: nowrap; }
.nl svg { width: 17px; height: 17px; } .nl svg.dd { width: 14px; height: 14px; opacity: .6; }
.nv:hover > .nl, .nv:focus-within > .nl { background: var(--navy-soft); color: var(--ink); }
.nv.on > .nl { background: var(--navy-soft); color: var(--navy); }
.sub { position: absolute; top: calc(100% + 4px); left: 0; min-width: 210px; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: none; z-index: 60; }
.sub::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nv.has:hover > .sub, .nv.has:focus-within > .sub { display: block; }
.sub a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.sub a:hover { background: var(--canvas); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.co-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13px; max-width: 240px; }
.co-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-pill svg { width: 16px; height: 16px; color: var(--navy); }
.co-pill:hover { border-color: var(--navy); }
.ib { width: 36px; height: 36px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--muted); text-decoration: none; flex: none; }
.ib:hover { background: var(--navy-soft); color: var(--ink); }
.ib.danger:hover { background: var(--danger-soft); color: var(--danger); }
.ib.sm { width: 30px; height: 30px; border-radius: 7px; } .ib.sm svg { width: 16px; height: 16px; }
.menu-btn { display: none; }

/* ---------- layout ---------- */
.wrap { max-width: 1440px; margin: 0 auto; padding: 18px 16px 60px; }
.wrap.narrow { max-width: 980px; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2px 0 14px; }
.ph h1 { margin: 0; font-size: 21px; }
.ph p { margin: 3px 0 0; color: var(--muted); }
.ph-b { display: flex; gap: 6px; flex-wrap: wrap; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.card.pad { padding: 16px; }
.sec { margin: 22px 0 10px; font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.cols.even { grid-template-columns: 1fr 1fr; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ---------- buttons ---------- */
.btn { height: 38px; padding: 0 14px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .12s; }
.btn svg { width: 17px; height: 17px; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; } .btn.sm svg { width: 15px; height: 15px; }
.btn.primary { background: var(--navy-btn); color: #fff; }
.btn.primary:hover:not([disabled]) { background: var(--navy-2); }
:root[data-theme="dark"] .btn.primary:hover:not([disabled]) { background: #4a75c2; }
.btn.ghost { color: var(--ink); border: 1px solid var(--line); background: var(--paper); }
.btn.ghost:hover:not([disabled]) { background: var(--canvas); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-t { color: var(--danger); border: 1px solid var(--line); background: var(--paper); }
.btn.danger-t:hover { background: var(--danger-soft); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.block { width: 100%; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tiles.t3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles.t5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; text-decoration: none; color: var(--ink); }
.tile > span { color: var(--muted); font-size: 13px; font-weight: 500; }
.tile b { font-size: 24px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile small { color: var(--muted); font-size: 12.5px; }
a.tile:hover { border-color: var(--navy); }
.tile.ok b { color: var(--ok); } .tile.bad b { color: var(--danger); } .tile.warn b { color: var(--saffron); }
.tile.dark { background: var(--navy-btn); border-color: var(--navy-btn); color: #fff; }
.tile.dark > span, .tile.dark small { color: rgba(255, 255, 255, .78); }

/* ---------- flash, notes ---------- */
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 12px; margin-bottom: 12px; font-weight: 500; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.err { background: var(--danger-soft); color: var(--danger); }
.flash.warn { background: var(--saffron-soft); color: var(--saffron); }
.flash span { flex: 1; } .flash .x { font-size: 18px; line-height: 1; opacity: .7; color: inherit; }
.note { padding: 10px 12px; border-radius: 10px; background: var(--saffron-soft); color: var(--ink); font-size: 13px; border: 1px solid color-mix(in srgb, var(--saffron) 30%, transparent); }
.note.info { background: var(--navy-soft); border-color: transparent; }
.note b { color: var(--saffron); } .note.info b { color: var(--navy); }
.note ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.warn { background: var(--saffron-soft); color: var(--saffron); }
.pill.mute { background: var(--canvas); color: var(--muted); border: 1px solid var(--line); }
.pill.navy { background: var(--navy-soft); color: var(--navy); }
.amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.in, .pos { color: var(--ok); } .amt.out, .neg { color: var(--danger); }

/* ---------- filters & forms ---------- */
.filters { padding: 12px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.frow { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.fl { display: flex; flex-direction: column; gap: 3px; min-width: 130px; flex: 1 1 140px; max-width: 230px; }
.fl.grow { max-width: none; flex: 3 1 240px; }
.fl > span, .f > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.fl select, .fl input, .f input, .f select, .f textarea { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); outline: none; width: 100%; }
.f textarea { height: auto; padding: 9px 10px; resize: vertical; }
.fl select:focus, .fl input:focus, .f input:focus, .f select:focus, .f textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-soft); }
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f small { color: var(--faint); font-size: 12px; }
.f i { color: var(--danger); font-style: normal; }
.f input[readonly] { background: var(--canvas); color: var(--muted); }
.g { display: grid; gap: 12px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .spanall { grid-column: 1 / -1; }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.chk input { width: 16px; height: 16px; accent-color: var(--navy-btn); }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); }
.search:focus-within { border-color: var(--navy); background: var(--paper); box-shadow: 0 0 0 3px var(--navy-soft); }
.search svg { color: var(--faint); width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 100%; }
.form-card { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.form-card h2 { margin: 0; font-size: 15px; }
.actions-row { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.qk { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.qk:hover { color: var(--ink); border-color: var(--navy); }
.qk.on { background: var(--navy-btn); border-color: var(--navy-btn); color: #fff; font-weight: 600; }
.qk .n { font-size: 11.5px; padding: 1px 6px; border-radius: 9px; background: var(--saffron-soft); color: var(--saffron); font-weight: 700; }

/* ---------- tables ---------- */
.table-card { overflow: hidden; }
.tscroll { overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; }
.grid th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.grid td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover td { background: var(--row-hover); }
.grid tfoot td { font-weight: 700; border-top: 2px solid var(--line); background: var(--canvas); }
.grid th.r, .grid td.r { text-align: right; }
.grid td.act { text-align: right; white-space: nowrap; width: 1%; }
.grid .empty td { text-align: center; color: var(--muted); padding: 40px 12px; }
.grid .empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.grid tr.dim td { opacity: .55; }
.grid tr.sel td { background: var(--navy-soft) !important; }
.grid input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--navy-btn); }
.grid .sub2, .rep .sub2 { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.acts { display: inline-flex; gap: 2px; justify-content: flex-end; align-items: center; }
.no { font-family: var(--mono); font-weight: 600; font-size: 13px; }
a.no { text-decoration: none; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.found { color: var(--muted); font-size: 13px; } .found b { color: var(--ink); }
.pages { display: flex; gap: 4px; }
.pg { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 13px; display: inline-grid; place-items: center; text-decoration: none; color: var(--ink); }
.pg:hover { border-color: var(--navy); } .pg.on { background: var(--navy-btn); border-color: var(--navy-btn); color: #fff; }
.pg[aria-disabled] { opacity: .4; }
.bulk { position: sticky; top: 68px; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 10px; border-radius: 12px; background: var(--navy-btn); color: #fff; box-shadow: var(--shadow); }
.bulk b { margin-right: auto; }
.bulk .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }

/* ---------- menus ---------- */
.menu-pop { position: fixed; z-index: 150; min-width: 210px; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink); text-decoration: none; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--canvas); }
.menu-pop svg { width: 16px; height: 16px; color: var(--muted); }
.menu-pop .danger, .menu-pop .danger svg { color: var(--danger); }
.menu-pop form { margin: 0; }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(9, 17, 33, .5); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 460px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); animation: rise .18s ease; }
.sheet.wide { max-width: 760px; }
@keyframes rise { from { transform: translateY(12px); opacity: .5; } }
.sheet > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px 20px; }
.sheet h2 { font-size: 17px; margin: 0; }
.sheet .body { padding: 4px 20px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.sheet > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.sheet p { margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 400; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-weight: 500; box-shadow: var(--shadow); transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); color: #fff; }

/* ---------- bill editor ---------- */
.lines { width: 100%; border-collapse: collapse; }
.lines th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.lines td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines input { width: 100%; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); outline: none; }
.lines input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-soft); }
.lines .n { width: 34px; color: var(--faint); font-size: 12px; padding-top: 15px; text-align: center; }
.lines .q { width: 86px; } .lines .rt { width: 110px; } .lines .dp { width: 78px; } .lines .am { width: 120px; text-align: right; font-weight: 600; padding-top: 14px; font-variant-numeric: tabular-nums; }
.lines .x { width: 40px; }
.lines .st { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.lines .st.bad { color: var(--danger); font-weight: 600; }
.lines tr.bad input[name="qty[]"] { border-color: var(--danger); background: var(--danger-soft); }
.totbox { display: flex; flex-direction: column; gap: 8px; }
.totbox .tr { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.totbox .tr input:not([type=checkbox]) { width: 120px; height: 34px; text-align: right; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.totbox .grand { border-top: 2px solid var(--line); padding-top: 10px; font-size: 20px; font-weight: 700; }
.totbox .grand b { color: var(--navy); font-variant-numeric: tabular-nums; }
.pick { position: relative; }
.pick-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; max-height: 300px; overflow: auto; z-index: 70; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; }
.pick-list button { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 7px 9px; border-radius: 7px; text-align: left; font-size: 13.5px; }
.pick-list button:hover, .pick-list button.on { background: var(--navy-soft); }
.pick-list small { color: var(--muted); white-space: nowrap; }
.pick-list .new { color: var(--navy); font-weight: 600; }

/* ---------- statements & reports ---------- */
.stmt td.bal { font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stmt tr.ob td { background: var(--canvas); font-weight: 600; }
.stmt tr.cleared td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.rep { padding: 6px 0; }
.rep table { width: 100%; border-collapse: collapse; }
.rep td { padding: 8px 16px; border-bottom: 1px solid var(--line); }
.rep td.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rep tr.h td { background: var(--canvas); font-weight: 700; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.rep tr.t td { font-weight: 700; border-top: 2px solid var(--line); }
.rep tr.big td { font-size: 17px; font-weight: 800; background: var(--navy-soft); color: var(--navy); }
.rep tr.big.loss td { background: var(--danger-soft); color: var(--danger); }
.rep tr.ind td:first-child { padding-left: 32px; color: var(--muted); }
.rep tr.big.loss td { background: var(--danger-soft); color: var(--danger); }
.rep td small.pos, .rep td small.neg { font-size: 11.5px; margin-left: 4px; }
.rep .cmp { color: var(--faint); font-size: 12.5px; }
.chart { width: 100%; height: 170px; display: block; overflow: visible; }
.chart * { stroke: none; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .bs { fill: var(--navy); } .chart .bp { fill: var(--saffron); } .chart .be { fill: var(--danger); opacity: .7; }
:root[data-theme="dark"] .chart .bs { fill: #6f93d6; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bar { height: 8px; border-radius: 4px; background: var(--canvas); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--navy-btn); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); align-items: center; }
.list li:last-child { border-bottom: 0; }
.list .l { min-width: 0; } .list .l b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .l small { color: var(--muted); }
.card > h3 { margin: 0; padding: 14px 16px 10px; font-size: 14.5px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); }
.card > h3 a { font-size: 12.5px; font-weight: 600; text-decoration: none; }

/* ---------- company picker ---------- */
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.co-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.co-card .ch { display: flex; gap: 12px; align-items: center; }
.co-card img, .co-card .ph-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: var(--canvas); border: 1px solid var(--line); display: grid; place-items: center; color: var(--navy); }
.co-card h2 { margin: 0; font-size: 16px; }
.co-card p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.co-card .cb { display: flex; gap: 8px; margin-top: auto; }
.co-card .cb .btn { flex: 1; }


/* bank & cash accounts */
.accs { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; margin-bottom: 14px; }
.acc { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.acc header { display: flex; align-items: center; gap: 10px; }
.acc .l { flex: 1; min-width: 0; } .acc .l a { text-decoration: none; color: var(--ink); } .acc .l b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .acc .l small { color: var(--muted); font-size: 12px; }
.acc .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-soft); color: var(--navy); } .acc .ic.cash { background: var(--ok-soft); color: var(--ok); }
.acc .bal { font-size: 22px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; } .acc .bal.neg { color: var(--danger); }
.acc .meta { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.bar { height: 6px; border-radius: 4px; background: var(--canvas); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--danger); }
.ib.on { color: var(--ok); background: var(--ok-soft); }
tr.clr td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.clrbox { width: 18px; height: 18px; accent-color: var(--ok); cursor: pointer; vertical-align: middle; }

/* dues ageing */
.stackbar { display: flex; height: 12px; border-radius: 8px; overflow: hidden; gap: 2px; margin: 4px 0 8px; background: var(--canvas); }
.stackbar i { display: block; min-width: 4px; }
.b-current { background: var(--ok); } .b-d30 { background: #e0a43a; } .b-d60 { background: var(--saffron); } .b-d90 { background: #d9603f; } .b-d90p { background: var(--danger); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.seg a { padding: 6px 12px; border-radius: 7px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg a.on { background: var(--navy-btn); color: #fff; }
@media (max-width: 1180px) {
  .menu-btn { display: inline-grid; }
  .nav { position: fixed; top: 60px; left: 0; bottom: 0; width: min(300px, 86vw); background: var(--paper); border-right: 1px solid var(--line); flex-direction: column; align-items: stretch; margin: 0; padding: 10px; overflow-y: auto; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); }
  body.nav-open .nav { transform: none; }
  .nv .sub { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 6px 30px; min-width: 0; }
  .nl svg.dd { display: none; }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .tiles, .tiles.t5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles.t3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols.even { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt small, .co-pill span { display: none; }
  .grid.cards thead { display: none; }
  .grid.cards, .grid.cards tbody, .grid.cards tr, .grid.cards td { display: block; width: auto; }
  .table-card:has(.grid.cards) { background: none; border: 0; overflow: visible; }
  .grid.cards tbody { display: flex; flex-direction: column; gap: 10px; }
  .grid.cards tr { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; position: relative; }
  .grid.cards td { border: 0; padding: 0; background: none !important; }
  .grid.cards td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 600; color: var(--faint); margin-bottom: 1px; }
  .grid.cards td.wide { grid-column: 1 / -1; }
  .grid.cards td.act { grid-column: 1 / -1; text-align: left; width: auto; }
  .grid.cards td.r { text-align: left; }
  .grid.cards tr.empty, .grid.cards tr.empty td { display: block; }
  .grid.cards tfoot { display: block; } .grid.cards tfoot tr { display: grid; }
  .grid.cards td:has(> input[data-row]) { position: absolute; top: 10px; right: 12px; }
  .grid.cards tr:has(input[data-row]) { padding-right: 40px; }
  .grid.cards td:empty { display: none; }
  .grid.cards td.bal { text-align: left; }
  .grid.stmt.cards tfoot { display: none; }
  .lines thead { display: none; }
  .lines, .lines tbody, .lines tr, .lines td { display: block; width: auto !important; }
  .lines tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); position: relative; }
  .lines td { border: 0; padding: 0; }
  .lines td.n { display: none; } .lines td.d { grid-column: 1 / -1; padding-right: 40px; }
  .lines td.x { position: absolute; right: 0; top: 10px; }
  .lines td.am { grid-column: 1 / -1; text-align: right; padding-top: 0; }
  .lines td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 600; color: var(--faint); }
}
@media (max-width: 600px) {
  .top { padding: 0 8px; gap: 4px; }
  .wrap { padding: 14px 12px 50px; }
  .tiles.t3 { grid-template-columns: 1fr 1fr; }
  .tile b { font-size: 20px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .fl { max-width: none; flex-basis: calc(50% - 4px); min-width: 0; }
  .sheet { max-height: 100dvh; border-radius: 16px 16px 0 0; align-self: flex-end; }
  .modal { padding: 0; }
  .ph h1 { font-size: 19px; }
  .ph-b { width: 100%; }
  .rep td { padding: 8px 10px; }
}
@media print {
  .top, .filters, .ph-b, .no-print, .pager, .bulk, .flash, .acts, td.act, th.act { display: none !important; }
  body { background: #fff; color: #000; }
  .wrap { max-width: none; padding: 0; }
  .card { border-color: #ccc; }
  .tile { border-color: #ccc; }
}

/* inventory additions */
.pick { position: relative; }
input.bad { border-color: var(--danger) !important; box-shadow: 0 0 0 3px var(--danger-soft); }
.stk { font-variant-numeric: tabular-nums; min-width: 44px; justify-content: center; }
tr.flashrow td { animation: flashrow 1.2s ease; }
@keyframes flashrow { 0% { background: var(--ok-soft); } 100% { background: transparent; } }
.scanbox { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.scanbox .f { flex: 1; min-width: 220px; }
.scanbox input.big { height: 48px; font-size: 17px; }
.kv2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 16px; }
.kv2 div span { display: block; font-size: 12px; color: var(--muted); } .kv2 div b { font-size: 15px; }
.prod-title { font-weight: 600; } .prod-title a { color: var(--ink); text-decoration: none; } .prod-title a:hover { color: var(--navy); text-decoration: underline; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.whbar { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; }
.whbar .row { display: grid; grid-template-columns: 140px 1fr 110px; gap: 10px; align-items: center; font-size: 13px; }
.whbar .row .bar { height: 10px; } .whbar .row .bar i { background: var(--navy); }
@media (max-width: 600px) { .whbar .row { grid-template-columns: 1fr 90px; } .whbar .row .bar { grid-column: 1 / -1; } }
.seg label { cursor: pointer; } .seg label span { display: inline-block; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); } .seg input:checked + span { background: var(--navy-btn); color: #fff; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); font-weight: 500; flex-wrap: wrap; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.chart .bi { fill: var(--ok); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--navy); }
details.more summary { cursor: pointer; color: var(--navy); font-size: 13px; font-weight: 600; margin-top: 10px; } details.more .frow { margin-top: 10px; }
.sortl { color: inherit; text-decoration: none; } .sortl.on { color: var(--navy); }
/* product list — filters as in the original version */
.colf { margin-top: 7px; } .colf input { width: 100%; min-width: 110px; height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); font-size: 13px; font-weight: 500; color: var(--ink); outline: none; }
.colf input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-soft); }
.sortl i { font-style: normal; opacity: .55; } .sortl.on i { opacity: 1; }
.range { display: flex; align-items: center; gap: 6px; } .range b { color: var(--muted); }
.tile.navy { background: var(--navy-btn); border-color: var(--navy-btn); } .tile.navy span, .tile.navy small { color: rgba(255,255,255,.75); } .tile.navy b { color: #fff; }
.colf-m { display: none; }
@media (max-width: 900px) { .colf-m { display: flex; } }
@media (max-width: 600px) { .tiles.t3 .tile.navy { grid-column: 1 / -1; } }

/* ================= Office Suite pages (launchpad, Operations hub, users, sign-ins) ================= */
.inl { display: inline; margin: 0; }
.me-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 4px; border-radius: 20px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.me-chip:hover { border-color: var(--navy); }
.me-chip .mt { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.me-chip .mt b { font-size: 13px; } .me-chip .mt small { font-size: 11px; color: var(--muted); }
.me-chip svg.dd { width: 14px; height: 14px; color: var(--muted); }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--navy-btn); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.av.lg { width: 44px; height: 44px; font-size: 18px; }
@media (max-width: 700px) { .me-chip .mt, .me-chip svg.dd { display: none; } .me-chip { padding: 0 4px; } }

/* hello band */
.hello { background: linear-gradient(135deg, #12305f 0%, #0b1f40 100%); color: #fff; border-radius: 18px; padding: 22px 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.hello h1 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.hello p { margin: 4px 0 0; color: rgba(255, 255, 255, .78); }
.hello .here { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; padding: 9px 12px; max-width: 100%; }
.hello .here svg { color: #9fc0ff; }
.hello .here b { display: block; font-size: 13.5px; font-weight: 600; }
.hello .here small { color: rgba(255, 255, 255, .72); font-size: 12px; }
.hello .here a { color: #cfe0ff; }

/* module cards */
.mods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.mod { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; min-height: 170px; }
.mod:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15, 31, 61, .08); }
.mod .mi { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--navy-soft); color: var(--navy); }
.mod .mi svg { width: 24px; height: 24px; }
.mod h2 { margin: 0; font-size: 18px; }
.mod p { margin: 0; color: var(--muted); font-size: 13.5px; flex: 1; }
.mod .go { font-weight: 600; color: var(--navy); display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; }
.mod .go svg { width: 16px; height: 16px; }
.mod.locked { background: var(--canvas); color: var(--muted); pointer-events: none; }
.mod.locked .mi { background: var(--line); color: var(--faint); }
.mod.locked .go { color: var(--faint); }
@media (max-width: 900px) { .mods { grid-template-columns: 1fr; } .mod { min-height: 0; } }

/* tool cards (Operations hub, quick links) */
.hub-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.hub-tools .search { flex: 1 1 280px; max-width: 420px; background: var(--paper); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13px; }
.chip:hover { border-color: var(--navy); }
.chip svg { width: 15px; height: 15px; color: var(--muted); }
.hub-sec { margin-top: 20px; }
.hub-sec > h2 { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.hub-sec > h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.hub-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .12s, background .12s; }
.hub-card:hover { border-color: var(--navy); background: var(--row-hover); }
.hub-card .hi { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--navy-soft); color: var(--navy); flex: none; }
.hub-card .hi.sf { background: var(--saffron-soft); color: var(--saffron); }
.hub-card .hi.tl { background: var(--teal-soft); color: var(--teal); }
.hub-card .hi.gr { background: var(--ok-soft); color: var(--ok); }
.hub-card .hi.rd { background: var(--danger-soft); color: var(--danger); }
.hub-card b { display: block; font-size: 14.5px; }
.hub-card small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.hub-card .arr { margin-left: auto; color: var(--faint); width: 16px; height: 16px; }

/* devices / places */
.dev { display: inline-flex; align-items: flex-start; gap: 7px; }
.dev svg { width: 17px; height: 17px; color: var(--muted); margin-top: 1px; }
.plc { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.plc b { font-weight: 600; font-size: 13.5px; }
.plc .co { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--navy); text-decoration: none; }
.plc .co:hover { text-decoration: underline; }
.plc .co svg { width: 13px; height: 13px; }
.who { display: flex; align-items: center; gap: 10px; }
.who b { display: block; } .who small { color: var(--muted); font-size: 12px; }
.dotl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.dotl::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dotl.ok { color: var(--ok); } .dotl.ok::before { background: var(--ok); }
.dotl.bad { color: var(--danger); } .dotl.bad::before { background: var(--danger); }
.dotl.warn { color: var(--saffron); } .dotl.warn::before { background: var(--saffron); }
.mine td { background: var(--navy-soft); }
.devlist { list-style: none; margin: 0; padding: 0; }
.devlist li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.devlist li:last-child { border-bottom: 0; }
.devlist .di { width: 38px; height: 38px; border-radius: 10px; background: var(--navy-soft); color: var(--navy); display: grid; place-items: center; flex: none; }
.devlist .dm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.devlist .dm > b { font-size: 14px; }
.devlist .meta { color: var(--muted); font-size: 12.5px; }
.mods-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.boxes { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.pw-wrap { position: relative; } .pw-wrap input { padding-right: 56px !important; }
.pw-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); padding: 4px 6px; }
.note { background: var(--saffron-soft); color: var(--saffron); border-radius: 12px; padding: 11px 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; font-weight: 500; }
.trail { list-style: none; margin: 0; padding: 0 0 0 6px; }
.trail li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--line); }
.trail li:last-child { border-left-color: transparent; }
.trail li::before { content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--navy); }
.trail li:first-child::before { background: var(--navy); }
.trail time { display: block; font-size: 12.5px; color: var(--muted); }
@media (max-width: 900px) {
  .hello { padding: 18px; } .hello h1 { font-size: 20px; }
}
