@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600&family=Barlow+Condensed:wght@600;700;800&display=swap");

/* Barvy z loga: tmavě zelená a mosaz. Světlý režim = transparent C, tmavý = transparent A. */
:root {
  --bg: #edf0ee; --surface: #ffffff; --surface2: #f3f5f4; --ink: #16201b; --muted: #57655d; --line: #cfd8d3;
  --brand: #1d2b25; --brass: #c39a4c; --brass-ink: #8a6a2c;
  --primary: #1d2b25; --on-primary: #ffffff;
  --go: #17834a; --on-go: #ffffff; --go-soft: #d9f0e2;
  --stop: #c3322a; --on-stop: #ffffff; --stop-soft: #f8dedb;
  --warn: #a86f00; --warn-soft: #fbefd2; --acc-soft: #efe3c8;
  --bn-bg: #ffffff; --bn-ink: #1d2b25; --bn-sub: #8a6a2c; --bn-edge: #1d2b25; --bn-wedge: #1d2b25; --bn-piston: #c39a4c; --bn-hi: #ecd08f;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
/* Tmavý režim: podle telefonu, nebo ručně v Můj účet → Vzhled (data-theme na <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1512; --surface: #17221d; --surface2: #1e2b25; --ink: #e5ece8; --muted: #95a69c; --line: #2b3a33;
    --primary: #c39a4c; --on-primary: #14100a;
    --go: #2fb26a; --on-go: #06170d; --go-soft: #14321f;
    --stop: #e5584b; --on-stop: #1e0806; --stop-soft: #3a1714;
    --warn: #e3a72a; --warn-soft: #3a2d10; --acc-soft: #3a2f18;
    --bn-bg: #1d2b25; --bn-ink: #ffffff; --bn-sub: #c39a4c; --bn-edge: #1d2b25; --bn-wedge: #c39a4c; --bn-piston: #1d2b25; --bn-hi: #ffffff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1512; --surface: #17221d; --surface2: #1e2b25; --ink: #e5ece8; --muted: #95a69c; --line: #2b3a33;
  --primary: #c39a4c; --on-primary: #14100a;
  --go: #2fb26a; --on-go: #06170d; --go-soft: #14321f;
  --stop: #e5584b; --on-stop: #1e0806; --stop-soft: #3a1714;
  --warn: #e3a72a; --warn-soft: #3a2d10; --acc-soft: #3a2f18;
  --bn-bg: #1d2b25; --bn-ink: #ffffff; --bn-sub: #c39a4c; --bn-edge: #1d2b25; --bn-wedge: #c39a4c; --bn-piston: #1d2b25; --bn-hi: #ffffff;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.35 var(--body); }
.wrap { max-width: 560px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
svg { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1 { font: 700 28px/1.1 var(--display); margin: 0; }
h3 { font: 700 22px var(--display); margin: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.hint { font-size: 14px; color: var(--muted); margin: 0; }
.sel { user-select: all; }

/* Transparent se jménem */
.bn { display: flex; height: 76px; background: var(--bn-bg); border: 2px solid var(--bn-edge); border-radius: 14px; overflow: hidden; text-decoration: none; }
.bn-t { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding-left: 16px; min-width: 0; }
.bn-t b { font: 800 34px/0.95 var(--display); color: var(--bn-ink); letter-spacing: 1px; white-space: nowrap; }
.bn-t span { display: flex; align-items: center; gap: 8px; font: 600 12px var(--display); letter-spacing: 6px; color: var(--bn-sub); }
.bn-t i { width: 24px; height: 2px; background: var(--bn-sub); }
.bn-w { width: 150px; flex: none; background: var(--bn-wedge); clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%); display: flex; align-items: center; }
.bn-w svg { width: 100%; height: 100%; stroke: none; }
/* písty z finálního návrhu (varianta B): tělo v barvě pístu, kroužky, ojnice a čepy v barvě klínu */
.bn .p { color: var(--bn-piston); }
.bn .p.hi { color: var(--bn-hi); }
.bn .pf { fill: currentColor; }
.bn .ph { fill: var(--bn-wedge); }
.bn .ph-s { stroke: var(--bn-wedge); stroke-width: 3.5; fill: none; }
@media (min-width: 400px) and (max-width: 759px) { .bn-w { width: 175px; } }
@media (max-width: 379px) { .bn-t b { font-size: 28px; } .bn-t span { letter-spacing: 4px; } .bn-w { width: 112px; } }

.userbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); padding: 8px 2px 4px; }
.userbar form { margin: 0; }
.link { border: 0; background: none; color: var(--muted); text-decoration: underline; padding: 8px 0; font-size: 14px; }
.pagehead { display: flex; align-items: center; gap: 10px; padding: 6px 0 12px; }
.back { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; font-size: 24px; flex: none; }

/* Úvodní dlaždice */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 12px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 140px; padding: 18px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.tile svg { font-size: 38px; color: var(--brass-ink); margin-bottom: auto; }
.tile b { font: 700 24px/1.05 var(--display); }
.tile small { font-size: 14px; color: var(--muted); }
.tile-main { grid-column: 1 / -1; min-height: 120px; background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.tile-main svg, .tile-main small { color: var(--on-primary); opacity: .9; }
.badge { position: absolute; top: 12px; right: 12px; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; background: var(--stop); color: var(--on-stop); font-weight: 600; font-size: 15px; }
.badge.warn { background: var(--warn); }
.running { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: var(--go-soft); color: var(--go); font-weight: 600; text-decoration: none; }

/* Tlačítka */
.big { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 72px; border-radius: 16px; border: 0; font: 700 23px var(--display); letter-spacing: .02em; padding: 10px 16px; text-align: center; text-decoration: none; }
.big svg { font-size: 28px; }
.primary { background: var(--primary); color: var(--on-primary); }
.go { background: var(--go); color: var(--on-go); }
.second { background: var(--surface); color: var(--ink); border: 2px solid var(--line); }
.warnbtn { background: var(--warn-soft); color: var(--ink); border: 2px solid var(--warn); }
.small { min-height: 48px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface2); font-weight: 600; font-size: 15px; }
form { margin: 0; }

/* Značka CZ */
.plate { display: inline-flex; align-items: stretch; background: #fff; color: #111; border: 2px solid #222; border-radius: 6px; overflow: hidden; font: 700 25px/1 var(--display); letter-spacing: .07em; white-space: nowrap; }
.plate .eu { background: #1f4fb5; color: #fff; font-size: 11px; display: flex; align-items: flex-end; padding: 0 5px 4px; }
.plate .pl { padding: 7px 10px 6px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

.job { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-decoration: none; }
.job.quiet { opacity: .85; }
.jmeta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jmeta b { font-size: 19px; }
.jmeta span { color: var(--muted); }
.jfoot { display: flex; align-items: center; gap: 10px; }
.jt { font: 700 20px var(--display); font-variant-numeric: tabular-nums; margin-left: auto; }
.chip { display: inline-flex; align-self: flex-start; align-items: center; padding: 5px 10px; border-radius: 999px; font-weight: 600; font-size: 14px; white-space: nowrap; margin-top: 4px; }
.c-go { background: var(--go-soft); color: var(--go); }
.c-warn { background: var(--warn-soft); color: var(--warn); }
.c-acc { background: var(--acc-soft); color: var(--brass-ink); }
.c-mut { background: var(--surface2); color: var(--muted); }
.c-err { background: var(--stop-soft); color: var(--stop); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .c-acc { color: var(--brass); } }
:root[data-theme="dark"] .c-acc { color: var(--brass); }
.live { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--go); font-size: 14px; }
.live::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--go); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live::before { animation: none; } }
.sec { font: 700 15px var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 0; display: flex; justify-content: space-between; }
.sec span { color: var(--ink); font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; }
.alert { background: var(--stop-soft); color: var(--stop); border-radius: 12px; padding: 14px; font-weight: 600; }
.note { background: var(--surface2); border-radius: 12px; padding: 12px 14px; color: var(--muted); }

