/* Bonasea Administrácia (the admin console).

   4.6.2 (Martin 17. 10.): on the Bonasea administrative design kit. static/admin-kit/bonasea-admin.css, loaded
   before this file, holds the kit's tokens and base components (.btn, .field, the focus ring, the type scale); this
   file builds the console's own screens on them and names no colour of its own - every colour here is a variable of
   the kit (tests/test_admin_kit.py). The console is light only, as the kit's manual has it ("Svetlý režim je
   základ"): until 4.6.2 it loaded the app's stylesheet for its tokens and followed the app's dark theme, with a switch.

   No style attributes anywhere in the console's markup: the admin host's CSP has no 'unsafe-inline' in style-src.
   Anything visual is a class here or an svg attribute (tests/test_admin_csp.py). */

.hidden { display: none !important; }

/* ---------- the shell: top bar, side navigation (a menu below 1024 px), the work area ---------- */

/* the top bar is 68 px: the 34 px logo with half its height free above and below it (the manual's clear space) */
.adm { min-height: 100vh; }
.adm-top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  min-height: 68px; padding: 0 var(--admin-pad);
  background: var(--sand); border-bottom: 1px solid var(--hairline);
}
.adm-brand { display: inline-flex; align-items: center; min-height: 44px; flex: none; border-radius: var(--r-sm); }
.adm-brand img { width: auto; height: 34px; }
/* the environment's name beside the logo as text of its own (the manual: never inside the logo), behind a hairline
   as tall as the logo; 4.6.3 (Martin 18. 10.): as the kit's testing centre header has it - capitals in the muted ink at
   normal weight and tracking, no gold dot */
