:root {
  --bg: #f4f5f7; --panel: #fff; --ink: #1d2230; --muted: #6b7280; --line: #e3e5ea;
  --brand: #1349a0; --brand-ink: #fff; --brand-soft: #e8eef9; --accent: #e31b23; --navy: #0a1f44;
  --warn: #b45309; --warn-soft: #fef3c7; --bad: #b91c1c; --bad-soft: #fee2e2; --good: #15803d;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  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; }
button, input, select, textarea { font: inherit; }
a { color: var(--brand); }

.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
aside { background: var(--navy); color: #d1d5db; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
aside .logo { color: #fff; font-weight: 700; font-size: 17px; padding: 4px 8px 18px; letter-spacing: .2px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
aside .logo .lg { width: 46px; height: 46px; flex: none; }
aside .logo .lt { min-width: 0; }
aside .logo #brand-switch { flex-basis: 100%; }
aside .logo small { display: block; color: #9ca3af; font-weight: 400; font-size: 12px; }
aside nav a { display: block; color: #d1d5db; text-decoration: none; padding: 9px 10px; border-radius: 8px; margin-bottom: 2px; }
aside nav a:hover { background: #13305f; }
aside nav a.active { background: var(--brand); color: #fff; }
aside .who { position: absolute; bottom: 16px; left: 22px; right: 12px; font-size: 12px; color: #9ca3af; }

main { padding: 20px 26px 60px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar h1 { font-size: 20px; margin: 0; flex: 1; }
.branch-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); background: var(--panel); padding: 5px 11px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; display: inline-block; }
.dot.on { background: #22c55e; } .dot.off { background: #ef4444; }

.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px; }
.card h2 { font-size: 15px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card h2 .spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.kpi .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.kpi .v { font-size: 19px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { color: var(--muted); font-size: 12px; margin-top: 2px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; background: #fafbfc; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:hover td { background: #fafbfc; }
.scroll { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.scroll table th { z-index: 1; }

.btn { border: 1px solid var(--line); background: var(--panel); padding: 7px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #c7cbd3; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 3px 8px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
input.price { width: 90px; text-align: right; }
input.dirty { border-color: var(--warn); background: var(--warn-soft); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
label.f { display: block; margin-bottom: 10px; }
label.f span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
label.f input, label.f select { width: 100%; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #eef0f3; font-size: 12px; }
.tag.good { background: #dcfce7; color: var(--good); } .tag.bad { background: var(--bad-soft); color: var(--bad); } .tag.warn { background: var(--warn-soft); color: var(--warn); }
.muted { color: var(--muted); }
.note { background: var(--brand-soft); border-left: 3px solid var(--brand); padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; font-size: 13px; }
.note.warn { background: var(--warn-soft); border-color: var(--warn); }
.empty { color: var(--muted); padding: 20px; text-align: center; }
.list-item { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.list-item:hover { background: #f3f4f6; } .list-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.modal-bg { position: fixed; inset: 0; background: rgba(17,24,39,.45); display: flex; align-items: flex-start; justify-content: center; padding-top: 8vh; z-index: 50; }
.modal { background: #fff; border-radius: 12px; width: min(560px, 94vw); max-height: 84vh; overflow: auto; padding: 20px 22px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal h3 { margin: 0 0 14px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.portion-row { display: grid; grid-template-columns: 1fr 90px 100px 30px; gap: 6px; margin-bottom: 6px; }

#toast { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: #111827; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); max-width: 380px; }
.toast.err { background: var(--bad); }

.login { max-width: 380px; margin: 14vh auto; }
/* sign-in page */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: #fff; }
.si-brand { background: radial-gradient(110% 90% at 20% 10%, #1a5bc4 0%, #0b2a5c 55%, #071a3d 100%); color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 40px; position: relative; overflow: hidden; }
.si-brand::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--accent); }
.si-brand .si-logo { width: min(240px, 46vw); height: auto; filter: drop-shadow(0 10px 30px rgba(0,0,0,.35)); }
.si-brand h1 { margin: 22px 0 2px; font-size: 34px; letter-spacing: .02em; }
.si-brand p { margin: 0; color: #c3d3f2; font-size: 16px; }
.si-form { align-self: center; justify-self: center; width: min(380px, 100%); padding: 32px 28px; }
.si-form h2 { font-size: 26px; margin: 0 0 4px; } .si-form > .muted { margin: 0 0 22px; }
.si-form .f { margin-bottom: 14px; } .si-form input { padding: 11px 12px; font-size: 15px; }
.si-form .btn { width: 100%; padding: 11px; font-size: 15px; margin-top: 6px; }
.si-foot { font-size: 12.5px; color: var(--muted); margin-top: 18px; }
@media (max-width: 760px) {
  .signin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .si-brand { padding: 28px 20px 30px; } .si-brand .si-logo { width: 120px; } .si-brand h1 { font-size: 24px; margin-top: 12px; }
  .si-form { align-self: start; padding-top: 26px; }
}
.chart-box { position: relative; height: 260px; }
.branch-card .row { display: flex; justify-content: space-between; padding: 3px 0; }
.branch-card .big { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* side menu: fixed height, the menu scrolls on its own, user + sign out stay at the bottom */
aside { display: flex; flex-direction: column; }
aside nav { flex: 1; min-height: 0; overflow-y: auto; margin-right: -8px; padding-right: 8px; scrollbar-width: thin; scrollbar-color: #374151 transparent; }
aside nav::-webkit-scrollbar { width: 6px; } aside nav::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }
aside .who { position: static; padding: 10px 10px 0; margin-top: 8px; border-top: 1px solid #1f2937; }
aside .ngroup { margin: 2px 0; }
aside .nh { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; width: 100%; padding: 8px 10px 4px;
  color: #6b7280; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
aside .nh:hover { color: #d1d5db; }
aside .nh .chev { margin-left: auto; font-size: 14px; transition: transform .15s; }
aside .ngroup.open > .nh .chev { transform: rotate(90deg); }
aside .ngroup:not(.open) > .nbody { display: none; }
aside nav > .ngroup > .nbody { margin-left: 6px; }
@media (max-width: 860px) {
  /* phone / app layout: slim sticky header with a sideways-scrolling menu */
  .layout { grid-template-columns: 1fr; }
  aside { position: sticky; top: 0; z-index: 20; height: auto; padding: 8px 10px 6px; padding-top: calc(8px + env(safe-area-inset-top));
    display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 6px; }
  aside .logo { padding: 0 4px; font-size: 16px; gap: 8px; flex-wrap: nowrap; }
  aside .logo .lg { width: 30px; height: 30px; }
  aside .logo small { display: inline; margin-left: 6px; }
  aside .who { position: static; grid-column: 2; grid-row: 1; text-align: right; line-height: 1.5; }
  aside nav { grid-column: 1 / -1; display: flex; gap: 6px; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  aside nav::-webkit-scrollbar { display: none; }
  aside nav { flex: none; overflow-y: visible; margin: 0; padding-right: 0; }
  aside .who { border-top: 0; margin: 0; padding: 0; }
  aside nav .ngroup, aside nav .nbody { display: contents !important; }     /* phone: one sideways row, no groups */
  aside nav .nh { display: none; }
  aside nav a { display: inline-block; margin: 0; padding: 7px 12px; border-radius: 999px; background: #1f2937; font-size: 14px; }
  aside nav .subnav { display: contents; }
  aside nav .subnav a { padding: 7px 12px; font-size: 13px; }
  aside nav .subnav a.active { background: #374151; }
  aside nav .subnav a.active::before { content: ''; }
  aside nav > a[data-p="reports"] { display: none; }            /* the report pages themselves are listed */
  main { padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .topbar { margin-bottom: 10px; }
  .topbar h1 { font-size: 18px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi .v { font-size: 18px; }
  .card { padding: 12px; }
  .chart-box { height: 200px; }
  .grid.g2, .grid.g3fix { grid-template-columns: 1fr !important; }
  .toolbar > * { flex: 1 1 auto; }
  table { font-size: 13px; }
}
@media (display-mode: standalone) { body { -webkit-user-select: none; } }
/* ---------- printing (Ctrl+P / Print button): whole tables, no menu, landscape A4, report header with the filters ---------- */
.print-head { display: none; }
@page { size: A4 landscape; margin: 10mm; }
@media print {
  html, body { background: #fff !important; font-size: 11px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  aside, .toolbar, .btn, button, .branch-pills, .rtabs, #brand-switch, .toast, .modal-bg, .no-print { display: none !important; }
  .layout { display: block !important; }
  main { padding: 0 !important; }
  .topbar { margin: 0 0 6px !important; } .topbar h1 { font-size: 16px; }
  .print-head { display: block; font-size: 11px; color: #374151; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid #d1d5db; }
  .print-head b { color: #111827; }
  .card { box-shadow: none !important; border: 1px solid #ddd; padding: 8px 10px !important; margin-bottom: 8px !important; break-inside: auto; }
  .scroll, .cmp-wrap { max-height: none !important; overflow: visible !important; border: none !important; }
  table { width: 100% !important; font-size: 10px; }
  th, td { padding: 3px 5px !important; }
  th, .cmp-lbl { position: static !important; }
  thead { display: table-header-group; }   /* column headings repeat on every page */
  tfoot { display: table-footer-group; }
  tr, .kpi, .btile, .branch-card, canvas { break-inside: avoid; }
  canvas { max-width: 100% !important; }
  a { color: inherit !important; text-decoration: none !important; }
  details:not([open]) > *:not(summary) { display: none; }
}
.card h2 input, .card h2 select { font-size: 13px; font-weight: 400; padding: 5px 8px; }

.kds-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.kds-col { background: #e9ebef; border-radius: var(--radius); padding: 10px; }
.kds-col h3 { margin: 4px 4px 10px; font-size: 15px; display: flex; justify-content: space-between; }
.kds-card { background: #fff; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; border-left: 5px solid #22c55e; box-shadow: var(--shadow); }
.kds-card.warn { border-color: #f59e0b; } .kds-card.late { border-color: #ef4444; background: #fff5f5; }
.kds-card.done { opacity: .55; border-color: #9ca3af; }
.kds-head { display: flex; justify-content: space-between; font-size: 15px; }
.kds-card ul { margin: 6px 0 0; padding-left: 18px; } .kds-card li { margin: 2px 0; }

.g3fix { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g3fix { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .g3fix { grid-template-columns: 1fr; } }
.branch-card .subh { margin: 10px 0 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
.mixrow { display: grid; grid-template-columns: 1fr 50px 110px 120px; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.mixrow b { text-align: right; } .mixrow .muted { text-align: right; }
.mixrow .bar { background: #eef0f3; border-radius: 4px; height: 8px; overflow: hidden; } .mixrow .bar i { display: block; height: 100%; background: var(--brand); }

.branch-card .split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
.branch-card .split > div { background: #f4f5f7; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.branch-card .split b { font-size: 17px; } .branch-card .split .muted { font-size: 11.5px; }

/* compare locations */
.cmp-wrap { overflow-x: auto; }
table.cmp { border-collapse: collapse; min-width: 720px; table-layout: fixed; }
table.cmp th, table.cmp td { border-bottom: 1px dashed var(--line); vertical-align: top; padding: 14px 16px; }
table.cmp th { background: #fff; text-transform: none; font-size: 13px; color: var(--ink); letter-spacing: 0; position: static; }
.cmp-lbl { width: 190px; font-weight: 600; font-size: 13px; background: #fafbfc; position: sticky; left: 0; z-index: 1; }
.cmp-lbl a { font-weight: 400; font-size: 11.5px; }
.cmp-cell { width: 300px; border-left: 1px solid var(--line); }
.cmp-cell.win { background: linear-gradient(90deg, transparent 0%, rgba(34,160,90,.22) 100%); }   /* v614: works on light and dark */
.cmp-cell .num-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.cmp-cell .num-v small { color: var(--muted); font-weight: 400; }
.cmp-loc { font-weight: 600; } .cmp-x { float: right; padding: 0 6px; }
.cmp-add { width: 100%; border-style: dashed; color: var(--muted); }
.cbar { height: 10px; background: #93c5fd; border-radius: 3px; overflow: hidden; } .cbar i { display: block; height: 100%; background: #1e40af; }
.cbar-l { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 400; margin-top: 4px; text-align: left; }
.brow { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 3px 0; font-weight: 400; text-align: left; }
.good-t { color: #1d4ed8; font-weight: 600; } .bad-t { color: var(--bad); font-weight: 600; }
.bdown { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); } .bsep { border-top: 1px dotted var(--line); margin: 4px 0; }
.avail { display: flex; flex-wrap: wrap; gap: 4px; } .avail i { width: 22px; height: 10px; background: #e5e7eb; border-radius: 2px; } .avail i.on { background: #1e40af; }
details.msel { position: relative; } details.msel summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; padding: 7px 28px 7px 10px; background: #fff; min-width: 170px; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.msel summary::after { content: '▾'; position: absolute; right: 10px; top: 7px; color: var(--muted); }
details.msel > div { position: absolute; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 8px 10px; min-width: 220px; margin-top: 4px; }
details.msel label { display: block; padding: 3px 0; }
@media print { .cmp-x, .cmp-add, details.msel { display: none !important; } }
.brow b { white-space: nowrap; }
.brow .rk { display: inline-block; min-width: 20px; color: var(--muted); font-size: 11px; }

#view table:not(.cmp) thead th { cursor: pointer; user-select: none; }
#view table:not(.cmp) thead th:hover { color: var(--brand); }
#view th.sorted-desc::after { content: ' ▼'; color: var(--brand); }
#view th.sorted-asc::after { content: ' ▲'; color: var(--brand); }
.basis { font-size: 12px; margin: -6px 0 10px 2px; }

aside nav .subnav { margin: 0 0 6px 12px; border-left: 1px solid #374151; padding-left: 6px; }
aside nav .subnav a { padding: 6px 10px; font-size: 13px; color: #9ca3af; }
aside nav .subnav a.active { background: transparent; color: #fff; font-weight: 600; }
aside nav .subnav a.active::before { content: '› '; }

tfoot tr.total td { font-weight: 700; border-top: 2px solid #d1d5db; background: #f9fafb; }
@media (max-width: 860px) { .mixrow { grid-template-columns: minmax(0,1fr) 34px 84px 56px; gap: 6px; } .mixrow span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

.kds-items { list-style: none; padding: 0; margin: 6px 0 0; }
.kds-items li { padding: 3px 0; border-top: 1px dashed #e5e7eb; }
.kds-items li:first-child { border-top: 0; }
.kds-items li.idone { color: #9ca3af; text-decoration: line-through; }
.kds-note { font-size: 12px; color: #b45309; margin-left: 18px; }

td.num { white-space: nowrap; }

.bstrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.btile { background: #fff; border-radius: 10px; padding: 10px 14px; box-shadow: 0 1px 2px rgba(0,0,0,.06); border-left: 4px solid var(--brand); cursor: pointer; }
.btile.off { border-left-color: #dc2626; opacity: .75; }
.btile .n { font-size: 12px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btile .a { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
@media (max-width: 860px) { .bstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .btile .a { font-size: 17px; } }
.btile .dot { margin-right: 6px; vertical-align: middle; }

.btile .p { font-size: 12px; color: #6b7280; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up { color: #16a34a; font-weight: 600; } .down { color: #dc2626; font-weight: 600; }
.tbar { display: inline-block; width: 60px; height: 6px; background: #eef0f3; border-radius: 3px; vertical-align: middle; margin-left: 4px; overflow: hidden; }
.tbar i { display: block; height: 100%; background: var(--brand); }

.kpi.kclick { cursor: pointer; border: 1px solid transparent; transition: border-color .15s; }
.kpi.kclick:hover { border-color: var(--brand, #1349a0); }
.kpi.kclick .s { color: var(--brand, #1349a0); }

/* combined reports: one row of small tiles per branch (own colour) above the total tiles */
.bxrows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.bxrow { background: color-mix(in srgb, var(--bc, #1349a0) 6%, #fff); border-left: 4px solid var(--bc, #1349a0); border-radius: 10px; padding: 8px 12px; }
.bxrow.off { border-left-color: #dc2626; background: #fff; }
.bxrow .bname, .bxrows > .bname { font-size: 13px; font-weight: 600; color: var(--bc, #1349a0); margin-bottom: 6px; }
.bkpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 6px; }
.bk { background: #fff; border-radius: 8px; padding: 6px 9px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.bk .l { font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; }
.bk .v { font-size: 13px; font-weight: 700; white-space: nowrap; }
.bk .s { font-size: 11px; color: #6b7280; }
@media (max-width: 860px) { .bkpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* reports: one-click branch buttons */
.rtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #eef0f3; }
.rtab { border: 1px solid #e5e7eb; background: #fff; border-radius: 999px; padding: 7px 16px; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: #374151; }
.rtab:hover { border-color: var(--tc); color: var(--tc); }
.rtab.on { background: var(--tc); border-color: var(--tc); color: #fff; font-weight: 600; }
.rtab.on .dot { background: #fff; }
@media (max-width: 860px) { .rtabs { flex-wrap: nowrap; overflow-x: auto; } .rtab { white-space: nowrap; padding: 6px 12px; font-size: 13px; } }

/* sales by hour: weekday x hour grid */
table.heat td, table.heat th { padding: 5px 6px; font-size: 12px; white-space: nowrap; }
table.heat td.num { min-width: 46px; border: 1px solid #fff; }

/* ---------- live dashboard ---------- */
.dhero { background: #0b2a5c; color: #e8eefb; border-radius: 14px; padding: 20px 24px 16px; margin-bottom: 14px; }
.dh-top { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.dh-main { flex: 1 1 340px; min-width: 0; }
.dh-l { font-size: 13px; color: #a9c1ec; display: flex; align-items: center; gap: 8px; }
.dh-t { color: #7f9bd0; margin-left: 4px; }
.live { width: 9px; height: 9px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 0 0 rgba(96,165,250,.6); animation: livepulse 2s infinite; }   /* blue = today's live data */
@keyframes livepulse { 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
@media (prefers-reduced-motion: reduce) { .live { animation: none; } }
.dh-v { font-size: 44px; line-height: 1.05; font-weight: 750; letter-spacing: -0.02em; color: #fff; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.dh-s { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; color: #c3d3f2; font-variant-numeric: tabular-nums; }
.dpill { padding: 3px 10px; border-radius: 999px; font-weight: 650; font-size: 12.5px; }
.dpill.up { background: #134e3a; color: #6ee7b7; } .dpill.down { background: #5b1d1d; color: #fca5a5; }
.dh-side { display: grid; gap: 10px; flex: 0 1 300px; min-width: 220px; }
.dh-m { background: rgba(255,255,255,.06); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.dh-m .k { font-size: 12px; color: #a9c1ec; }
.dh-m b { font-size: 24px; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.dh-m .d { font-size: 12px; color: #c3d3f2; font-variant-numeric: tabular-nums; }
.dh-m .mbar { margin-top: 4px; }
.dh-m.warn b { color: #fcd34d; }
.mbar { display: block; height: 5px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.mbar i { display: block; height: 100%; background: #7fb2ff; }
.race { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin-top: 16px; gap: 2px; }
.race i { cursor: pointer; min-width: 4px; }
.race-l { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 12.5px; color: #c3d3f2; }
.race-l span { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.race-l span i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.race-l b { color: #fff; font-weight: 600; }

/* branch tiles: the coloured edge says how the branch is doing (target, else last week) */
.btile { position: relative; border-left-width: 5px; transition: box-shadow .15s; }
.btile.sel { box-shadow: 0 0 0 2px var(--brand); }
.btile.st-g { border-left-color: #16a34a; } .btile.st-y, .btile.st-a { border-left-color: #eab308; } .btile.st-o { border-left-color: #f97316; } .btile.st-r { border-left-color: #dc2626; }
.btile.st- { border-left-color: #cbd5e1; }
.btile.st-off { border-left-color: #dc2626; background: #fef2f2; opacity: 1; }
.btile.st-wait { border-left-color: #f59e0b; background: #fffbeb; }
.btile .p.stale { color: #b45309; font-size: 11px; }
.dot.wait { background: #f59e0b; }
.tv-tile.wait { opacity: .75; }
.btile .a { font-size: 22px; letter-spacing: -0.01em; }
.btile .ring { position: absolute; top: 10px; right: 10px; width: 42px; height: 42px; border-radius: 50%;
  background: conic-gradient(var(--rc, #1349a0) calc(var(--p) * 1%), #e8ecef 0); display: grid; place-items: center; }
.btile.st-g .ring { --rc: #16a34a; } .btile.st-y .ring, .btile.st-a .ring { --rc: #eab308; } .btile.st-o .ring { --rc: #f97316; } .btile.st-r .ring { --rc: #dc2626; }
.btile .ring span { width: 32px; height: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.btile.st-off .ring span { background: #fef2f2; }
.btile:has(.ring) .n, .btile:has(.ring) .a { padding-right: 46px; }

/* order type / channel mix */
.stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; margin: 4px 0 10px; }
.stack i { min-width: 3px; }
.legend > div { display: grid; grid-template-columns: 10px minmax(0,1fr) 44px 110px 44px; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.legend > div:last-child { border-bottom: 0; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend .muted, .legend b, .legend .pc { text-align: right; } .legend .pc { color: var(--muted); font-size: 12px; }

/* branch card numbers */
.branch-card .big { font-size: 28px; letter-spacing: -0.01em; }
.mgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 10px 0 2px; }
.mgrid > div { background: #f6f7f9; border-radius: 8px; padding: 7px 9px; display: flex; flex-direction: column; min-width: 0; font-variant-numeric: tabular-nums; }
.mgrid span { font-size: 11.5px; color: var(--muted); } .mgrid b { font-size: 15px; } .mgrid small { font-size: 11px; color: var(--muted); }
.mgrid > div.warn { background: var(--warn-soft); } .mgrid > div.warn b { color: var(--warn); }

@media (max-width: 860px) {
  .dhero { padding: 14px 14px 12px; border-radius: 12px; }
  .dh-v { font-size: 32px; }
  .dh-side { flex-basis: 100%; grid-template-columns: 1fr 1fr; min-width: 0; }
  .dh-m b { font-size: 18px; }
  .legend > div { grid-template-columns: 10px minmax(0,1fr) 34px 84px 36px; gap: 6px; font-size: 13px; }
  .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btile .a { font-size: 18px; }
}
@media print { .dhero { background: #0b2a5c !important; } .live { animation: none; } }

.cur { font-size: .5em; font-weight: 600; letter-spacing: 0; margin-right: .3em; opacity: .7; vertical-align: .35em; }
.prow { display: grid; grid-template-columns: minmax(0,1fr) 70px 90px; gap: 10px; align-items: center; padding: 3px 0; font-variant-numeric: tabular-nums; }
.prow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .prow b { text-align: right; }
.pbar { display: block; height: 6px; border-radius: 3px; background: #eef0f3; overflow: hidden; } .pbar i { display: block; height: 100%; background: var(--brand); opacity: .75; }
.dh-v { font-size: 52px; }
@media (max-width: 860px) { .dh-v { font-size: 38px; } .dh-m b { font-size: 20px; } }

/* dashboard: trend + alerts row, top lists */
.dgrid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }
.dgrid > .card { margin-bottom: 14px; }
.dgrid h2 select { font-size: 12.5px; padding: 4px 8px; }
.fc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.fc > div { background: #f6f7f9; border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; min-width: 0; font-variant-numeric: tabular-nums; }
.fc > div:first-child { background: #fff7e6; }
.fc span { font-size: 12px; color: var(--muted); } .fc b { font-size: 18px; } .fc small { font-size: 11.5px; color: var(--muted); }
.alist { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.al > a, .al > div { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px; border-left: 4px solid; text-decoration: none; color: var(--ink); }
.al.warn > * { background: #fffbeb; border-color: #f59e0b; } .al.bad > * { background: #fef2f2; border-color: #dc2626; }
.al b { font-size: 12.5px; } .al span { font-size: 13px; }
.al > a:hover { filter: brightness(.97); }
.allok { padding: 22px 10px; text-align: center; color: var(--good); font-weight: 600; background: #f0fdf4; border-radius: 8px; }
.rank > div { display: grid; grid-template-columns: 20px minmax(0, 1fr) 44px 80px 96px; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.rank.staff > div { grid-template-columns: 20px minmax(0, 1fr) 40px 70px 90px 72px; }
.rank > div:last-child { border-bottom: 0; }
.rank em { font-style: normal; color: var(--muted); font-size: 12px; text-align: right; }
.rank span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .muted, .rank b { text-align: right; } .rank .disc { color: var(--warn); text-align: right; font-size: 11.5px; }
@media (max-width: 1100px) { .dgrid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .fc { grid-template-columns: 1fr 1fr; } .fc > div:first-child { grid-column: span 2; }
  .rank > div { grid-template-columns: 18px minmax(0, 1fr) 34px 84px; } .rank > div .pbar { display: none; }
  .rank.staff > div { grid-template-columns: 18px minmax(0, 1fr) 34px 80px 56px; }
}

/* ---------- TV screen (#/tv) ---------- */
body.tvmode { background: #061632; overflow: hidden; }
body.tvmode .layout { display: block; }
body.tvmode aside, body.tvmode .topbar, body.tvmode #brand-switch, body.tvmode main > .note { display: none !important; }
body.tvmode main { padding: 0; }
.tv { position: fixed; inset: 0; background: radial-gradient(120% 90% at 0% 0%, #10357a 0%, #061632 62%); color: #e2f3f0;
  display: flex; flex-direction: column; padding: 2.2vh 2.6vw 1.6vh; font-size: clamp(14px, 1.15vw, 26px); cursor: none; }
.tv:hover { cursor: default; }
.tv-top { display: flex; align-items: center; gap: 1.4vw; }
.tv-brand { font-weight: 800; font-size: 1.5em; color: #fff; letter-spacing: -0.01em; }
.tv-title { flex: 1; font-size: 1.5em; color: #a9c1ec; font-weight: 500; }
.tv-clock { display: flex; align-items: center; gap: .6em; color: #c3d3f2; font-size: 1.1em; font-variant-numeric: tabular-nums; }
.tv-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2.2vh; padding-top: 2.4vh; }
.tv-wait { margin: auto; font-size: 2em; color: #a9c1ec; text-align: center; } .tv-wait.bad { color: #fca5a5; } .tv-wait small { font-size: .5em; color: #94a3b8; }
.tv-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 3vw; }
.tv-big { font-size: 5.4em; line-height: 1; font-weight: 800; color: #fff; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tv-sub { display: flex; flex-wrap: wrap; gap: .5em 1.4em; align-items: center; margin-top: .6em; font-size: 1.15em; color: #c3d3f2; font-variant-numeric: tabular-nums; }
.tv-pace { padding: .15em .7em; border-radius: 999px; font-weight: 700; } .tv-pace small { font-weight: 500; opacity: .8; }
.tv-pace.up { background: #134e3a; color: #6ee7b7; } .tv-pace.down { background: #5b1d1d; color: #fca5a5; }
.tv-warn { color: #fcd34d; font-weight: 600; }
.tv-fc { text-align: right; background: rgba(251,191,36,.10); border: 1px solid rgba(251,191,36,.35); border-radius: 14px; padding: .8em 1.2em; }
.tv-fc span { display: block; color: #fcd34d; font-size: .95em; } .tv-fc b { font-size: 2.2em; color: #fff; font-variant-numeric: tabular-nums; }
.tv-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14vw, 1fr)); gap: 1.2vw; }
.tv-tile { background: rgba(255,255,255,.06); border-radius: 14px; padding: 1em 1.2em; border-left: 6px solid #7fb2ff; }
.tv-tile.off { border-left-color: #ef4444; background: rgba(239,68,68,.10); }
.tv-tile .n { color: #a9c1ec; font-size: 1.05em; } .tv-tile .v { font-size: 2.2em; font-weight: 750; color: #fff; font-variant-numeric: tabular-nums; }
.tv-tile .p { margin-top: .3em; font-size: .9em; }
.tv-chart { position: relative; flex: 1; min-height: 22vh; }
.tv-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2vw; }
.tv-two { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 3vw; }
.tv-list h3 { margin: 0 0 .6em; font-size: 1.1em; color: #a9c1ec; font-weight: 600; }
.tv-list > div { display: grid; grid-template-columns: 1.6em minmax(0, 1fr) auto; gap: .8em; align-items: center; padding: .45em 0; border-bottom: 1px solid rgba(148,163,184,.15); font-size: 1.15em; font-variant-numeric: tabular-nums; }
.tv-list.big > div { font-size: 1.4em; }
.tv-list em { font-style: normal; color: #7fb2ff; font-weight: 700; } .tv-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-list small { color: #94a3b8; font-size: .7em; } .tv-list b { color: #fff; }
.tv-alerts { display: grid; gap: 1.2vh; }
.tv-alerts > div { display: flex; gap: 1em; align-items: baseline; padding: .8em 1.1em; border-radius: 12px; font-size: 1.5em; border-left: 8px solid; }
.tv-alerts .warn { background: rgba(245,158,11,.12); border-color: #f59e0b; } .tv-alerts .bad { background: rgba(239,68,68,.14); border-color: #ef4444; }
.tv-alerts b { color: #fff; min-width: 9em; }
.tv-foot { display: flex; align-items: center; gap: 1.2vw; padding-top: 1.4vh; }
.tv-dots { display: flex; gap: .5em; } .tv-dots i { width: .6em; height: .6em; border-radius: 50%; background: rgba(148,163,184,.35); } .tv-dots i.on { background: #7fb2ff; }
.tv-prog { flex: 1; height: 3px; background: rgba(148,163,184,.18); border-radius: 2px; overflow: hidden; } .tv-prog i { display: block; height: 100%; width: 0; background: #7fb2ff; }
.tv-ctl { position: fixed; bottom: 22px; right: 2.6vw; display: flex; gap: 12px; opacity: 0; transition: opacity .2s; font-size: 13px; }
.tv:hover .tv-ctl { opacity: 1; } .tv-ctl a { color: #a9c1ec; }
@media (max-width: 860px) { .tv-split, .tv-two { grid-template-columns: 1fr; } .tv-big { font-size: 3.4em; } .tv-hero { flex-wrap: wrap; } }

/* Barbar brand touches */
aside nav a.active { box-shadow: inset 3px 0 0 var(--accent); }
.tv-brand { display: flex; align-items: center; gap: .5em; } .tv-brand .tv-logo { height: 1.8em; width: 1.8em; }
.dhero { background: radial-gradient(120% 140% at 0% 0%, #10357a 0%, #0b2a5c 55%, #081f47 100%); position: relative; overflow: hidden; }
.dhero::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
/* print header with the logo; page numbers at the bottom of every page */
.print-head .ph-top { display: flex; align-items: center; gap: 10px; }
.print-head .ph-top .ph-logo { width: 38px; height: 38px; }
.print-head .ph-top > div { flex: 1; display: flex; flex-direction: column; }
.print-head .ph-b { font-size: 14px; color: #0a1f44; } .print-head .ph-when { text-align: right; font-size: 10px; color: #6b7280; }
.print-head .ph-f { margin-top: 4px; }
@page { @bottom-left { content: "Barbar · Head office · Confidential"; font-size: 8pt; color: #6b7280; }
        @bottom-right { content: "Page " counter(page) " of " counter(pages); font-size: 8pt; color: #6b7280; } }
@media print { .print-head { border-bottom: 2px solid #1349a0 !important; } }
aside .who a { color: #c3d3f2; }
.kpi { border-top: 3px solid var(--brand); }
.kpi .v { font-size: 21px; letter-spacing: -0.01em; }
/* target colour (set per tile as --tc): ring and edge follow the % of today's target */
.btile[style*="--tc"] { border-left-color: var(--tc) !important; }
.btile[style*="--tc"] .ring { --rc: var(--tc) !important; }

/* brand without a logo yet: initials in a circle */
.mono { display: inline-grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; letter-spacing: .02em; flex: none; }
aside .logo .mono { font-size: 17px; } .si-brand .mono { height: min(240px, 46vw); font-size: 72px; } .tv-brand .mono { font-size: .8em; }
.print-head .mono { font-size: 13px; }
@media (max-width: 760px) { .si-brand .mono { height: 120px; font-size: 40px; } }
.fin-h { font-size: 14px; margin: 14px 0 6px; color: var(--ink); }

/* Joe & The Juice report tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tabs a { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: #fff; font-size: 13px; }
.tabs a:hover { border-color: var(--brand); }
.tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (max-width: 860px) { .tabs { flex-wrap: nowrap; overflow-x: auto; } .tabs a { white-space: nowrap; } }
@media print { .tabs { display: none !important; } }

/* ---- reports menu: short sections that fold like an accordion ---- */
aside nav > a[data-p="reports"] + .subnav { margin: 2px 0 8px 8px; border-left: 1px solid #1f2937; padding-left: 4px; }
aside nav .subnav .ngroup { margin: 0; }
aside nav .subnav .nh { padding: 7px 10px; gap: 8px; font-size: 11.5px; letter-spacing: .5px; color: #8b93a1; border-radius: 6px; }
aside nav .subnav .nh:hover { background: rgba(255,255,255,.04); color: #e5e7eb; }
aside nav .subnav .ngroup.open > .nh { color: #fff; }
aside .nh .ncount { font-size: 10.5px; font-weight: 600; letter-spacing: 0; color: #6b7280; background: rgba(255,255,255,.06); border-radius: 999px; padding: 1px 7px; margin-left: auto; }
aside .nh .ncount + .chev { margin-left: 6px; }
aside nav .subnav .ngroup.lav > .nh span:first-child { color: #fff; letter-spacing: 1.2px; }
aside nav .subnav .ngroup.lav > .nh span:first-child::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
aside nav .subnav .nbody { margin: 0 0 4px 8px; padding-left: 6px; border-left: 2px solid rgba(255,255,255,.06); }
aside nav .subnav .ngroup.open > .nbody { border-left-color: var(--accent); }
aside nav .subnav .nbody a { padding: 5px 10px; font-size: 13px; }

/* ---- reports overview (#/reports) ---- */
.rsec { margin-bottom: 22px; }
.rsec-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 2px 10px; }
.rsec-h h2 { margin: 0; font-size: 16px; }
.rsec-h .muted { font-size: 12.5px; }
.rcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rcard { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.rcard b { font-size: 14px; color: var(--navy, #0a1f44); }
.rcard span { font-size: 12.5px; color: var(--muted, #6b7280); line-height: 1.4; }
.rcard:hover { border-color: var(--brand, #1349a0); box-shadow: 0 4px 14px rgba(0,0,0,.06); transform: translateY(-1px); }
.rsec.lav .rcard { border-left: 4px solid var(--accent); }
.rsec.lav .rsec-h h2::after { content: 'All brands'; margin-left: 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: #fff; background: var(--navy); padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }
@media (max-width: 860px) { aside nav .subnav .nh .ncount { display: none; } }
aside nav .subnav .nbody a.active { box-shadow: none; background: rgba(255,255,255,.08); color: #fff; font-weight: 600; border-radius: 6px; }
aside nav .subnav .nbody a.active::before { content: ''; }
aside nav .subnav .nbody a:hover { color: #e5e7eb; }
@media (max-width: 860px) {   /* phone: one "Sales reports" button (opens the overview) instead of 17 report buttons */
  aside nav > a[data-p="reports"] { display: inline-block !important; }
  aside nav > a[data-p="reports"] + .subnav { display: none !important; }
}

/* ---- open tickets ---- */
.ot-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 16px; }
.ot-tabs { display: inline-flex; background: #eef0f3; border-radius: 999px; padding: 3px; }
.ot-tab { all: unset; cursor: pointer; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ot-tab.active { background: var(--panel); color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ot-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-right: 6px; }
#otx { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.age { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.age.ok { background: #e7f6ec; color: #17803d; } .age.warn { background: #fff4d6; color: #a15c00; } .age.bad { background: #fde8e8; color: #c81e1e; }
.otf { display: inline-block; margin: 1px 4px 1px 0; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; background: #eef0f3; color: #4b5563; white-space: nowrap; }
.otf.warn { background: #fff4d6; color: #a15c00; } .otf.bad { background: #fde8e8; color: #c81e1e; }
.kpi.k-warn { border-top-color: #f59e0b; } .kpi.k-bad { border-top-color: #dc2626; } .kpi.k-bad .v { color: #c81e1e; }
.ot-stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ot-store { display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid #16a34a; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.ot-store.late { border-left-color: #f59e0b; } .ot-store.off { border-left-color: #9ca3af; opacity: .8; }
.ot-store span { font-variant-numeric: tabular-nums; } .ot-store .muted { font-size: 12px; }

/* ---- outlets & opening hours ---- */
.ol-all { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; padding: 10px 12px; background: var(--brand-soft); border-radius: 10px; }
table.ol input[type=time] { width: 132px; } table.ol input.on { width: 100%; min-width: 160px; }
table.ol tr.off td { opacity: .55; }
table.ol td { vertical-align: middle; }
.mono-c { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted); }
.tag.hrs { background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 500; margin-left: 6px; }
.rv-m { display: inline-flex; align-items: center; gap: 6px; margin: 4px 10px 4px 0; padding: 4px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.cp-bar { height: 10px; background: #eef0f3; border-radius: 999px; overflow: hidden; } .cp-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

/* ---- Lavoya dashboard ---- */
.lv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 16px 0; }
.lv-card .lv-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lv-card h2 { margin: 0 0 6px; }
.lv-card .big { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lv-card .lv-row { margin: 4px 0 10px; font-size: 13px; }
.lv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lv-grid div { background: var(--bg); border-radius: 8px; padding: 8px 10px; } .lv-grid span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.lv-grid b { font-size: 15px; font-variant-numeric: tabular-nums; }
.lv-links { margin-top: 12px; text-align: right; }
/* group (Lavoya) wordmark instead of a round logo */
aside .logo .lg.wide { width: auto; height: 34px; max-width: 150px; border-radius: 0; object-fit: contain; }
.si-brand .si-logo.wide { width: min(280px, 60vw); border-radius: 0; filter: none; }
.lv-logo { width: 32px; height: 32px; border-radius: 50%; vertical-align: middle; margin-right: 8px; object-fit: cover; }
.lv-card .lv-top h2 { display: flex; align-items: center; }
@media (max-width: 860px) { aside .logo .lg.wide { height: 26px; } }
.lv-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 16px; margin-bottom: 14px; font-size: 13px; }
.lv-jb { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.lv-jb a { color: var(--brand); text-decoration: none; font-weight: 600; } .lv-jb a:hover { text-decoration: underline; }

/* live dashboard: today per country in its own currency (small line under the totals) */
.dh-cty { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12.5px; color: #dbe4f5; }
.dh-cty span { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dh-cty em { font-style: normal; opacity: .7; margin-right: 2px; }
.dh-cty b { color: #fff; font-weight: 600; }

/* ---- KPI colour key (top right of dashboards and reports) and arrows ---- */
:root { --kpi-g: #16a34a; --kpi-y: #eab308; --kpi-o: #f97316; --kpi-r: #dc2626; --kpi-b: #2563eb; --kpi-p: #7c3aed; --kpi-n: #94a3b8; }
.kar { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kar.up { color: var(--kpi-g); } .kar.down { color: var(--kpi-r); } .kar.flat { color: var(--kpi-n); }
.dpill.kar, .tv-pace.kar { padding: 3px 10px; border-radius: 999px; }
.dpill.kar.up, .tv-pace.kar.up { background: #134e3a; color: #6ee7b7; } .dpill.kar.down, .tv-pace.kar.down { background: #5b1d1d; color: #fca5a5; }
.dpill.kar.flat, .tv-pace.kar.flat { background: #334155; color: #e2e8f0; }
#kpiLeg { position: relative; }
.kleg summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 3px; padding: 5px 9px; border: 1px solid #d6dde8; border-radius: 999px;
  background: #fff; font-size: 12px; color: #334155; user-select: none; }
.kleg summary::-webkit-details-marker { display: none; }
.kleg summary span { margin-left: 4px; }
.kd { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.kd.g { background: var(--kpi-g); } .kd.y { background: var(--kpi-y); } .kd.o { background: var(--kpi-o); } .kd.r { background: var(--kpi-r); } .kd.b { background: var(--kpi-b); } .kd.p { background: var(--kpi-p); }
.kleg-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: min(380px, calc(100vw - 32px)); background: #fff; border: 1px solid #d6dde8;
  border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .16); padding: 12px 14px; font-size: 12.5px; color: #334155; }
.kleg-pop ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 7px; }
.kleg-pop li { display: grid; grid-template-columns: 12px 82px 1fr; gap: 8px; align-items: baseline; }
.kleg-pop li .kd { transform: translateY(1px); }
.kleg-pop p { margin: 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.dchip { font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; letter-spacing: .02em; white-space: nowrap; }
.dchip.dc-live { background: #e0eaff; color: var(--kpi-b); } .dchip.dc-final { background: #efe7ff; color: var(--kpi-p); }
@media print { #kpiLeg .kleg-pop { display: none; } }
@media (max-width: 700px) { .kleg-pop { left: 0; right: auto; } }

/* ---- Today (live) | Yesterday (final) split: hero and branch tiles ---- */
.dh-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.dh-half { min-width: 0; padding: 2px 22px 4px; }
.dh-half:first-child { padding-left: 0; }
.dh-half:last-child { padding-right: 0; }
.dh-yday { border-left: 1px solid rgba(255,255,255,.18); }
.dh-yday .dh-v { color: #e9ddff; }
.dh-yday .dh-l { color: #d8c9ff; }
.ydot { width: 9px; height: 9px; border-radius: 50%; background: #a78bfa; display: inline-block; }
.dh-badge { margin-left: auto; font-size: 12px; color: #c3d3f2; display: inline-flex; align-items: center; gap: 6px; }
.dh-l { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dh-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.dh-mini .dh-m b { font-size: 20px; }
.mbar.y > i { background: #a78bfa !important; }
.dh-yday .dh-m { background: rgba(167,139,250,.10); }
@media (max-width: 900px) {
  .dh-split { grid-template-columns: 1fr; }
  .dh-half { padding: 0; }
  .dh-yday { border-left: 0; border-top: 1px solid rgba(255,255,255,.18); margin-top: 14px; padding-top: 14px; }
}
.bstrip:has(.btile.split) { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.btile.split { padding: 10px 12px 12px; }
.btile.split .bt-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.btile.split .bt-h .n { font-size: 13px; font-weight: 650; color: #1f2937; }
.btile.split .vsy { font-size: 12px; white-space: nowrap; } .btile.split .vsy small { color: #64748b; }
.btile.split .bt-cols { display: grid; grid-template-columns: 1fr 1fr; }
.btile.split .bt-t { padding-right: 10px; min-width: 0; }
.btile.split .bt-y { padding-left: 10px; border-left: 1px solid #e5e7eb; min-width: 0; }
.btile.split .bt-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.btile.split .bt-t .bt-k { color: var(--kpi-b); } .btile.split .bt-y .bt-k { color: var(--kpi-p); }
.btile.split .a { font-size: 20px; padding-right: 0 !important; }
.btile.split .bt-y .a { color: #4c3a75; }
.btile.split .p.warnt { color: #b45309; }
.btile.split .bt-yk { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.yring { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--rc, #94a3b8) calc(var(--p, 0) * 1%), #e5e7eb 0); }
.yring span { width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.yring.none { background: #e5e7eb; } .yring.none span { color: #94a3b8; }
.ystat { display: inline-block; margin-top: 2px; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; color: #fff; }
.ystat.k-g { background: var(--kpi-g); } .ystat.k-y { background: var(--kpi-y); } .ystat.k-o { background: var(--kpi-o); } .ystat.k-r { background: var(--kpi-r); }
@media (max-width: 860px) { .bstrip:has(.btile.split) { grid-template-columns: 1fr; } }
.lv-split { display: grid; grid-template-columns: 1fr 1fr; margin-top: 4px; }
.lv-split .lv-t { padding-right: 12px; min-width: 0; }
.lv-split .lv-y { padding-left: 12px; border-left: 1px solid #e5e7eb; min-width: 0; }
.lv-split .bt-k { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-bottom: 2px; }
.lv-split .lv-t .bt-k { color: var(--kpi-b); } .lv-split .lv-y .bt-k { color: var(--kpi-p); }
.lv-split .big { font-size: 22px; } .lv-split .lv-y .big { color: #4c3a75; }
.lv-split .lv-grid { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); }
.lv-split .bt-yk { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.lv-card .vsy { font-size: 12.5px; white-space: nowrap; }
.lv-cards:has(.lv-split) { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
@media (max-width: 480px) { .lv-cards:has(.lv-split) { grid-template-columns: 1fr; } .lv-split .big { font-size: 18px; } }

/* Sign in with Microsoft */
.si-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--muted); font-size: 12px; }
.si-or::before, .si-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn.ms { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1d2230; border: 1px solid #8c8c8c; font-weight: 600; }
.btn.ms:hover { background: #f3f3f3; }
/* LPO: PDF / quotation viewer, approver preview */
.modal.wide { width: min(1100px, 96vw); max-width: 96vw; padding: 12px; }
.lpov-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.lpov-h .spacer { flex: 1; }
.lpov-b { height: min(78vh, 900px); border: 1px solid var(--line); border-radius: 8px; overflow: auto; background: #f7f7f8; }
.lpov-b iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.lpov-b img { max-width: 100%; display: block; margin: 0 auto; }
.lpo-prev { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0; font-size: 13px; }
.lp-l { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.lp-l:last-child { border-bottom: 0; }
.lp-l .spacer { flex: 1; }
.lp-l.skip { opacity: .55; }
@media (max-width: 700px) { .lpov-b { height: 70vh; } }
/* LPO phase 3: PO page (document + approval timeline), signing pad */
.lpo-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; }
.lpo-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lpo-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.lpo-doc .tabs { margin-bottom: 8px; }
.tl { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.tl:last-of-type { border-bottom: 0; }
.tl-l { flex: 0 0 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; background: #eef0f4; color: var(--muted); }
.tl-b { flex: 1; min-width: 0; font-size: 13px; }
.tl-s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tl-c { margin-top: 4px; padding: 6px 8px; background: #f6f7f9; border-radius: 6px; font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-sig { display: block; max-width: 180px; max-height: 64px; margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.tl.cur { background: #fff8e6; margin: 0 -10px; padding: 9px 10px; border-radius: 8px; }
.tl.cur .tl-l { background: #f5b301; color: #fff; }
.tl.st-approved .tl-l { background: #16a34a; color: #fff; }
.tl.st-rejected .tl-l { background: #c81e1e; color: #fff; }
.tl.st-returned .tl-l { background: #ea7a0c; color: #fff; }
.tl.dim { opacity: .55; }
.sigpad { position: relative; height: 170px; border: 1.5px dashed #9aa3b2; border-radius: 10px; background: #fcfcfd; touch-action: none; user-select: none; -webkit-user-select: none; }
.sigpad canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.sigline { position: absolute; left: 16px; right: 16px; bottom: 34px; border-bottom: 1px solid #c9ced8; font-size: 11px; color: #9aa3b2; padding-bottom: 2px; pointer-events: none; }
.sigbar { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; font-size: 12.5px; }
.sigbar .spacer { flex: 1; }
.sigbar .ok { color: #16a34a; font-weight: 600; }
@media (max-width: 860px) {
  .lpo-grid { grid-template-columns: 1fr; }
  .lpo-doc .lpov-b { height: 60vh; }
  /* approvers on a phone: the decision buttons stay at the bottom of the screen */
  .lpo-acts:not(:empty) { position: sticky; bottom: 0; z-index: 5; background: var(--panel); padding: 10px 0; width: 100%; box-shadow: 0 -6px 12px rgba(0,0,0,.06); }
  .lpo-acts .btn { flex: 1; }
  .sigpad { height: 150px; }
}

/* ---- Renewals ---- */
aside nav a .ncount.alert { display: inline-block; min-width: 18px; text-align: center; font-size: 11px; font-weight: 700; color: #fff; background: #dc2626; border-radius: 999px; padding: 0 6px; margin-left: 6px; line-height: 18px; }
.ren-banner { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ren-banner a:not(.btn) { font-weight: 600; }
.kpi.ren-k.on { outline: 2px solid var(--brand); }
.modal.ren-modal { width: min(820px, 96vw); }
.ren-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.ren-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 12px 0; }
.ren-grid > div span { display: block; font-size: 11.5px; }
.ren-grid > div b { font-weight: 600; word-break: break-word; }
.ren-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.ren-file { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line, #eee); flex-wrap: wrap; }
.ren-hist > div { padding: 6px 0; border-bottom: 1px solid var(--line, #eee); font-size: 13px; }
.ren-ty { padding: 8px 0; border-bottom: 1px solid var(--line, #eee); }
@media (max-width: 700px) { .ren-form { grid-template-columns: 1fr; } .ren-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rc-bud { margin-left: auto; }
@media (max-width: 700px) { .rc-bud { margin-left: 0; } }
.pause-note { position: sticky; top: 0; z-index: 30; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fff7ed; color: #9a3412; font-size: 13px; border: 1px solid #fed7aa; }

/* ---- Sales charts / Group sales overview ---- */
.sc-f .sc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.sc-f .sc-row:last-child { margin-bottom: 0; }
.sc-d { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.seg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.sc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--line, #e5e7eb); border-radius: 999px; font-size: 13px; background: var(--panel, #fff); }
.sc-chip i, .sc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.sc-chip a { text-decoration: none; color: var(--muted); font-weight: 700; }
.sc-sel { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.sc-c { position: relative; height: 330px; }
.sc-pick { position: relative; min-width: 260px; }
.sc-pick input { width: 100%; }
.sc-list { position: absolute; right: 0; left: 0; top: 100%; z-index: 20; max-height: 300px; overflow: auto; background: var(--panel, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 8px; box-shadow: var(--shadow); padding: 4px; }
.sc-list label { display: block; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.sc-list label:hover { background: var(--bg, #f3f4f6); }
@media (max-width: 700px) { .sc-c { height: 260px; } .sc-pick { min-width: 100%; } }
.sc-heat table { font-size: 12.5px; }
.sc-heat td.sc-hc { font-variant-numeric: tabular-nums; }
.sc-heat .sc-sticky { position: sticky; left: 0; background: var(--panel, #fff); z-index: 1; white-space: nowrap; }
.sc-heat tr.sc-brand td { background: var(--bg, #f6f7f9); }
.sc-heat tr.sc-brand td.sc-sticky { background: var(--bg, #f6f7f9); }
.sc-heat { max-height: 72vh; overflow: auto; }
.sc-heat thead th { position: sticky; top: 0; z-index: 2; background: var(--panel, #fff); }
.sc-heat thead th.sc-sticky { z-index: 3; }

/* ---- welcome screen after sign-in: brand logos circling the group logo ---- */
.lv-welcome { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #13306a 0%, #0a1f44 60%, #071530 100%); color: #fff; transition: opacity .45s ease; cursor: pointer; }
.lv-welcome.out { opacity: 0; pointer-events: none; }
.lv-welcome .lvw-in { text-align: center; animation: lvw-up .6s ease both; padding: 0 16px; }
.lv-welcome h1 { font-size: clamp(22px, 4vw, 34px); margin: 0 0 4px; letter-spacing: .2px; }
.lv-welcome .muted { color: rgba(255,255,255,.65); margin: 0 0 26px; min-height: 1em; }
.lv-welcome .lvw-by { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 12px; color: rgba(255,255,255,.55); letter-spacing: .3px; }
@keyframes lvw-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.lv-orbit { position: relative; width: 120px; height: 120px; margin: 0 auto; --r: 50px; --s: 30px; }
.lv-orbit.big { width: 230px; height: 230px; --r: 92px; --s: 54px; }
.lv-orbit .lv-c { position: absolute; left: 50%; top: 50%; width: calc(var(--s) * 1.25); height: calc(var(--s) * 1.25); margin: calc(var(--s) * -.625) 0 0 calc(var(--s) * -.625);
  border-radius: 50%; object-fit: contain; animation: lv-pulse 2.4s ease-in-out infinite; }
.lv-orbit .lv-ring { position: absolute; inset: 0; animation: lv-spin 7s linear infinite; }
.lv-orbit .lv-ring span { position: absolute; left: 50%; top: 50%; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1)); }
.lv-orbit .lv-ring img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.25);
  animation: lv-spin 7s linear infinite reverse; }
@keyframes lv-spin { to { transform: rotate(360deg); } }
@keyframes lv-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
/* every "Loading…" box: big, in the middle of the page - the brand logos turning around the Lavoya logo */
.empty.loading { position: relative; min-height: 58vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  font-size: 15px; color: var(--muted, #6b7280); }
.empty.loading::before { content: ''; display: block; width: 150px; height: 150px; margin: 0;
  background: url(brand/brands/barbar.png) top center / 44px no-repeat, url(brand/brands/joe.png) right center / 44px no-repeat,
    url(brand/brands/dhc.png) bottom center / 44px no-repeat, url(brand/brands/emsherif.png) left center / 44px no-repeat;
  animation: lv-spin 3s linear infinite; }
/* the Lavoya logo in the middle of the turning circle (circle 150 px + 14 px gap + text: its centre is 17 px above the box's centre) */
.empty.loading::after { content: ''; position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -43px 0 0 -26px;
  background: url(brand/group-icon.png) center / contain no-repeat; border-radius: 50%; animation: lv-pulse 2.4s ease-in-out infinite; }
/* small places (a pop-up, a box inside a card): smaller, no full-page height */
.modal .empty.loading, .card .card .empty.loading, td .empty.loading { min-height: 180px; }
.modal .empty.loading::before { width: 110px; height: 110px; background-size: 32px, 32px, 32px, 32px; }
.modal .empty.loading::after { width: 40px; height: 40px; margin: -37px 0 0 -20px; }
@media (prefers-reduced-motion: reduce) { .lv-orbit .lv-ring, .lv-orbit .lv-ring img, .lv-orbit .lv-c, .empty.loading::before, .empty.loading::after { animation: none; } }

/* welcome: the brands orbit the Lavoya logo like planets around the sun (each its own orbit, speed and start) */
.lv-welcome h1 { margin-bottom: 30px; }
.lv-system { position: relative; width: min(86vw, calc((78px + (var(--n) - 1) * 34px) * 2 + 70px)); aspect-ratio: 1; margin: 0 auto; }
.lv-system .lv-sun { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; object-fit: contain;
  box-shadow: 0 0 40px 8px rgba(255, 201, 40, .35); animation: lv-pulse 3s ease-in-out infinite; z-index: 2; }
.lv-system .lvp-orbit { position: absolute; left: 50%; top: 50%; width: calc(var(--r) * 2); height: calc(var(--r) * 2); margin: calc(var(--r) * -1) 0 0 calc(var(--r) * -1);
  border: 1px dashed rgba(255, 255, 255, .18); border-radius: 50%; }
.lv-system .lvp-arm { position: absolute; inset: 0; transform: rotate(var(--a)); animation: lvp-spin var(--t) linear infinite; }
.lv-system .lvp-arm span { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; transform: translateY(calc(var(--r) * -1)); }
.lv-system .lvp-arm img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.35);
  transform: rotate(calc(var(--a) * -1)); animation: lvp-upright var(--t) linear infinite; }
@keyframes lvp-spin { from { transform: rotate(var(--a)); } to { transform: rotate(calc(var(--a) + 360deg)); } }
@keyframes lvp-upright { from { transform: rotate(calc(var(--a) * -1)); } to { transform: rotate(calc(var(--a) * -1 - 360deg)); } }
@media (max-width: 520px) { .lv-system .lvp-arm span { width: 40px; height: 40px; margin: -20px 0 0 -20px; } .lv-system .lv-sun { width: 64px; height: 64px; margin: -32px 0 0 -32px; } }
@media (prefers-reduced-motion: reduce) { .lv-system .lvp-arm, .lv-system .lvp-arm img, .lv-system .lv-sun { animation: none; } }

/* welcome v3: faded map of the countries with stores behind the orbit; the logos circle across it (3 seconds) */
.lv-welcome { overflow: hidden; background: radial-gradient(ellipse at 50% 50%, #0f2d63 0%, #071733 72%); }
.lv-welcome .lvw-in { position: relative; z-index: 1; }
.lv-welcome .lvm { position: absolute; width: 100vw; max-width: 1500px; left: 50%; top: 50%; transform: translate(-56%, -46%); opacity: .6; pointer-events: none; }
.lvm .lvm-l { fill: rgba(143,184,255,.06); stroke: rgba(143,184,255,.35); stroke-width: 1.2; stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: lvm-draw var(--draw, 1.4s) ease forwards; }
.lvm .lvm-l.u { fill: rgba(245,196,0,.08); stroke: rgba(245,196,0,.55); }
.lvm .lvm-t { fill: rgba(220,230,255,.16); font-size: 30px; font-weight: 700; letter-spacing: 8px; }
.lvm .lvm-c { opacity: 0; animation: lvm-pop .5s ease forwards; } .lvm .lvm-c circle { fill: #f5c400; } .lvm .lvm-c.off circle { fill: #9fb3d9; }
.lvm .lvm-c text { fill: rgba(220,230,255,.55); font-size: 11px; }
.lvm .lvm-ring { fill: none !important; stroke: #f5c400; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: lvm-pulse 1.6s ease-out infinite; }
.lv-welcome .lv-system.wide { width: min(96vw, 720px); margin: -150px auto -150px; }
.lv-welcome .lvw-sub { margin-top: 18px; color: #cbd5e1; font-size: 14px; } .lv-welcome .lvw-sub b { color: #f5c400; }
@keyframes lvm-draw { to { stroke-dashoffset: 0; } } @keyframes lvm-pop { to { opacity: 1; } }
@keyframes lvm-pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(4.5); opacity: 0; } }
@media (max-width: 700px) { .lv-welcome .lvm { width: 180vw; } .lv-welcome .lv-system.wide { margin: -60px auto; } }
@media (prefers-reduced-motion: reduce) { .lvm .lvm-l, .lvm .lvm-c, .lvm .lvm-ring { animation: none; opacity: 1; stroke-dashoffset: 0; } }
/* v308: Daily sales legend with the brand logos */
.sc-lgs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 10px; }
.sc-lg { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border: 1px solid var(--line, #e5e7eb); border-radius: 999px; background: var(--panel, #fff); color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.sc-lg img { width: 30px; height: 30px; border-radius: 50%; object-fit: contain; background: #fff; }
.sc-lg i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sc-lg.off { opacity: .4; text-decoration: line-through; }
/* v309: outlet network profile */
.as-g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .as-g3 { grid-template-columns: 1fr; } .as-g3 > * { grid-column: auto !important; } }
.as-box { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 12px; background: var(--panel, #fff); }
.as-phs { display: flex; flex-wrap: wrap; gap: 8px; }
.as-ph { margin: 0; width: 140px; }
.as-ph img { width: 140px; height: 100px; object-fit: cover; border-radius: 8px; background: #e5e7eb; cursor: zoom-in; display: block; }
.as-ph figcaption { font-size: 11.5px; display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-top: 3px; }
