/* mybatumi — office panel + shop portal.
   Layout: fixed deep-green sidebar on desktop; on phones a slim top bar, an off-canvas menu and a bottom tab bar.
   Content sits in one 1200px column of white cards on a cool grey ground. */
:root {
  --bg: #f2f5f3;
  --card: #ffffff;
  --sunk: #f7f9f8;
  --ink: #0f1a16;
  --ink-2: #2d3c35;
  --muted: #687771;
  --line: #e3e9e6;
  --line-2: #cfd8d3;
  --side: #0e2a20;
  --side-2: #143628;
  --side-ink: #d6e6dd;
  --side-muted: #86a596;
  --accent: #15845a;
  --accent-dk: #0d6a47;
  --accent-soft: #e3f3ea;
  --blue: #2e66bd;  --blue-soft: #e7eefb;
  --amber: #b86f0a; --amber-soft: #fcf1de; --amber-line: #f1d9ae;
  --red: #bf3b35;   --red-soft: #fbe8e6;
  --violet: #5a48b5; --violet-soft: #ece9fb;
  --gray-soft: #edf0ef;
  --r: 14px;
  --shadow: 0 1px 2px rgba(15, 26, 22, .04), 0 6px 20px rgba(15, 26, 22, .04);
  --font: "Noto Sans Georgian", "BPG Arial", system-ui, -apple-system, "Segoe UI", sans-serif;
  --side-w: 252px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-dk); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1 { font-size: 1.65rem; line-height: 1.2; margin: 0 0 1rem; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
h1 small { font-weight: 500; font-size: .9rem; color: var(--muted); }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; font-weight: 700; }
h3 { font-size: .95rem; margin: 1.1rem 0 .4rem; }
p { margin: 0 0 .75rem; }
small, .sub, .muted { color: var(--muted); }
.sub { font-size: .82rem; }
.sm { font-size: .86rem; }
.r { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.neg { color: var(--red); }
.pos { color: var(--accent); }
.warn-t { color: var(--amber); font-weight: 600; }
.danger-t { color: var(--red) !important; }
.empty { color: var(--muted); padding: 1.4rem 1rem; text-align: center; margin: 0; }
.eyebrow { font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin: 0 0 .35rem; }
.tag { display: inline-block; font-size: .72rem; padding: .02rem .45rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent-dk); font-weight: 600; }
.pill { display: inline-block; padding: .35rem .8rem; border-radius: 99px; font-weight: 600; font-size: .88rem; }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.crumbs { margin: 0 0 .5rem; font-size: .88rem; }
.crumbs a { color: var(--muted); }
.ic { flex-shrink: 0; display: block; }