.adm-env {
  display: inline-flex; align-items: center; margin: 0 0 0 5px; padding-left: 18px;
  border-left: 1px solid var(--hairline-strong); min-height: 34px;
  color: var(--ink-muted); font-size: 0.9375rem; font-weight: 500; line-height: 1.2; letter-spacing: 0.04em;
  text-transform: uppercase; white-space: nowrap;
}
.adm-spacer { flex: 1; }                        /* pushes what follows it to the end of a flex row */
.adm-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.whoami { color: var(--ink-muted); font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.adm-menu-btn { display: none; }
.adm-top .btn.adm-menu-btn[aria-expanded="true"]:not(:disabled) { background: var(--water-pale); border-color: var(--water-mid); }
.adm-menu-ico { width: 18px; height: 18px; flex: none; }

.adm-shell { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.adm-side { display: flex; flex-direction: column; gap: 16px; padding: 20px 16px; min-width: 0; }
.adm-search input { min-height: 44px; padding: 10px 14px; font-size: 0.875rem; }
.adm-cat-search { max-width: 480px; margin-bottom: 16px; }   /* Katalóg lodí: its own search above its filters */
.adm-nav { display: flex; flex-direction: column; gap: 2px; }
.adm-nav button {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 14px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-muted);
  font-size: 0.9rem; line-height: 1.3; text-align: left; cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.adm-nav button:hover { background: var(--surface-quiet); color: var(--ink); }
.adm-nav button.on, .adm-nav button[aria-current="page"] { background: var(--water-pale); color: var(--ink); font-weight: 600; }
/* new feedback waiting: a count, the kit's gold label */
.adm-nav .adm-badge {
  margin-left: auto; min-width: 26px; padding: 2px 8px; border-radius: var(--r-pill); text-align: center;
  background: var(--gold-sand); color: var(--gold-ink); font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.adm-side-foot { display: none; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.adm-side-foot .whoami { flex: 1; max-width: none; }
.adm-main { min-width: 0; width: 100%; max-width: var(--admin-max); padding: var(--admin-pad) var(--admin-pad) 64px; }

@media (min-width: 1024px) {
  .adm-shell { grid-template-columns: var(--admin-sidebar) minmax(0, 1fr); }
  .adm-side {
    position: sticky; top: 68px; align-self: start; height: calc(100vh - 68px); overflow-y: auto;
    border-right: 1px solid var(--hairline);
  }
}
/* below 1024 px the navigation is a menu under the top bar, opened by its button (aria-expanded), over the screen */
@media (max-width: 1023px) {
  .adm-menu-btn { display: inline-flex; }
  .adm-side {
    display: none; position: fixed; top: 68px; left: 0; right: 0; bottom: 0; z-index: 29; overflow-y: auto;
    padding: 16px var(--admin-pad) 32px; background: var(--sand);
  }
  .adm.adm-menu-open .adm-side { display: flex; }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .adm-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
}
/* on a phone the user's actions move into the menu, the top bar keeps the logo, the name and the menu */
@media (max-width: 767px) {
  .adm-user { display: none; }
  .adm-side-foot { display: flex; }
}
@media (max-width: 480px) {
  .adm-top { min-height: 64px; gap: 8px; }
  .adm-side { top: 64px; }
  .adm-brand img { height: 28px; }
  .adm-env { margin-left: 6px; padding-left: 10px; min-height: 28px; font-size: 0.8125rem; }
}

/* ---------- a screen: its head, sections, hints ---------- */

.adm-head { display: flex; align-items: baseline; gap: 8px 16px; margin-bottom: 20px; flex-wrap: wrap; }
.adm-head h2 { font-size: clamp(1.5rem, 2.3vw, 2rem); line-height: 1.15; letter-spacing: -0.035em; overflow-wrap: break-word; }
.adm-head .adm-sub { color: var(--ink-muted); font-size: 0.9375rem; }
.adm-head .btn { align-self: center; }
.adm-overline { font-size: 0.875rem; font-weight: 600; line-height: 1.4; color: var(--ink); margin: 0 0 8px; }
.adm-section { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.025em; margin: 32px 0 12px; }   /* opens the second half of a screen */
.adm-gap { margin-top: 16px; }                  /* a second block in a card, below a table or a message */
.adm-hint { font-size: 0.8125rem; line-height: 1.5; color: var(--ink-muted); margin: 8px 0 0; }
p.adm-hint { max-width: 80ch; }
.adm-note { font-size: 0.8125rem; line-height: 1.5; color: var(--ink-muted); margin: 12px 0 0; }
.adm-note.adm-warn { color: var(--gold-ink); background: var(--gold-cream); padding: 8px 12px; border-radius: var(--r-sm); }
.adm-nowrap { white-space: nowrap; }
.adm-key { color: var(--ink-muted); white-space: nowrap; }   /* the label column of a key–value table */

/* a state is a word; where it is a cell's verdict the word is the kit's status label (business states, not comfort) */
.adm-ok { color: var(--ink); }
.adm-warn { color: var(--gold-ink); }
.adm-danger { color: var(--comfort-red); }
.adm-faint { color: var(--ink-muted); }
.adm-caution { color: var(--gold-ink-strong); }   /* 4.9.16: between a warning and an outage (Zdroje výstrah, neúplné) */
b.adm-ok, .adm-ok > b, b.adm-danger, .adm-danger > b, .adm-warn > b, .adm-caution > b, .adm-faint > b {
  display: inline-block; padding: 2px 10px; border-radius: var(--r-pill); font-size: 0.8125rem; font-weight: 600; line-height: 1.5;
}
b.adm-ok, .adm-ok > b { background: var(--comfort-green); color: var(--ink); }
b.adm-danger, .adm-danger > b { background: var(--comfort-red); color: var(--surface); }
.adm-warn > b { background: var(--gold-cream); color: var(--gold-ink); }
.adm-caution > b { background: var(--comfort-gold); color: var(--gold-ink-strong); }
.adm-faint > b { background: var(--chip); color: var(--ink-muted); }

/* ---------- panels, tiles ---------- */

.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; margin-bottom: 16px; }
.adm-card { min-width: 0; overflow-x: auto; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 20px 24px; }
.adm-card h3 { margin: 0 0 12px; }
.adm-card.wide { grid-column: 1 / -1; }
.adm-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.adm-two > .adm-card { align-self: start; }

.adm-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 172px), 1fr)); gap: 12px; margin-bottom: 16px; }
.adm-tile { min-width: 0; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-sm); padding: 14px 16px; }
.adm-tile .k { font-size: 0.8125rem; font-weight: 600; line-height: 1.35; color: var(--ink-muted); }
.adm-tile .v { margin-top: 4px; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); line-height: 1.2;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-tile .v.long { font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.5; }   /* dates and ratios */
.adm-tile .s { margin-top: 2px; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-muted); }

