:root {
--bg: #f2f4f3; --surface: #ffffff; --surface-2: #f7f9f8; --ink: #15201b; --muted: #5b6862; --faint: #8a9690; --line: #dce3df; --line-2: #e9eeeb;
--accent: #0e6a5a; --accent-ink: #ffffff; --accent-soft: #e0efea; --accent-line: #b9dbd1;
--side: #0f221d; --side-ink: #c9dbd4; --side-dim: #7f9a90; --side-hover: #18322b; --side-active: #21423a;
--good: #1c7547; --good-bg: #e1f2e8; --warn: #8f6200; --warn-bg: #fbf0d2; --bad: #ad3329; --bad-bg: #fbe4e1; --info: #2459a8; --info-bg: #e3ecfa; --neu: #56635d; --neu-bg: #ebefed;
--s1: #2a78d6; --s2: #eb6834; --grid: #e6ebe8;
--shadow: 0 1px 2px rgba(16, 34, 29, .06), 0 2px 8px rgba(16, 34, 29, .04);
--f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--f-num: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
--r: 8px;
color-scheme: light;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #101513; --surface: #171e1b; --surface-2: #1c2421; --ink: #e5ece8; --muted: #9eaba5; --faint: #73807a; --line: #2a3430; --line-2: #222b28;
--accent: #4fbfa3; --accent-ink: #06201a; --accent-soft: #1b3530; --accent-line: #2d5a50;
--side: #0a110f; --side-ink: #c9dbd4; --side-dim: #6f8880; --side-hover: #142320; --side-active: #1d342e;
--good: #6fd29c; --good-bg: #16301f; --warn: #e7bd57; --warn-bg: #342910; --bad: #f08a80; --bad-bg: #3a1c19; --info: #8fb5f3; --info-bg: #182640; --neu: #a7b4ae; --neu-bg: #232c29;
--s1: #3987e5; --s2: #d95926; --grid: #26302c; --shadow: none; color-scheme: dark;
}
}
:root[data-theme="dark"] {
--bg: #101513; --surface: #171e1b; --surface-2: #1c2421; --ink: #e5ece8; --muted: #9eaba5; --faint: #73807a; --line: #2a3430; --line-2: #222b28;
--accent: #4fbfa3; --accent-ink: #06201a; --accent-soft: #1b3530; --accent-line: #2d5a50;
--side: #0a110f; --side-ink: #c9dbd4; --side-dim: #6f8880; --side-hover: #142320; --side-active: #1d342e;
--good: #6fd29c; --good-bg: #16301f; --warn: #e7bd57; --warn-bg: #342910; --bad: #f08a80; --bad-bg: #3a1c19; --info: #8fb5f3; --info-bg: #182640; --neu: #a7b4ae; --neu-bg: #232c29;
--s1: #3987e5; --s2: #d95926; --grid: #26302c; --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 600; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 600; }
.num, .mono { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100%; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--side-hover); }
.brand b { font-size: 15px; color: #fff; font-weight: 600; letter-spacing: -.01em; }
.brand span { font-size: 11px; color: var(--side-dim); text-transform: uppercase; letter-spacing: .08em; }
.nav { padding: 10px 8px; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--side-dim); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--side-ink); font-size: 13.5px; text-decoration: none; }
.nav a svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav a:hover { background: var(--side-hover); }
.nav a.on { background: var(--side-active); color: #fff; font-weight: 500; }
.nav a.soon { color: var(--side-dim); cursor: default; }
.nav a.soon:hover { background: none; }
.nav a .tag { margin-left: auto; font-size: 10px; border: 1px solid var(--side-hover); border-radius: 4px; padding: 0 5px; color: var(--side-dim); }
.nav a .badge { margin-left: auto; background: var(--s2); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 7px; font-weight: 600; }
.who { border-top: 1px solid var(--side-hover); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.who .n { color: #fff; font-weight: 500; font-size: 13px; }
.who .r { font-size: 12px; color: var(--side-dim); }
.who .links { display: flex; gap: 12px; font-size: 12.5px; }
.who .links a, .who .links button { color: var(--side-ink); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.topbar { display: none; }
.main { min-width: 0; padding-inline: 28px; padding-block: 22px 60px; }
.page { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.phead .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.phead .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
@media (max-width: 900px) {
.shell { grid-template-columns: 1fr; }
.side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .18s ease; padding-top: env(safe-area-inset-top, 0px); }
.shell.open .side { transform: none; }
.shell.open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; }
.topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: var(--side); color: #fff; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; }
.topbar button { background: none; border: 0; color: #fff; padding: 4px; cursor: pointer; display: flex; }
.topbar b { font-weight: 600; font-size: 15px; }
.main { padding-inline: 16px; padding-block: 16px 60px; }
}
.btn { font: inherit; font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 7px;
border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-line); outline-offset: 0; border-color: var(--accent); }
label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field .hint { font-size: 12px; color: var(--faint); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 400; color: var(--ink); }
.check input { width: auto; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; }
.span2 { grid-column: span 2; } .spanall { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card > .hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.card > .bd { padding: 16px; }
.card > .bd.flush { padding: 0; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: var(--neu-bg); color: var(--neu); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.good { background: var(--good-bg); color: var(--good); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.info { background: var(--info-bg); color: var(--info); }
.pill.acc { background: var(--accent-soft); color: var(--accent); }
.msg { padding: 10px 12px; border-radius: 7px; font-size: 13px; }
.msg.err { background: var(--bad-bg); color: var(--bad); } .msg.ok { background: var(--good-bg); color: var(--good); } .msg.warn { background: var(--warn-bg); color: var(--warn); }
.msg ul { margin: 6px 0 0; padding-left: 18px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl th.sort { cursor: pointer; user-select: none; } .tbl th.sort:hover { color: var(--ink); }
.tbl th .ar { font-size: 9px; margin-left: 3px; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.link { cursor: pointer; } .tbl tbody tr.link:hover { background: var(--surface-2); }
.tbl .r { text-align: right; } .tbl td.r { font-family: var(--f-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line); }
.tbl .sub { font-size: 12px; color: var(--muted); }
.ono { font-family: var(--f-num); font-weight: 500; font-size: 13px; white-space: nowrap; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager .b { display: flex; gap: 6px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.toolbar .grow { flex: 1 1 220px; }
.toolbar .field { flex: 0 1 170px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); font-weight: 600; }
.filterbar { display: flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent); border-radius: 7px; padding: 7px 12px; font-size: 13px; }
.filterbar button { margin-left: auto; }
.ranges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ranges input[type=date] { width: auto; padding: 5px 8px; font-size: 12.5px; }
.secttl { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; margin: 4px 0 -8px; }
.sales { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.sales > div { padding: 14px 18px; border-left: 1px solid var(--line-2); min-width: 0; }
.sales > div:first-child { border-left: 0; }
.sales .k { font-size: 12px; color: var(--muted); }
.sales .v { font-family: var(--f-num); font-size: 24px; font-weight: 500; letter-spacing: -.02em; margin-top: 4px; overflow-wrap: anywhere; }
.sales .v small, .tile .v small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; letter-spacing: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; color: inherit; cursor: pointer; min-width: 0; position: relative; }
.tile:hover { border-color: var(--accent-line); background: var(--surface-2); }
.tile.static { cursor: default; } .tile.static:hover { border-color: var(--line); background: var(--surface); }
.tile .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile .v { font-family: var(--f-num); font-size: 21px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile .s { font-size: 11.5px; color: var(--faint); }
.tile.alert { border-left: 3px solid var(--warn); } .tile.bad { border-left: 3px solid var(--bad); } .tile.good { border-left: 3px solid var(--good); }
.tile .na { font-family: var(--f-body); font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.alerts { display: flex; gap: 10px; flex-wrap: wrap; }
.alerts a { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 7px; background: var(--warn-bg); color: var(--warn); font-size: 13px; font-weight: 500; text-decoration: none; }
.alerts a.bad { background: var(--bad-bg); color: var(--bad); }
.alerts a:hover { filter: brightness(.97); }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.charts .wide { grid-column: 1 / -1; }
@media (max-width: 980px) { .charts { grid-template-columns: 1fr; } .sales { grid-template-columns: repeat(2, 1fr); } .sales > div:nth-child(3) { border-left: 0; } .sales > div:nth-child(n+3) { border-top: 1px solid var(--line-2); } }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .ax { font-family: var(--f-num); font-size: 10.5px; fill: var(--muted); }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--surface); font-size: 12px; padding: 6px 9px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.chart .tip b { font-family: var(--f-num); font-weight: 500; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; background: none; border: 0; padding: 0; color: inherit; font-family: inherit; text-align: left; width: 100%; }
button.hbar { cursor: pointer; } button.hbar:hover .lbl { color: var(--accent); }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .trk { height: 12px; background: transparent; position: relative; }
.hbar .fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); min-width: 2px; }
.hbar .val { font-family: var(--f-num); font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink); min-width: 48px; text-align: right; }
.stack { display: flex; height: 26px; gap: 2px; margin: 6px 0 12px; }
.stack div { height: 100%; } .stack div:first-child { border-radius: 4px 0 0 4px; } .stack div:last-child { border-radius: 0 4px 4px 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.kv dd.txt { font-family: var(--f-body); text-align: left; overflow-wrap: anywhere; }
.kv small { font-size: 11px; color: var(--muted); margin-left: 3px; }
.kv .tot { font-weight: 600; border-top: 1px solid var(--line); padding-top: 6px; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.detail .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 1080px) { .detail { grid-template-columns: 1fr; } }
.statusrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding-bottom: 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin: 5px 0 0 2px; }
.timeline .dot.payment { background: var(--s1); } .timeline .dot.note { background: var(--faint); } .timeline .dot.delivery { background: var(--s2); }
.timeline .t { font-size: 13px; } .timeline .m { font-size: 12px; color: var(--muted); }
.items-ed { width: 100%; border-collapse: collapse; }
.items-ed th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: left; padding: 0 6px 6px; font-weight: 600; }
.items-ed td { padding: 4px 6px; vertical-align: middle; }
.items-ed td.lt { font-family: var(--f-num); text-align: right; white-space: nowrap; }
.items-ed .x { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 18px; padding: 4px; }
.items-ed .x:hover { color: var(--bad); }
.suggest { position: absolute; z-index: 15; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow: hidden; }
.suggest button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.suggest button:hover, .suggest button:focus { background: var(--accent-soft); }
.chosen { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--accent-soft); border-radius: 7px; }
.overlay { position: fixed; inset: 0; background: rgba(8, 18, 15, .45); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,.25); display: flex; flex-direction: column; }
.modal.wide { max-width: 760px; }
.modal .hd { padding: 16px 18px 0; display: flex; justify-content: space-between; align-items: center; }
.modal .hd button { background: none; border: 0; font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1; }
.modal .bd { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.modal .ft { padding: 12px 18px 16px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 8px; font-size: 13.5px; z-index: 80; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.auth { min-height: 100%; display: flex; align-items: flex-start; justify-content: center; padding-inline: 16px; padding-block: 9vh 40px; }
.authbox { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
.authbox .mark { display: flex; align-items: center; gap: 10px; }
.authbox .mark i { width: 34px; height: 34px; border-radius: 8px; background: var(--side); display: grid; place-items: center; color: var(--accent); }
.authbox form { display: flex; flex-direction: column; gap: 13px; }
.authbox .card .bd { display: flex; flex-direction: column; gap: 13px; }
.loading { padding: 60px 16px; text-align: center; color: var(--muted); }
.spin { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; display: inline-block; animation: sp .7s linear infinite; vertical-align: -4px; margin-right: 8px; }
@keyframes sp { to { transform: rotate(360deg); } }
.matrix th:not(:first-child), .matrix td:not(:first-child) { text-align: center; }
.matrix td:first-child { white-space: normal; min-width: 220px; }
pre.json { margin: 0; font-family: var(--f-num); font-size: 11.5px; white-space: pre-wrap; word-break: break-word; color: var(--muted); max-width: 420px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 720px) {
.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile .v { font-size: 18px; }
.hide-sm { display: none; }
.tbl.cards thead { display: none; }
.tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
.tbl.cards tr { padding: 12px 14px; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
.tbl.cards td { border: 0; padding: 0; }
.tbl.cards td.r { text-align: right; }
.tbl.cards tfoot { display: none; }
}
