/* Doner · LorvoTech — one stylesheet for the till (staff) and the owner's panel (admin).
   Warm charcoal and ember: the colours of a grill, high contrast for a tablet next to one. */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1E9F; }

:root {
  --bg: #f6f1ea; --bg2: #efe7dc; --card: #fffdf9; --ink: #1d1712; --ink2: #5d5249; --ink3: #8a7e73; --line: #e3d8ca; --line2: #d4c6b4;
  --ember: #d9531e; --ember2: #b8410f; --ember-soft: #fbe3d5; --on-ember: #fff;
  --ok: #1f8a4c; --ok-soft: #dcf1e3; --warn: #b7791f; --warn-soft: #fbefd6; --bad: #c0352b; --bad-soft: #f9dedb; --info: #2f6db3;
  --cash: #2f7d4f; --card-pay: #3460a8;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 6px 20px rgba(60, 40, 20, .07);
  --r: 14px; --r2: 20px;
  --display: "Archivo", "Inter", system-ui, sans-serif; --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #15110e; --bg2: #1d1814; --card: #221c17; --ink: #f6eee4; --ink2: #c9bcae; --ink3: #94877a; --line: #342b24; --line2: #45392f;
  --ember: #f26b2a; --ember2: #ff8a4c; --ember-soft: #3a2015; --on-ember: #1b0f08;
  --ok: #3fbf72; --ok-soft: #173323; --warn: #e3a743; --warn-soft: #3a2c13; --bad: #f0675b; --bad-soft: #3d1a17; --info: #6aa5ea;
  --cash: #4cc27f; --card-pay: #7aa3ec;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15110e; --bg2: #1d1814; --card: #221c17; --ink: #f6eee4; --ink2: #c9bcae; --ink3: #94877a; --line: #342b24; --line2: #45392f;
    --ember: #f26b2a; --ember2: #ff8a4c; --ember-soft: #3a2015; --on-ember: #1b0f08;
    --ok: #3fbf72; --ok-soft: #173323; --warn: #e3a743; --warn-soft: #3a2c13; --bad: #f0675b; --bad-soft: #3d1a17; --info: #6aa5ea;
    --cash: #4cc27f; --card-pay: #7aa3ec;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--ember) 60%, transparent); outline-offset: 2px; }
.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink3); }
.hidden, [hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; margin: 0; }

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 600; background: var(--bg2); color: var(--ink); border: 1px solid var(--line); transition: transform .06s, background .15s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--ember); color: var(--on-ember); border-color: transparent; }
.btn--primary:hover { background: var(--ember2); }
.btn--ok { background: var(--ok); color: #fff; border-color: transparent; }
.btn--danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn--lg { min-height: 60px; font-size: 19px; border-radius: 16px; padding: 0 26px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--ink2); font-weight: 500; }
.field input, .field select, .field textarea, .input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font-size: 15px; }
.field textarea { min-height: 72px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink); }
.check input { width: 20px; height: 20px; accent-color: var(--ember); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--bg2); color: var(--ink2); }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--bad { background: var(--bad-soft); color: var(--bad); }
.badge--ember { background: var(--ember-soft); color: var(--ember); }
.badge--cash { background: color-mix(in srgb, var(--cash) 15%, transparent); color: var(--cash); }
.badge--card { background: color-mix(in srgb, var(--card-pay) 15%, transparent); color: var(--card-pay); }
.notice { border-radius: 12px; padding: 12px 14px; background: var(--warn-soft); color: var(--ink); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.notice--info { background: var(--ember-soft); }
.fiscal { font-size: 11.5px; color: var(--ink3); text-align: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }

/* ---------- toast, dialog ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); transition: .2s; z-index: 100; max-width: calc(100vw - 32px); pointer-events: none; }
.toast.is-on { opacity: 1; transform: translateX(-50%); }
.toast--err { background: var(--bad); color: #fff; }
.toast--ok { background: var(--ok); color: #fff; }
dialog.sheet { border: 0; padding: 0; background: transparent; max-width: min(560px, calc(100vw - 24px)); width: 100%; color: var(--ink); }
dialog.sheet::backdrop { background: rgba(20, 12, 6, .55); backdrop-filter: blur(2px); }
.sheet__card { background: var(--card); border-radius: var(--r2); padding: 22px; box-shadow: var(--shadow); max-height: calc(100dvh - 40px); overflow: auto; }
.sheet__card h2 { font-size: 22px; margin-bottom: 4px; }
.sheet__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 560px) { dialog.sheet { max-width: 100vw; margin: auto 0 0; } .sheet__card { border-radius: var(--r2) var(--r2) 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); } }

/* ===================================================================== the till */
.till { height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.tbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: var(--card); border-bottom: 1px solid var(--line); min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand__logo { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; background: var(--ember); display: grid; place-items: center; color: var(--on-ember); font: 800 17px var(--display); flex: none; }
.brand__name { font: 800 17px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbar__stats { display: flex; gap: 8px; margin-left: auto; align-items: center; min-width: 0; }
.stat { display: grid; line-height: 1.1; padding: 4px 12px; border-radius: 10px; background: var(--bg2); }
.stat b { font: 700 16px var(--display); font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; color: var(--ink3); text-transform: uppercase; letter-spacing: .04em; }
.net { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.net::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.net--off { background: var(--warn-soft); color: var(--warn); }
.net--q { background: var(--ember-soft); color: var(--ember); }
.who { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--bg2); font-weight: 600; white-space: nowrap; }
.who__av { width: 30px; height: 30px; border-radius: 50%; background: var(--ember); color: var(--on-ember); display: grid; place-items: center; font: 800 14px var(--display); }

.pos { display: grid; grid-template-columns: 1fr 360px; min-height: 0; }
.menu { display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.cats { display: flex; gap: 8px; padding: 12px 16px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; min-height: 48px; padding: 0 20px; border-radius: 99px; font: 700 16px var(--display); background: var(--card); border: 1px solid var(--line); color: var(--ink2); }
.cat.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tiles { overflow-y: auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; align-content: start; }
.tile { position: relative; display: grid; align-content: space-between; gap: 10px; min-height: 124px; padding: 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); text-align: left; box-shadow: var(--shadow); transition: transform .06s, border-color .15s; overflow: hidden; }
.tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--tile, var(--ember)); }
.tile:active { transform: scale(.97); border-color: var(--ember); }
.tile__name { font: 700 18px/1.2 var(--display); }
.tile__desc { font-size: 12px; color: var(--ink3); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile__price { font: 800 22px var(--display); color: var(--ember); font-variant-numeric: tabular-nums; }
.tile__qty { position: absolute; top: 10px; right: 10px; min-width: 30px; height: 30px; border-radius: 99px; background: var(--ember); color: var(--on-ember); font: 800 15px var(--display); display: grid; place-items: center; padding: 0 8px; animation: pop .18s; }
@keyframes pop { from { transform: scale(.4); } }

.cart { display: grid; grid-template-rows: auto 1fr auto; background: var(--card); border-left: 1px solid var(--line); min-height: 0; }
.cart__head { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px 8px; }
.cart__head h2 { font-size: 20px; }
.cart__lines { overflow-y: auto; padding: 0 12px; }
.cart__empty { display: grid; place-items: center; text-align: center; color: var(--ink3); padding: 40px 20px; gap: 8px; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 6px; border-bottom: 1px dashed var(--line); }
.line__name { font-weight: 700; font-size: 15.5px; }
.line__sum { font: 700 16px var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.line__ctl { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.qty { display: inline-flex; align-items: center; background: var(--bg2); border-radius: 12px; }
.qty button { width: 46px; height: 42px; font: 700 22px var(--display); color: var(--ink); border-radius: 12px; }
.qty button:active { background: var(--line); }
.qty b { min-width: 30px; text-align: center; font: 800 17px var(--display); }
.note-btn { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ink2); padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--line2); max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-btn.has { border-style: solid; background: var(--ember-soft); color: var(--ember); border-color: transparent; }
.cart__foot { padding: 12px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.total { display: flex; justify-content: space-between; align-items: baseline; }
.total span { color: var(--ink2); font-weight: 600; }
.total b { font: 800 30px var(--display); font-variant-numeric: tabular-nums; }
.vat { font-size: 12px; color: var(--ink3); text-align: right; margin-top: -8px; }
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay button { min-height: 54px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg2); font: 700 16px var(--display); display: flex; align-items: center; justify-content: center; gap: 8px; }
.pay button.is-on[data-pay="gotovina"] { border-color: var(--cash); background: color-mix(in srgb, var(--cash) 14%, var(--card)); color: var(--cash); }
.pay button.is-on[data-pay="kartica"] { border-color: var(--card-pay); background: color-mix(in srgb, var(--card-pay) 14%, var(--card)); color: var(--card-pay); }
.charge { min-height: 66px; border-radius: 16px; background: var(--ember); color: var(--on-ember); font: 800 21px var(--display); display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 6px 20px color-mix(in srgb, var(--ember) 35%, transparent); }
.charge[disabled] { opacity: .35; box-shadow: none; }
.minibar { display: none; }

/* the phone: tiles in two columns, the cart as a bar that opens a sheet */
@media (max-width: 820px) {
  .pos { grid-template-columns: 1fr; }
  .cart { position: fixed; inset: auto 0 0 0; max-height: 86dvh; border-left: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); transform: translateY(105%); transition: transform .22s ease; z-index: 30; }
  .cart.is-open { transform: none; }
  .minibar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; min-height: 62px; border-radius: 18px; background: var(--ember); color: var(--on-ember); align-items: center; padding: 0 18px; font: 800 18px var(--display); gap: 12px; box-shadow: 0 8px 26px rgba(0, 0, 0, .3); }
  .minibar[disabled] { background: var(--card); color: var(--ink3); box-shadow: var(--shadow); border: 1px solid var(--line); }
  .minibar__n { background: rgba(0, 0, 0, .18); border-radius: 99px; padding: 2px 10px; font-size: 15px; }
  .minibar__t { margin-left: auto; font-variant-numeric: tabular-nums; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px 12px 100px; }
  .tile { min-height: 112px; padding: 14px; }
  .tile__name { font-size: 16px; }
  .tile__price { font-size: 19px; }
  .tbar { gap: 8px; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); }
  .tbar .stat--day, .tbar .brand__name { display: none; }
  .who span:not(.who__av) { max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
  .cats { padding: 10px 12px; }
  .cat { min-height: 44px; padding: 0 16px; font-size: 15px; }
  .till .fiscal { display: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 25; }
}

/* the PIN pad */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 50% -10%, var(--ember-soft), transparent 60%), var(--bg); }
.pin { width: min(380px, 100%); display: grid; gap: 18px; text-align: center; }
.pin__logo { width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; font-size: 30px; }
.pin h1 { font-size: 26px; }
.dots { display: flex; gap: 16px; justify-content: center; height: 22px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink3); }
.dots i.on { background: var(--ember); border-color: var(--ember); }
.dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.keys button { height: 72px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); font: 700 28px var(--display); box-shadow: var(--shadow); }
.keys button:active { background: var(--ember-soft); }
.keys .k-muted { font-size: 16px; color: var(--ink2); }
.pin__msg { min-height: 22px; color: var(--bad); font-weight: 600; }