/* ---------- alerts, empty, loading and failed states ---------- */

.adm-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.adm-alert {
  display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--water-pale); color: var(--ink-body); font-size: 0.9375rem; line-height: 1.45;
  border: 1.5px solid transparent; cursor: pointer;
}
.adm-alert:hover { border-color: var(--water-mid); }
.adm-alert.warn { background: var(--gold-cream); color: var(--gold-ink); }
.adm-alert.warn:hover { border-color: var(--gold-label); }
.adm-alert.error { background: var(--surface); border-color: var(--comfort-red); }
.adm-alert.error:hover { background: var(--surface-quiet); }
.adm-alert-x {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-block: -8px; border: 0; border-radius: var(--r-pill); background: none;
  color: inherit; font: inherit; font-size: 1.375rem; line-height: 1; cursor: pointer;
}
.adm-alert-x:hover { background: var(--surface); }
.adm-empty { color: var(--ink-muted); font-size: 0.875rem; padding: 12px 0; }
/* a screen that could not be drawn (route): the reason, and Skúsiť znova in its head */
.adm-fail { padding: 16px 20px; border-radius: var(--r-sm); background: var(--surface); border: 1.5px solid var(--comfort-red); color: var(--ink-body); }

/* ---------- tables ---------- */

.adm-tablewrap { max-width: 100%; overflow-x: auto; }
/* a table that is a screen's content of its own (Používatelia, Katalóg lodí) sits on a white panel, as in a card */
.adm-main > .adm-tablewrap { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); margin-bottom: 16px; }
table.adm-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; line-height: 1.45; }
/* 4.8.23: Úvod nováčika (static/admin-intro.js) - the buttons under a file field */
.adm-intro-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
table.adm-table th {
  text-align: left; padding: 10px 12px; background: var(--surface-quiet); color: var(--ink);
  font-size: 0.8125rem; font-weight: 600; border-bottom: 1px solid var(--hairline); white-space: nowrap; vertical-align: bottom;
}
table.adm-table td { padding: 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; color: var(--ink-body); overflow-wrap: break-word; }
table.adm-table tbody tr:last-child td { border-bottom: 0; }
table.adm-table tr[data-action] { cursor: pointer; }
table.adm-table tr[data-action]:hover td { background: var(--surface-quiet); }
table.adm-table td small { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 0.8125rem; }
table.adm-table td.num, table.adm-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- filters (chips), labels (pills) ---------- */

.adm-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.adm-chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--ink-faint); background: var(--surface); color: var(--ink-body);
  font-size: 0.875rem; font-weight: 500; line-height: 1.3; font-variant-numeric: tabular-nums; cursor: pointer;
}
.adm-chip:hover { border-color: var(--ink-body); }
.adm-chip.on { background: var(--ink-body); border-color: var(--ink-body); color: var(--sand); font-weight: 600; }
.adm-pill {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--r-pill);
  background: var(--chip); color: var(--ink-muted); font-size: 0.8125rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.adm-pill.gold { background: var(--gold-cream); color: var(--gold-ink); }
/* 4.6.7: a partner nobody sees in the app (Skrytý) */
.adm-pill.off { background: transparent; color: var(--ink-muted); border: 1px dashed var(--ink-muted); font-weight: 500; }