/* Formuláře */
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld label { font-weight: 600; font-size: 15px; color: var(--muted); }
.fld input, .fld textarea, .stepper input { width: 100%; min-height: 56px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); padding: 12px 14px; font-size: 19px; }
.fld textarea { min-height: 90px; resize: vertical; }
.plate-in { font: 700 24px var(--display) !important; letter-spacing: .08em; text-transform: uppercase; }
.pin { font-size: 28px !important; letter-spacing: .4em; text-align: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info { background: var(--surface); border: 2px solid var(--brass); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 600; }
.check input { width: 24px; height: 24px; }

.dhead { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.dhead b { font-size: 20px; }
.dhead > span { color: var(--muted); }

.trow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 12px 16px; }
.trow.me { border: 2px solid var(--brass); }
.tname { font-weight: 600; font-size: 18px; display: block; }
.tval { font: 700 32px var(--display); font-variant-numeric: tabular-nums; display: block; }
.tbtn { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 150px; min-height: 76px; border: 0; border-radius: 14px; font: 700 24px var(--display); letter-spacing: .04em; }
.tbtn svg { font-size: 26px; }
.tbtn.go { background: var(--go); color: var(--on-go); }
.tbtn.stop { background: var(--stop); color: var(--on-stop); }
.tbtn.view { background: var(--surface2); color: var(--muted); font-size: 17px; }

.prow { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.prow > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prow b { font-size: 18px; }
.prow span { font-size: 14px; color: var(--muted); }
.prow .chip { font-size: 13px; }
.qty { font: 700 20px var(--display); white-space: nowrap; }
.pick { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-height: 76px; }
.pick b { font-size: 19px; display: block; }
.pick small { display: block; font-size: 14px; color: var(--muted); }
.pick.mine { border: 2px solid var(--go); background: var(--go-soft); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; font-weight: 600; font-size: 18px; cursor: pointer; }
.switch small { color: var(--muted); font-weight: 400; font-size: 14px; }
.switch input { position: absolute; opacity: 0; }
.knob { width: 56px; height: 32px; border-radius: 999px; background: var(--line); position: relative; flex: none; }
.knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); transition: left .15s; }
.switch:has(input:checked) { border-color: var(--warn); background: var(--warn-soft); }
.switch:has(input:checked) .knob { background: var(--warn); }
.switch:has(input:checked) .knob::after { left: 27px; }

