/* Termio — dizajnový systém. Akcentová farba firmy prichádza za behu ako --accent. */
:root {
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 35%, transparent);

  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e8ebf0;
  --line: #e3e6eb;
  --line-strong: #cfd4dc;
  --ink: #111827;
  --ink-2: #4b5563;
  --ink-3: #8a93a1;
  --ok: #059669;  --ok-soft: #d1fae5;
  --warn: #d97706; --warn-soft: #fef3c7;
  --bad: #dc2626;  --bad-soft: #fee2e2;
  --info: #2563eb; --info-soft: #dbeafe;

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --sh-1: 0 1px 2px rgb(16 24 40 / .05);
  --sh-2: 0 4px 16px rgb(16 24 40 / .08), 0 1px 3px rgb(16 24 40 / .06);
  --sh-3: 0 20px 50px rgb(16 24 40 / .18);
  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --nav-w: 248px;
  --top-h: 60px;
  --bottom-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1016; --surface: #151922; --surface-2: #1c212c; --surface-3: #252b38;
    --line: #262c39; --line-strong: #343b4b; --ink: #eef0f4; --ink-2: #b4bac6; --ink-3: #7c8494;
    --ok-soft: #06392b; --warn-soft: #3d2a06; --bad-soft: #42141a; --info-soft: #172a52;
    --sh-1: none; --sh-2: 0 4px 18px rgb(0 0 0 / .35); --sh-3: 0 20px 50px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1016; --surface: #151922; --surface-2: #1c212c; --surface-3: #252b38;
  --line: #262c39; --line-strong: #343b4b; --ink: #eef0f4; --ink-2: #b4bac6; --ink-3: #7c8494;
  --ok-soft: #06392b; --warn-soft: #3d2a06; --bad-soft: #42141a; --info-soft: #172a52;
  --sh-1: none; --sh-2: 0 4px 18px rgb(0 0 0 / .35); --sh-3: 0 20px 50px rgb(0 0 0 / .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Layout ─────────────────────────────────────────────────────── */
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1 1 auto; min-width: 0; }
.between { justify-content: space-between; }
.gap-0 { gap: 0; } .gap-4 { gap: 4px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ── Admin shell ────────────────────────────────────────────────── */
.shell { min-height: 100dvh; }
.sidenav {
  position: fixed; inset: 0 auto 0 0; width: var(--nav-w); background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; z-index: 30; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand-logo { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; flex: none; overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand-name { font-weight: 650; line-height: 1.2; }
.navlink {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 500;
  border: 0; background: none; width: 100%; text-align: left; cursor: pointer;
}
.navlink:hover { background: var(--surface-2); color: var(--ink); }
.navlink.active { background: var(--accent-soft); color: var(--accent); }
.navlink svg { width: 20px; height: 20px; flex: none; }
.navlink .badge { margin-left: auto; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.nav-foot { margin-top: auto; padding-top: 12px; }

.main { margin-left: var(--nav-w); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 20px; }
.page { padding: 8px 24px 40px; max-width: 1280px; }
.page.wide { max-width: none; }

.bottomnav { display: none; }
.fab {
  position: fixed; right: 20px; bottom: 24px; width: 56px; height: 56px; border-radius: 18px; border: 0; z-index: 25;
  background: var(--accent); color: var(--accent-ink); box-shadow: var(--sh-2); display: grid; place-items: center; cursor: pointer;
}
.fab svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .sidenav { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; height: 56px; }
  .page { padding: 4px 16px calc(var(--bottom-h) + 88px); }
  .bottomnav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset: auto 0 0 0; z-index: 30;
    height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .bottomnav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 550; color: var(--ink-3); cursor: pointer; position: relative; }
  .bottomnav button svg { width: 23px; height: 23px; }
  .bottomnav button.active { color: var(--accent); }
  .bottomnav .badge { position: absolute; top: 6px; left: calc(50% + 6px); }
  .fab { bottom: calc(var(--bottom-h) + 16px + env(safe-area-inset-bottom)); }
}

/* ── Karty a panely ─────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { flex: 1; }
.card-body { padding: 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 640px) { .card-pad, .card-body { padding: 14px; } .card-head { padding: 12px 14px; } }

.stat { padding: 16px 18px; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.stat-label { color: var(--ink-3); font-size: 13px; font-weight: 500; }

.section-title { display: flex; align-items: center; gap: 8px; margin: 24px 0 10px; }
.section-title h2 { flex: 1; }

/* ── Zoznamy ────────────────────────────────────────────────────── */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0;
  width: 100%; text-align: left; cursor: pointer; color: inherit; min-height: 56px;
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }
.list-item.static { cursor: default; }
.list-item.static:hover { background: none; }
@media (max-width: 640px) { .list-item { padding: 12px 14px; } }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 14px; flex: none; background: var(--accent-soft); color: var(--accent); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.timebox { min-width: 54px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }
.timebox small { display: block; font-weight: 500; color: var(--ink-3); font-size: 12px; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.empty svg { width: 40px; height: 40px; opacity: .5; margin-bottom: 8px; }

table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: var(--surface-2); }

/* ── Tlačidlá ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s; text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn-group { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.btn-group button { border: 0; background: none; padding: 0 14px; height: 38px; cursor: pointer; font-weight: 550; color: var(--ink-2); }
.btn-group button + button { border-left: 1px solid var(--line); }
.btn-group button.active { background: var(--accent-soft); color: var(--accent); }

/* ── Formuláre ──────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.field .err { font-size: 12px; color: var(--bad); }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); outline: none;
  transition: border-color .12s, box-shadow .12s; font-size: 15px;
}
.textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a93a1' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.invalid { border-color: var(--bad); }
@media (max-width: 640px) { .input, .select, .textarea { font-size: 16px; } } /* iOS nezoomuje */
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 10px 0 0 10px; }
.input-group .addon { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 10px 10px 0; background: var(--surface-2); color: var(--ink-3); font-size: 14px; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 38px; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 4px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 2px 0 0; flex: none; }
.switch { position: relative; display: flex; align-items: center; gap: 12px; cursor: pointer; width: fit-content; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 12px; background: var(--line-strong); transition: background .15s; position: relative; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-soft); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-2); font-weight: 550; font-size: 14px; cursor: pointer; white-space: nowrap; flex: none;
}
.chip.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip .count { font-size: 12px; opacity: .7; }