/* ---------- Partneri (4.6.6, Martin 19. 10.): a logo in the table and the form, a row's buttons, the descriptions ---------- */
.adm-pt-logo { display: block; width: 32px; height: 32px; object-fit: contain; border-radius: 6px; }
.adm-pt-nologo {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px;
  background: var(--chip); color: var(--ink-muted); font-size: 0.75rem; font-weight: 600;
}
.adm-pt-logobox { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.adm-pt-logobox .adm-pt-logo, .adm-pt-logobox .adm-pt-nologo { width: 96px; height: 96px; font-size: 1.5rem; }
.adm-pt-logobox .field { flex: 1 1 260px; }
.adm-pt-acts { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.adm-pt-vis { margin-top: 6px; }
.adm-pt-desc textarea { min-height: 88px; }
.adm-pt-osm { color: var(--water-mid); }

/* ---------- charts: each has a legend (admLegend), none of them is a comfort score ---------- */

/* no height here: a chart scales by its viewBox, and a sparkline sets its own in a height attribute */
.adm-chart { width: 100%; display: block; overflow: visible; }
.adm-chart .ax { stroke: var(--hairline-strong); stroke-width: 1; }
.adm-chart .lbl { fill: var(--ink-muted); font-size: 12px; font-family: var(--font-sans), system-ui, sans-serif; }
.adm-chart .val { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: var(--font-sans), system-ui, sans-serif; }
.adm-chart .bar { fill: var(--water-vivid); }
/* the gold of the second series is outlined in the dark gold, so the bar has 3 : 1 against the card */
.adm-chart .bar.alt { fill: var(--gold); stroke: var(--gold-label); stroke-width: 1; }
.adm-chart .ln { fill: none; stroke: var(--water-vivid); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.adm-chart .area { fill: var(--water-vivid); opacity: .12; }
.adm-chart .cell { stroke: var(--surface); stroke-width: 1; }
.adm-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0 0; font-size: 0.8125rem; line-height: 1.45; color: var(--ink-muted); }
.adm-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.adm-sw { flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--water-vivid); }
.adm-sw.alt { background: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-label); }
.adm-sw.adm-ret-1 { background: color-mix(in srgb, var(--water-vivid) 10%, var(--surface)); box-shadow: inset 0 0 0 1px var(--hairline-strong); }
.adm-sw.adm-ret-10 { background: var(--water-mid); }

.adm-bars { display: flex; flex-direction: column; gap: 8px; }
.adm-bar-row { display: grid; grid-template-columns: minmax(96px, 34%) 1fr auto; gap: 12px; align-items: center; font-size: 0.875rem; line-height: 1.4; }
.adm-bar-lbl { color: var(--ink-body); overflow-wrap: anywhere; }
/* admMeter: the fill is as long as its rect's width attribute */
.adm-meter { display: block; width: 100%; height: 10px; background: var(--chip); border-radius: var(--r-pill); overflow: hidden; }
.adm-meter .fill { fill: var(--water-vivid); }
.adm-meter.alt .fill { fill: var(--gold); }
.adm-bar-val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); white-space: nowrap; }
.adm-bar-val small { font-weight: 500; color: var(--ink-muted); }
/* the retention grid's tint in ten steps (admGrid): the water up to 70 % with dark text, then the darker water with white
   text - every step's number keeps 4.5 : 1 (tests/test_admin_kit.py) */
td.adm-ret { font-weight: 600; }
td.adm-ret-1 { background: color-mix(in srgb, var(--water-vivid) 10%, var(--surface)); }
td.adm-ret-2 { background: color-mix(in srgb, var(--water-vivid) 20%, var(--surface)); }
td.adm-ret-3 { background: color-mix(in srgb, var(--water-vivid) 30%, var(--surface)); }
td.adm-ret-4 { background: color-mix(in srgb, var(--water-vivid) 40%, var(--surface)); }
td.adm-ret-5 { background: color-mix(in srgb, var(--water-vivid) 50%, var(--surface)); }
td.adm-ret-6 { background: color-mix(in srgb, var(--water-vivid) 60%, var(--surface)); }
td.adm-ret-7 { background: color-mix(in srgb, var(--water-vivid) 70%, var(--surface)); color: var(--ink); }
td.adm-ret-8 { background: color-mix(in srgb, var(--water-mid) 80%, var(--surface)); color: var(--surface); }
td.adm-ret-9 { background: color-mix(in srgb, var(--water-mid) 90%, var(--surface)); color: var(--surface); }
td.adm-ret-10 { background: var(--water-mid); color: var(--surface); }

/* ---------- messages, logs, codes ---------- */

