/* Layout: jeden stĺpec do 1100px; tabuľka poradovníka na počítači, karty na telefóne. */
:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #5b6772;
  --line: #d5dbe1;
  --accent: #0b5cab;
  --accent-ink: #ffffff;
  --none-bg: #e7ebef;
  --none-fg: #55616c;
  --none-dot: #8b97a2;
  --plan-bg: #fff1c2;
  --plan-fg: #6e4a00;
  --plan-dot: #e0a100;
  --done-bg: #d6f1de;
  --done-fg: #0f5a29;
  --done-dot: #1f9d4d;
  --ready-row: #eaf8ee;
  --t-red: #c62828; --t-red-bg: #fdeceb;
  --t-need-line: #c62828; --t-grey: #eef0f2;
  --t-prep-line: #2e9e4f;
  --t-done-line: #5b78b8; --t-done-fg: #2d4378;
  --danger: #b3261e;
  --only-bg: #dbeafe;
  --only-fg: #0b3d91;
  --only-line: #7fb0f0;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161b; --surface: #1a2128; --ink: #e8edf1; --muted: #9aa7b2; --line: #2c363f;
    --accent: #5aa7ee; --accent-ink: #0b1722;
    --none-bg: #252e36; --none-fg: #a3afba; --none-dot: #7c8893;
    --plan-bg: #3a2f10; --plan-fg: #f0c860; --plan-dot: #e0a100;
    --done-bg: #14351f; --done-fg: #7fdc9d; --done-dot: #35b565;
    --ready-row: #15291c; --danger: #f2877f;
    --t-red: #e5534b; --t-red-bg: #35191a;
    --t-need-line: #e5534b; --t-grey: #161c22;
    --t-prep-line: #35b565;
    --t-done-line: #6d88c9; --t-done-fg: #a9bde8;
    --only-bg: #12294a; --only-fg: #8fc0ff; --only-line: #2f5fa3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11161b; --surface: #1a2128; --ink: #e8edf1; --muted: #9aa7b2; --line: #2c363f;
  --accent: #5aa7ee; --accent-ink: #0b1722;
  --none-bg: #252e36; --none-fg: #a3afba; --none-dot: #7c8893;
  --plan-bg: #3a2f10; --plan-fg: #f0c860; --plan-dot: #e0a100;
  --done-bg: #14351f; --done-fg: #7fdc9d; --done-dot: #35b565;
  --ready-row: #15291c; --danger: #f2877f;
  --t-red: #e5534b; --t-red-bg: #35191a;
  --t-need-line: #e5534b; --t-grey: #161c22;
  --t-prep-line: #35b565;
  --t-done-line: #6d88c9; --t-done-fg: #a9bde8;
    --only-bg: #12294a; --only-fg: #8fc0ff; --only-line: #2f5fa3;
  color-scheme: dark;
}
[hidden] { display: none !important; }
html, body { height: auto; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.45; }
* { box-sizing: border-box; }
.wrap { max-width: 1100px; margin-inline: auto; padding-inline: 16px; padding-block: 20px 40px; display: flex; flex-direction: column; gap: 16px; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1.05; letter-spacing: 0.01em; margin: 0; text-wrap: balance; }
h2 { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: 0.02em; margin: 0; }
.sub { margin: 4px 0 0; color: var(--muted); }
.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.who strong { color: var(--ink); font-weight: 600; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.link { background: none; border: 0; padding: 4px 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px; padding: 10px 18px; font-weight: 600; min-height: 42px; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.notice { background: var(--plan-bg); color: var(--plan-fg); border-radius: 6px; padding: 10px 14px; }
.gate { display: flex; flex-direction: column; gap: 14px; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.role-btn { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.role-btn:hover { border-color: var(--accent); }
.role-btn b { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.02em; }
.role-btn span { color: var(--muted); font-size: 14px; }
form.add { display: flex; flex-direction: column; gap: 12px; }
.fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; align-items: start; }
.fields > .btn { align-self: end; }
.vinwrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vinwrap .check { color: var(--muted); }
.note-f { grid-column: 2 / 4; }
.nopdi-box { grid-column: 2 / 4; grid-row: 3; display: flex; align-items: center; gap: 10px; background: var(--only-bg); color: var(--only-fg); border: 2px solid var(--only-line); border-radius: 8px; padding: 10px 14px; font-size: 15px; font-weight: 600; cursor: pointer; }
.nopdi-box input { width: 22px; height: 22px; flex: none; }
.nopdi-box:has(input:checked) { border-color: var(--only-fg); box-shadow: 0 0 0 2px var(--only-line); }
label.f select { text-transform: none; letter-spacing: 0; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; min-width: 0; }
input[type="text"], input[type="search"], input[type="date"] {
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; min-height: 42px; width: 100%; min-width: 0; font-size: 15px; text-transform: none; letter-spacing: 0;
}
input.vin { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }
.msg:empty { display: none; }
.msg { min-height: 20px; font-size: 14px; color: var(--muted); }
.msg.err { color: var(--danger); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.chip .n { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip[aria-pressed="true"] .n { color: var(--accent-ink); }
.tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tools input[type="search"] { width: 250px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { width: 18px; height: 18px; }
.table { display: flex; flex-direction: column; gap: 8px; }
.cols { display: grid; grid-template-columns: minmax(200px, 1.6fr) minmax(120px, 0.8fr) minmax(215px, 1.3fr) minmax(215px, 1.3fr) 128px; gap: 12px 16px; align-items: start; }
.thead { padding-inline: 16px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.row { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
.row.ready { background: var(--ready-row); border-color: var(--done-dot); }
.row.t-need, .row.t-prep, .row.t-ready { border-left-width: 8px; }
.row.t-need { border-left-color: var(--t-need-line); }
.row.t-prep { border-left-color: var(--t-prep-line); }
.row.t-ready { border-left-color: var(--t-done-line); background: var(--t-grey); }
.row.t-ready > * { opacity: 0.62; transition: opacity 0.2s; }
.row.t-ready:hover > *, .row.t-ready:focus-within > * { opacity: 1; }
.pill.t-done-pill { background: transparent; color: var(--t-done-fg); border: 1px solid var(--t-done-line); }
.cell.t-alert .pill.none { background: var(--t-red); color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.cell.t-alert .picks select:not(:disabled) { border: 2px solid var(--t-red); }
.time-hint { font-size: 13px; font-weight: 600; color: var(--t-red); margin-top: 4px; }
.row.removed { background: var(--none-bg); border-style: dashed; color: var(--none-fg); }
.row.removed .nm { text-decoration: line-through; }
.row.removed .cell, .row.removed .veh-sub, .row.removed .vin { opacity: 0.65; }
.removed-note { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--danger); }
.wtype { font-weight: 600; font-size: 14px; }
.planned { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
details.panel > summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: 0.02em; }
#adminList { display: flex; flex-direction: column; margin-top: 8px; }
.urow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 240px); gap: 12px; align-items: center; padding-block: 10px; border-top: 1px solid var(--line); }
.uname { font-weight: 600; }
.urow .d { color: var(--muted); font-size: 13px; }
.c-act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.note { font-size: 14px; margin-top: 6px; }
.note-box { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; margin-top: 2px; }
.note-box input { max-width: 420px; }
.note-box .link { font-size: 13px; padding: 2px 0; }
.row-actions { flex-direction: row; }
.hist { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.hist-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: 0.02em; }
.hist-row { display: grid; grid-template-columns: 150px 130px minmax(0, 1fr); gap: 4px 12px; }
.hist-when { color: var(--muted); font-variant-numeric: tabular-nums; }
.hist-who { font-weight: 600; }
@media (max-width: 899px) { .hist-row { grid-template-columns: minmax(0, 1fr); } }
.confirm { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.confirm-q { font-weight: 600; }
.veh-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.1; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.veh-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.vin { font-family: var(--font-mono); font-weight: 500; color: var(--ink); }
.who-cell { font-size: 14px; }
.who-cell .d { color: var(--muted); font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 3px 11px 3px 9px; font-size: 13px; font-weight: 600; width: fit-content; }
.pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.pill.none { background: var(--none-bg); color: var(--none-fg); }
.pill.plan { background: var(--plan-bg); color: var(--plan-fg); }
.pill.done { background: var(--done-bg); color: var(--done-fg); }
.pill.only { background: var(--only-bg); color: var(--only-fg); }
.cell.nopdi { background: var(--only-bg); color: var(--only-fg); border: 1px solid var(--only-line); border-radius: 8px; padding: 6px 10px; width: fit-content; }
.cell.nopdi .pill { background: transparent; padding: 0; font-size: 13px; }
.pill.big { font-size: 14px; padding: 4px 12px 4px 10px; }
.dcell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dcell .dt { font-variant-numeric: tabular-nums; font-size: 14px; }
.picks { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 6px; }
select { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 8px 6px; min-height: 40px; width: 100%; min-width: 0; font-size: 14px; }
select:disabled { opacity: 0.5; }
.cell::before { display: none; }
.empty { text-align: center; color: var(--muted); padding: 32px 16px; }
.empty b { display: block; color: var(--ink); font-family: var(--font-display); font-size: 22px; margin-bottom: 4px; font-weight: 600; }
.actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
@media (max-width: 899px) {
  .thead { display: none; }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields .btn { grid-column: 1 / -1; }
  .note-f { grid-column: 1 / -1; }
  .nopdi-box { grid-column: 1 / -1; grid-row: auto; }
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .c-veh, .c-who, .c-act { grid-column: 1 / -1; }
  .cell::before { display: block; content: attr(data-label); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
  .c-veh::before, .c-act::before { display: none; }
  .actions { flex-direction: row; }
  .tools input[type="search"] { width: 100%; }
  .tools { width: 100%; }
}
@media (max-width: 899px) { .typewrap { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .row { padding: 14px; }
  .picks { grid-template-columns: minmax(0, 1fr) 118px; }
}
@media (max-width: 420px) {
  h1 { font-size: 30px; }
  .panel { padding: 14px; }
}
@media (max-width: 340px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .row { transition: background-color 0.25s, border-color 0.25s; }
}

/* ---- samostatná verzia: prihlásenie a správa používateľov ---- */
.login { max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.login form { display: flex; flex-direction: column; gap: 12px; }
.mgmt-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; align-items: start; margin-top: 8px; }
.mgmt-form .btn { align-self: end; }
.urow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(150px, 1fr) auto; gap: 10px 14px; align-items: center; padding-block: 12px; border-top: 1px solid var(--line); }
.urow.off { opacity: 0.6; }
.uname { font-weight: 600; }
.u-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pw-line { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pw-line input { max-width: 260px; }
.tag { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--only-fg); background: var(--only-bg); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.top-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
@media (max-width: 899px) {
  .mgmt-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mgmt-form .btn { grid-column: 1 / -1; }
  .urow { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) { .mgmt-form { grid-template-columns: minmax(0, 1fr); } }
input[type="password"], input[type="text"].plain { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; min-height: 42px; width: 100%; min-width: 0; font-size: 15px; }

/* ---- základ stránky mimo Claude ---- */
html { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
body { margin: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }

.queue-hint { margin: 0; padding: 8px 12px; border-radius: 6px; background: var(--only-bg); color: var(--only-fg); font-size: 14px; }
.qline { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.qn { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1; min-width: 36px; text-align: center; padding: 4px 8px; border-radius: 6px; background: var(--none-bg); color: var(--none-fg); }
.qn.first { background: var(--accent); color: var(--accent-ink); }
.qwait { font-size: 13px; color: var(--muted); }

.keys-hint { margin: 0; padding: 10px 12px; border-radius: 6px; background: var(--plan-bg); color: var(--plan-fg); border: 1px solid var(--plan-dot); font-size: 14px; }

.urgent-box { grid-column: 2 / 4; grid-row: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; border: 2px solid var(--t-red); background: var(--t-red-bg); color: var(--t-red); border-radius: 8px; padding: 10px 14px; font-size: 15px; font-weight: 600; }
.urgent-box .ub-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.urgent-box input[type="checkbox"] { width: 22px; height: 22px; flex: none; }
.urgent-box .ub-date { flex: 1 1 200px; color: var(--t-red); }
.urgent-badge { font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: 0.03em; color: #fff; background: var(--t-red); border-radius: 6px; padding: 3px 9px; }
.linkbtn { background: none; border: 0; padding: 0; margin-top: 6px; color: var(--accent); text-decoration: underline; font-size: 14px; cursor: pointer; text-align: left; }
.urg-edit { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; max-width: 280px; }
@media (max-width: 899px) { .urgent-box { grid-column: 1 / -1; grid-row: auto; } }
.brandbar { background: #1d1d1b; padding-block: 12px; }
.brandbar-in { max-width: 1100px; margin-inline: auto; padding-inline: 16px; }
.brandbar img { display: block; height: 24px; width: auto; max-width: 100%; }

.login-help { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.login-help p { margin: 0; }
.login-help b { color: var(--ink); }
.login-help a { color: var(--accent); }

.login-intro { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.msg.ok { color: var(--done-fg); }
.d.warn { color: var(--t-red); }
.login .link { align-self: flex-start; }
