/* k3reports page. Meaning is never carried by colour alone: the meter has a number, a word and a bar length. */
:root { --ink: #1b1b1b; --muted: #555; --line: #ccc; --accent: #0b5cad; --bg: #fff; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, sans-serif; color: var(--ink); background: var(--bg); }
header { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 1rem;
         border-bottom: 1px solid var(--line); }
header h1 { margin: 0; font-size: 1.2rem; }
main { padding: 1rem; max-width: 64rem; }
.hidden { display: none !important; }
label { display: block; margin: 0.5rem 0; }
input, select, button { font: inherit; padding: 0.3rem 0.5rem; }
input:not([type=date]):not([type=checkbox]) { width: 100%; max-width: 24rem; display: block; }
button { cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 3px; }
#logout { background: #fff; color: var(--accent); margin-left: 0.6rem; }
#message { margin: 0.6rem 1rem; padding: 0.5rem 0.7rem; border: 2px solid var(--ink); font-weight: 600; }
.window { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: end; }
.window label { margin: 0; }
.note { color: var(--muted); margin-top: 0; }
table { border-collapse: collapse; width: 100%; margin-bottom: 1.5rem; }
th, td { text-align: left; padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--line); }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.errors-nonzero { font-weight: 700; }
td.errors-nonzero::before { content: "! "; }
.meter { margin: 0.6rem 0; max-width: 24rem; }
.meter-bar { height: 0.7rem; border: 1px solid var(--ink); }
.meter-fill { height: 100%; background: var(--ink); }
.meter-fill.s0 { width: 4%; } .meter-fill.s1 { width: 25%; } .meter-fill.s2 { width: 50%; }
.meter-fill.s3 { width: 75%; } .meter-fill.s4 { width: 100%; }
#meter-text { margin: 0.3rem 0; }
h3 { font-size: 1rem; margin: 1rem 0 0.3rem; }
fieldset { border: 1px solid var(--line); padding: 0.3rem 0.7rem; display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem;
           align-items: center; }
fieldset legend { padding: 0 0.3rem; }
fieldset label { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; white-space: nowrap; }
fieldset input[type=checkbox] { margin: 0; width: 1.05rem; height: 1.05rem; }

/* Busy: the area being loaded blurs and shows a spinner and the word "Loading..." (never motion or colour alone). */
.area, .step { position: relative; }
.busy > * { filter: blur(1.5px); opacity: 0.45; pointer-events: none; }
.busy::before { content: ""; position: absolute; left: 50%; top: 2.5rem; width: 2rem; height: 2rem; margin-left: -1rem;
                border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; z-index: 2;
                animation: spin 0.8s linear infinite; }
.busy::after { content: "Loading..."; position: absolute; left: 0; right: 0; top: 5rem; text-align: center;
               font-weight: 600; z-index: 2; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .busy::before { animation: none; } }
svg.chart { width: 100%; height: auto; max-width: 960px; font: 12px system-ui, sans-serif; }
.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0.3rem 0 1rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
#live-toggle.on { background: #fff; color: var(--accent); }
td.not-ok { font-weight: 700; }
td.not-ok::before { content: "! "; }
td.ref { font-family: ui-monospace, monospace; font-size: 0.9em; }
#qr { display: block; margin: 0.6rem 0; image-rendering: pixelated; }
code { font-size: 1rem; letter-spacing: 0.05em; }