/* ── Odznaky ────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.badge.accent { background: var(--accent); color: var(--accent-ink); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: color-mix(in srgb, var(--c) 80%, var(--ink)); }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* ── Modály a spodné panely ─────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgb(10 14 22 / .45); display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .15s ease; }
.modal { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); width: 100%; max-width: 560px; max-height: calc(100dvh - 48px); display: flex; flex-direction: column; animation: pop .18s ease; }
.modal.lg { max-width: 820px; }
.modal.sm { max-width: 420px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.grabber { display: none; }
@media (max-width: 640px) {
  .overlay { align-items: flex-end; padding: 0; }
  .modal, .modal.lg, .modal.sm { max-width: none; border-radius: 22px 22px 0 0; max-height: 94dvh; animation: sheet .22s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
  .grabber { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 0; }
  .modal-head { padding: 10px 16px 12px; }
  .modal-body { padding: 16px; }
  .modal-foot { padding: 12px 16px; }
  .modal-foot .btn { flex: 1; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes sheet { from { transform: translateY(100%); } }

.toasts { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); bottom: 24px; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: var(--surface); padding: 11px 16px; border-radius: 12px; box-shadow: var(--sh-2); font-weight: 500; animation: pop .2s ease; pointer-events: auto; display: flex; gap: 10px; align-items: center; }
.toast.bad { background: var(--bad); color: #fff; }
@media (max-width: 900px) { .toasts { bottom: calc(var(--bottom-h) + 20px); } }

.menu { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-2); padding: 6px; min-width: 200px; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none; padding: 9px 10px; border-radius: 8px; cursor: pointer; text-align: left; }
.menu button:hover { background: var(--surface-2); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 550; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--accent); }

.spinner { width: 22px; height: 22px; border: 2.5px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
.center { display: grid; place-items: center; padding: 48px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); align-items: flex-start; }
.callout.warn { background: var(--warn-soft); }
.callout.info { background: var(--info-soft); }
.callout.ok { background: var(--ok-soft); }
.callout.bad { background: var(--bad-soft); }
.callout svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; }
.kv dt { color: var(--ink-3); font-size: 14px; }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }

/* ── Kalendár ───────────────────────────────────────────────────── */
.cal-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cal-title { font-weight: 650; font-size: 17px; min-width: 0; }
.cal-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal-scroll { overflow: auto; max-height: calc(100dvh - 190px); position: relative; }
.cal-grid { display: grid; position: relative; min-width: 100%; }
.cal-head { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); display: grid; }
.cal-head > div { padding: 10px 8px; font-weight: 600; font-size: 13px; text-align: center; border-left: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.cal-head > div:first-child { border-left: 0; }
.cal-head .today { color: var(--accent); }
.cal-times { position: relative; }
.cal-time { position: absolute; left: 0; right: 0; font-size: 11px; color: var(--ink-3); text-align: right; padding-right: 8px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.cal-col { position: relative; border-left: 1px solid var(--line); }
.cal-col.closed { background: repeating-linear-gradient(-45deg, transparent 0 6px, var(--surface-2) 6px 12px); }
.cal-open { position: absolute; left: 0; right: 0; background: var(--surface); }
.cal-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); pointer-events: none; }
.cal-line.half { border-top-style: dashed; opacity: .6; }
.cal-now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--bad); z-index: 3; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.cal-ev {
  position: absolute; z-index: 2; border-radius: 8px; padding: 4px 7px; font-size: 12.5px; line-height: 1.3; overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); border-left: 3px solid var(--c); color: var(--ink); box-shadow: var(--sh-1);
}
.cal-ev:hover { box-shadow: var(--sh-2); z-index: 4; }
.cal-ev b { font-weight: 650; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev .t { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cal-ev.pending { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c) 16%, var(--surface)) 0 6px, color-mix(in srgb, var(--c) 8%, var(--surface)) 6px 12px); }
.cal-ev.done { opacity: .6; }
.cal-allday { display: grid; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-allday > div { border-left: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-allday > div:first-child { border-left: 0; font-size: 11px; color: var(--ink-3); justify-content: center; text-align: right; padding-right: 8px; }
.cal-chip { font-size: 12px; padding: 3px 7px; border-radius: 6px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); border-left: 3px solid var(--c); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.datestrip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px; scroll-snap-type: x proximity; }
.datestrip::-webkit-scrollbar { display: none; }
.datestrip button { flex: none; width: 52px; padding: 8px 0; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; scroll-snap-align: center; }
.datestrip button small { font-size: 11px; color: var(--ink-3); text-transform: uppercase; font-weight: 600; }
.datestrip button b { font-size: 18px; font-weight: 650; }
.datestrip button i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.datestrip button i.has { background: var(--accent); }
.datestrip button.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.datestrip button.active small { color: inherit; opacity: .85; }
.datestrip button.active i.has { background: var(--accent-ink); }
.datestrip button.today:not(.active) { border-color: var(--accent); }

.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month .dow { text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 4px 0; }
.month button { aspect-ratio: 1; border: 0; border-radius: 12px; background: none; font-weight: 550; cursor: pointer; font-variant-numeric: tabular-nums; font-size: 15px; position: relative; }
.month button.free { background: var(--accent-soft); color: var(--accent); }
.month button.free:hover { background: var(--accent-line); }
.month button:disabled { color: var(--ink-3); opacity: .45; cursor: default; }
.month button.sel { background: var(--accent); color: var(--accent-ink); }
.month button.today::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot { height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.slot:hover { border-color: var(--accent); color: var(--accent); }
.slot.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ── Položky zákazky ────────────────────────────────────────────── */
.items { width: 100%; border-collapse: collapse; }
.items th { font-size: 12px; color: var(--ink-3); font-weight: 600; text-align: left; padding: 6px 6px; }
.items td { padding: 4px 6px; vertical-align: middle; }
.items .input { height: 38px; }
.items .r { text-align: right; }
.item-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 0; font-size: 15px; }
.total-row b { font-size: 22px; letter-spacing: -.02em; }

.color-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.color-dots button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }
.color-dots button.sel { box-shadow: 0 0 0 2px var(--ink); }

.var-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chips button { border: 1px dashed var(--line-strong); background: var(--surface-2); border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; font-family: ui-monospace, Menlo, monospace; }
.phone-preview { background: var(--surface-2); border-radius: 18px; padding: 14px; }
.bubble { background: var(--surface); border-radius: 16px 16px 16px 4px; padding: 10px 12px; box-shadow: var(--sh-1); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }

.settings-layout { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--top-h) + 8px); display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 900px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; }
}

.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 10% -10%, var(--accent-soft), transparent), var(--bg); }
.login-card { width: 100%; max-width: 400px; }

@media (max-width: 900px) { .hide-mobile { display: none !important; } }
.cap::first-letter { text-transform: uppercase; }
@media (min-width: 901px) { .fab { display: none; } }
.list-item > svg, .list-item > input, .row > svg { flex: none; }
.bubble.theirs { background: var(--surface-2); box-shadow: none; }
.bubble.mine { background: var(--accent); color: var(--accent-ink); border-radius: 16px 16px 4px 16px; box-shadow: none; }