.oil { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.oil > div:first-child { display: flex; flex-direction: column; }
.stepper { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 8px; }
.oil .stepper { grid-template-columns: 56px 64px 56px; }
.stepper button { width: 100%; height: 56px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font: 700 30px var(--display); }
.stepper output { text-align: center; font: 700 20px var(--display); }
.stepper input { text-align: center; font: 700 26px var(--display); }
.big-step { grid-template-columns: 64px 1fr 64px; }
.big-step button { height: 64px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card summary { cursor: pointer; min-height: 32px; }
.row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.row.muted { color: var(--muted); font-size: 15px; }
.row.tot { font: 700 28px var(--display); border-top: 2px solid var(--line); padding-top: 12px; }
.line { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.line div { display: flex; flex-direction: column; min-width: 0; }
.line div span { font-size: 14px; color: var(--muted); }
.price { font: 700 20px var(--display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cp { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.cp > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.cp span { font-size: 14px; color: var(--muted); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--surface2); border-radius: 14px; padding: 4px; }
.seg label, .seg a { display: grid; }
.seg3 { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .seg a { min-height: 52px; display: grid; place-items: center; border-radius: 11px; font-weight: 600; font-size: 16px; color: var(--muted); padding: 4px 6px; text-align: center; text-decoration: none; cursor: pointer; }
.seg input:checked + span, .seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.seg .s-use input:checked + span { background: var(--go); color: var(--on-go); }
.seg .s-ret input:checked + span { background: var(--warn); color: var(--surface); }
.seg input:focus-visible + span { outline: 3px solid var(--brass); }

.shot { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 110px; border-radius: 16px; border: 2px dashed var(--brass); background: var(--acc-soft); text-align: center; padding: 12px; cursor: pointer; }
.shot svg { font-size: 40px; color: var(--brass-ink); }
.shot b { font: 700 22px var(--display); }
.shot.busy { opacity: .6; pointer-events: none; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }

.sum { display: flex; flex-direction: column; border-radius: 16px; padding: 18px; font: 700 24px var(--display); }
.sum small { font: 500 14px var(--body); color: var(--ink); }
.sum.ok { background: var(--go-soft); color: var(--go); }
.sum.warn { background: var(--warn-soft); color: var(--warn); }
.drow { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.card h3 + .drow { border-top: 0; padding-top: 0; }
.drow div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.drow b { font-size: 17px; }
.drow span { font-size: 14px; color: var(--muted); }

/* Přihlášení */
.login { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: max(40px, env(safe-area-inset-top)); }
.login > form, .login > .card { width: 100%; }
.login-icon { border-radius: 28px; }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.who-btn input { position: absolute; opacity: 0; }
.who-btn span { display: flex; flex-direction: column; gap: 2px; min-height: 84px; justify-content: center; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); cursor: pointer; }
.who-btn b { font: 700 22px var(--display); }
.who-btn small { color: var(--muted); }
.who-btn input:checked + span { border-color: var(--brass); background: var(--acc-soft); }
pre { white-space: pre-wrap; background: var(--surface2); padding: 10px; border-radius: 8px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--bg); padding: 14px 20px; border-radius: 14px; font-weight: 600; max-width: calc(100% - 32px); text-align: center; z-index: 10; }
@media (max-width: 380px) { .grid2 { grid-template-columns: 1fr; } .tbtn { min-width: 120px; } }

/* Historie, nastavení, fotky */
.okmsg { background: var(--go-soft); color: var(--go); border-radius: 12px; padding: 14px; font-weight: 600; }
a.alert { display: block; text-decoration: none; margin-top: 12px; }
.searchbar { display: grid; grid-template-columns: 1fr 64px; gap: 8px; }
.searchbar input { min-height: 60px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); padding: 12px 16px; font: 700 22px var(--display); letter-spacing: .03em; }
.searchbar .small { min-height: 60px; font-size: 26px; display: grid; place-items: center; }
.select { width: 100%; min-height: 56px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); padding: 12px 14px; font-size: 19px; }
.card.quiet { opacity: .7; }
.dhead a { color: inherit; }
a.plate { text-decoration: none; }
.shots4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shot.sm { min-height: 92px; flex-direction: column; gap: 6px; }
.shot.sm svg { font-size: 30px; }
.shot.sm b { font-size: 19px; }
.thumbs a { position: relative; display: block; }
.tlabel { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 6px; }
.lightbox { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.15); color: #fff; width: 56px; height: 56px; border-radius: 50%; font-size: 28px; }
.lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); color: #fff; font-weight: 600; }
.htmx-request { opacity: .6; transition: opacity .15s; }

.monthnav { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 8px; text-align: center; }
.monthnav b { font: 700 24px var(--display); }
.monthnav .small { display: grid; place-items: center; text-decoration: none; font-size: 26px; min-height: 56px; }

/* Počítač a tablet */
.split, .split > .col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cards { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 760px) {
  .wrap { max-width: 1080px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tile-main { grid-column: span 2; }
  .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 20px; }
  .shots4 { grid-template-columns: repeat(4, 1fr); }
  .thumbs { grid-template-columns: repeat(6, 1fr); }
  form.stack:not(#job), .card, .who { max-width: 100%; }
  .login { max-width: 520px; }
  .bn { height: 88px; }
  .bn-t b { font-size: 40px; }
  .bn-w { width: 227px; }
}
@media (min-width: 1100px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.svcgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.svc { width: 100%; min-height: 72px; display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); }
.svc svg { font-size: 24px; color: var(--brass-ink); }
.svc b { display: block; font-size: 16px; }
.svc small { display: block; font-size: 13px; color: var(--muted); }
.oil .exact { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.oil .exact input { min-height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); padding: 8px 12px; font-size: 17px; }
.oil .stepper { grid-template-columns: 56px 76px 56px; }
.dhead a.plate, a.plate { color: #111; }

/* ---- spojení, fronta fotek, neuložené akce ---- */
.conn { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--go); margin-right: 8px; vertical-align: 0; }
.conn.off { background: var(--stop); }
.offline { margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: var(--stop); color: var(--on-stop); font-weight: 600; }
.pending { margin-top: 8px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--ink); border: 1px solid var(--warn); font-weight: 600; }
button.failed { background: var(--stop-soft) !important; color: var(--stop) !important; border: 2px solid var(--stop) !important; }

/* ---- docházka na úvodní stránce ---- */
.att { margin-top: 12px; display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.att-s { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.att-s small { color: var(--muted); }
.att-b { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.day { align-items: flex-start; }
.day.we b { color: var(--muted); }
.entry { display: grid; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.btns { display: flex; gap: 8px; }
.sel-big { width: 100%; min-height: 56px; font-size: 18px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); }

/* ---- předávací protokol ---- */
.protorow { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 2px dashed var(--brass); text-decoration: none; color: var(--ink); }
.protorow svg { width: 34px; height: 34px; flex: none; color: var(--brass-ink); fill: none; stroke: currentColor; stroke-width: 1.8; }
.protorow span { display: grid; }
.protorow small { color: var(--muted); }
.protorow.done { border-style: solid; border-color: var(--go); }
.protorow.done svg { color: var(--go); }
.sigpad { display: grid; gap: 8px; }
.sigpad canvas { width: 100%; height: 200px; background: #fff; border: 2px solid var(--line); border-radius: 12px; touch-action: none; }
.sigimg { width: 100%; max-width: 360px; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.appr { display: grid; padding: 8px 0; border-bottom: 1px solid var(--line); }
.appr small { color: var(--muted); }
.svc.pkg { border-color: var(--brass); }
.quiet summary { cursor: pointer; }
details.card:not([open]) { gap: 0; }

/* ---- sleva pro zákazníka při uzavření ---- */
.pct { display: inline-flex; align-items: center; gap: 6px; }
.pct input { width: 96px; min-height: 48px; text-align: right; font-size: 18px; padding: 0 10px; border-radius: 10px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); }
.warn-text { color: var(--stop) !important; font-weight: 600; }
.pick small.transit { color: var(--warn); font-weight: 600; }
.tabs4 { grid-template-columns: repeat(4, 1fr) !important; }
.tabs4 a { font-size: 15px; }
.seg .s-miss input:checked + span { background: var(--stop); color: var(--on-stop); }
.oil:has(> a.small) { grid-template-columns: 1fr auto auto; }
.prow > a.small { align-self: center; display: inline-grid; place-items: center; text-decoration: none; color: var(--ink); }
.oil > a.small { display: inline-grid; place-items: center; text-decoration: none; color: var(--ink); }

/* fotka dílu na zakázce */
.pthumb { flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--warn-soft); display: grid; place-items: center; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pthumb.lg { width: 88px; height: 88px; }
.pthumb.nophoto { font-size: 13px; color: var(--warn); text-align: center; border-style: dashed; padding: 4px; }
.shot.pshot { min-height: 48px; padding: 6px 12px; gap: 8px; border-width: 2px; }
.shot.pshot svg { font-size: 24px; }
.shot.pshot b { font-size: 17px; }
.shot.pshot.need { border-style: solid; border-color: var(--warn); }
.cp > div.cphead { flex-direction: row; align-items: center; gap: 12px; }
.cphead > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prow > .pact { flex: none; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.pact .small { width: 100%; }

.userbar .me { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.userbar .me:active { opacity: .7; }
[hidden] { display: none !important; }
[data-pk-offer] { margin: 12px 0; }
.psearch { position: sticky; top: 0; z-index: 3; padding: 6px 0; background: var(--bg); }
.psearch input { width: 100%; min-height: 56px; font-size: 19px; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); }
.psearch input:focus { outline: none; border-color: var(--brass, #c39a4c); }

/* ===== Počítač (kancelář): boční menu, tabulky, dva sloupce ===== */
.side, .desk-only { display: none; }
.dtable { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 15px; }
.dtable th { text-align: left; font: 600 12px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; background: var(--surface2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.dtable th[data-sort] { cursor: pointer; user-select: none; }
.dtable th[data-sort]::after { content: " ↕"; opacity: .35; }
.dtable th.asc::after { content: " ↑"; opacity: 1; }
.dtable th.desc::after { content: " ↓"; opacity: 1; }
.dtable td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable tbody tr:hover td { background: var(--surface2); }
.dtable tr[data-href] { cursor: pointer; }
.dtable tr.quiet td { opacity: .55; }
.dtable .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dtable td a { text-decoration: none; }
.dtable form { margin: 0; }
.tsearch { width: 100%; max-width: 420px; min-height: 44px; border-radius: 10px; border: 2px solid var(--line); background: var(--surface); padding: 8px 12px; font-size: 16px; }
.btnrow { display: flex; flex-direction: column; gap: 10px; }
.cards1 { display: flex; flex-direction: column; gap: 10px; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; padding: 16px; border: 2px dashed var(--line); border-radius: 14px; background: var(--surface2); text-align: center; cursor: pointer; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop svg { font-size: 32px; color: var(--brass-ink); }
.drop b { font-size: 17px; }
.drop small { color: var(--muted); }
.drop.over { border-color: var(--go); background: var(--go-soft); }
.drop.has b { color: var(--go); }
.people { flex-wrap: wrap; gap: 8px; }
.people a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 600; font-size: 15px; }
.people a.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.acc-grid, .att-grid, .att-grid > .col { display: flex; flex-direction: column; gap: 12px; }

@media (min-width: 1024px) and (hover: hover) {
  .desk-only { display: revert; }
  .people.desk-only { display: flex; }
  .mob-only { display: none !important; }
  body { font-size: 16px; }
  .shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); max-width: 1480px; margin: 0 auto; }
  .side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 10px 16px 16px; }
  .side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); }
  .side a svg { font-size: 20px; color: var(--brass-ink); }
  .side a:hover { background: var(--surface); color: var(--ink); }
  .side a.on { background: var(--primary); color: var(--on-primary); }
  .side a.on svg { color: var(--on-primary); }
  .side-sec { margin: 14px 12px 4px; font: 600 11px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .shell > .wrap { max-width: none; width: 100%; margin: 0; padding: 16px 28px 48px 12px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .tile-main { grid-column: span 2; }
  .bn { height: 64px; }
  .bn-t b { font-size: 30px; }
  .bn-w { width: 200px; }
  .pagehead h1 { font-size: 32px; }
  /* tlačítka v kanceláři nemusí být přes celou šířku */
  .big { min-height: 52px; font-size: 19px; border-radius: 12px; }
  .big svg { font-size: 22px; }
  .btnrow { flex-direction: row; flex-wrap: wrap; }
  .btnrow .big { width: auto; flex: 0 1 auto; padding: 10px 22px; }
  .monthnav { grid-template-columns: 44px auto 44px; justify-content: start; }
  .monthnav .small { min-height: 44px; font-size: 22px; }
  .monthnav b { min-width: 180px; }
  .tile { min-height: 116px; }
  .tile:hover, .job:hover, .prow:hover { border-color: var(--brass); }
  .big:hover { filter: brightness(1.05); }
  .sel-big { max-width: 420px; }
  .tabs4 { max-width: 760px; }
  .acc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "todo inv" "sup sup" "att bank"; align-items: start; gap: 16px; }
  .a-todo { grid-area: todo; } .a-inv { grid-area: inv; } .a-sup { grid-area: sup; } .a-att { grid-area: att; } .a-bank { grid-area: bank; }
  .a-stat { width: auto; align-self: flex-start; padding: 10px 22px; }
  .att-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: 16px; }
  .att-grid .day { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
  .att-grid .day + .day { margin-top: -6px; }
  .drop { min-height: 160px; }
}

/* ===== Statistiky ===== */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; min-width: 0; }
.kpi .kl { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .kv { font: 800 28px/1.1 var(--display); }
.kpi .kc { font-size: 13px; color: var(--muted); }
.kpi .kc.up { color: var(--go); font-weight: 600; }
.kpi .kc.down { color: var(--stop); font-weight: 600; }
.kpi .kc.y { font-size: 12px; }
.kpi .hint { font-size: 12px; margin-top: 4px; }
.kpi .chip { align-self: flex-start; white-space: normal; }
.stats-grid { display: flex; flex-direction: column; gap: 12px; }
.chart { width: 100%; height: auto; display: block; stroke: none; }
.chart text { stroke: none; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .rev { fill: var(--acc-soft); stroke: var(--brass); stroke-width: 1; }
.chart .pro { fill: var(--go); }
.chart .cur .rev { fill: var(--brass); }
.chart .lbl { font: 600 12px var(--body); fill: var(--muted); text-anchor: middle; }
.chart g:hover .rev { stroke-width: 2.5; }
.legend { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend .lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.legend .lg.rev { background: var(--acc-soft); border: 1px solid var(--brass); }
.legend .lg.pro { background: var(--go); }
.payrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 6px 0; }
.payrow .bar { height: 8px; border-radius: 4px; background: var(--surface2); overflow: hidden; }
.payrow .bar i { display: block; height: 100%; background: var(--brass); }
.bad { color: var(--stop); }
.dtable.plain { border: 0; }
@media (min-width: 1024px) and (hover: hover) {
  .kpis { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
  .kpi:is(a):hover { border-color: var(--brass); }
  .stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 16px; }
  .s-chart { grid-column: span 2; }
}

/* ===== Přihlášení: QR, oko u hesla, pozvánka ===== */
.center { text-align: center; }
.login-ways { display: grid; gap: 14px; width: 100%; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 120px; justify-content: center; }
.qr-img svg, .qr-big svg { width: 200px; height: 200px; background: #fff; border-radius: 10px; }
.qr-big { display: flex; justify-content: center; }
.qr-big svg { width: 240px; height: 240px; }
.qr-code { font: 800 34px/1 var(--display); letter-spacing: .12em; margin: 4px 0 0; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.codein { text-transform: uppercase; letter-spacing: .2em; font: 700 26px var(--display); text-align: center; }
.pw-box { position: relative; display: block; }
.pw-box input { width: 100%; padding-right: 52px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; border-radius: 10px; }
.pw-eye svg { font-size: 22px; }
.pw-eye[aria-pressed="true"] { color: var(--brass-ink); }
.acc-two { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 760px) {
  .login[data-login-mode="nove"] { max-width: 900px; }
  .login-ways { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (min-width: 1024px) and (hover: hover) {
  .acc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
}

/* aplikace na ploše */
.install-card h3 { margin: 0; }
.install-steps { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; font-size: 1.05rem; }
.ico-inline { width: 1.2em; height: 1.2em; vertical-align: -0.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.install-card .link { align-self: flex-start; }

/* QR kódy vždy černé na bílé, bez obrysu ikon */
svg.qr, svg.qr * { stroke: none !important; }
svg.qr { background: #fff; }

/* vzhled: automaticky / světlý / tmavý */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg button { min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* STK a registr vozidel */
.stk { display: inline-flex; align-self: flex-start; font-weight: 700; font-size: 14px; padding: 4px 10px; border-radius: 999px; }
.stk-ok { background: var(--go-soft); color: var(--go); }
.stk-soon { background: var(--warn-soft); color: var(--warn); }
.stk-over { background: var(--stop-soft); color: var(--stop); }
.card.registr { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.card.registr > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick .small { min-width: 56px; }

/* Nastavení: rozcestník a skupiny */
.set-nav { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; margin: 0 -4px; background: var(--bg); scrollbar-width: none; }
.set-nav::-webkit-scrollbar { display: none; }
.set-nav a { flex: none; padding: 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 15px; }
.set-nav a:last-child { background: none; border-style: dashed; }
.set-group { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; scroll-margin-top: 60px; }
.set-group + .set-group { border-top: 2px solid var(--line); padding-top: 20px; margin-top: 8px; }
h2.grp { font: 800 26px/1.1 var(--display); margin: 0; letter-spacing: .01em; }
@media (min-width: 1024px) and (hover: hover) {
  .set-nav { top: 0; }
}

/* verze aplikace */
.side-ver { display: none; }
@media (min-width: 1024px) and (hover: hover) {
  .side a.side-ver { display: block; margin-top: auto; padding: 12px 16px 4px; font-size: 12px; color: var(--muted); background: none; text-decoration: none; }
  .side a.side-ver:hover { text-decoration: underline; }
}
.ver-line { text-align: center; font-size: 13px; color: var(--muted); margin: 18px 0 0; }

/* Nastavení: dlaždice a záložky podstránek (jako Správa v LKTO) */
.stiles { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .stiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .stiles { grid-template-columns: 1fr 1fr 1fr; } }
.stile { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; min-height: 104px; }
.stile:hover { border-color: var(--brass); }
.stile b { font: 700 21px/1.15 var(--display); }
.stile span { color: var(--muted); font-size: 15px; }
.stile small { margin-top: auto; font-weight: 600; color: var(--brass-ink); font-size: 14px; }
.stile.stile-sys small { color: var(--go); }
.stile.stile-sys.warn small { color: var(--warn); }
.subnav { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; padding: 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); }
.subnav a.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pv-grid2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 1024px) { .pv-grid2 { grid-template-columns: 1fr 1fr; } }
.chart .ax { font-size: 11px; fill: var(--muted); stroke: none; }
.stile .chip { align-self: flex-start; }

/* přepínač vzhledu v horní liště */
.ub-r { display: flex; align-items: center; gap: 10px; }
.theme-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.theme-btn svg { width: 20px; height: 20px; display: none; }
.theme-btn[data-mode="auto"] .ti-auto, .theme-btn:not([data-mode]) .ti-auto, .theme-btn[data-mode="light"] .ti-light, .theme-btn[data-mode="dark"] .ti-dark { display: block; }
.mdoc > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.mdoc-a { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mdoc-a form { margin: 0; }
a.mlink { text-decoration: none; }
a.mlink span { color: var(--muted); font-size: 15px; }