/* ---------- shell ---------- */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 40;
  background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; padding: calc(1.1rem + env(safe-area-inset-top, 0px)) .8rem 1rem;
}
.logo { display: flex; align-items: center; gap: .7rem; padding: .2rem .5rem 1.3rem; color: #fff; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(140deg, #2fbf83, #138055); display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: #fff; flex-shrink: 0; }
.logo-name { font-weight: 700; line-height: 1.2; font-size: .98rem; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side-nav a { display: flex; align-items: center; gap: .75rem; padding: .62rem .75rem; border-radius: 10px; color: var(--side-ink); font-weight: 500; font-size: .94rem; }
.side-nav a .ic { color: var(--side-muted); }
.side-nav a:hover { background: var(--side-2); text-decoration: none; }
.side-nav a.on { background: #fff; color: var(--ink); font-weight: 600; }
.side-nav a.on .ic { color: var(--accent); }
.dot { margin-left: auto; font-style: normal; background: #f2b437; color: #2a1d00; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 0 .45rem; min-width: 20px; text-align: center; }
.side-foot { display: flex; align-items: center; gap: .6rem; padding: .8rem .4rem 0; border-top: 1px solid #1d4334; }
.side-foot .me { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.side-foot .me b { font-size: .88rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .me small { color: var(--side-muted); font-size: .76rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dk); display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.avatar.sm { width: 32px; height: 32px; }
.avatar.warm { background: var(--red-soft); color: var(--red); }
.side .avatar { background: #1f4a39; color: #c9f0dc; }
.iconbtn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.side .iconbtn { color: var(--side-muted); }
.side .iconbtn:hover { background: var(--side-2); color: #fff; }
.mbar, .tabbar, .scrim { display: none; }

body.app .wrap { margin-left: var(--side-w); max-width: none; padding: 1.8rem clamp(16px, 2vw, 28px) 3rem; }
body.app .wrap > * { max-width: 1560px; margin-left: 0; margin-right: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 1.4rem 16px 3rem; }

/* ---------- page heads ---------- */
.page-head, .head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: .8rem 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.page-head h1, .head-row h1 { margin: 0; }
.head-row.tight { margin-bottom: .5rem; align-items: center; }
.row-btns { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.daynav { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .3rem; box-shadow: var(--shadow); }
.daynav input[type=date] { width: auto; margin: 0; border: 0; min-height: 34px; padding: .2rem .4rem; }
.daynav .btn.sm { border: 0; }
.daytitle { margin: 0 .5rem; font-size: .92rem; }
.toolbar select, .toolbar input[type=search] { width: auto; min-width: 220px; margin: 0; }
.inline { display: inline; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; margin-bottom: 1.1rem; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 560px; margin: 2rem auto; }
.card .pad, .card h2.pad { padding: 1.1rem 1.25rem 0; margin-bottom: .6rem; }
.card p.pad { padding-top: 0; margin-top: -.3rem; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.card-head h2 { margin: 0 0 .1rem; }
.card-head p { margin: 0; }
.card-head.pad { padding: 1.1rem 1.25rem .6rem; margin: 0; align-items: center; }
.big-num { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.card-head .r p { margin: 0; }
.link-more { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; font-size: .9rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; margin-bottom: 1.1rem; }
.grid2.wide-left { grid-template-columns: 1.65fr 1fr; }
.grid2 > .card, .stack > .card { margin-bottom: 0; }
.stack { display: grid; gap: 1.1rem; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-bottom: 1.1rem; }
.kpi { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ic l" "v v" "s s"; column-gap: .7rem; row-gap: .15rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
a.kpi:hover { border-color: var(--line-2); text-decoration: none; transform: translateY(-1px); }
.kpi-ic { grid-area: ic; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.kpi-ic.green { background: var(--accent-soft); color: var(--accent); }
.kpi-ic.blue { background: var(--blue-soft); color: var(--blue); }
.kpi-ic.amber { background: var(--amber-soft); color: var(--amber); }
.kpi-ic.red { background: var(--red-soft); color: var(--red); }
.kpi-l { grid-area: l; font-size: .84rem; color: var(--muted); font-weight: 500; line-height: 1.3; }
.kpi-v { grid-area: v; font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: .55rem; line-height: 1.15; }
.kpi-v small { font-size: 1rem; font-weight: 600; }
.kpi-s { grid-area: s; font-size: .84rem; color: var(--muted); }
.kpi .meter { grid-area: s; margin-top: .35rem; }
.kpi.attn { border-color: #bcd0f0; background: linear-gradient(180deg, #f6f9ff, #fff); }
.kpi.attn .kpi-v { color: var(--blue); }
.meter { display: block; height: 8px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.meter.warn i { background: #e2a33a; }
.notice { display: flex; gap: .7rem; align-items: center; background: var(--amber-soft); border: 1px solid var(--amber-line); color: #7a4a05; border-radius: var(--r); padding: .85rem 1.1rem; margin-bottom: 1.1rem; }
.notice em { margin-left: auto; font-style: normal; font-weight: 700; display: inline-flex; gap: .3rem; align-items: center; }
.notice:hover { text-decoration: none; border-color: #e3bb73; }

/* chart */
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .base { stroke: var(--line-2); }
.chart .axis { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.chart .axis.strong { fill: var(--ink); font-weight: 700; }
.chart .bar { fill: #b7dcc9; }
.chart .bar.today { fill: var(--accent); }
.chart .bar.next { fill: #f2b437; }
.chart .bar:hover { fill: var(--accent-dk); }
.legend { display: flex; gap: .4rem; align-items: center; margin: .6rem 0 0; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: .6rem; }
.lg:first-child { margin-left: 0; }
.lg.today { background: var(--accent); }
.lg.next { background: #f2b437; }

/* bars list */
.bars { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .95rem; }
.bars-row { display: flex; justify-content: space-between; gap: .6rem; font-size: .92rem; margin-bottom: .35rem; }
.bars-row .num { color: var(--muted); white-space: nowrap; }
.bars-row .num b { color: var(--ink); }

/* feed */
.feed { list-style: none; margin: 0; padding: 0 .5rem .5rem; }
.feed a { display: flex; align-items: center; gap: .8rem; padding: .65rem .75rem; border-radius: 10px; color: var(--ink); }
.feed a:hover { background: var(--sunk); text-decoration: none; }
.feed-main { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.feed-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-main small { font-size: .8rem; }
.feed-side { display: grid; justify-items: end; gap: .2rem; font-size: .9rem; }

/* ---------- chips ---------- */
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .chips { margin-bottom: 0; }
.chip { display: inline-flex; gap: .45rem; align-items: center; padding: .38rem .85rem; border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-size: .88rem; font-weight: 500; }
.chip span { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .8rem; background: var(--gray-soft); border-radius: 99px; padding: 0 .45rem; }
.chip:hover { border-color: var(--line-2); text-decoration: none; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on span { background: #2d3c35; color: #dfe8e3; }

/* legacy stat tiles (money page) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.1rem; margin-bottom: 1.1rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .1rem; color: var(--ink); box-shadow: var(--shadow); }
.stat span { font-size: .84rem; color: var(--muted); }
.stat b { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat em { font-style: normal; color: var(--muted); font-size: .85rem; }
.stat.warnbg { background: linear-gradient(180deg, #fff8ec, #fff); border-color: var(--amber-line); }
.stat.warnbg b { color: var(--amber); }

/* ---------- tables ---------- */
.tw { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; }
.tbl th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--sunk); }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tfoot td { border-top: 1px solid var(--line-2); border-bottom: 0; background: var(--sunk); font-weight: 600; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #f6faf8; }
.tbl.big td { font-size: 1.05rem; }
.tbl .cb { width: 2.4rem; padding-right: 0; }
.tbl td a b { color: var(--ink); }
.card:not(.flush) .tbl th, .card:not(.flush) .tbl td { padding-left: .5rem; padding-right: .5rem; }
.lines { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.lines td { padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.lines td + td { padding-left: .8rem; }
.bulk { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .8rem 1rem; border-top: 1px solid var(--line); background: var(--sunk); }
.bulk select { width: auto; margin: 0; min-height: 34px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; padding: .16rem .6rem; border-radius: 99px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.st-new { background: var(--blue-soft); color: var(--blue); }
.st-confirmed { background: var(--violet-soft); color: var(--violet); }
.st-loaded, .st-pending { background: var(--amber-soft); color: var(--amber); }
.st-delivered, .st-active { background: var(--accent-soft); color: var(--accent-dk); }
.st-cancelled { background: var(--gray-soft); color: var(--muted); }
.st-blocked { background: var(--red-soft); color: var(--red); }

/* ---------- forms ---------- */
.form label, .order-form label, label.lbl { display: block; font-size: .85rem; color: var(--muted); font-weight: 500; margin-bottom: .8rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line-2); border-radius: 10px; padding: .55rem .75rem; margin-top: .3rem; min-height: 42px;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover { border-color: #b5c2bb; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21, 132, 90, .15); }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--accent); vertical-align: middle; box-shadow: none; }
label.check { display: flex; gap: .55rem; align-items: center; color: var(--ink-2); margin-bottom: .8rem; }
fieldset { border: 1px dashed var(--line-2); border-radius: 10px; padding: .6rem .8rem 0; margin: 0 0 .8rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inline-row { display: flex !important; align-items: center; justify-content: space-between; gap: .8rem; color: var(--ink) !important; }
.inline-row input { width: 96px; text-align: right; margin: 0; }
.quick { display: flex; gap: .4rem; flex-wrap: wrap; margin: -.3rem 0 .9rem; }
.danger-zone { margin-top: 1rem; padding-top: .7rem; border-top: 1px solid var(--line); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600; cursor: pointer; font-size: .92rem;
  background: #fff; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 10px; padding: .5rem 1rem; min-height: 40px; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--sunk); border-color: #b5c2bb; text-decoration: none; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 1px 2px rgba(13, 106, 71, .3); }
.btn.primary:hover { background: var(--accent-dk); border-color: var(--accent-dk); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn.ghost:hover { background: var(--gray-soft); }
.btn.sm { padding: .25rem .7rem; font-size: .84rem; min-height: 32px; border-radius: 8px; }
.btn.big { padding: .75rem 1.4rem; font-size: 1rem; min-height: 48px; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }

.flash { display: flex; gap: .6rem; align-items: center; padding: .8rem 1rem; border-radius: 12px; margin-bottom: 1.1rem; background: var(--accent-soft); color: var(--accent-dk); border: 1px solid #bfe0cd; font-weight: 500; }
.flash.err { background: var(--red-soft); color: var(--red); border-color: #f1c6c2; }
.note { background: var(--amber-soft); padding: .6rem .85rem; border-radius: 10px; font-size: .92rem; }
.plain { padding-left: 1.1rem; margin: 0; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem 1.2rem; margin-bottom: 1.2rem; }
.meta span { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-bottom: .1rem; }
.balance { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.balance span { display: block; }
.balance b { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.balance.owe { background: linear-gradient(180deg, #fff5f4, #fff); border-color: #f1c6c2; }
.balance.owe b { color: var(--red); }

/* ---------- auth (guest) ---------- */
body.guest { background: radial-gradient(1200px 600px at 10% -10%, #d9efe3 0%, transparent 60%), var(--bg); }
.auth { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; max-width: 980px; margin: 7vh auto 0; }
.auth-intro h1 { font-size: 2.3rem; }
.auth-box { margin: 0; padding: 1.6rem; }
.auth-box h2 { font-size: 1.25rem; }
.auth-alt { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--line); display: grid; gap: .5rem; text-align: center; }
.steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; color: var(--ink-2); }
body.guest .wrap > .auth-box { max-width: 540px; margin: 6vh auto 0; }

/* ---------- catalog / order entry ---------- */
.plist { display: flex; flex-direction: column; }
.pitem { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .8rem 1.2rem; border-bottom: 1px solid var(--line); transition: background .15s; }
.pitem:last-child { border-bottom: 0; }
.pitem.has { background: var(--accent-soft); }
.pitem.has .pname { color: var(--accent-dk); font-weight: 600; }
.pname { min-width: 0; font-weight: 500; }
.pname small { display: block; font-weight: 400; font-variant-numeric: tabular-nums; }
.stepper { display: flex; align-items: center; gap: .3rem; flex-shrink: 0; }
.stepper input { width: 66px; text-align: center; margin: 0; font-size: 1.05rem; font-weight: 600; padding: .4rem .2rem; font-variant-numeric: tabular-nums; }
.stepper button { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--accent-dk); font-size: 1.35rem; cursor: pointer; line-height: 1; }
.stepper button:hover { background: var(--sunk); }
.stepper button:active { background: var(--accent-soft); }
.sticky-total {
  position: sticky; bottom: 1rem; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: .8rem;
  background: var(--side); color: var(--side-ink); border-radius: var(--r); padding: .75rem .8rem .75rem 1.25rem; margin-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(14, 42, 32, .25);
}
.sticky-total b { font-size: 1.35rem; font-variant-numeric: tabular-nums; color: #fff; }
.sticky-total .muted { color: var(--side-muted); }
#shopSel { margin-top: .4rem; }
#shopSel option { padding: .4rem .3rem; }

/* ---------- shops ---------- */
.cards { display: grid; gap: .7rem; }
.shopcard { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--ink); margin: 0; }
.shopcard:hover { border-color: var(--accent); text-decoration: none; }
.approve { background: linear-gradient(180deg, #fff8ec, #fff); border-color: var(--amber-line); }

/* ---------- products & team rows ---------- */
.prow { display: grid; grid-template-columns: minmax(0, 3fr) 90px 110px 80px 56px 110px; gap: .6rem; align-items: center; padding: .6rem 1.1rem; border-bottom: 1px solid var(--line); }
.prow input { margin: 0; }
.prow .check { margin: 0; justify-content: center; }
.prow.head { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--sunk); padding-top: .7rem; padding-bottom: .7rem; }
.prow.new { background: #f7fbf9; }
.prow.off input:not([type=checkbox]) { color: var(--muted); background: var(--sunk); }
.trow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto auto; gap: .6rem; align-items: center; padding: .6rem 1.25rem; border-top: 1px solid var(--line); }
.trow input { margin: 0; }
.trow .check { margin: 0; }
.trow .full { grid-column: 1 / -1; margin-top: -.3rem; }
.trow.off input { color: var(--muted); background: var(--sunk); }
.trow.new { background: #f7fbf9; }

/* ---------- loading ---------- */
.truck { padding: 0; overflow: hidden; }
.truck-h { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: var(--sunk); border-bottom: 1px solid var(--line); }
.truck-h h2 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.truck.unassigned { border-color: var(--amber-line); }
.truck.unassigned .truck-h { background: var(--amber-soft); }
.truck .tbl.stops { border-top: 1px solid var(--line); }

.print-only { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .side { transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  body.menu-open .side { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 35; background: rgba(8, 20, 15, .45); }
  body.menu-open .scrim { display: block; }
  .mbar { display: flex; align-items: center; gap: .5rem; position: sticky; top: 0; z-index: 30; background: var(--side); color: #fff; padding: calc(.45rem + env(safe-area-inset-top, 0px)) .6rem .45rem; }
  .mbar-title { flex: 1; color: #fff; font-weight: 700; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mbar-title:hover { text-decoration: none; }
  .mbar .iconbtn.accent { background: var(--accent); }
  .mbar .avatar { background: #1f4a39; color: #c9f0dc; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
    padding: .3rem .3rem calc(.3rem + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -6px 20px rgba(15, 26, 22, .06);
  }
  .tabbar a, .tabbar button { flex: 1; display: grid; justify-items: center; gap: .1rem; padding: .35rem 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: .7rem; font-weight: 600; cursor: pointer; border-radius: 10px; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.on { color: var(--accent-dk); }
  .tabbar a.on .ic { background: var(--accent-soft); border-radius: 99px; padding: 2px 10px; width: 44px; }
  body.app .wrap { margin-left: 0; padding: 1.1rem 16px calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
  .grid2, .grid2.wide-left, .auth { grid-template-columns: 1fr; }
  .auth { gap: 1.2rem; margin-top: 1.5rem; }
  .auth-intro h1 { font-size: 1.6rem; }
  .prow { grid-template-columns: 1fr 80px 100px; }
  .prow.head { display: none; }
  .prow > input[name=name] { grid-column: 1 / -1; }
  .trow { grid-template-columns: 1fr 1fr; }
  .trow input[name=name] { grid-column: 1 / -1; }
  .sticky-total { bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 520px) {
  .row2 { grid-template-columns: 1fr; gap: 0; }
  h1 { font-size: 1.35rem; }
  .kpis { gap: .7rem; }
  .kpi { padding: .9rem; }
  .kpi-v { font-size: 1.4rem; }
  .kpi-l { font-size: .78rem; }
  .page-head .row-btns { width: 100%; }
  .page-head .row-btns .btn { flex: 1; }
  .toolbar select, .toolbar input[type=search], .toolbar form { width: 100%; min-width: 0; }
  .tbl th, .tbl td { padding: .6rem .6rem; }
  .pitem { padding: .7rem .85rem; }
  .sticky-total .btn.big { padding: .7rem .9rem; }
  .card { padding: 1rem; }
}


/* ---------- product media ---------- */
.pimg, .pthumb, .promo-img { display: block; overflow: hidden; background: var(--sunk); }
.pimg img, .pthumb img, .promo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { display: grid !important; place-items: center; font-weight: 800; letter-spacing: .02em; color: rgba(15, 26, 22, .55); }
.ph0 { background: linear-gradient(135deg, #e6f4ec, #cfe9da); }
.ph1 { background: linear-gradient(135deg, #fdf3df, #f7e2b8); }
.ph2 { background: linear-gradient(135deg, #e8eefb, #d3def5); }
.ph3 { background: linear-gradient(135deg, #f6eaf0, #ecd3df); }
.ph4 { background: linear-gradient(135deg, #eef1ef, #dde4e0); }
.pthumb { width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0; font-size: .8rem; }
.pitem .pname { flex: 1; }
.pname s, .price-line s { color: var(--muted); font-weight: 400; }
.off { color: var(--red); font-weight: 700; }
.off-badge { position: absolute; top: .6rem; left: .6rem; background: var(--red); color: #fff; font-weight: 800; font-size: .82rem; padding: .15rem .55rem; border-radius: 8px; box-shadow: 0 2px 6px rgba(191, 59, 53, .35); }
.ribbon { position: absolute; top: .6rem; right: .6rem; background: #f2b437; color: #2a1d00; font-weight: 700; font-size: .75rem; padding: .15rem .55rem; border-radius: 8px; }
.ribbon.gray { background: var(--ink); color: #fff; }
.price-line { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.price-line strong { font-size: 1.2rem; font-weight: 800; }
.price-line .unit { color: var(--muted); font-size: .85rem; }
.pcat { text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; font-weight: 700; color: var(--accent); }

/* ---------- admin product grid & form ---------- */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; }
.acard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.acard.off { opacity: .6; }
.acard-img { position: relative; display: block; aspect-ratio: 4 / 3; max-width: 100%; }
.acard-img .pimg { position: absolute; inset: 0; font-size: 1.8rem; }
.acard-body { padding: .8rem 1rem 1rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.acard-name { color: var(--ink); font-weight: 700; }
.acard-actions { display: flex; gap: .3rem; margin-top: auto; padding-top: .6rem; }
.acard.add { align-items: center; justify-content: center; gap: .5rem; min-height: 260px; border: 2px dashed var(--line-2); background: transparent; color: var(--muted); font-weight: 600; box-shadow: none; }
.acard.add:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pform { display: grid; grid-template-columns: 340px 1fr; gap: 1.1rem; align-items: start; }
.pform > .card { margin: 0; position: sticky; top: 1rem; }
.drop { display: grid !important; gap: .8rem; justify-items: center; text-align: center; border: 2px dashed var(--line-2); border-radius: 14px; padding: 1rem; cursor: pointer; color: var(--ink) !important; }
.drop:hover { border-color: var(--accent); background: #f7fbf9; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-preview { width: 100%; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 10px; background: var(--sunk); display: grid; place-items: center; color: var(--line-2); overflow: hidden; }
.drop-preview img { width: 100%; height: 100%; object-fit: cover; }
.drop-text { display: grid; }
.drop-text small { font-size: .8rem; }
textarea { min-height: 70px; resize: vertical; }

/* ---------- payments ---------- */
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.notice.blue { background: var(--blue-soft); border-color: #c4d5f2; color: #1d4a8f; }
.notice.blue:hover { border-color: var(--blue); }
.paybox { display: grid; gap: .3rem; background: var(--blue-soft); border: 1px solid #c4d5f2; border-radius: 12px; padding: .8rem 1rem; margin-bottom: .8rem; font-size: .92rem; }
.paybox form { margin-top: .3rem; }
.paycard.attn { border-color: #e3bb73; box-shadow: 0 0 0 3px rgba(242, 180, 55, .2); }
.card.focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21, 132, 90, .15); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
@media (max-width: 900px) { .row3 { grid-template-columns: 1fr; } }

/* ---------- admin login ---------- */
.admin-login { max-width: 420px; margin: 10vh auto 0; }
.al-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.2rem; }
.al-head div { display: grid; line-height: 1.25; }
.al-head small { color: var(--muted); }
body.guest .wrap > .admin-login { margin-top: 10vh; }

@media (max-width: 900px) {
  .pform { grid-template-columns: 1fr; }
  .pform > .card { position: static; }
}
@media (max-width: 520px) {
  .agrid { grid-template-columns: 1fr 1fr; gap: .7rem; }
}

@media print {
  .side, .mbar, .tabbar, .store-bar, .store-foot, .no-print, .toolbar, .btn, .sticky-total, .chips, .bulk, .crumbs, .cb { display: none !important; }
  body.app .wrap { margin: 0; padding: 0; }
  .print-only { display: block; }
  body { background: #fff; font-size: 12px; }
  .card { border: 1px solid #bbb; box-shadow: none; break-inside: avoid; }
  a { color: #000; }
  .tbl th { background: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* filters row (realization, turnover) */
.toolbar.filters { justify-content: flex-start; align-items: end; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem 1rem; box-shadow: var(--shadow); }
.toolbar.filters label.sm { display: grid; gap: .15rem; color: var(--muted); }
.toolbar.filters input[type=date] { margin: 0; min-height: 40px; width: auto; }
.toolbar.filters input[type=search] { min-width: 240px; flex: 1; }
.toolbar.filters .check { align-self: center; display: flex !important; flex-direction: row; align-items: center; gap: .4rem; margin: 0; }
.toolbar.filters .check input { margin: 0; width: auto; min-height: 0; }
/* realization table */
.tbl.sales tr.done td { color: var(--muted); }
.tbl.sales tr.done td b { color: var(--ok, #1d7a45); }
.collect { display: flex; gap: .35rem; align-items: center; }
.collect input { width: 96px; margin: 0; min-height: 34px; padding: .3rem .5rem; text-align: right; font-variant-numeric: tabular-nums; }
.bulk input[type=date] { width: auto; margin: 0 0 0 .3rem; min-height: 34px; }
.tbl tr.subtotal td { background: var(--sunk); font-weight: 600; }
/* debt search */
.debt-search { display: flex; gap: .6rem; margin-bottom: 1.1rem; }
.s-search-a { flex: 1; display: flex; align-items: center; gap: .6rem; background: var(--card); border: 1.5px solid var(--line-2); border-radius: 14px; padding: 0 .9rem; color: var(--muted); box-shadow: var(--shadow); }
.s-search-a:focus-within { border-color: var(--accent); }
.s-search-a input { border: 0; margin: 0; min-height: 50px; padding: 0; background: transparent; box-shadow: none !important; font-size: 1.05rem; }
.debt-search .btn { min-height: 52px; padding-inline: 1.4rem; }
.found { border-color: var(--accent); }
.big-debt b { font-size: 1.1rem; }
@media (max-width: 640px) {
  .toolbar.filters input[type=search] { min-width: 0; width: 100%; }
  .collect input { width: 76px; }
}

/* loading: steps, driver tabs, table */
.ld-steps { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0 0 1rem; }
.ld-steps li { display: flex; align-items: center; gap: .45rem; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: .35rem .85rem .35rem .4rem; font-size: .88rem; color: var(--ink-2); }
.ld-steps b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-soft); font-size: .8rem; }
.ld-steps li.done b { background: var(--accent); color: #fff; }
.ld-steps li.todo { border-color: var(--amber-line); background: var(--amber-soft); }
.ld-steps li.todo b { background: var(--amber); color: #fff; }
.ld-steps li.cur { border-color: var(--accent); }
.ld-steps li.cur b { background: var(--accent-soft); color: var(--accent-dk); }
.ld-steps em { font-style: normal; color: var(--amber); font-weight: 600; }
.drv-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem; margin-bottom: 1.1rem; }
.drv { display: grid; gap: .15rem; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); padding: .75rem .9rem; color: var(--ink); box-shadow: var(--shadow); }
.drv:hover { text-decoration: none; border-color: var(--line-2); }
.drv.on { border-color: var(--accent); background: var(--accent-soft); }
.drv.warn { border-color: var(--amber-line); background: var(--amber-soft); }
.drv.warn.on { border-color: var(--amber); }
.drv-n { display: flex; align-items: center; gap: .45rem; font-weight: 700; }
.drv-n i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: var(--side); color: #fff; display: grid; place-items: center; font-size: .72rem; }
.drv-s { font-size: .84rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.drv-l { font-size: .78rem; color: var(--muted); }
.drv.on .drv-l { color: var(--accent-dk); font-weight: 600; }
.tbl.ld tr.done td { background: var(--sunk); }
.tbl.ld tr.nodrv td { background: var(--amber-soft); }
.drv-sel { margin: 0; min-height: 34px; padding: .25rem .5rem; width: auto; min-width: 140px; }
.drv-sel.empty { border-color: var(--amber); color: var(--amber); font-weight: 600; }
.ld-bar { position: sticky; bottom: 0; z-index: 5; box-shadow: 0 -6px 16px rgba(15, 26, 22, .06); }
.truck-load .tbl.big td { font-size: 1.02rem; }
.notice-in { background: var(--blue-soft); color: var(--blue); border-radius: 10px; padding: .5rem .7rem; }
.ld-grid { align-items: start; }
.truck-load { position: sticky; top: 1rem; }

/* order products pop-up */
.items-dlg { border: 0; border-radius: 18px; padding: 0; width: min(640px, calc(100% - 24px)); max-height: 86vh; box-shadow: 0 24px 60px rgba(15, 26, 22, .25); color: var(--ink); }
.items-dlg::backdrop { background: rgba(15, 26, 22, .45); }
.items-dlg .dlg-body { display: flex; flex-direction: column; max-height: 86vh; }
.items-dlg .tw { overflow: auto; }
.dlg-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1rem 1.2rem .6rem; border-bottom: 1px solid var(--line); }
.dlg-h h2 { margin: 0; font-size: 1.15rem; }
.dlg-h p { margin: .15rem 0 0; }
.dlg-x { border: 0; background: var(--sunk); width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; color: var(--ink); flex: none; }
.dlg-f { display: flex; justify-content: flex-end; gap: .5rem; padding: .8rem 1.2rem; border-top: 1px solid var(--line); background: var(--sunk); }
tr.click-items { cursor: pointer; }
tr.click-items:hover td { background: var(--accent-soft); }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent-dk); cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.linkbtn:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .drv-tabs { grid-template-columns: 1fr 1fr; }
  .truck-load { position: static; }
  .drv-sel { min-width: 110px; }
}
@media print {
  .ld-grid { display: block; }
  .truck-load { break-before: page; }
}
.ld-grid { grid-template-columns: minmax(0, 2.3fr) minmax(250px, 1fr); }
.tbl.ld td:nth-child(2) { min-width: 190px; }
.tbl.ld th:last-child, .tbl.ld td:last-child { width: 1%; white-space: nowrap; }
@media (max-width: 1000px) { .ld-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .tbl.ld td:nth-child(2) { min-width: 150px; }
  .tbl.ld .drv-sel { min-width: 96px; max-width: 120px; }
  .ld-bar { bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- ERP shell: top sections + left section menu ---------- */
:root { --top-h: 78px; --side-w: 248px; }
.topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--top-h); z-index: 45; display: flex; align-items: center; gap: 1rem; padding: 0 1rem; background: var(--side); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.topbar .logo { padding: 0; width: calc(var(--side-w) - 1rem - clamp(4px, 1vw, 12px)); flex: none; }
.topbar .logo-mark { width: 34px; height: 34px; font-size: .85rem; }
.topnav { flex: 1; display: flex; justify-content: flex-start; gap: .35rem; min-width: 0; align-self: stretch; align-items: center; }
.topnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; min-width: 104px; padding: .55rem .9rem; border-radius: 12px; color: var(--side-ink); font-weight: 600; font-size: .86rem; line-height: 1.15; white-space: nowrap; text-align: center; transition: background .15s, color .15s; }
.topnav a .ic { width: 26px; height: 26px; }
.topnav a .ic { color: var(--side-muted); }
.topnav a:hover { background: var(--side-2); text-decoration: none; color: #fff; }
.topnav a.on { background: #fff; color: var(--ink); }
.topnav a.on .ic { color: var(--accent); }
.tb-user { display: flex; align-items: center; gap: .55rem; flex: none; }
.tb-user .me { display: grid; line-height: 1.2; }
.tb-user .me b { font-size: .85rem; }
.tb-user .me small { font-size: .72rem; color: var(--side-muted); }
.tb-user .avatar { background: #1f4a39; color: #c9f0dc; }
.tb-user .iconbtn, .tb-menu { color: var(--side-muted); }
.tb-user .iconbtn:hover { background: var(--side-2); color: #fff; }
.tb-bell { position: relative; }
.tb-bell .dot { position: absolute; top: 0; right: 0; }
.tb-menu { display: none; }
body.app .side { top: var(--top-h); padding: 1rem .75rem 1.5rem; overflow-y: auto; }
.side-sec { display: none; }
.side-sec.cur { display: block; }
.side-h { display: flex; align-items: center; gap: .5rem; margin: 0 .4rem .7rem; color: #fff; font-weight: 700; font-size: 1rem; }
.side-h .ic { color: #5fd8a2; }
.side-g { margin: 1rem .75rem .35rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--side-muted); font-weight: 700; }
.side-nav a { font-size: .9rem; padding: .55rem .7rem; }
.side-nav a span { flex: 1; }
.side-nav .dot { position: static; }
body.app .wrap { padding-top: calc(var(--top-h) + 1.6rem); }
@media (max-width: 1250px) {
  .topnav a { min-width: 0; padding: .5rem .6rem; font-size: .8rem; }
  .tb-user .me { display: none; }
}
@media (max-width: 900px) {
  .topbar { gap: .4rem; padding: 0 .5rem; }
  .tb-menu { display: grid; }
  .topbar .logo { width: auto; }
  .topbar .logo-name { display: none; }
  .topnav { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav { gap: .15rem; scroll-snap-type: x proximity; }
  .topnav a { flex: none; min-width: 78px; padding: .45rem .5rem; font-size: .72rem; gap: .25rem; scroll-snap-align: center; }
  .topbar .logo, .tb-user .avatar { display: none; }
  .topnav a .ic { width: 22px; height: 22px; }
  body.app .side { top: 0; z-index: 50; padding-top: calc(1rem + env(safe-area-inset-top, 0px)); }
  .side-sec { display: block; margin-bottom: 1.2rem; }
  .side-sec:not(.cur) .side-h { opacity: .85; }
  .mbar { display: none !important; }
  body.app .wrap { padding-top: calc(var(--top-h) + 1rem); }
}
@media print { .topbar { display: none !important; } body.app .wrap { padding-top: 0; } }

/* ---------- ERP pages ---------- */
.ref-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .2rem .9rem; }
.ref-grid label { margin: 0; }
.ref-grid .w1 { grid-column: span 1; } .ref-grid .w2 { grid-column: span 2; } .ref-grid .w3 { grid-column: span 3; }
.tbl tr.off td { opacity: .55; }
.tbl tr.sel td { background: var(--accent-soft); }
.tbl tr.sub-row td { background: var(--sunk); font-size: .9rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--sunk); border-radius: 12px; padding: 4px; margin-bottom: .8rem; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: .5rem; border-radius: 9px; font-weight: 700; color: var(--muted); }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(15, 26, 22, .1); }
.seg label:first-child input:checked + span { color: var(--accent-dk); }
.seg label:last-child input:checked + span { color: var(--red); }
.bar-cell { min-width: 160px; }
.hbar { display: inline-block; vertical-align: middle; width: calc(100% - 52px); height: 10px; background: var(--gray-soft); border-radius: 99px; overflow: hidden; margin-right: .4rem; }
.hbar i { display: block; height: 100%; background: linear-gradient(90deg, #2fbf83, var(--accent)); border-radius: 99px; }
.bar-cell small { color: var(--muted); font-variant-numeric: tabular-nums; }
.pcell { display: flex; align-items: center; gap: .6rem; }
.pcell .pthumb { width: 36px; height: 36px; flex: none; border-radius: 8px; }
.pcell span { display: grid; line-height: 1.25; }
.pcell small { color: var(--muted); font-size: .78rem; }
.doc-lines input { width: 96px; margin: 0; min-height: 36px; padding: .3rem .5rem; text-align: right; font-variant-numeric: tabular-nums; }
.doc-lines tr.has td { background: var(--accent-soft); }
.card-head.pad input[type=search] { width: auto; min-width: 200px; margin: 0; }
@media (max-width: 900px) {
  .ref-grid { grid-template-columns: 1fr 1fr; }
  .ref-grid .w1 { grid-column: span 1; } .ref-grid .w2, .ref-grid .w3 { grid-column: 1 / -1; }
  .doc-lines input { width: 72px; }
}

.pcode { color: var(--ink-2); font-weight: 700; }
.code-row { grid-template-columns: 140px 1fr; }
@media (max-width: 520px) { .code-row { grid-template-columns: 1fr; } }

/* row edit / delete buttons */
.ract { display: inline-flex; gap: .3rem; vertical-align: middle; }
.ibtn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); color: var(--muted); cursor: pointer; padding: 0; }
.ibtn:hover { background: var(--sunk); color: var(--ink); text-decoration: none; border-color: #b5c2bb; }
.ibtn.del:hover { background: var(--red-soft); color: var(--red); border-color: #efc4c0; }
.tbl td.acts { width: 1%; white-space: nowrap; text-align: right; }

/* routes, reorder, profit */
.stat.okbg { background: #eaf7f0; border-color: #bfe6d0; }
.stat.okbg b { color: #17744a; }
.pad-x { padding: 0 1.25rem; }
tr.muted-row td { color: var(--muted); }
.rt-card .stats { margin: .2rem 0 1rem; }
.bar-cell { position: relative; min-width: 90px; }
.bar-cell i { display: block; height: 6px; border-radius: 3px; background: #2f8f62; margin-top: 4px; }
.bar-cell i.neg { background: #d9534f; }
.tabs-line { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 1rem; }
.tabs-line a { padding: .45rem .9rem; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .9rem; }
.tabs-line a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs-line a:hover { text-decoration: none; }
.ro-in { width: 84px; text-align: right; margin: 0; }
.ro-hot td:first-child { box-shadow: inset 4px 0 0 #d9534f; }
.cost-box { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.cost-box p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 700px) { .cost-box { grid-template-columns: 1fr; } .pad-x { padding: 0 1rem; } }
/* debt ageing, expenses */
.age-bar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; margin-top: 5px; max-width: 220px; background: var(--line); }
.age-bar i, .age-legend i { display: block; height: 100%; }
.a1 { background: #8fc9a9; } .a2 { background: #f0c45c; } .a3 { background: #ee8a3c; } .a4 { background: #d9534f; }
.age-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; margin: -.3rem 0 .9rem; color: var(--muted); }
.age-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.age-legend i { width: 14px; height: 8px; border-radius: 2px; }
.age-legend a { margin-left: auto; }
.exp-cats { display: grid; gap: .55rem; }
.exp-cat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .8rem; font-size: .92rem; }
.exp-cat i { grid-column: 1 / -1; display: block; height: 6px; border-radius: 3px; background: #d9534f; opacity: .75; }
.exp-cat a { color: var(--ink); }
.exp-cat.on a { font-weight: 700; }
.badge.xc { background: #f1f3f6; color: var(--ink-2); }

/* ---------- orders journal + editor (FINA-style) ---------- */
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { filter: brightness(.93); }
.ok-t { color: var(--accent); font-weight: 700; }
.oj { display: flex; flex-direction: column; gap: .6rem; }
.oj-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .55rem .8rem; }
.oj-top h1 { font-size: 1.05rem; margin: 0 .5rem 0 0; white-space: nowrap; }
.oj-top input[type=date], .oj-top select, .oj-bar select { min-height: 34px; padding: .2rem .45rem; font-size: .86rem; width: auto; max-width: 175px; }
.oj-top input[type=date] { width: 140px; }
.oj-search { margin-left: auto; width: 200px !important; min-height: 34px; padding: .25rem .7rem; font-size: .9rem; }
.oj-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.oj-bar .btn .ic { margin-right: .15rem; }
.oj-bar .btn:disabled { opacity: .45; cursor: default; }
.oj-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 .2rem; }
.oj-quick { font-size: .84rem; color: var(--muted); white-space: nowrap; }
.oj-quick a { font-weight: 600; }
.oj-pop .oj-assign { min-width: 280px; }
.oj-menu { position: relative; }
.oj-menu > summary { list-style: none; cursor: pointer; }
.oj-menu > summary::-webkit-details-marker { display: none; }
.oj-pop { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 230px; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 26, 22, .16); padding: .3rem; display: flex; flex-direction: column; }
.oj-pop > a, .oj-pop > button, .oj-assign button { display: block; text-align: left; padding: .5rem .7rem; border-radius: 7px; border: 0; background: none; color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.oj-pop > a:hover, .oj-pop > button:hover:not(:disabled), .oj-assign button:hover:not(:disabled) { background: var(--accent-soft); }
.oj-pop button:disabled { opacity: .45; cursor: default; }
.oj-pop hr { border: 0; border-top: 1px solid var(--line); margin: .3rem 0; }
.oj-assign { display: flex; gap: .3rem; align-items: center; padding: .2rem .3rem; }
.oj-assign select { flex: 1; min-height: 32px; padding: .2rem .4rem; font-size: .86rem; }
.oj-grid { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: auto; max-height: calc(100vh - 290px); min-height: 260px; }
.ojt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .83rem; font-variant-numeric: tabular-nums; }
.ojt th { position: sticky; top: 0; z-index: 2; background: #eef3f0; color: var(--ink-2); font-weight: 600; font-size: .74rem; text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line); white-space: nowrap; }
#ojGrid th { white-space: normal; line-height: 1.2; vertical-align: bottom; }
.ojt td { padding: .38rem .5rem; border-bottom: 1px solid var(--line); border-right: 1px solid #eef2f0; vertical-align: middle; }
.ojt .r { text-align: right; }
.ojt .nw { white-space: nowrap; }
.ojt .e1 { max-width: 140px; }
.ojt .e2 { max-width: 160px; }
.ojt .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ojGrid tbody tr { cursor: default; user-select: none; }
#ojGrid tbody tr:nth-child(even) td { background: #fafcfb; }
#ojGrid tbody tr:hover td { background: #f0f7f3; }
#ojGrid tbody tr.sel td { background: #cfeadb; }
#ojGrid tbody tr.cx td { color: var(--muted); text-decoration: line-through; }
#ojGrid tfoot td { position: sticky; bottom: 0; background: #eef3f0; border-top: 1px solid var(--line-2); font-weight: 500; }
.oj-empty td { text-align: center; color: var(--muted); padding: 2.5rem; }
.oj-hint { margin: 0; }
.cs { display: inline-block; padding: .05rem .5rem; border-radius: 6px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.cs-new { background: var(--amber-soft); color: var(--amber); }
.cs-confirmed { background: var(--blue-soft); color: var(--blue); }
.cs-loaded { background: var(--violet-soft); color: var(--violet); }
.cs-delivered { background: var(--accent-soft); color: var(--accent-dk); }
.cs-cancelled { background: var(--gray-soft); color: var(--muted); }

.fdlg { width: min(1180px, 96vw); max-width: none; max-height: 94vh; padding: 0; border: 0; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); background: var(--card); color: var(--ink); }
.fdlg::backdrop { background: rgba(10, 25, 18, .45); }
.fdlg form { display: flex; flex-direction: column; max-height: 94vh; }
.fd-h { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; background: var(--side); color: #fff; }
.fd-h h2 { margin: 0; font-size: 1.02rem; font-weight: 600; }
.fd-h .dlg-x { background: rgba(255, 255, 255, .12); color: #fff; width: 32px; height: 32px; font-size: 1.25rem; }
.fd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; padding: .6rem 1rem; border-bottom: 1px solid var(--line); background: var(--sunk); }
.fd-bar .btn { min-height: 36px; padding: .3rem .85rem; font-size: .9rem; }
.fd-st { margin-left: auto; }
.fd-tabs { display: flex; gap: .2rem; padding: 0 1rem; border-bottom: 1px solid var(--line); }
.fd-tabs button { border: 0; background: none; padding: .6rem .9rem; font: inherit; font-size: .9rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.fd-tabs button.on { color: var(--accent-dk); border-bottom-color: var(--accent); }
.fd-body { overflow: auto; padding: .8rem 1rem 1rem; }
.fd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem .8rem; margin-bottom: .8rem; }
.fd-grid label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; font-weight: 600; color: var(--ink-2); position: relative; min-width: 0; }
.fd-grid label.w2 { grid-column: span 2; }
.fd-grid label.w4 { grid-column: 1 / -1; }
.fd-grid input, .fd-grid select { min-height: 36px; padding: .3rem .6rem; font-size: .92rem; font-weight: 400; width: 100%; }
.fd-grid input[readonly] { background: var(--sunk); color: var(--muted); }
.fd-grid small { font-weight: 400; min-height: 1em; }
.fd-in { display: flex; align-items: stretch; gap: 0; position: relative; }
.fd-in input { flex: 1; min-width: 0; }
.fd-ac .fd-in input:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.fd-ib { display: grid; place-items: center; width: 36px; border: 1px solid var(--line-2); border-left: 0; background: var(--sunk); color: var(--ink-2); font-size: 1rem; cursor: pointer; text-decoration: none; }
.fd-ib:last-child { border-radius: 0 8px 8px 0; }
.fd-ib:hover { background: var(--accent-soft); color: var(--accent-dk); }
.fd-search { position: relative; display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.fd-search .fd-in { flex: 1; align-items: center; }
.fd-search .fd-in .ic { position: absolute; left: .7rem; color: var(--muted); pointer-events: none; }
.fd-search .fd-in input { padding-left: 2.1rem; min-height: 38px; }
.ac-box { position: absolute; z-index: 40; left: 0; right: 0; top: 100%; margin-top: 2px; max-height: 300px; overflow: auto; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 26, 22, .18); font-weight: 400; }
.fd-search .ac-box { right: auto; width: min(640px, 100%); }
.ac-i { display: flex; align-items: baseline; gap: .6rem; padding: .45rem .7rem; cursor: pointer; font-size: .9rem; color: var(--ink); }
.ac-i small { margin-left: auto; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-i.on, .ac-i:hover { background: var(--accent-soft); }
.ac-c { color: var(--muted); font-size: .8rem; min-width: 3.5rem; }
.ac-no { padding: .6rem .8rem; color: var(--muted); font-size: .88rem; }
.fd-items { border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 46vh; }
.fd-t td { padding: .3rem .5rem; }
.fd-t input { width: 92px; min-height: 30px; padding: .15rem .4rem; text-align: right; font-size: .9rem; border-radius: 6px; }
.fd-t .neg { color: var(--red); }
.fd-t .n { color: var(--muted); width: 2.5rem; }
.fd-none td { text-align: center; color: var(--muted); padding: 1.6rem; }
.fd-rm { border: 0; background: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; width: 28px; height: 28px; border-radius: 6px; }
.fd-rm:hover { background: var(--red-soft); color: var(--red); }
.fd-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; padding: .7rem .2rem 0; }
.fd-foot .chk { display: flex; align-items: center; gap: .45rem; font-size: .9rem; margin-right: auto; }
.fd-foot .chk input { width: 18px; height: 18px; }
.fd-tot { font-size: .92rem; color: var(--ink-2); }
.fd-tot.big { font-size: 1.1rem; }
.fd-tot.big b { color: var(--accent-dk); }
@media (max-width: 900px) {
  .oj-search { margin-left: 0; width: 100% !important; }
  .oj-quick { margin-left: 0; }
  .oj-grid { max-height: none; }
  .fd-grid { grid-template-columns: 1fr 1fr; }
  .fd-grid label.w2 { grid-column: span 2; }
  .fdlg { width: 100vw; max-height: 100vh; border-radius: 0; }
  .fdlg form { max-height: 100vh; }
}
/* order details under the journal */
.oj-grid.with-detail { max-height: 42vh; min-height: 200px; }
.oj-detail { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem 1rem; box-shadow: var(--shadow); }
.od-load { margin: .5rem 0; }
.od-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .6rem 1rem; }
.od-title h2 { margin: 0; font-size: 1.05rem; }
.od-title p { margin: .1rem 0 0; }
.od-acts { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.od-x { width: 32px; height: 32px; font-size: 1.2rem; }
.od-info { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin: .7rem 0; padding: .55rem .8rem; background: var(--sunk); border-radius: 10px; }
.od-info div { min-width: 0; }
.od-info div.w { flex-basis: 100%; }
.od-info dt { font-size: .72rem; color: var(--muted); font-weight: 600; }
.od-info dd { margin: 0; font-size: .88rem; }
.od-items { border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
.od-items tfoot td { background: #eef3f0; border-top: 1px solid var(--line-2); }
/* journal checkboxes, view window, realization */
.ojt .oj-cbc { width: 34px; text-align: center; padding-left: .3rem; padding-right: .3rem; }
.oj-cbc input { width: 16px; height: 16px; margin: 0; cursor: pointer; vertical-align: middle; }
.oj-bar .oj-real:disabled { opacity: .5; }
.det-dlg { width: min(1100px, 96vw); }
.det-body { padding: 1rem 1.2rem 1.2rem; overflow: auto; max-height: 92vh; }
.det-dlg .od-items { max-height: 55vh; }
.real-dlg { width: min(520px, 94vw); }
.real-body { padding: 1rem 1.2rem; }
.real-body select { width: 100%; margin: .3rem 0 .6rem; }
body.app .wrap > dialog.fdlg, dialog.fdlg { margin: auto; inset: 0; position: fixed; }
dialog.fdlg:focus-visible { outline: none; }
/* journal: block selection + right-click menu */
#ojGrid tbody tr.sel td { background: #3b82c4; color: #fff; }
#ojGrid tbody tr.sel td .muted, #ojGrid tbody tr.sel td .warn-t, #ojGrid tbody tr.sel td .ok-t { color: #fff; }
#ojGrid tbody tr.sel .cs { background: rgba(255, 255, 255, .22); color: #fff; }
.rs-saved { background: var(--gray-soft); color: var(--ink-2); }
.rs-active { background: var(--violet-soft); color: var(--violet); }
.rs-closed { background: var(--accent-soft); color: var(--accent-dk); }
.rs-cancelled { background: var(--red-soft); color: var(--red); }
.ctx { position: fixed; z-index: 1000; min-width: 250px; background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 12px 34px rgba(15, 26, 22, .22); padding: .25rem; font-size: .9rem; }
.ctx button, .ctx a, .ctx-has > span { display: block; width: 100%; text-align: left; padding: .45rem .75rem; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; border-radius: 5px; white-space: nowrap; text-decoration: none; }
.ctx button:hover, .ctx a:hover, .ctx-has:hover > span { background: var(--accent-soft); }
.ctx hr { border: 0; border-top: 1px solid var(--line); margin: .25rem 0; }
.ctx-has { position: relative; }
.ctx-has > span::after { content: '▸'; float: right; color: var(--muted); margin-left: 1rem; }
.ctx-sub { display: none; position: absolute; left: 100%; top: -.3rem; min-width: 220px; background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 12px 34px rgba(15, 26, 22, .22); padding: .25rem; max-height: 60vh; overflow: auto; }
.ctx.flip .ctx-sub { left: auto; right: 100%; }
.ctx-has:hover > .ctx-sub { display: block; }
.ctx .danger-t { color: var(--red); }
.ctx-toast { position: fixed; z-index: 1001; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--side); color: #fff; padding: .7rem 1rem; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); font-size: .95rem; display: flex; gap: 1rem; align-items: center; }
.ctx-toast button { background: none; border: 0; color: #fff; font-size: 1.2rem; cursor: pointer; }
#ojGrid { user-select: none; }
.ctx[hidden], .ctx-toast[hidden] { display: none; }
/* payment received dialog */
.rc-dlg { width: min(640px, 96vw); }
.rc-body { padding: 1rem 1.3rem 1.3rem; display: flex; flex-direction: column; gap: .7rem; }
.rc-row { display: grid; grid-template-columns: 130px 1fr; gap: .8rem; align-items: start; position: relative; }
.rc-row > label { text-align: right; font-size: .9rem; color: var(--ink-2); padding-top: .5rem; }
.rc-f { display: flex; flex-direction: column; gap: .3rem; min-width: 0; position: relative; }
.rc-f input, .rc-f select { min-height: 38px; padding: .3rem .6rem; font-size: .93rem; width: 100%; }
.rc-2 { flex-direction: row; align-items: center; gap: .6rem; }
.rc-2 input[type=datetime-local] { flex: 1; }
.rc-lbl { white-space: nowrap; font-size: .9rem; color: var(--ink-2); }
.rc-no { width: 90px !important; text-align: right; background: var(--sunk); color: var(--muted); }
.rc-amt { width: 160px !important; text-align: right; font-weight: 600; }
.rc-cur { font-weight: 600; color: var(--ink-2); }
.rc-badge { align-self: flex-start; background: #3b82c4; color: #fff; font-size: .78rem; font-weight: 600; padding: .1rem .55rem; border-radius: 6px; }
.rc-badge:empty { display: none; }
.rc-f .ac-box { top: 40px; }
@media (max-width: 600px) { .rc-row { grid-template-columns: 1fr; gap: .2rem; } .rc-row > label { text-align: left; padding-top: 0; } }
/* purchase window */
.pu-dlg { width: min(1240px, 97vw); }
.pu-dlg .fd-t input.rt { width: 86px; }

/* purchase window: VAT flag + profit in GEL */
.fd-grid label.w3 { grid-column: span 3; }
.fd-grid label.fd-chk { flex-direction: row; align-items: center; gap: .45rem; align-self: end; min-height: 36px; font-size: .88rem; cursor: pointer; }
.fd-grid label.fd-chk input { width: 18px; min-height: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); }
.pu-dlg .fd-t td.c, .pu-dlg .fd-t td.pf { white-space: nowrap; }
.pu-dlg .fd-t td.pf { font-weight: 700; color: var(--accent-dk); }
.pu-dlg .fd-t td.pf.neg, .pu-profit b.neg { color: #c62828; }
.pu-profit { margin-top: .6rem; padding: .55rem .8rem; border-radius: 10px; background: var(--accent-soft); }
.pu-profit #puPf { color: var(--accent-dk); }
@media (max-width: 760px) { .fd-grid label.w3 { grid-column: 1 / -1; } }

/* office view of drivers: stop order, message to driver, cash handover */
.rs-mv { display: flex; align-items: center; gap: 3px; }
.rs-mv b { min-width: 18px; text-align: right; margin-right: 2px; }
.rs-mv button { border: 1px solid var(--line-2); background: var(--card); border-radius: 6px; width: 24px; height: 24px; font-size: .65rem; cursor: pointer; padding: 0; color: var(--ink-2); }
.rs-mv button:disabled { opacity: .3; cursor: default; }
.rs-note { display: flex; gap: 4px; margin-top: 4px; max-width: 360px; }
.rs-note input { margin: 0; min-height: 30px; padding: .2rem .5rem; font-size: .85rem; flex: 1; min-width: 0; }
.rs-note .btn { min-height: 30px; padding: 0 .5rem; }
.rs-extra { border-top: 1px solid var(--line); display: grid; gap: .4rem; }
.rs-extra h3 { margin: .3rem 0 0; font-size: .9rem; color: var(--ink-2); }
.rs-hand { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fffaf0; font-size: .9rem; }
.rs-hand.ok { background: #f2faf5; }
.rs-conf { display: inline-flex; gap: 4px; }
.rs-conf input { width: 90px; margin: 0; min-height: 30px; padding: .2rem .5rem; text-align: right; }

/* office user permissions on the users page */
.trow .perm-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: center; padding-top: .2rem; }
.trow .perm-row .check { margin: 0; }

/* payroll */
.pr-rule { display: flex; gap: 4px; align-items: center; }
.pr-rule input { width: 54px; margin: 0; min-height: 30px; padding: .2rem .4rem; text-align: right; font-size: .85rem; }
.pr-rule input:disabled { opacity: .35; }
.pr-pay { display: flex; gap: 4px; align-items: center; }
.pr-pay input { width: 78px; margin: 0; min-height: 30px; padding: .2rem .4rem; text-align: right; }
.pr-pay select { width: auto; margin: 0; min-height: 30px; padding: .1rem .4rem; font-size: .85rem; }

/* team: pre-seller rows (name, phone, driver, password, active, save) */
.trow.trow-ag { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr) auto auto; }
.trow select { margin: 0; }
@media (max-width: 760px) { .trow.trow-ag { grid-template-columns: 1fr 1fr; } .trow.trow-ag input[name=name] { grid-column: 1 / -1; } }

/* agents report: working day */
.ag-sh { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; align-items: center; font-size: .88rem; color: var(--ink-2); margin-top: .35rem; }
.ag-sh form { margin: 0; }

/* payroll: schemes */
.pr-links { font-size: .8rem; margin-top: .15rem; }
.pr-week { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.pr-week label { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .85rem; }
.pr-week select { width: auto; margin: 0; }
.pr-h { margin: 1.4rem 0 .6rem; font-size: 1.1rem; }
.pr-cards { display: grid; gap: .6rem; }
.pr-card { padding: 0; }
.pr-card > summary { cursor: pointer; padding: .9rem 1.2rem; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.pr-card > summary em { margin-left: auto; font-style: normal; font-weight: 700; }
.pr-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.2rem; padding: 0 1.2rem 1.2rem; }
.pr-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem .4rem; margin: 0 0 .8rem; }
.pr-form legend { font-weight: 700; font-size: .9rem; padding: 0 .3rem; }
.pr-form .w-s { max-width: 260px; }
.pr-side h3 { margin: 0 0 .4rem; font-size: .95rem; }
.pr-calc td { padding: .4rem .5rem; }
.pr-calc .pr-tot td { font-weight: 800; border-top: 2px solid var(--ink); }
.pr-adj { display: grid; grid-template-columns: 1fr 100px; gap: .35rem; margin: .7rem 0; }
.pr-adj > * { margin: 0; }
.pr-adj input[name=note], .pr-adj button { grid-column: 1 / -1; }
@media (max-width: 860px) { .pr-grid { grid-template-columns: 1fr; } }
/* payroll: plan, shops, shortages */
.pr-form .pr-now { align-self: end; padding-bottom: .7rem; }
.pr-form .chk { display: flex; align-items: center; gap: .45rem; align-self: end; padding-bottom: .7rem; }
.pr-form .chk input { width: 18px; height: 18px; margin: 0; }
.pr-form .row-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.pr-form .pr-filled { box-shadow: 0 0 0 2px #f5c542 inset; }
