/* NEXIRA SERVIS — mobil na prvom mieste (technik na streche), svetlá aj tmavá téma */
:root {
  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f7f9fc; --line: #e1e6ef; --line-strong: #c9d1de;
  --text: #182033; --muted: #66708a; --faint: #98a1b5;
  --brand: #0af0ee; --brand-ink: #00181a; --accent: #0a8f8d; --accent-soft: #e2f7f6;
  --bar: #00030b; --bar-text: #e9eef7; --bar-muted: #8f9ab0;
  --danger: #c93a3a; --danger-soft: #fdecec; --warn: #b77900; --warn-soft: #fff4dc; --ok: #2e9e4f; --ok-soft: #e5f5ea;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070a12; --surface: #0f1420; --surface-2: #141a28; --line: #222a3b; --line-strong: #323c52;
    --text: #e7ecf5; --muted: #9aa4ba; --faint: #6b7590;
    --accent: #2fd8d5; --accent-soft: #0d2a2c;
    --danger: #ef6b6b; --danger-soft: #2c1416; --warn: #e3a92b; --warn-soft: #2a2110; --ok: #4cc472; --ok-soft: #10261a;
    --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.boot { padding: 40px; text-align: center; color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- vrchná lišta + navigácia */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--bar); color: var(--bar-text);
  display: flex; align-items: center; gap: 14px; padding: 0 16px; height: 56px;
  padding-top: env(safe-area-inset-top);
}
.logo { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 800; letter-spacing: .5px; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo-img { height: 34px; width: auto; display: block; }
.logo-img.logo-lg { height: 54px; }
@media (max-width: 760px) { .logo-img { height: 30px; } }
.logo b { color: var(--brand); font-weight: 800; }
.topnav { display: flex; gap: 2px; margin-left: 12px; flex: 1; min-width: 0; overflow-x: auto; }
.topnav a { color: var(--bar-muted); padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.topnav a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.06); }
.topnav a.on { color: var(--brand); background: rgba(10, 240, 238, .09); }
.userbtn { margin-left: auto; background: none; border: 1px solid #263046; color: var(--bar-text); border-radius: 999px;
  padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userbtn:hover { border-color: var(--brand); }
.helpbtn { border: 1px solid #263046; color: var(--bar-text); border-radius: 999px; padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.helpbtn:hover { border-color: var(--brand); text-decoration: none; }
@media (max-width: 760px) { .helpbtn { padding: 6px 9px; } .helpbtn span { display: none; } }
.trialbar { background: var(--warn-soft); color: var(--warn); text-align: center; font-size: 13px; padding: 6px 12px; font-weight: 600; }

.bottomnav { display: none; }
@media (max-width: 760px) {
  .topnav { display: none; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--bar); border-top: 1px solid #1a2132; padding-bottom: env(safe-area-inset-bottom);
  }
  .bottomnav a { color: var(--bar-muted); text-align: center; padding: 8px 2px 7px; font-size: 11px; font-weight: 600; }
  .bottomnav a:hover { text-decoration: none; }
  .bottomnav a .ic { display: block; font-size: 19px; line-height: 1.2; }
  .bottomnav a.on { color: var(--brand); }
  main { padding-bottom: 86px !important; }
}

main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; }
.pagehead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pagehead h1 { flex: 1; min-width: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); margin-bottom: 8px; }

/* ---------- karty a mriežky */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.card + .card { margin-top: 14px; }
.card > h2, .card-head { margin-bottom: 12px; }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-head h2 { flex: 1; margin: 0; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > .card + .card { margin-top: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cols > div > .card + .card { margin-top: 14px; }
@media (max-width: 960px) { .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .grid.two, .grid.three { grid-template-columns: minmax(0, 1fr); } }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .n { font-size: 26px; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 13px; }

/* ---------- zoznamy */
.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-top: 1px solid var(--line);
  color: inherit; min-width: 0;
}
.row:first-child { border-top: 0; }
a.row:hover { text-decoration: none; background: var(--surface-2); }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .side { text-align: right; flex: none; font-size: 13px; color: var(--muted); }
.empty { color: var(--faint); padding: 14px 4px; font-size: 14px; }
.empty-big { text-align: center; padding: 34px 14px; color: var(--muted); }
.empty-big .ic { font-size: 34px; display: block; margin-bottom: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text); white-space: nowrap;
}
.badge .dot, .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, #888); display: inline-block; flex: none; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px;
  padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chip .cnt { color: var(--muted); font-weight: 600; }
.progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; width: 70px; display: inline-block; vertical-align: middle; }
.progress i { display: block; height: 100%; background: var(--ok); }

/* ---------- tlačidlá a formuláre */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 650; font-size: 14px;
  cursor: pointer; white-space: nowrap; min-height: 40px;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.primary:hover { filter: brightness(.95); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: none; }
