/* Evidencia PC a manuál správcu IKT.
   Systémové písmo (žiadne externé fonty), chladné sivomodré neutrály a jeden petrolejový akcent. */
:root {
  --bg: #f1f5f8;
  --surface: #ffffff;
  --fg: #13222d;
  --muted: #4e606c;
  --line: #d2dce3;
  --accent: #0a6c8f;
  --accent-ink: #ffffff;
  --accent-soft: #dff0f6;
  --ok: #17794a;
  --ok-soft: #dcf2e5;
  --err-ink: #8a1f1f;
  --err-soft: #fbe4e4;
  --warn-ink: #7a4d00;
  --warn-soft: #fdf1d3;
  --warn-line: #e6c36f;
  --head-bg: #e8eef2;
  --input-bg: #fbfcfd;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e171d;
    --surface: #162129;
    --fg: #e5ecf0;
    --muted: #9bb0bc;
    --line: #2a3a44;
    --accent: #5cc3e8;
    --accent-ink: #06222d;
    --accent-soft: #15333f;
    --ok: #5fd39a;
    --ok-soft: #143826;
    --err-ink: #ffb4b4;
    --err-soft: #3d1c1c;
    --warn-ink: #f0c56b;
    --warn-soft: #362d12;
    --warn-line: #6b5720;
    --head-bg: #1f2e38;
    --input-bg: #101a20;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { color-scheme: light; }
@media (prefers-color-scheme: dark) { html { color-scheme: dark; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}
h1, h2, h3 { text-wrap: balance; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 2px; }
code, .mono { font-family: var(--font-mono); font-size: 0.9em; }
code { background: var(--head-bg); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Navigácia */
.topnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.topnav-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.brand { font-weight: 600; color: var(--fg); text-decoration: none; }
.brand-sub { font-family: var(--font-mono); font-weight: 400; font-size: 0.8rem; color: var(--muted); margin-left: 6px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.links a { color: var(--fg); text-decoration: none; padding: 5px 10px; border-radius: 6px; }
.links a:hover { background: var(--head-bg); }
.links a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.me { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.me-name { color: var(--fg); text-decoration: none; font-weight: 500; }
.me-name:hover { text-decoration: underline; }
.me-name[aria-current="page"] { text-decoration: underline; }
.role { font-size: 0.75rem; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--head-bg); color: var(--muted); }
.role-admin { background: var(--accent-soft); color: var(--accent); }
.role-editor { background: var(--ok-soft); color: var(--ok); }
form.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 16px 56px; display: flex; flex-direction: column; gap: 18px; }
.wrap > * { min-width: 0; }

/* Hlásenia */
.flash { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.flash-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.flash-err { background: var(--err-soft); color: var(--err-ink); border-color: transparent; }

/* Karty a formuláre */
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.card { display: flex; flex-direction: column; gap: 12px; }
.card.narrow { max-width: 440px; width: 100%; margin: 24px auto 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack label { font-weight: 500; margin-top: 4px; }
.stack .btn { margin-top: 10px; align-self: flex-start; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.grid-form > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.grid-form label { font-weight: 500; }
input[type="text"], input[type="password"], input[type="date"], select {
  background: var(--input-bg); border: 1px solid var(--line); border-radius: 5px; padding: 6px 9px; width: 100%; min-width: 0; line-height: 1.3;
}
input:disabled, select:disabled { opacity: 0.75; cursor: default; }
.sel-inline { width: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 6px; padding: 7px 14px; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn.alt { background: transparent; color: var(--accent); }
.btn.small { padding: 3px 10px; font-size: 0.88rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.copy { font-family: inherit; font-size: 0.82rem; background: transparent; color: var(--accent); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; cursor: pointer; }
.copy:hover { border-color: var(--accent); }
.copyrow { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; }
.inline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.inline-row input[type="password"] { width: 11em; }
.inline-row select { width: auto; }
.state-on { color: var(--ok); font-weight: 600; }
.state-off { color: var(--err-ink); font-weight: 600; }

/* Hlavičky stránok */
.page-head { display: flex; flex-direction: column; gap: 8px; }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.lead { color: var(--muted); max-width: 68ch; }
.admin-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.admin-line label { font-weight: 500; }
.admin-line input { width: 9em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chips a { text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: 5px 12px; border-radius: 999px; font-size: 0.9rem; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.note { font-size: 0.85rem; color: var(--muted); max-width: 90ch; }

/* Prehľad a export */
.overview { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.overview > * { min-width: 0; }
.prog { display: flex; flex-direction: column; gap: 6px; flex: 1 1 280px; }
.prog .line { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.bar { display: block; height: 8px; border-radius: 99px; background: var(--head-bg); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ok); width: 0; border-radius: 99px; }
.exp { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.exp label { font-size: 0.88rem; color: var(--muted); }

/* Záložky učební */
.tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.tab { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tab:hover { border-color: var(--accent); }
.tab[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.tab .t1 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tab .rc { font-family: var(--font-mono); font-weight: 600; }
.tab .cnt { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tab .t2 { font-size: 0.8rem; color: var(--muted); overflow-wrap: anywhere; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.toolbar .resp { display: inline-flex; align-items: center; gap: 8px; }
.toolbar .resp input { width: 8em; }
.toolbar .spacer { flex: 1 1 auto; }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chk input { width: 17px; height: 17px; accent-color: var(--accent); }

/* Tabuľky */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; }
table.grid { min-width: 1120px; }
table.plain { min-width: 560px; font-size: 0.93rem; }
th, td { padding: 5px 6px; border-top: 1px solid var(--line); vertical-align: middle; text-align: left; }
table.plain th, table.plain td { padding: 10px 14px; vertical-align: top; }
thead th { border-top: 0; background: var(--head-bg); font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 8px 6px; vertical-align: bottom; }
table.plain thead th { padding: 10px 14px; }
thead th .hint { display: block; text-transform: none; letter-spacing: 0; font-size: 0.74rem; font-weight: 400; opacity: 0.85; }
td.seat { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 500; padding-left: 10px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: var(--line); box-shadow: inset 0 0 0 1px var(--muted); }
tr.done .dot { background: var(--ok); box-shadow: none; }
td.roomc { white-space: nowrap; font-size: 0.85rem; }
td.by { font-size: 0.8rem; color: var(--muted); min-width: 170px; }
.c-device { min-width: 110px; } .c-cpu { min-width: 170px; } .c-ram { min-width: 90px; } .c-sys { min-width: 100px; }
.c-os { min-width: 140px; } .c-osver { min-width: 90px; } .c-date { min-width: 140px; } .c-note { min-width: 170px; }
.empty { color: var(--muted); padding: 28px 8px; text-align: center; }
.status { min-height: 1.5em; font-size: 0.9rem; color: var(--muted); }
.status.err { color: var(--err-ink); background: var(--err-soft); padding: 8px 12px; border-radius: 6px; }

/* Manuál */
.school-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.school-card > * { min-width: 0; }
.label { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.school-name { font-weight: 600; font-size: 1.05rem; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.codebox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.code { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 500; background: var(--accent-soft); padding: 6px 12px; border-radius: 6px; overflow-wrap: anywhere; }
.hint { font-size: 0.88rem; color: var(--muted); margin-top: 8px; }
.callout { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn-ink); border-radius: 8px; padding: 12px 16px; }
.sec { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 16px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.progress { font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.deadline { font-size: 0.92rem; color: var(--muted); }
.tasks { list-style: none; margin: 0; padding: 0; counter-reset: task; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.tasks li { counter-increment: task; border-top: 1px solid var(--line); }
.tasks li:first-child { border-top: 0; }
.tasks label { display: grid; grid-template-columns: 1.6em 22px minmax(0, 1fr); gap: 10px; padding: 14px 18px; cursor: pointer; align-items: start; }
.tasks label::before { content: counter(task); color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; font-size: 0.9rem; padding-top: 1px; }
.tasks input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.tasks .t { font-weight: 500; display: block; }
.tasks .d { display: block; color: var(--muted); font-size: 0.93rem; margin-top: 2px; font-weight: 400; }
.tasks input:checked ~ div .t { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.tasks input:disabled { cursor: default; }
@media (max-width: 480px) { .tasks label { padding: 12px; gap: 8px; grid-template-columns: 1.3em 22px minmax(0, 1fr); } }
ol.steps { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; }
ol.steps li::marker { color: var(--accent); font-weight: 600; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.cols > * { min-width: 0; }
.panel h3 { margin-bottom: 8px; }
.panel .sub, .panel .when { color: var(--muted); font-size: 0.92rem; margin-bottom: 10px; }
.pathcell { font-family: var(--font-mono); font-size: 0.85rem; margin-bottom: 6px; }
.state { display: inline-block; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--accent-soft); font-size: 0.85rem; white-space: nowrap; }
.infolist { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 6px 20px; }
.infolist li { display: flex; flex-direction: column; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.infolist .k { font-weight: 500; }
.infolist .e { color: var(--muted); font-size: 0.88rem; }
.group-title { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-top: 6px; }
.phones { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.foot { color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); padding-top: 14px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