.adm-det { border-top: 1px solid var(--hairline); }
.adm-det summary { padding: 12px 0; cursor: pointer; font-size: 0.875rem; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.adm-det pre {
  white-space: pre-wrap; word-break: break-word; margin: 0 0 12px; padding: 12px 14px; max-height: 320px; overflow: auto;
  background: var(--surface-quiet); border-radius: var(--r-sm); color: var(--ink-body);
  font: 0.75rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.adm-msg { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 75ch; font-size: 0.9375rem; line-height: 1.6; }
/* the feedback list: one card per message */
.adm-fb { margin-bottom: 12px; }
.adm-fb .adm-head { margin-bottom: 8px; align-items: center; }
.adm-fb .adm-overline { margin-top: 12px; }
.adm-secret {
  margin: 8px 0; padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface-quiet); color: var(--ink);
  font: 1rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; text-align: center;
  /* break between the four-character groups, never inside one — it is typed by hand */
  overflow-wrap: break-word; word-break: normal;
}
.adm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.adm-card .field + .btn { margin-top: 12px; }     /* a field's button under it (Spätná väzba: Odoslať, Uložiť) */
.adm-card .field textarea[rows="3"] { min-height: 104px; }
.btn-sm { padding: 10px 16px; font-size: 0.875rem; }
.btn-block { display: flex; width: 100%; min-height: 48px; margin-top: 8px; }
/* a button without a role of its own is the kit's secondary one: white, the muted outline */
.btn:not(.btn-primary):not(.btn-danger):not(:disabled) { background: var(--surface); color: var(--ink-body); border-color: var(--ink-muted); }
.btn:not(.btn-primary):not(.btn-danger):not(:disabled):hover { border-color: var(--ink-body); }
.btn-danger:hover { border-color: var(--ink-body); }

/* ---------- sign-in ---------- */

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px var(--admin-pad); }
.login-card {
  width: min(100%, 440px); padding: 32px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card);
}
.adm-login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.adm-login-brand img { width: auto; height: 34px; }
.login-card h1 { margin-bottom: 4px; }
.login-sub { color: var(--ink-muted); font-size: 0.9375rem; margin: 0 0 24px; }
.login-card .field { margin-bottom: 16px; }
.login-err {
  margin-top: 16px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface);
  border: 1.5px solid var(--comfort-red); color: var(--ink-body); font-size: 0.875rem;
}
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 0.9375rem; color: var(--ink-body); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--water-mid); }
#adm-enrol-out:not(.hidden) + #adm-step-totp { margin-top: 20px; border-top: 1px solid var(--hairline); padding-top: 20px; }
/* 3.94 (Martin 3. 10.): "remember this computer" at the code step, and the note after Odhlásiť */
.adm-remember { margin: 0 0 8px; }
.adm-trust-note { margin-top: 20px; border-top: 1px solid var(--hairline); padding-top: 16px; }
.adm-trust-note .adm-hint { margin: 0 0 4px; }
@media (max-width: 480px) {
  .login-card { padding: 24px 20px; }
  .adm-login-brand img { height: 28px; }
}

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px);
  padding: 12px 24px; border-radius: var(--r-pill); background: var(--ink-body); color: var(--sand);
  font-size: 0.9375rem; font-weight: 600; box-shadow: var(--shadow-float);
}

@media (max-width: 1099px) {
  .adm-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .adm-card { padding: 16px; }
}