.btn.sm { padding: 5px 10px; min-height: 32px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.iconbtn { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 16px; padding: 6px; border-radius: 6px; }
.iconbtn:hover { color: var(--danger); background: var(--danger-soft); }

label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 9px; padding: 9px 11px; width: 100%; min-height: 42px;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); flex: none; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text); font-weight: 500; cursor: pointer; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--muted); padding: 8px 14px; font: inherit; font-weight: 650; cursor: pointer; }
.seg button.on { background: var(--accent-soft); color: var(--accent); }
.hint { font-size: 12px; color: var(--faint); font-weight: 500; }
.hint.ok { color: var(--ok); font-weight: 700; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { flex: 1 1 220px; }
.toolbar select { width: auto; flex: 0 1 190px; }

/* ---------- detail zákazky */
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.statusbar { display: flex; gap: 6px; flex-wrap: wrap; }
.statusbar button {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 6px 11px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.statusbar button.on { color: #fff; background: var(--c); border-color: var(--c); }
.statusbar button.on .dot { background: #fff; }
.chk { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--line); }
.chk:first-child { border-top: 0; }
.chk label { flex: 1; display: flex; gap: 10px; align-items: center; cursor: pointer; min-width: 0; }
.chk.done .lbl { color: var(--faint); text-decoration: line-through; }
.chk .who { font-size: 12px; color: var(--faint); white-space: nowrap; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photos a { position: relative; display: block; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.log { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow: auto; }
.log .e { font-size: 14px; }
.log .e .m { font-size: 12px; color: var(--faint); }
.log .e.system { color: var(--muted); font-size: 13px; }
.log .e.note { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; white-space: pre-wrap; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 650; padding: 6px 6px; border-bottom: 1px solid var(--line); }
table.t td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-wrap { overflow-x: auto; }

/* ---------- kalendár */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
.cal .dh { background: var(--surface-2); text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 0; }
.cal .d { background: var(--surface); min-height: 104px; padding: 5px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.cal .d.out { background: var(--surface-2); }
.cal .d.out .num { color: var(--faint); }
.cal .d.today .num { background: var(--brand); color: var(--brand-ink); }
.cal .num { font-size: 12px; font-weight: 700; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.cal .ev { font-size: 11.5px; border-left: 3px solid var(--c); background: var(--surface-2); padding: 2px 5px; border-radius: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.cal .more { font-size: 11px; color: var(--muted); }
@media (max-width: 760px) {
  .cal .d { min-height: 58px; }
  .cal .ev { display: none; }
  .cal .d .dots { display: flex; gap: 3px; flex-wrap: wrap; }
}
.cal .dots { display: none; }

/* ---------- prihlásenie */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-hero { background: var(--bar); color: var(--bar-text); padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.auth-hero h1 { font-size: 34px; color: #fff; }
.auth-hero h1 b { color: var(--brand); }
.auth-hero p { color: var(--bar-muted); font-size: 16px; max-width: 460px; margin: 0; }
.auth-hero ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; color: var(--bar-text); }
.auth-hero li::before { content: "✓"; color: var(--brand); font-weight: 800; margin-right: 9px; }
.auth-box { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 22px; margin-bottom: 4px; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tabs button { flex: 1; border: 0; background: none; font: inherit; font-weight: 700; color: var(--muted); padding: 10px; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.msg { padding: 10px 12px; border-radius: 9px; font-size: 14px; }
.msg.err { background: var(--danger-soft); color: var(--danger); }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 20px; gap: 10px; }
  .auth-hero h1 { font-size: 24px; }
  .auth-hero ul, .auth-hero p.more { display: none; }
}

/* ---------- modál + toast + menu */
.modal-back { position: fixed; inset: 0; background: rgba(4, 8, 18, .55); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 12px 12px; overflow: auto; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 620px; box-shadow: 0 20px 50px rgba(0,0,0,.3); display: flex; flex-direction: column; max-height: 88vh; }
.modal.wide { max-width: 860px; }
.modal-h { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); gap: 10px; }
.modal-h h2 { flex: 1; }
.modal-b { padding: 16px; overflow: auto; flex: 1; min-height: 0; }
.modal-f { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 560px) { .modal-back { padding: 0; align-items: stretch; } .modal { max-height: none; border-radius: 0; min-height: 100%; } }
#toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; background: var(--bar); color: #fff; padding: 10px 16px;
  border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; }
#toast.err { background: var(--danger); }
.menu { position: fixed; top: 56px; right: 12px; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.18); min-width: 220px; padding: 6px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface-2); text-decoration: none; }
.menu .who { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 13px; color: var(--muted); }

/* ---------- nastavenia */
.edit-list { display: flex; flex-direction: column; gap: 8px; }
.edit-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.edit-row input[type=text] { flex: 1 1 180px; }
.edit-row select { width: auto; flex: 0 1 170px; }
.edit-row input[type=color] { width: 44px; padding: 3px; flex: none; }
.edit-row input.num { width: 90px; flex: none; }
.side-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

.mat-form { grid-template-columns: 2fr 1fr 1fr 2fr auto; align-items: end; }
@media (max-width: 760px) { .mat-form { grid-template-columns: 1fr 1fr; } .mat-form label:first-child, .mat-form label:nth-child(4), .mat-form button { grid-column: 1 / -1; } }

.demobar { background: var(--accent-soft); color: var(--text); display: flex; gap: 12px; align-items: center; justify-content: center;
  flex-wrap: wrap; padding: 8px 16px; font-size: 14px; border-bottom: 1px solid var(--line); text-align: center; }

/* ---------- prehľad (dashboard) */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpis.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis, .kpis.kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; color: inherit; box-shadow: var(--shadow); border-top: 3px solid var(--line-strong); min-width: 0; }
.kpi:hover { text-decoration: none; border-color: var(--accent); }
.kpi .n { font-size: 26px; font-weight: 800; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .l { color: var(--text); font-size: 13px; font-weight: 600; }
.kpi .sub { color: var(--muted); font-size: 12px; }
.kpi.warn { border-top-color: var(--warn); } .kpi.warn .n { color: var(--warn); }
.kpi.danger { border-top-color: var(--danger); background: var(--danger-soft); } .kpi.danger .n { color: var(--danger); }
.kpi.ok { border-top-color: var(--ok); }

.tl { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: 760px; font-size: 13px; }
.tl th, .tl td { border-bottom: 1px solid var(--line); padding: 6px; vertical-align: top; }
.tl thead th { font-size: 12px; color: var(--muted); font-weight: 700; text-align: left; }
.tl thead th small { display: block; font-weight: 500; color: var(--faint); }
.tl .tl-who { width: 150px; text-align: left; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl .is-today { background: var(--accent-soft); }
.tl thead th.is-today { color: var(--accent); }
.tl .is-weekend { background: var(--surface-2); }
.tl-chip { display: block; border-left: 3px solid var(--c); background: var(--surface-2); border-radius: 5px; padding: 3px 6px; margin-bottom: 4px;
  color: var(--text); font-size: 12px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-chip:hover { text-decoration: none; background: var(--accent-soft); }
.tl .is-today .tl-chip { background: var(--surface); }
.tl-mobile { display: none; }
@media (max-width: 760px) { .tl-desktop { display: none; } .tl-mobile { display: block; } }
.tl-day + .tl-day { margin-top: 12px; }
.tl-dayname { font-weight: 700; font-size: 14px; text-transform: capitalize; margin-bottom: 6px; }
.tl-mrow { display: flex; align-items: center; gap: 8px; }
.tl-mrow .tl-chip { flex: 1; min-width: 0; font-size: 13px; padding: 6px 8px; }

.funnel { display: flex; gap: 6px; flex-wrap: wrap; }
.fn-step { display: flex; flex-direction: column; justify-content: center; min-width: 96px; flex-basis: 96px; padding: 10px 12px;
  border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); border-top: 4px solid var(--c); color: var(--text); }
.fn-step:hover { text-decoration: none; border-color: var(--c); }
.fn-step.is-empty { opacity: .5; }
.fn-n { font-size: 22px; font-weight: 800; line-height: 1.1; }
.fn-l { font-size: 12px; color: var(--muted); font-weight: 600; }

.al-group + .al-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.al-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.al-items { display: flex; flex-direction: column; gap: 4px; padding-left: 4px; font-size: 14px; }
.all-ok { color: var(--ok); font-weight: 600; padding: 6px 0; }
.mo-row { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.mo-row:first-of-type { border-top: 0; }
.mo-row b { text-align: right; }
.mo-row .faint { grid-column: 1 / -1; }

/* ---------- editor cenovej ponuky */
.qi-head, .qi-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 64px 104px 104px 32px; gap: 6px; align-items: start; }
.qi-head { font-size: 12px; color: var(--muted); font-weight: 650; padding: 0 2px 4px; }
.qi-head span:nth-child(n+2):nth-child(-n+5) { text-align: right; }
.qi-row { padding: 6px 0; border-top: 1px solid var(--line); }
.qi-main { display: flex; flex-direction: column; gap: 4px; }
.qi-note { font-size: 13px; min-height: 34px; padding: 6px 10px; }
.qi-qty, .qi-price { text-align: right; }
.qi-sum { text-align: right; font-weight: 700; padding-top: 11px; white-space: nowrap; }
.q-totals { max-width: 340px; margin: 12px 0 0 auto; }
@media (max-width: 680px) {
  .qi-head { display: none; }
  .qi-row { grid-template-columns: 1fr 1fr 1fr 32px; }
  .qi-main { grid-column: 1 / -1; }
  .qi-sum { grid-column: 1 / 4; text-align: left; padding-top: 4px; }
}

/* ---------- hodiny, výber fotiek do protokolu */
.work-form { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); align-items: end; }
.pick-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 6px; }
.pick { position: relative; display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 2px solid var(--line); cursor: pointer; }
.pick img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .45; transition: opacity .15s; }
.pick input { position: absolute; top: 6px; left: 6px; z-index: 1; }
.pick:has(input:checked) { border-color: var(--accent); }
.pick:has(input:checked) img { opacity: 1; }

/* Doplnky kolo 2 (9. 10. 2026): termín zákazníkovi, AI štítok, výkaz práce */
.visit-line { margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ai-box { background: var(--accent-soft); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
input.ai-filled, select.ai-filled { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
table.t tr.is-sel td { background: var(--accent-soft); }
