/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: var(--fs-md); color: var(--ink); background: var(--paper-2); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-size: var(--fs-xl); font-weight: 700; color: var(--navy); }
h2 { font-size: var(--fs-lg); font-weight: 600; color: var(--navy); }
h3 { font-size: var(--fs-md); font-weight: 700; }
p { margin: 0 0 10px; }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.mono { font-family: var(--font-mono); font-size: 0.92em; line-height: 1.63; }  /* same line height as the text around it, so it shares the baseline */
input[type="checkbox"], input[type="radio"] { accent-color: var(--navy); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.boot { padding: 60px; text-align: center; color: var(--ink-3); }
[hidden] { display: none !important; }
.eyebrow { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); margin-bottom: 4px; }

/* ===== Top bar ===== */
.topbar { height: var(--topbar-h); background: var(--navy); color: #fff; display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 0 var(--gutter); gap: 20px; position: sticky; top: 0; z-index: 20; }
.topbar .tb-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.topbar .tb-right { display: flex; align-items: center; gap: 20px; justify-content: flex-end; min-width: 0; }
.topbar .hydra-logo { display: flex; align-items: center; flex: none; }
.topbar .hydra-logo img { height: 26px; width: auto; display: block; transform: translateY(1px); }
.topbar .logo { height: 40px; width: 124px; background: var(--logo-on-dark) center / contain no-repeat; flex: none; justify-self: center; align-self: center; margin: 0; transform: translateY(-8px); }  /* the star sits above the letters: lift so the letters share the Hydra baseline */
.topbar a { color: #fff; }
.topbar a:hover { text-decoration: none; }
.topbar .wordmark { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.topbar .wordmark .w1 { font-weight: 700; font-size: 19px; }
.topbar .wordmark .w2 { font-weight: 500; font-size: var(--fs-sm); opacity: 0.85; }
.topbar .wordmark .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); display: inline-block; margin: 0 2px 2px; }
.topbar .spacer { flex: 1; }
.topbar .region-switch { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.topbar select {
  -webkit-appearance: none; appearance: none;
  height: 36px; line-height: 36px; padding: 0 32px 0 12px; margin: 0;
  background-color: rgba(255,255,255,0.1); color: #fff;
  border: 1px solid rgba(255,255,255,0.35); border-radius: 8px;
  font: inherit; font-size: var(--fs-sm); font-weight: 600;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
  cursor: pointer;
}
.topbar select:focus { outline: 2px solid rgba(255,255,255,0.5); outline-offset: 1px; }
.topbar select option { color: var(--ink); background: #fff; font-weight: 500; }
.topbar .btn-ghost { height: 36px; }
.topbar .user { font-size: var(--fs-sm); opacity: 0.9; white-space: nowrap; }
.topbar .btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.topbar .btn-ghost:hover { background: rgba(255,255,255,0.12); }
.has-logo .topbar .wordmark .w1, .has-logo .topbar .wordmark .dot { display: none; }
.has-logo .topbar .wordmark .w2 { font-weight: 600; font-size: var(--fs-md); opacity: 1; border-left: 1px solid rgba(255,255,255,0.35); padding-left: 16px; }
body:not(.has-logo) .topbar .logo { display: none; }

/* ===== Module nav ===== */
.modnav { background: var(--paper); border-bottom: 1px solid var(--line); }
.modnav .inner { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter); display: flex; gap: 6px; overflow-x: auto; }
.modnav a { display: inline-block; padding: 14px 14px 12px; color: var(--ink-2); font-weight: 600; font-size: var(--fs-sm); border-bottom: 3px solid transparent; white-space: nowrap; }
.modnav a:hover { color: var(--navy); text-decoration: none; }
.modnav a.active { color: var(--navy); border-bottom-color: var(--navy); }

/* ===== Page ===== */
.page { max-width: var(--content-max); margin: 0 auto; padding: 28px var(--gutter) 64px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-3); margin-top: 4px; font-size: var(--fs-sm); max-width: 70ch; }
.page-head .actions select { font: inherit; font-size: var(--fs-sm); font-weight: 600; padding: 9px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.crumbs { font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: 10px; }
.crumbs a { color: var(--ink-3); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
section.block { margin-top: 32px; }
section.block > h2 { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
section.block > .page-head { margin-bottom: 12px; align-items: center; }
.name-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
h1 .badge { margin-left: 8px; vertical-align: middle; }

/* ===== Cards ===== */
.card { background: var(--paper); border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.card .card-head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card .card-body { padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

/* ===== Stat tiles ===== */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
/* Label / value / hint rows are shared across a row of tiles, so a label that wraps in one language
   doesn't push that tile's number out of line with its neighbours */
.tile { background: var(--paper); border: 0; border-radius: var(--radius); padding: 14px 16px 14px 18px; position: relative; overflow: hidden; box-shadow: var(--shadow); display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; align-content: start; }
.tile .label { align-self: start; }
.tile .value { align-self: end; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--navy); }
.tile.accent::before { background: var(--red); }
.tile .label { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; }
.tile .value { font-size: var(--fs-xxl); font-weight: 700; margin-top: 2px; line-height: 1.05; color: var(--navy); }
.tile .hint { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 4px; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); background: var(--paper); }
table.data th { text-align: left; font-weight: 600; color: var(--navy); font-size: var(--fs-sm); padding: 12px 14px; border-bottom: 2px solid var(--navy-soft); background: var(--paper); white-space: nowrap; }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--navy-tint); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; line-height: 1.7; white-space: nowrap; background: var(--muted-soft); color: var(--ink); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.badge.ok { background: var(--ok-soft); } .badge.ok::before { background: var(--fir); }
.badge.warn { background: var(--warn-soft); } .badge.warn::before { background: var(--bronze); }
.badge.bad { background: var(--bad-soft); } .badge.bad::before { background: var(--red); }
.badge.info { background: var(--info-soft); } .badge.info::before { background: var(--sky); }
.badge.brand { background: var(--navy-soft); color: var(--navy); } .badge.brand::before { background: var(--navy); }
.badge.accent { background: var(--bad-soft); } .badge.accent::before { background: var(--red); }
.badge.solid { background: var(--navy); color: #fff; } .badge.solid::before { background: #fff; }

/* ===== Buttons and forms ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--navy); background: var(--paper); color: var(--navy); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s; }
.btn:hover { background: var(--navy-soft); text-decoration: none; }
.btn.primary, .btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover, .btn.navy:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.btn.quiet { border-color: var(--line-strong); color: var(--ink-2); }
.btn.quiet:hover { background: var(--paper-3); }
.btn.sm { padding: 5px 12px; font-size: var(--fs-xs); }
.btn:disabled { opacity: 0.55; cursor: default; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea { font: inherit; font-size: var(--fs-md); padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--navy-soft); border-color: var(--navy); }
.field textarea { min-height: 84px; resize: vertical; }
.field .help { font-size: var(--fs-xs); color: var(--ink-3); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; }
.field.check { flex-direction: row; align-items: center; gap: 10px; }
.field.check input { width: 18px; height: 18px; padding: 0; margin: 0; accent-color: var(--navy); }
.field.check label { font-weight: 600; color: var(--ink); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input, .toolbar select { font: inherit; font-size: var(--fs-sm); padding: 8px 11px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); }
.toolbar .grow { flex: 1; min-width: 200px; }
.error { color: var(--ink); font-size: var(--fs-sm); padding-left: 10px; border-left: 3px solid var(--red); }
.notice { background: var(--navy-soft); color: var(--navy); border-radius: var(--radius); padding: 10px 14px; font-size: var(--fs-sm); margin-bottom: 14px; border-left: 4px solid var(--navy); }
.notice.warn { background: var(--bronze-light); color: var(--ink); border-left-color: var(--bronze); }
.notice.accent { background: var(--bad-soft); color: var(--ink); border-left-color: var(--red); }
.empty { padding: 40px 24px; text-align: center; color: var(--ink-3); }

/* ===== Modal ===== */
.modal-back { position: fixed; inset: 0; background: rgba(0, 17, 77, 0.5); display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; z-index: 50; overflow-y: auto; }
.modal { background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 580px; }
.modal .card-body { padding: 22px; }
.modal .modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); align-items: center; }
.modal .modal-foot .error { margin-right: auto; }

/* ===== Toast ===== */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: var(--radius); font-size: var(--fs-sm); font-weight: 600; z-index: 60; box-shadow: var(--shadow-lg); }
.toast.bad { background: var(--ink); border-left: 4px solid var(--red); }

/* ===== Login ===== */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--paper); }
.login-side { background: var(--sodexo-blue); color: #fff; padding: 44px 0 44px 56px; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; overflow: hidden; }
.login-side .logo { height: 40px; width: 124px; background: var(--logo-on-dark) left center / contain no-repeat; }
body:not(.has-logo) .login-side .logo { display: none; }
.login-side .block { background: var(--white); color: var(--ink); margin-left: -56px; padding: 44px 48px 40px 56px; width: min(560px, 92%); border-radius: 0 32px 32px 0; }
.login-side .big { font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--navy); max-width: 14ch; }
.login-side .tiles-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 34px; max-width: 440px; }
.login-side .mini { background: var(--blue-light); border-radius: 14px; padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.login-side .mini .ico { width: 30px; height: 30px; color: var(--navy); }
.login-side .mini .ico svg { width: 100%; height: 100%; display: block; }
.login-side .mini .lbl { font-size: var(--fs-xs); font-weight: 600; color: var(--ink); }
.login-main { display: grid; place-items: center; padding: 40px 24px; }
.login { width: 100%; max-width: 380px; }
.login .logo { display: none; }
.login h1 { font-size: var(--fs-xl); margin-bottom: 6px; }
.login .sub { color: var(--ink-3); font-size: var(--fs-sm); margin-bottom: 24px; }
.login .btn { width: 100%; justify-content: center; padding: 12px; font-size: var(--fs-md); }
.login .links { margin-top: 16px; font-size: var(--fs-sm); }
.login .foot { margin-top: 28px; font-size: var(--fs-xs); color: var(--ink-3); }
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { min-height: 0; padding: 24px 0 28px 24px; gap: 22px; }
  .login-side .logo { height: 34px; width: 106px; }
  .login-side .block { margin-left: -24px; padding: 26px 24px 24px 24px; width: 88%; border-radius: 0 22px 22px 0; }
  .login-side .big { font-size: 28px; }
  .login-side .tiles-row { display: none; }
  .login-main { padding: 28px 24px 40px; }
}