/* ---------- coverage map (plain SVG: the console has no mapping library and no tiles) ---------- */
/* sea and land have to be told apart at a glance, or the rectangles float in fog */
.cov-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.cov-side { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 16px; }
.cov-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cov-group { margin-bottom: 12px; }
.cov-row {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 6px 8px; text-align: left;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-body); font-size: 0.875rem; cursor: pointer;
}
.cov-row:hover { background: var(--surface-quiet); }
.cov-row.on { background: var(--water-pale); font-weight: 600; color: var(--ink); }
.cov-row.cov-empty { color: var(--ink-muted); }
.cov-dot { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 12px; display: inline-block; }
.cov-row.on .cov-dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ink); }
.cov-name { flex: 1; overflow-wrap: anywhere; }
.cov-n { font-size: 0.8125rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.cov-key { display: flex; flex-direction: column; gap: 6px; font-size: 0.8125rem; color: var(--ink-muted); margin-top: 12px; }
.cov-key-box { display: inline-block; width: 16px; height: 10px; vertical-align: -1px; margin-right: 6px; }
.cov-key-box.solid { border: 1.5px solid var(--water-mid); background: color-mix(in srgb, var(--water-vivid) 16%, transparent); }
.cov-key-box.dashed { border: 1.5px dashed var(--water-mid); background: transparent; }

.cov-mapwrap { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cov-map { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; }
.cov-map svg { display: block; width: 100%; height: clamp(320px, 52vh, 620px); touch-action: none; cursor: grab; }
.cov-map svg.cov-dragging { cursor: grabbing; }
.cov-sea { fill: var(--water-pale); }
.cov-land { fill: var(--sand); stroke: color-mix(in srgb, var(--ink-body) 38%, transparent); }
.cov-grat { stroke: var(--hairline); fill: none; }
.cov-a { cursor: pointer; }
.cov-a:hover { fill-opacity: .34; }
/* 4.9.13 (Martin 9. 11. 2026): the demand's cells - gold while somebody waits, water once all were told */
.cov-dem { fill: var(--gold); fill-opacity: .7; stroke: var(--gold-ink-strong); cursor: pointer; }
.cov-dem.told { fill: var(--water-vivid); fill-opacity: .45; stroke: var(--water-mid); }
.cov-dem-n { fill: var(--ink); font-weight: 700; pointer-events: none; }
.cov-dem-dot { border-radius: 50%; }
.cov-info { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 16px 20px; }
table.cov-detail th { text-align: left; color: var(--ink-muted); font-weight: 500; padding-right: 16px; white-space: nowrap; background: none; }
.cov-bbox { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 0.8125rem; }
.cov-fact { color: var(--gold-label); font-weight: 600; }
.cov-claim { color: var(--ink-muted); }
.cov-mut { color: var(--ink-muted); }
@media (max-width: 900px) { .cov-wrap { grid-template-columns: minmax(0, 1fr); } }

/* model skill (3.82): the best cell of a column — the lowest mean error among models with enough comparisons */
table.adm-table td.sk-best { background: var(--gold-cream); }
table.adm-table td.sk-best b { color: var(--gold-ink-strong); }

/* per-account testing powers (v3.49) — one switch on the user detail page */
.adm-switch-row { display: flex; align-items: flex-start; gap: 16px; padding: 8px 0; cursor: pointer; }
.adm-switch-row span { flex: 1; display: block; font-size: 0.9375rem; color: var(--ink-body); }
.adm-switch-row small { display: block; margin-top: 4px; font-size: 0.8125rem; color: var(--ink-muted); line-height: 1.5; }
.adm-switch-row input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--water-mid); cursor: pointer; }
.adm-switch-row input:disabled { cursor: not-allowed; }

/* Open-Meteo monthly budget (v3.53), an admMeter: the water, gold from 80 % */
.adm-om-bar .fill { fill: var(--water-vivid); }
.adm-om-bar.warn .fill { fill: var(--gold); }
.adm-om-hint { margin: 8px 0 12px; }
/* 3.75 (audit #37): a refused paid key is an alarm, not a footnote - the kit's red with white on it, named in words */
.adm-om-keyfail {
  margin: 0 0 12px; padding: 12px 16px; border-radius: var(--r-sm);
  background: var(--comfort-red); color: var(--surface); font-size: 0.875rem; line-height: 1.5;
}
.adm-om-keyfail b { display: block; margin-bottom: 2px; font-size: 0.9375rem; }

/* community queue (v3.63) */
.adm-co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.adm-co-photo { border: 1px solid var(--hairline); border-radius: var(--r-sm); padding: 12px; background: var(--surface); }
.adm-co-photo img { width: 100%; height: 160px; object-fit: cover; border-radius: 8px; display: block; background: var(--surface-quiet); }
.adm-co-meta { margin: 8px 0; font-size: 0.875rem; }
.adm-co-meta .adm-hint { margin: 4px 0; }
.adm-co-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-co-thumb { display: inline-block; height: 56px; width: auto; border-radius: 6px; vertical-align: middle; }   /* a reported photo in Nahlásenia */

