/* Head Office pages. Plain CSS, no frameworks: works offline on the office computer and prints on A4. */
:root {
  --ink: #1b2740; --muted: #5b667c; --line: #d9dee7; --bg: #f3f5f9; --card: #fff; --accent: #2f4b7c; --accent-2: #3b6fb6; --soft: #e3ebf6;
  --ok: #1e7a52; --warn: #a86b00; --bad: #b3362e;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
body.hq { margin: 0; font: 15px/1.45 var(--sans); color: var(--ink); background: var(--bg); }
a { color: var(--accent-2); }
.muted { color: var(--muted); } .small { font-size: 13px; } .nw { white-space: nowrap; } .mono { font-family: ui-monospace, Consolas, monospace; } .green { color: var(--ok); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; background: var(--ink); color: #fff; }
.top .brand { font: 700 18px Rockwell, "Roboto Slab", Georgia, serif; } .top .brand span { font: 600 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; opacity: .7; margin-left: 8px; }
.top .who { font-size: 14px; opacity: .9; } .top a { color: #fff; }
.tabs { display: flex; gap: 2px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 12px 14px; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--ink); } .tabs a.on { color: var(--ink); border-bottom-color: var(--accent-2); }
main { padding: 18px 20px 40px; max-width: 1500px; margin: 0 auto; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
h1 { margin: 0; font-size: 24px; } h2 { margin: 0 0 10px; font-size: 16px; } h3 { margin: 18px 0 6px; font-size: 15px; } h2 .muted { font-weight: 400; font-size: 13px; }
.acts { display: flex; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 8px; font: 600 14px var(--sans); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent-2); } .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.sm { padding: 3px 10px; font-size: 13px; }
details.menu { position: relative; } details.menu summary { list-style: none; } details.menu summary::-webkit-details-marker { display: none; }
details.menu > div { position: absolute; right: 0; top: 110%; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 220px; z-index: 5; padding: 4px; }
details.menu > div a { display: block; padding: 8px 12px; color: var(--ink); text-decoration: none; border-radius: 6px; } details.menu > div a:hover { background: var(--soft); }
.bar { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; background: #fff; }
.chip:hover { border-color: var(--accent-2); } .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.card label { margin-bottom: 10px; }
input, select { font: 14px var(--sans); padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fff; min-width: 0; }
/* Same height for every box; Safari and Chrome draw their own smaller drop-down otherwise */
input:not([type=checkbox]):not([type=radio]), select { box-sizing: border-box; height: 36px; line-height: 20px; }
select { -webkit-appearance: none; appearance: none; padding-right: 30px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; }
.fields .btn { height: 36px; }
.card input, .card select { width: 100%; }
.period { color: var(--muted); font-size: 13px; margin: 0 0 12px 2px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 14px; } .cols.wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .cols.one { grid-template-columns: 1fr; }
@media (max-width: 1000px) { .cols, .cols.wide { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kpi .l { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.kpi .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; } .kpi .s { font-size: 12px; color: var(--muted); }
.kpi.main { background: var(--accent); border-color: var(--accent); color: #fff; } .kpi.main .l, .kpi.main .s { color: rgba(255,255,255,.75); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pill { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: #adb5bd; }
.dot.online { background: var(--ok); } .dot.recent { background: #e08a00; }
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 7px 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:hover td { background: #f8fafd; }
.num { text-align: right; white-space: nowrap; } .empty { text-align: center; color: var(--muted); padding: 18px; }
tr.tot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }
tr.pick td { background: #e8f0fb !important; }
table.dense td, table.dense th { padding: 5px 6px; font-size: 13px; }
table.bordered td, table.bordered th { border: 1px solid var(--line); }
td.ok { color: var(--ok); font-weight: 700; } td.over { color: var(--warn); font-weight: 700; } td.short { color: var(--bad); font-weight: 700; }
td.w40 { width: 40%; vertical-align: middle; }
.hbar { height: 10px; background: var(--soft); border-radius: 5px; overflow: hidden; } .hbar span { display: block; height: 100%; background: var(--accent-2); }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-top: 4px; }
.chart .b { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.chart .bar { width: 100%; max-width: 48px; background: var(--accent-2); border-radius: 4px 4px 0 0; } .chart .b:hover .bar { background: var(--accent); }
.chart .v { font-size: 10px; color: var(--muted); white-space: nowrap; } .chart .l { font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.h2row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; } .h2row h2 { margin: 0; }
.seg { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--soft); color: var(--accent); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.red { background: #fbe4e2; color: var(--bad); } .tag.green { background: #dff3ea; color: var(--ok); }
.note { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent-2); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.note.bad { border-left-color: var(--bad); } .note.ok { border-left-color: var(--ok); }
.rhead, details.rcpt > summary { display: grid; grid-template-columns: 130px 80px 1.2fr 1fr 1fr 70px 1.6fr 100px; gap: 8px; align-items: center; padding: 8px; }
.rhead { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--line); }
details.rcpt { border-bottom: 1px solid var(--line); } details.rcpt > summary { cursor: pointer; list-style: none; } details.rcpt > summary::-webkit-details-marker { display: none; }
details.rcpt > summary:hover { background: #f8fafd; } details.rcpt[open] > summary { background: var(--soft); }
details.rcpt table.inner { margin: 4px 0 10px; background: #fafbfd; } details.rcpt table.inner td { font-size: 14px; padding: 4px 8px; }
@media (max-width: 900px) { .rhead { display: none; } details.rcpt > summary { grid-template-columns: 1fr 1fr; } }
.boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 700px) { .boxes { grid-template-columns: 1fr; } }
.box { border: 2px solid var(--accent); border-radius: 10px; padding: 10px 14px; } .box .n { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; } .box .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.zslip { max-width: 560px; } table.z td { padding: 5px 4px; } table.z tr.zh td { font-weight: 700; border-bottom: 2px solid var(--ink); padding-top: 14px; }
table.z tr.b td { font-weight: 700; } table.z tr.bad td { font-weight: 700; color: var(--bad); }
form.inline { display: inline; }
body.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.loginbox { width: min(380px, 100%); } .loginbox h1 { margin-bottom: 4px; } .loginbox button { width: 100%; justify-content: center; margin-top: 6px; }
.print-only { display: none; }
@media (max-width: 600px) { main { padding: 12px 12px 30px; } .top { padding: 10px 12px; } .kpi .v { font-size: 22px; } }
@media print {
  @page { size: A4; margin: 12mm; }
  body.hq { background: #fff; font-size: 10.5pt; }
  .no-print, .top, .tabs, .bar, .period, .acts, details.menu, .head { display: none !important; }
  .print-only { display: block; } .printhead { margin-bottom: 10px; }
  main { padding: 0; max-width: none; }
  .card { border: 0; padding: 0; margin-bottom: 12px; break-inside: avoid-page; }
  .cols, .cols.wide { display: block; }
  .kpi.main { background: #fff; color: var(--ink); } .kpi.main .l, .kpi.main .s { color: var(--muted); }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  a { color: inherit; text-decoration: none; }
  details.rcpt > summary { grid-template-columns: 90px 60px 1fr 1fr 1fr 50px 1.4fr 70px; font-size: 9pt; }
  .chart { height: 130px; }
  th, td { padding: 3px 5px; }
}