/* ===== Demo banner ===== */
.demo-banner { background: var(--bronze-light); color: var(--ink); text-align: center; font-size: var(--fs-xs); font-weight: 600; padding: 5px; }

/* ===== Site header strip ===== */
.site-strip { display: flex; gap: 28px; flex-wrap: wrap; padding: 16px 20px; }
.site-strip .kv { min-width: 110px; }
.site-strip .kv .k { font-size: var(--fs-sm); color: var(--ink-3); font-weight: 600; }
.site-strip .kv .v { font-weight: 600; margin-top: 2px; color: var(--navy); }

/* ===== Fixture portal ===== */
.fridge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.fridge { background: var(--paper); border: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.fridge .photo { aspect-ratio: 4 / 3; background: var(--navy-tint); display: grid; place-items: center; color: var(--ink-3); font-size: var(--fs-sm); position: relative; }
.fridge .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fridge .photo .ph { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fridge .photo .ph svg { width: 36px; height: 36px; opacity: 0.45; }
.fridge .photo .num { position: absolute; top: 10px; left: 10px; background: var(--navy); color: #fff; font-weight: 700; font-size: var(--fs-xs); padding: 3px 9px; border-radius: 999px; }
.fridge .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.fridge .label { font-weight: 600; color: var(--navy); font-size: var(--fs-md); }
.fridge .meta { font-size: var(--fs-sm); color: var(--ink-2); }
.fridge .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; gap: 8px; flex-wrap: wrap; }
.fridge.removed { opacity: 0.55; }

/* ===== Calendar ===== */
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); gap: 10px; }
.cal-head .month { font-size: var(--fs-lg); font-weight: 700; min-width: 190px; text-align: center; color: var(--navy); }
.cal-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cal-grid .dow { padding: 9px 10px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--line); background: var(--paper-2); }
.cal-cell { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; cursor: pointer; position: relative; transition: background .1s; }
.cal-cell:hover { background: var(--navy-tint); }
.cal-cell:nth-child(5n) { border-right: 0; }
.cal-cell.blank { background: var(--paper-2); cursor: default; }
.cal-cell.blank:hover { background: var(--paper-2); }
.weekend-note { padding: 8px 18px 0; }
.weekend-note:empty { display: none; }
.cal-cell.today .day { box-shadow: inset 0 0 0 2px var(--red); }
.cal-cell.selected { background: var(--navy-soft); }
.cal-cell.selected .day { background: var(--navy); color: #fff; box-shadow: none; }
.cal-cell .day { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; margin-bottom: 4px; }
.cal-cell .chip { display: flex; align-items: center; gap: 4px; font-size: 11px; line-height: 1.35; padding: 3px 7px; border-radius: 6px; margin-bottom: 3px; background: var(--navy); color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-cell .chip span { overflow: hidden; text-overflow: ellipsis; }
.cal-cell .chip.completed { background: var(--fir-light); color: var(--ink); box-shadow: inset 0 0 0 1px var(--fir-mid); }
.cal-cell .chip.cancelled { background: var(--muted-soft); color: var(--ink-3); text-decoration: line-through; }
.cal-cell .chip.flagged { box-shadow: inset 4px 0 0 var(--red); padding-left: 9px; }
.cal-cell .chip .doc { width: 10px; height: 12px; border: 1.5px solid currentColor; border-radius: 2px; flex: none; opacity: 0.9; }
.cal-cell .more { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.rotate-hint { display: none; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--ink-3); padding: 10px 18px; border-top: 1px solid var(--line); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; background: var(--navy); }
.legend i.completed { background: var(--fir-light); border: 1px solid var(--fir-mid); }
.legend i.cancelled { background: var(--muted-soft); }
.legend i.flagged { background: var(--navy); box-shadow: inset 3px 0 0 var(--red); }
.legend i.today { background: transparent; border: 2px solid var(--red); border-radius: 50%; }
@media (max-width: 640px) {
  .rotate-hint { display: block; }
  .cal-cell { min-height: 66px; padding: 4px; }
  .cal-cell .chip { font-size: 10px; padding: 2px 4px; }
  .cal-cell .chip .doc { display: none; }
}
.visit-list .visit { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: flex-start; flex-wrap: wrap; }
.visit-list .visit:last-child { border-bottom: 0; }
.visit-list .when { min-width: 100px; font-weight: 600; color: var(--navy); }
.visit-list .who { color: var(--ink-2); font-size: var(--fs-sm); margin-top: 2px; }
.visit-list .site { font-weight: 600; }
.report-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); font-size: var(--fs-xs); font-weight: 600; }
.report-chip:hover { background: var(--navy); color: #fff; text-decoration: none; }
.report-chip .doc { width: 10px; height: 12px; border: 1.5px solid currentColor; border-radius: 2px; }
.flag { padding: 10px 14px; border-radius: var(--radius); background: var(--paper-2); margin-top: 8px; font-size: var(--fs-sm); border-left: 4px solid var(--line-strong); }
.flag.bad_date { background: var(--bad-soft); border-left-color: var(--red); }
.flag .by { color: var(--ink-3); font-size: var(--fs-xs); margin-top: 2px; }
.month-list .day-group { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.month-list .day-group:last-child { border-bottom: 0; }
.month-list .day-group.past { opacity: 0.75; }
.month-list .d { font-weight: 700; color: var(--navy); }
.month-list .d small { display: block; font-weight: 600; color: var(--ink-3); font-size: var(--fs-xs); }
.month-list .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 4px 0; font-size: var(--fs-sm); }
@media (max-width: 640px) { .month-list .day-group { grid-template-columns: 1fr; gap: 4px; } }

/* ===== Report renderer ===== */
.report { background: var(--paper); border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.report .r-head { background: var(--navy); color: #fff; padding: 26px 30px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.report .r-head h1 { font-size: var(--fs-xl); color: #fff; }
.report .r-head .eyebrow { color: rgba(255,255,255,0.8); }
.report .r-meta { display: flex; gap: 22px; flex-wrap: wrap; font-size: var(--fs-sm); margin-top: 10px; opacity: 0.9; }
.report .r-meta strong { color: #fff; }
.report .r-logo { height: 40px; width: 150px; background: var(--logo-on-dark) right center / contain no-repeat; }
body:not(.has-logo) .report .r-logo { display: none; }
.report .r-section { padding: 20px 30px; border-bottom: 1px solid var(--line); }
.report .r-section:last-child { border-bottom: 0; }
.report .r-section h2 { font-size: var(--fs-md); font-weight: 600; color: var(--navy); margin-bottom: 14px; }
.report .qa { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: 10px 20px; }
.report .qa .q { color: var(--ink-2); font-size: var(--fs-sm); padding-top: 2px; }
.report .qa .a { font-weight: 600; }
.report .qa .a.long { white-space: pre-wrap; font-weight: 400; }
.report .photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.report .photos figure { margin: 0; }
.report .photos .ph { aspect-ratio: 4 / 3; background: var(--navy-tint); border-radius: var(--radius); display: grid; place-items: center; color: var(--ink-3); font-size: var(--fs-xs); overflow: hidden; }
.report .photos img { width: 100%; height: 100%; object-fit: cover; }
.report .photos figcaption { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 5px; }
.report .r-foot { background: var(--paper-2); }
@media print {
  .topbar, .modnav, .actions, .demo-banner, .crumbs, .toast { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .report { border: 0; box-shadow: none; }
  .report .r-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report .r-section { break-inside: avoid; }
}

/* ===== Pricing ===== */
.var-pos { color: var(--ink); font-weight: 700; }
.var-neg { color: var(--ink); font-weight: 600; }
.var-zero { color: var(--fir); font-weight: 600; }

/* ===== Central ===== */
.region-card .card-head { background: var(--navy); color: #fff; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.region-card .card-head h2 { color: #fff; display: flex; align-items: center; gap: 10px; }
.region-card .card-head .btn { border-color: rgba(255,255,255,0.5); color: #fff; background: transparent; }
.region-card .card-head .btn:hover { background: rgba(255,255,255,0.12); }
.kv-list { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; font-size: var(--fs-sm); }
.kv-list .k { color: var(--ink-2); }
.kv-list .v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--navy); }

/* ===== Narrow screens ===== */
@media (max-width: 760px) {
  .topbar { height: auto; grid-template-columns: 1fr auto; padding: 10px 14px; gap: 8px 12px; }
  .topbar .logo { width: 90px; height: 29px; justify-self: end; }
  .topbar .hydra-logo img { height: 22px; }
  .has-logo .topbar .wordmark { display: none; }
  .topbar .wordmark .w2 { display: none; }
  .topbar .tb-right { grid-column: 1 / -1; flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
  .topbar .tb-right > .user { display: none; }
  .topbar .region-switch { flex: 1; }
  .topbar .region-switch > .user:first-child { display: none; }
  .topbar .region-switch { gap: 8px; }
  .topbar .region-switch select:first-of-type { flex: 1; min-width: 0; }
  .topbar .region-switch select { height: 38px; line-height: 38px; }
  .cal-head { flex-wrap: wrap; padding: 12px 14px; }
  .cal-head .month { order: -1; flex-basis: 100%; min-width: 0; margin-bottom: 4px; }
  .cal-head .actions { flex-wrap: nowrap; margin-left: auto; }
  .page-head .actions .btn { width: 100%; justify-content: center; }
  .site-strip .kv { min-width: 40%; }
  :root { --gutter: 16px; --fs-xl: 23px; --fs-xxl: 28px; }
}

/* ---------- Leaderboard ---------- */
.lb-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.lb-tabs a { padding: 12px 16px; font-weight: 600; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; text-decoration: none; }
.lb-tabs a.active { color: var(--navy); border-color: var(--navy); font-weight: 700; }
.tile .value .of { font-size: var(--fs-md); color: var(--ink-3); font-weight: 600; }
.podium-card .card-head { border-bottom: 0; }
.podium-stage { padding: 8px 32px 0; }
.podiums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: end; }
.podium .who { text-align: center; padding: 0 8px 14px; min-height: 78px; }
.podium .who .place { display: inline-block; font-size: var(--fs-xs); font-weight: 700; background: var(--blue-lighter); color: var(--ink); border-radius: 999px; padding: 3px 10px; }
.podium.p1 .who .place { background: var(--red); color: #fff; }
.podium .who .name { margin-top: 8px; font-size: 19px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.podium.p1 .who .name { font-size: 22px; }
.podium .who .meta { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 3px; }
.podium .top { height: 22px; background: #45447A; clip-path: polygon(5% 0, 95% 0, 100% 100%, 0 100%); }
.podium.p1 .top { height: 26px; background: #F53D3D; }
.podium .face { min-height: 236px; box-sizing: border-box; padding: 20px 24px; color: #fff; display: flex; flex-direction: column; gap: 12px; background-color: var(--dark-blue-purple); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.09) 0 2px, rgba(255,255,255,0) 2px 11px); box-shadow: inset 0 -6px 0 rgba(0,0,0,0.18); }
.podium.p1 .face { min-height: 292px; padding: 24px 26px; gap: 14px; background-color: var(--red); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.12) 0 2px, rgba(255,255,255,0) 2px 11px); }
.podium.p3 .face { min-height: 200px; padding: 18px 24px; gap: 10px; }
.podium .face-head { display: flex; align-items: center; justify-content: space-between; }
.podium .rank { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--dark-blue-purple); font-size: 20px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.podium.p1 .rank { width: 46px; height: 46px; font-size: 23px; color: var(--red); }
.podium.p3 .rank { width: 36px; height: 36px; font-size: 18px; }
.podium .what { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; }
.podium .score { font-size: 44px; font-weight: 800; line-height: 1; }
.podium.p1 .score { font-size: 60px; }
.podium.p3 .score { font-size: 38px; }
.podium .pbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; font-size: var(--fs-sm); }
.podium .pbar .k { overflow-wrap: anywhere; }
.podium .pbar .track { grid-row: 2; grid-column: 1 / -1; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.28); }
.podium .pbar .fill { height: 8px; border-radius: 4px; background: #fff; }
.podium .pbar .v { text-align: right; font-weight: 700; }
.podium.empty-slot .top, .podium.empty-slot .face { opacity: 0.18; }
.podium-stage .floor { height: 14px; background: var(--blue-light); margin: 0 -32px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
table.data.lb .rank-chip { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 6px; font-weight: 800; color: var(--navy); }
table.data.lb .rank-chip.r1 { background: var(--red); color: #fff; }
table.data.lb .rank-chip.r2, table.data.lb .rank-chip.r3 { background: var(--dark-blue-purple); color: #fff; }
.score-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.score-cell .track { flex: 1; height: 8px; border-radius: 4px; background: var(--blue-lighter); }
.score-cell .fill { height: 8px; border-radius: 4px; background: var(--navy); }
.score-cell strong { width: 44px; text-align: right; color: var(--navy); }
.delta.up { color: var(--fir); font-weight: 700; }
.delta.down { color: var(--bronze); font-weight: 700; }

/* ---------- Fleet insight ---------- */
.grid-next { margin-top: 16px; }
.donut-wrap { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.donut { position: relative; width: 200px; height: 200px; flex: none; }
.donut svg { width: 200px; height: 200px; display: block; }
.donut .centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut .pct { font-size: 36px; font-weight: 800; color: var(--navy); line-height: 1; }
.donut .lbl { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); margin-top: 4px; }
.donut-wrap .legend { display: flex; flex-direction: column; gap: 14px; min-width: 200px; flex: 1; padding: 0; border-top: 0; font-size: var(--fs-sm); color: var(--ink); }
.legend .row { display: flex; align-items: center; gap: 12px; }
.legend .row .grow { flex: 1; font-weight: 600; }
.legend .row strong { font-size: 20px; color: var(--navy); }
.legend .sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; flex: none; }
.sw.navy, .dot.navy { background: var(--navy); }
.sw.light, .dot.light { background: var(--blue-light); }
.legend .sub { border-top: 1px solid var(--blue-lighter); padding-top: 12px; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5; }
.cap-chart { position: relative; height: 300px; }
.cap-chart .plot { position: absolute; left: 0; right: 0; top: 28px; bottom: 36px; }
.cap-chart .cap-line { position: absolute; left: 0; right: 0; border-top: 2px solid var(--red); }
.cap-chart .cap-line span { position: absolute; right: 0; bottom: 4px; font-size: var(--fs-xs); font-weight: 700; color: var(--red); }
.cap-chart .half { position: absolute; left: 0; right: 0; border-top: 1px solid var(--blue-lighter); }
.cap-chart .half span { position: absolute; left: 0; bottom: 2px; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.cap-chart .bars { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 72px; border-bottom: 1.5px solid var(--blue-light); }
.cap-chart .bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; width: 150px; position: relative; }
.cap-chart .bar-col .val { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.cap-chart .bar-col .bar { width: 100%; background: var(--navy); border-radius: 6px 6px 0 0; }
.cap-chart .bar-col .lbl { position: absolute; top: 100%; margin-top: 10px; font-size: var(--fs-md); font-weight: 600; white-space: nowrap; }
.share .big-row { display: flex; align-items: baseline; gap: 12px; }
.share .big { font-size: 64px; font-weight: 800; color: var(--navy); line-height: 1; }
.share .text { font-size: var(--fs-md); color: var(--ink-2); line-height: 1.3; max-width: 240px; }
.share .bar2 { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; margin-top: 16px; }
.share .bar2 .yes { background: var(--navy); }
.share .bar2 .no { flex: 1; background: var(--blue-light); }
.legend.small { display: flex; gap: 20px; font-size: var(--fs-sm); color: var(--ink-2); margin-top: 12px; padding: 0; border-top: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 7px; }
.hbars .hrow { display: grid; grid-template-columns: 170px minmax(0, 1fr) 36px; align-items: center; gap: 14px; font-size: var(--fs-md); margin-bottom: 14px; }
.hbars .hrow .k { font-weight: 600; }
.hbars .hrow .track { height: 14px; border-radius: 7px; background: var(--blue-lighter); }
.hbars .hrow .fill { height: 14px; border-radius: 7px; background: var(--navy); }
.hbars .hrow .v { font-weight: 800; color: var(--navy); text-align: right; }
.foot-note { border-top: 1px solid var(--blue-lighter); padding-top: 12px; margin-top: 16px; line-height: 1.5; }

/* ---------- Resources ---------- */
.doc-groups section.block h2 .count { margin-left: 10px; font-size: var(--fs-sm); background: var(--blue-lighter); color: var(--ink-2); border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.doc-list .doc { display: flex; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.doc-list .doc:first-child { border-top: 0; }
.doc-icon svg { width: 36px; height: 44px; display: block; }
.doc-main { flex: 1; min-width: 0; }
.doc-title { font-weight: 700; color: var(--navy); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.doc-actions { display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .podiums { grid-template-columns: 1fr; }
  .podium.p1 { order: -1; }
  .podium.empty-slot { display: none; }
  .cap-chart .bars { gap: 24px; }
  .cap-chart .bar-col { width: 110px; }
  .hbars .hrow { grid-template-columns: 120px minmax(0, 1fr) 36px; }
  .doc-list .doc { flex-wrap: wrap; }
}

.modal.preview { max-width: 1100px; }
.modal.preview .card-head { gap: 12px; }
.modal.preview .card-head .actions { display: flex; gap: 8px; margin-left: auto; }
.preview-frame { height: 78vh; background: var(--blue-lighter); border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden; }
.preview-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.preview-frame.img { display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.preview-frame.img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); background: #fff; }

/* ---------- Import preview ---------- */
table.data tr.warn-row td { background: var(--warn-soft); }
table.data tr.bad-row td { background: var(--bad-soft); }
table.data select { font: inherit; font-size: var(--fs-sm); padding: 6px 8px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); max-width: 320px; }

/* ---------- Selects everywhere else: one chevron, room for it, same height as inputs ---------- */
.toolbar select, .page-head .actions select, .field select, table.data select, .lb-tabs ~ * select {
  -webkit-appearance: none; appearance: none;
  padding-right: 36px; min-width: 150px; cursor: pointer; color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%23283897' stroke-width='1.8' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
}
.toolbar select { padding-top: 9px; padding-bottom: 9px; }
table.data select { min-width: 200px; }
.field select { padding-right: 38px; }

/* Out of the allowed price range: the one thing on the pricing page that must not be missed */
.tile.flag { background: var(--red); color: #fff; }
.tile.flag::before { background: #A50000; }
.tile.flag .label, .tile.flag .value, .tile.flag .hint { color: #fff; }
table.data tr.flag-row td { background: var(--bad-soft); }
table.data tr.flag-row td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.badge.flag { background: var(--red); color: #fff; font-weight: 700; }
.badge.flag::before { display: none; }
.flag-count { display: inline-block; min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 700; text-align: center; }

/* ---------- Users ---------- */
.access-list { display: flex; flex-wrap: wrap; gap: 6px; }
.access-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-lighter); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.access-chip:not(:has(.chip-x)) { padding-right: 10px; }
.access-chip .chip-x { border: 0; background: transparent; color: var(--ink-3); font-size: 15px; line-height: 1; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; }
.access-chip .chip-x:hover { background: var(--blue-light); color: var(--red); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.role-help { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; line-height: 1.45; }
.field .readonly { font-size: var(--fs-md); padding: 10px 0; color: var(--ink); font-weight: 600; }

/* ---------- Views: one column per tab, so every region and role lines up ---------- */
table.data.views th.tab, table.data.views td.tab { text-align: center; width: 1%; min-width: 112px; }
table.data.views th.tab { white-space: normal; line-height: 1.3; vertical-align: bottom; }
table.data.views td { vertical-align: middle; }
table.data.views td.role { min-width: 150px; }
table.data.views td.save { text-align: right; width: 1%; }
table.data.views input[type="checkbox"] { width: 18px; height: 18px; margin: 0; cursor: pointer; vertical-align: middle; }
table.data.views input[type="checkbox"]:disabled { cursor: default; opacity: 0.5; }

/* ---------- File picker ---------- */
input[type="file"] { font: inherit; font-size: var(--fs-sm); color: var(--ink-2); }
input[type="file"]::file-selector-button { font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--navy); background: var(--paper); border: 1.5px solid var(--navy); border-radius: 999px; padding: 6px 14px; margin-right: 12px; cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: var(--navy-soft); }

/* ---------- Phones: tables scroll sideways instead of squeezing every word onto its own line ---------- */
@media (max-width: 760px) {
  table.data th, table.data td { white-space: nowrap; }
  .doc-list .doc { align-items: flex-start; }
  .doc-main { flex: 1 1 calc(100% - 60px); }
  .doc-actions { flex-basis: 100%; padding-left: 52px; }
  .card .card-head { flex-wrap: wrap; row-gap: 4px; }
  .card .card-head > h2, .card .card-head > h3 { flex: 1 1 100%; }
  .toolbar > input, .toolbar > select, .toolbar .grow { flex: 1 1 100%; min-width: 0; }
  section.block { margin-top: 26px; }
  .page-head { align-items: flex-start; }
}