/* limits (3.74, audit P1-5): one number per row; a box that Save would send is marked - the kit's unsaved state */
.adm-limit-in, .adm-sup-sel {
  min-height: 44px; padding: 8px 12px; border: 1px solid var(--ink-faint); border-radius: var(--r-sm);
  background: var(--surface-quiet); color: var(--ink-body); font-size: 0.875rem; font-variant-numeric: tabular-nums;
}
.adm-limit-in { width: 112px; text-align: right; }
/* 4.9.18 (legal audit 9. 11., R12): the support phone is text, read from the left */
.adm-limit-in.adm-sup-phone { width: 180px; text-align: left; }
.adm-limit-in.changed, .adm-sup-sel.changed { border: 2px solid var(--gold-label); background: var(--gold-cream); }
.adm-limit-unit { color: var(--ink-muted); font-size: 0.8125rem; margin-left: 8px; }
.adm-limit-over { color: var(--comfort-red); font-weight: 600; }

/* Podpora (3.86, audit 30. 9., 11.6): label and field side by side, the languages as a row of boxes */
.adm-sup-grid { display: grid; grid-template-columns: minmax(180px, 320px) 1fr; gap: 12px 24px; align-items: center; }
.adm-sup-k { font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.adm-sup-langs { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 2px 8px; border: 2px solid transparent; border-radius: var(--r-sm); }
.adm-sup-langs.changed { border-color: var(--gold-label); background: var(--gold-cream); }
.adm-sup-lang { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 0.875rem; }
.adm-sup-lang input { width: 20px; height: 20px; margin: 0; accent-color: var(--water-mid); }
.adm-sup-prev { font-size: 0.875rem; line-height: 1.6; margin: 8px 0; max-width: 80ch; }
@media (max-width: 640px) { .adm-sup-grid { grid-template-columns: minmax(0, 1fr); } }

/* Zdroje (3.84, audit 30. 9., S03): the data disk as an admMeter, sortable headers, 80 % of a ceiling, the total row */
.adm-meter.adm-res-bar { height: 12px; }
.adm-res-bar.warn .fill { fill: var(--comfort-red); }
.adm-res-sort {
  display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0; padding: 0; border: 0; background: none;
  cursor: pointer; font: inherit; letter-spacing: inherit; color: inherit; white-space: nowrap;
}
.adm-res-sort:hover, .adm-res-sort.on { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
table.adm-table td.adm-res-hot { color: var(--gold-ink-strong); font-weight: 600; }
table.adm-table tr.adm-res-total td { font-weight: 700; border-top: 2px solid var(--hairline-strong); border-bottom: 0; }

/* ---------- explanations (4.6.3, Martin 18. 10.): the one tooltip of static/admin.js (tipListen) ----------
   An explained element (admTip, data-tip) says so by the cursor, and a focus ring that a cell's scrolling wrapper does
   not cut off; on a touch screen the long press that shows the explanation selects no text and opens no callout. The
   box: the kit's surface, its ink, hairline, radius and floating shadow, over everything, placed by script within the
   window (never in the flow, so nothing moves); it fades in, but not for a reader who asked for less motion. */
[data-tip]:not(button):not(a):not([data-action]) { cursor: help; }
th[data-tip]:focus-visible, td[data-tip]:focus-visible, .adm-bar-row[data-tip]:focus-visible,
table[data-tip]:focus-visible { outline-offset: -3px; }
@media (hover: none) {
  [data-tip] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}
.adm-tip {
  position: fixed; left: 0; top: 0; z-index: 100; box-sizing: border-box; width: max-content;
  max-width: min(320px, calc(100vw - 16px)); padding: 10px 14px;
  background: var(--surface); color: var(--ink-body); border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sm); box-shadow: var(--shadow-float);
  font-size: 0.8125rem; font-weight: 400; line-height: 1.5; letter-spacing: normal; text-align: left;
  text-transform: none; white-space: normal; overflow-wrap: break-word;
  animation: adm-tip-in var(--t-fast);
}
.adm-tip[hidden] { display: none; }
.adm-tip b { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes adm-tip-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .adm-tip { animation: none; }
}
