:root {
  --bg: #f4f5f4; --panel: #ffffff; --ink: #1f2623; --muted: #6a736f; --line: #e3e6e3; --line2: #d2d7d4;
  --brand: #0b6e5b; --brand-ink: #ffffff; --brand-soft: #e2f0ec;
  --warn: #9a5b00; --warn-soft: #fff4dd; --bad: #b42318; --bad-soft: #fde8e6; --ok: #1a7f37; --ok-soft: #e6f4ea;
  --radius: 10px; --shadow: 0 1px 2px rgba(16, 24, 20, .06); --nav-h: 52px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 650; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--bad); }

/* ---------- top navigation (Odoo style) ---------- */
.nav { position: sticky; top: 0; z-index: 30; height: var(--nav-h); background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 4px; padding: 0 12px; }
.nav .home { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 8px; color: var(--ink); }
.nav .home:hover { background: #f1f3f2; }
.nav .appname { font-weight: 650; font-size: 16px; padding: 0 10px 0 4px; color: var(--ink); white-space: nowrap; }
.nav .appname:hover { text-decoration: none; }
.menus { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.menu { position: relative; }
.menu > a, .menu > button { display: block; padding: 8px 10px; border-radius: 7px; color: var(--ink); background: none; border: 0;
  font: inherit; cursor: pointer; white-space: nowrap; }
.menu > a:hover, .menu > button:hover, .menu.open > button { background: #f1f3f2; text-decoration: none; }
.menu .drop { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.10); padding: 6px; z-index: 40; }
.menu.open .drop { display: block; }
.menu .drop a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--ink); }
.menu .drop a:hover { background: #f1f3f2; text-decoration: none; }
.nav .right { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: 13px; }
.nav .right select { padding: 5px 8px; width: auto; max-width: 200px; }
.icon-btn { position: relative; display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center;
  border-radius: 8px; color: var(--ink); }
.icon-btn:hover { background: #f1f3f2; text-decoration: none; }
.icon-btn .dot { position: absolute; top: 2px; right: 0; background: #e03131; color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 99px; padding: 0 5px; line-height: 16px; }
.btn.burger, .burger { display: none; }

.main { padding: 16px 20px 60px; max-width: 1500px; margin: 0 auto; }
.top { display: flex; align-items: center; justify-content: flex-start; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.top > .actions:empty { display: none; }
.top .title { flex: 1; min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: -4px 0 10px; color: var(--muted); flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs .back { font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; background: #fff; }
.crumbs .sep { opacity: .5; }
/* searchable drop-downs */
.combo { position: relative; }
.combo-in { width: 100%; }
.combo-list { position: absolute; z-index: 50; left: 0; right: 0; top: 100%; max-height: 300px; overflow-y: auto; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); margin-top: 2px; min-width: 240px; }
.combo-list div { padding: 7px 10px; cursor: pointer; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-list div.grp { font-size: 11px; text-transform: uppercase; color: var(--muted); cursor: default; padding: 6px 10px 2px; }
.combo-list div.hi, .combo-list div.opt:hover { background: #e6f2ef; }
.combo-list div.none { color: var(--muted); cursor: default; }
.crumbs { color: var(--muted); font-size: 13px; }

/* ---------- home screen ---------- */
.home-wrap { min-height: calc(100vh - var(--nav-h)); background: linear-gradient(160deg, #f6f1f4 0%, #eef4f2 60%, #f4f5f4 100%); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 26px 16px; max-width: 760px;
  margin: 0 auto; padding: 56px 16px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink); text-align: center; }
.tile:hover { text-decoration: none; }
.tile .ic { width: 72px; height: 72px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.12); transition: transform .12s; }
.tile:hover .ic { transform: translateY(-2px); }
.tile .ic svg { width: 36px; height: 36px; stroke: #fff; }
.tile .nm { font-size: 13.5px; }

/* ---------- panels, kpis, tables ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px; overflow-x: auto; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); display: block; }
a.kpi:hover { border-color: var(--line2); text-decoration: none; }
.kpi .v { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi .l { color: var(--muted); font-size: 12.5px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfa; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8faf9; }
tr.click { cursor: pointer; }
.table-wrap { overflow-x: auto; }
tfoot td { font-weight: 650; border-top: 1px solid var(--line2); }
tr.grp td { background: #f3f5f4; font-weight: 600; cursor: pointer; }
tr.sec td { font-weight: 700; background: #fafbfa; }
tr.sub td:first-child { padding-left: 26px; }
tr.acc td:first-child { padding-left: 42px; }
tr.tot td { font-weight: 700; border-top: 1px solid var(--line2); }

/* ---------- list control panel ---------- */
.cp { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cp .search { flex: 1 1 280px; display: flex; gap: 6px; }
.cp .search input { flex: 1; }
.chip { display: inline-flex; gap: 6px; align-items: center; background: var(--brand-soft); color: var(--brand); border-radius: 99px;
  padding: 3px 10px; font-size: 12.5px; font-weight: 600; }
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; }
.dd > summary::-webkit-details-marker { display: none; }
.dd .dd-body { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1); padding: 10px; min-width: 220px; z-index: 20; }
.dd .dd-body label { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 13.5px; margin: 4px 0; font-weight: 400; }
.dd .dd-body hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.pager { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }

/* ---------- badges, forms, buttons ---------- */
.b { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eef0ee; color: #3b4440; white-space: nowrap; }
.b.ok { background: var(--ok-soft); color: var(--ok); }
.b.warn { background: var(--warn-soft); color: var(--warn); }
.b.bad { background: var(--bad-soft); color: var(--bad); }
.b.brand { background: var(--brand-soft); color: var(--brand); }
label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
input, select, textarea { width: 100%; padding: 7px 10px; border: 1px solid #cfd5d1; border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: auto; }
.field { margin-bottom: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 160px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 8px; border: 1px solid #cfd5d1; background: #fff;
  color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f3f5f3; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #095a4a; }
.btn.danger { color: var(--bad); border-color: #f0c7c2; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline { display: inline; }
.scan input { font-size: 20px; padding: 14px; letter-spacing: .04em; font-family: ui-monospace, Menlo, monospace; }
.scan .hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; border: 1px solid; }
.msg.success { background: var(--ok-soft); border-color: #b7dfc2; color: #10521f; }
.msg.error { background: var(--bad-soft); border-color: #f3c3bd; color: #8a1c12; }
.msg.warning, .msg.info { background: var(--warn-soft); border-color: #f1d9a6; color: #6b4000; }
dl.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }
.right { text-align: right; }
.mt { margin-top: 14px; }
.big { font-size: 18px; font-weight: 650; }
.lines-table input, .lines-table select { padding: 6px 8px; }
.login { max-width: 380px; margin: 10vh auto; }
.statusbar { display: flex; gap: 0; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.statusbar span { padding: 5px 12px; font-size: 12.5px; color: var(--muted); border-right: 1px solid var(--line2); background: #fff; }
.statusbar span:last-child { border-right: 0; }
.statusbar span.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* ---------- record layout with chatter ---------- */
.record { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.chatter { position: sticky; top: calc(var(--nav-h) + 12px); }
.chatter .tl { max-height: 60vh; overflow-y: auto; }
.chatter .item { border-top: 1px solid var(--line); padding: 8px 0; font-size: 13px; }
.chatter .item .who { font-weight: 600; }
.chatter .item .when { color: var(--muted); font-size: 12px; }
.chatter .item .det { color: var(--muted); font-size: 12px; word-break: break-word; }
.chatter textarea { min-height: 60px; }

@media (max-width: 1100px) { .record { grid-template-columns: 1fr; } .chatter { position: static; } }
@media (max-width: 900px) {
  .btn.burger, .burger { display: inline-flex; }
  .menus { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
  .nav.mopen .menus { display: flex; }
  .menu .drop { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; display: block; }
  .nav .right .who-name, .nav .right select { display: none; }
  .main { padding: 12px 12px 60px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr 1fr; }
  dl.kv { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(3, 1fr); padding: 28px 12px; gap: 20px 8px; }
  .tile .ic { width: 60px; height: 60px; }
}
@media (max-width: 900px) { .table-wrap td, .table-wrap th { white-space: nowrap; } }
@media (max-width: 520px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

@media print {
  .nav, .no-print, .msg, .chatter, .cp { display: none !important; }
  .record { display: block; } .main { padding: 0; max-width: none; } body { background: #fff; }
  .panel { border: 0; box-shadow: none; padding: 0; }
}

.combo-list div.create { color: var(--brand); font-weight: 600; border-top: 1px solid var(--line); }
.modal-bg { position: fixed; inset: 0; background: rgba(20,30,25,.35); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px; }
.modal { background: #fff; border-radius: 12px; padding: 20px; width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal .field { margin-bottom: 10px; }
.modal .err { min-height: 18px; margin-bottom: 6px; font-size: 13px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.seg label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); border-radius: 8px; padding: 7px 12px; color: var(--ink); cursor: pointer; margin: 0; }
.seg input { width: auto; margin: 0; }
.seg label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.row + .row { margin-top: 10px; }

.dupes { background: #fff7e6; border: 1px solid #f5d38b; border-radius: 8px; padding: 10px; color: var(--ink); }
.dupes .dupe { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.tabs { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; background: #fff; }
.tabs a { padding: 7px 14px; color: var(--ink); border-right: 1px solid var(--line2); }
.tabs a:last-child { border-right: 0; }
.tabs a.on { background: var(--brand); color: #fff; font-weight: 600; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 220px; padding-top: 18px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.bar { width: 100%; max-width: 46px; background: #9ccdc1; border-radius: 4px 4px 0 0; min-height: 2px; }
.bar.cur { background: var(--brand); }
.bar-val { font-size: 11px; color: var(--muted); margin-bottom: 3px; white-space: nowrap; }
.bar-lbl { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; line-height: 1.2; }
.bar-lbl span { display: block; font-size: 10px; }
@media (max-width: 600px) { .bar-val { display: none; } .chart { gap: 3px; } }
.bar-wrap { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
[hidden] { display: none !important; }
tr.sub td { background: #fafbfa; border-top: 0; padding-top: 4px; }
form.cand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.check { padding: 6px 0; border-bottom: 1px solid var(--line); }
.approval-tab { border: 2px solid #f0b54a; padding-top: 0; }
.approval-tab .tabhead { display: inline-block; background: #f0b54a; color: #3b2a00; font-weight: 700; padding: 5px 14px; border-radius: 0 0 8px 8px; margin: 0 0 12px; }
.approval-tab { scroll-margin-top: 70px; }
@media (max-width: 700px) {
  .top { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .top > .actions { justify-content: flex-start; }
  h1 { font-size: 18px; overflow-wrap: anywhere; }
}
.day { display: grid; gap: 8px; }
.jobcard { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: 12px 14px; color: var(--ink); }
.jobcard:hover { text-decoration: none; border-color: var(--line2); }
.jobcard.done { border-left-color: #9ccdc1; opacity: .75; }
.jobcard.late { border-left-color: #c92a2a; }
.jc-time { font-size: 18px; font-weight: 700; min-width: 56px; text-align: center; }
.jc-time span { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.jc-main { flex: 1; min-width: 0; }
.jc-title { font-weight: 600; }
.jc-state { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.jc-call { border: 1px solid var(--line2); border-radius: 6px; padding: 3px 10px; font-size: 13px; }
.scan-ov { position: fixed; inset: 0; background: #000; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.scan-ov video { width: 100%; max-height: 75vh; object-fit: cover; }
.scan-frame { position: absolute; width: 80%; height: 22%; border: 3px solid #4ade80; border-radius: 10px; }
.scan-ov .btn { position: relative; z-index: 2; }
.scan-ov .scan-pick { display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.scan-ov .scan-pick .btn { font-family: ui-monospace, Menlo, monospace; font-size: 17px; padding: 12px; }
.scan-ov .scan-pick .hint { color: #fff; text-align: center; }
.scan-btn { margin-left: 6px; }

.scan-field { display: flex; gap: 6px; }
.scan-field input { flex: 1; }
.scan-ov .hint { position: relative; z-index: 2; color: #fff; font-size: 14px; }
#scan-reader video { width: 100% !important; }

.scan-btn { display: inline-flex; align-items: center; gap: 6px; }
.scan-ctl { position: relative; z-index: 2; display: flex; gap: 8px; align-items: center; }
.scan-cam { max-width: 60vw; background: #222; color: #fff; border: 1px solid #555; border-radius: 8px; padding: 8px; }

/* waiting-for-action strip on each app's first page */
.todo { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.todo-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.todo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.todo-i { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line); color: var(--ink); background: #fffaf0; }
.todo-i:hover { text-decoration: none; border-color: var(--line2); }
.todo-i .n { min-width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; background: #f1c56b; color: #4a2f00; padding: 0 6px; }
.todo-i.bad { background: #fff4f3; }
.todo-i.bad .n { background: #c92a2a; color: #fff; }
.todo-i .l { flex: 1; font-weight: 600; font-size: 13.5px; }
.todo-i .go { color: var(--muted); font-size: 18px; }
.tile .ic { position: relative; }
.tbadge { position: absolute; top: -6px; right: -8px; min-width: 20px; height: 20px; border-radius: 10px; background: #c92a2a; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; }

/* goods receiving */
.partyname { display: block; font-size: 19px; font-weight: 700; margin: 2px 0 1px; color: var(--ink); }
a.partyname:hover { color: var(--brand); }
.loc-tabs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.loc-tabs a { padding: 7px 14px; border: 1px solid var(--line2); border-radius: 20px; color: var(--ink); font-weight: 600; }
.loc-tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.loc-tabs a:hover { text-decoration: none; }
.parts { margin-top: 4px; display: flex; gap: 10px; }
.part { font-size: 12px; color: var(--muted); }
.rcv-modal { max-width: 520px; }
.rcv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rcv-head h2 { margin: 0; }
#rcv .seg { display: flex; background: #eef1f0; border-radius: 10px; padding: 3px; gap: 3px; margin-bottom: 10px; }
#rcv .seg a { flex: 1; text-align: center; padding: 8px; border-radius: 8px; color: var(--muted); font-weight: 600; }
#rcv .seg a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
#rcv .seg a:hover { text-decoration: none; }
#rcv-input { font-size: 18px; padding: 12px; font-family: ui-monospace, Menlo, monospace; }
.rcv-list { max-height: 30vh; overflow: auto; margin: 6px 0 0; padding-left: 22px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

.cfg { display: block; color: var(--ink); }
.cfg:hover { text-decoration: none; border-color: var(--brand); }
ol.steps { padding-left: 20px; margin: 6px 0; } ol.steps li { margin-bottom: 6px; }
.qr svg { width: 100%; height: auto; }

.scan-err { position: relative; z-index: 2; max-width: 520px; margin: 0 16px; background: #fff4f3; color: #8a1c12; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.scan-ctl { flex-wrap: wrap; justify-content: center; }
.scan-photo { cursor: pointer; }

.rcv-progress { font-weight: 600; margin: 4px 0 8px; }
#rcv .seg a.full { color: #2b8a3e; }
.rcv-list li { padding: 4px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.rcv-acts { margin-left: auto; display: flex; gap: 10px; font-family: system-ui, sans-serif; }
.linkbtn { background: none; border: 0; color: var(--brand); font-weight: 600; font-size: 12.5px; padding: 2px 0; cursor: pointer; }
.linkbtn.neg { color: #c92a2a; }
.kpi .up { color: #1d7a55; font-weight: 600; }
.kpi .down { color: #b3412f; font-weight: 600; }
.chart.dense { gap: 3px; }
.chart.dense .bar-val { display: none; }
.chart.dense .bar-lbl { font-size: 10px; }
.dash-periods .tabs { max-width: 100%; overflow-x: auto; }
.dash-periods .tabs a { white-space: nowrap; }
@media (max-width: 600px) {
  .grid.dash-k { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-k .kpi { padding: 10px 12px; }
  .dash-k .kpi .v { font-size: 18px; }
  .dash-k .kpi .l { font-size: 11.5px; }
}
.panel.alert-panel { border-color: #e2a39a; background: #fff7f5; }
.lines-table.payroll input { min-width: 90px; }
.jh-row { padding: 10px 0; border-top: 1px solid var(--line); }
.jh-row:first-child { border-top: 0; }
.jh-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.jh-date { margin-left: auto; font-size: 12.5px; }

/* contact documents */
.docs-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}
.docs-grid .doc{border:1px solid var(--line,#e5e7eb);border-radius:8px;padding:8px;display:flex;flex-direction:column;gap:4px}
.docs-grid .doc img{width:100%;height:110px;object-fit:cover;border-radius:6px;background:#f3f4f6}
.docs-grid .doc-icon{height:110px;display:flex;align-items:center;justify-content:center;font-size:40px;background:#f3f4f6;border-radius:6px}
.price-grid input{width:120px;text-align:right}
.mbars{display:flex;gap:8px;align-items:flex-end;height:180px;overflow-x:auto}
.mbar{flex:1;min-width:46px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%}
.mbar-b{width:70%;background:var(--brand,#0b7285);border-radius:4px 4px 0 0;min-height:2px}
.mbar-v{font-size:11px;color:var(--muted,#6b7280);white-space:nowrap}
.mbar-l{font-size:12px;margin-top:4px}
.lines-table input.qty-over{color:#c92a2a;border-color:#c92a2a;font-weight:600}

/* printouts from normal pages: no browser header/footer with the page address */
@page { size: A4; margin: 0; }
@media print { body { padding: 10mm !important; } }