/* open shift / confirm / done */
.center { display: grid; place-items: center; min-height: 100%; padding: 24px 16px; }
.panel { width: min(460px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 26px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.bigsum { font: 800 44px var(--display); text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick button { min-height: 50px; border-radius: 12px; background: var(--bg2); font: 700 16px var(--display); border: 1px solid var(--line); }
.change { display: flex; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: var(--ok-soft); font-weight: 600; }
.change b { font: 800 22px var(--display); }
.done { text-align: center; display: grid; gap: 6px; }
.done__check { width: 76px; height: 76px; margin: 0 auto 6px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; animation: pop .25s; }
.done__no { font: 800 52px var(--display); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); font-weight: 600; }
.chip.is-on { background: var(--ember); color: var(--on-ember); border-color: transparent; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; }
.kv dt { color: var(--ink2); }
.kv dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.kv .strong { font: 800 20px var(--display); }
.drawer { display: grid; gap: 6px; }
.drawer button { text-align: left; min-height: 52px; padding: 0 14px; border-radius: 12px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.drawer button:hover { background: var(--bg2); }
.recent { display: grid; gap: 6px; max-height: 50dvh; overflow: auto; }
.recent div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg2); font-size: 14px; }

/* ===================================================================== the owner's panel */
.admin { min-height: 100dvh; display: grid; grid-template-columns: 240px 1fr; }
.side { position: sticky; top: 0; height: 100dvh; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px; gap: 4px; }
.side .brand { padding: 0 8px 16px; }
.side a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink2); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.side a svg { width: 19px; height: 19px; flex: none; }
.side a:hover { background: var(--bg2); color: var(--ink); }
.side a.is-on { background: var(--ember-soft); color: var(--ember); }
.side__foot { margin-top: auto; display: grid; gap: 6px; font-size: 12px; color: var(--ink3); padding: 8px; }
.main { min-width: 0; padding: 24px 28px 40px; display: grid; gap: 20px; align-content: start; }
.head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.head h1 { font-size: 26px; }
.head .row { margin-left: auto; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { font-size: 15px; color: var(--ink2); font-family: var(--sans); font-weight: 600; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.kpi__v { font: 800 32px var(--display); margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi__d { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink2); margin-top: 4px; }
.delta { font-weight: 700; }
.delta--up { color: var(--ok); }
.delta--down { color: var(--bad); }
.split { height: 8px; border-radius: 99px; overflow: hidden; display: flex; background: var(--bg2); margin-top: 12px; }
.split i { background: var(--cash); }
.split i + i { background: var(--card-pay); }
.split-l { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink2); margin-top: 6px; }
.split-l b { color: var(--ink); }
.two { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.wide { grid-column: 1 / -1; }
.chart { width: 100%; height: 220px; display: block; }
.chart text { font: 11px var(--sans); fill: var(--ink3); }
.chart .bar { fill: var(--ember); }
.chart .bar--future { fill: var(--line); }
.chart .ghost { fill: none; stroke: var(--ink3); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .bar:hover { fill: var(--ember2); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--ember); margin-right: 5px; vertical-align: -1px; }
.legend i.g { background: none; border: 1.5px dashed var(--ink3); }
.tabs { display: inline-flex; background: var(--bg2); border-radius: 10px; padding: 3px; gap: 2px; }
.tabs button { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.tabs button.is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 12px; color: var(--ink3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: var(--bg2); }
.t tr.void td { color: var(--ink3); text-decoration: line-through; text-decoration-color: var(--bad); }
.t tfoot td { font-weight: 800; border-top: 2px solid var(--line2); }
.rank { display: grid; gap: 10px; }
.rank__row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.rank__bar { grid-column: 2 / -1; height: 6px; border-radius: 99px; background: var(--bg2); overflow: hidden; margin-top: -4px; }
.rank__bar i { display: block; height: 100%; background: var(--ember); border-radius: 99px; }
.rank__n { font: 700 13px var(--display); color: var(--ink3); }
.alert { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg2); font-size: 14px; }
.alert b { margin-left: auto; font-variant-numeric: tabular-nums; }
.empty { color: var(--ink3); text-align: center; padding: 24px; font-size: 14px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters .field { min-width: 140px; }
.lines-edit { display: grid; gap: 8px; }
.lines-edit .le { display: grid; grid-template-columns: 1fr 70px 90px 36px; gap: 8px; align-items: center; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px 16px; background: radial-gradient(1000px 500px at 50% -10%, var(--ember-soft), transparent 60%), var(--bg); }
.login .panel { gap: 14px; }
.topm { display: none; }
@media (max-width: 1100px) { .cards { grid-template-columns: 1fr 1fr; } .cards > :first-child { grid-column: 1 / -1; } .two { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); }
  .side.is-open { transform: none; }
  .topm { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); }
  .main { padding: 16px 16px 40px; gap: 16px; }
  .cards { grid-template-columns: 1fr; }
  .head h1 { font-size: 22px; }
  .kpi__v { font-size: 28px; }
}
@media print {
  body { background: #fff; color: #000; }
  .side, .topm, .tbar, .no-print, .toast { display: none !important; }
  .admin { display: block; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* ---------- the system owner: objects ---------- */
.sys { min-height: 100dvh; background: var(--bg); }
.sys__top { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 2; }
.objs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.obj { display: grid; gap: 12px; align-content: start; }
.obj--off { opacity: .62; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--ink3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
