/* KidsFlow – klidný, přehledný vzhled: tlumená modrá, teplá meruňková, jemná neutrální pozadí. */
:root {
  color-scheme: light;
  --bg: #eef3f9;
  --surface: #ffffff;
  --surface-2: #f6f9fd;
  --line: #dce5f0;
  --line-strong: #c5d2e3;
  --text: #172540;
  --muted: #5a6a82;
  --primary: #2456a6;
  --primary-hover: #1b4489;
  --primary-soft: #e3ecfa;
  --accent: #2fb0c6;
  --accent-soft: #e4f5f9;
  --pending: #6650c8;
  --pending-ink: #43358f;
  --pending-bg: #efecfc;
  --success: #24785a;
  --success-bg: #e3f4ec;
  --danger: #b8324a;
  --danger-bg: #fdeef0;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(23, 50, 90, .06), 0 4px 16px rgba(23, 50, 90, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
}
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 650; }
h2 { font-size: 1.08rem; font-weight: 650; }
h3 { font-size: .98rem; font-weight: 650; margin-top: 1.2em; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.opt { color: var(--muted); font-weight: 400; font-size: .85em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Kostra ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  padding: 22px 14px; background: var(--surface-2); border-right: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; padding: 0 10px; }
.brand-mark { width: 34px; height: 34px; flex: none; display: block; }
.brand-word { font-weight: 760; letter-spacing: -.025em; color: var(--text); }
.brand-lg .brand-mark { width: 52px; height: 52px; }
.brand-lg { font-size: 1.6rem; gap: 12px; }
.family-name { color: var(--muted); font-size: .85rem; padding: 0 10px 0 50px; margin: -2px 0 18px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.side-nav a:hover { background: #e9eff8; }
.side-nav a.is-active { background: var(--primary-soft); color: var(--primary-hover); }
.count {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: var(--pending); color: #fff; font-size: .78rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
h2 .count { margin-left: 6px; vertical-align: 2px; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.side-user-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user form { margin-left: auto; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; }

.main { padding: 26px 32px 48px; width: 100%; min-width: 0; }
.topbar, .tabbar, .mobile-only { display: none; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 7px; vertical-align: 0; flex: none; }

/* ---------- Prvky ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card.narrow { max-width: 560px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.section + .section { margin-top: 32px; }
.empty { color: var(--muted); margin: 0; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #edf2f9; color: var(--text); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #9a2a3e; color: #fff; }
.btn-sm { min-height: 34px; padding: 5px 12px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); text-decoration: none; font-size: 1.3rem; line-height: 1;
}
.icon-btn:hover { background: #edf2f9; color: var(--text); }

.flash { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; border: 1px solid transparent; }
.flash-success { background: var(--success-bg); border-color: #bfe2d2; color: #1d5a43; }
.flash-error { background: var(--danger-bg); border-color: #f3c6ce; color: #8a2235; }
.flash-info { background: var(--primary-soft); border-color: #c9d9f0; color: #1b4489; }

.callout { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 14px; }
.callout-pending { background: var(--pending-bg); border: 1px dashed var(--pending); color: var(--pending-ink); }
.callout-pending a { color: var(--pending-ink); font-weight: 600; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 650; white-space: nowrap; border: 1px solid transparent; }
.badge-pending { background: var(--pending-bg); color: var(--pending-ink); border: 1px dashed var(--pending); }
.badge-confirmed { background: var(--success-bg); color: #1d5a43; }
.badge-rejected { background: var(--danger-bg); color: #8a2235; }
.badge-cancelled { background: #eaeff6; color: #4f5d72; text-decoration: line-through; text-decoration-thickness: 1px; }
.badge-superseded { background: #eaeff6; color: #4f5d72; }

/* ---------- Formuláře ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
.form > .btn:not(.btn-block) { align-self: flex-start; }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
input[type=text], input[type=url], input[type=number], input[type=search], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text);
  font: inherit; font-weight: 400; font-size: 16px; /* 16px = iOS nezoomuje */
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
input:disabled { background: var(--surface-2); color: var(--muted); }
input[type=color] { width: 44px; height: 40px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; cursor: pointer; flex: none; }
.color-label { flex-direction: row !important; align-items: center; justify-content: space-between; }
.hint { color: var(--muted); font-size: .84rem; margin: -6px 0 0; font-weight: 400; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.form-inline label { flex: 1 1 220px; }
.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.more-fields summary, .cancel-box summary { cursor: pointer; font-weight: 600; color: var(--primary); list-style: none; }
.more-fields summary::before { content: "＋ "; }
.more-fields[open] summary::before { content: "－ "; }
.more-fields[open] summary { margin-bottom: 10px; }
.cancel-box summary { color: var(--text); }
.cancel-box summary::-webkit-details-marker, .more-fields summary::-webkit-details-marker { display: none; }
.cancel-box[open] { flex-basis: 100%; }
.cancel-box[open] summary { margin-bottom: 10px; }
.form-card { max-width: none; }

/* ---------- Přihlášení ---------- */
.bare-main { max-width: 480px; margin: 0 auto; padding: 48px 18px; display: flex; flex-direction: column; gap: 18px; }
.bare-main .brand-lg { align-self: center; }
.auth-card h1 { font-size: 1.4rem; }
.auth-switch { margin: 18px 0 0; text-align: center; }

/* ---------- Kalendář ---------- */
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav h1 { min-width: 190px; text-align: center; }
.legend { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .86rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 18px; height: 12px; border-radius: 4px; background: color-mix(in srgb, var(--c) 22%, #fff); border-left: 3px solid var(--c); }
.swatch-pending { background: var(--pending-bg); border: 1px dashed var(--pending); }
.legend-warn a { font-weight: 600; color: #2456a6; }

.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.cal-main { min-width: 0; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.cal-dow { padding: 9px 10px; font-size: .78rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-day { min-height: 112px; padding: 6px 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.is-weekend { background: #f9fbfe; }
.cal-day.is-out { background: #f3f6fa; }
.cal-day.is-out .cal-num { color: #a7b3c4; }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.cal-num { font-size: .86rem; font-weight: 600; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-day.is-today .cal-num { background: var(--primary); color: #fff; }
.cal-add { opacity: 0; color: var(--muted); text-decoration: none; font-size: 1.1rem; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
.cal-day:hover .cal-add, .cal-add:focus { opacity: 1; }
.cal-add:hover { background: var(--primary-soft); color: var(--primary); }

.chip {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0;
  padding: 3px 7px; border-radius: 7px; font-size: .78rem; line-height: 1.3;
  text-decoration: none; color: var(--text);
  background: color-mix(in srgb, var(--parent) 15%, #fff);
  border-left: 3px solid var(--parent);
}
.chip:hover { color: var(--text); background: color-mix(in srgb, var(--parent) 25%, #fff); }
.cal-grid .chip { display: block; }
.chip-line { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-line .chip-icon { margin-right: 3px; }
.cal-grid .chip-time { display: block; }
.chip-text { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 100%; }
.chip-time { color: var(--muted); font-size: .72rem; }
.chip-pending {
  background: var(--pending-bg); color: var(--pending-ink);
  border: 1px dashed var(--pending); border-left: 3px dashed var(--pending);
}
.chip-pending:hover { background: #e4dffa; color: var(--pending-ink); }
.chip-pending .chip-time { color: var(--pending-ink); opacity: .8; }
.chip-icon { font-size: .72rem; }
.chip.has-request { box-shadow: inset 0 0 0 1px var(--pending); }

.agenda { display: none; }

.cal-side h2 { display: flex; align-items: center; }
.panel-approvals { border-top: 3px solid var(--pending); }
.mine-note { margin: 12px 0 0; }
.more { display: inline-block; margin-top: 10px; font-weight: 600; }
.upcoming { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.upcoming li { border-left: 3px solid var(--parent); padding: 2px 0 2px 10px; }
.upcoming a { color: var(--text); text-decoration: none; display: block; }
.upcoming a:hover strong { text-decoration: underline; }
.upcoming .small { display: block; }

/* Karta návrhu */
.ev-card { border: 1px solid var(--line); border-left: 4px solid var(--parent); border-radius: 11px; padding: 12px 14px; background: #fff; }
.ev-card + .ev-card { margin-top: 10px; }
.ev-card.ev-pending { border-color: #d5cff5; border-left: 4px dashed var(--pending); background: #fbfbff; }
.ev-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.kind { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--muted); }
.ev-card-title { display: block; font-weight: 650; color: var(--text); text-decoration: none; }
.ev-card-title:hover { text-decoration: underline; color: var(--text); }
.ev-card-title .muted { font-weight: 400; }
.ev-card-range { margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.ev-card-meta, .ev-card-note { margin: 0 0 4px; font-size: .88rem; color: var(--muted); }
.ev-card-note { font-style: italic; }
.ev-card-by { margin: 4px 0 0; }
.ev-card-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.card-grid .ev-card + .ev-card { margin-top: 0; }

/* Detail */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.detail { border-top: 4px solid var(--parent); }
.detail.ev-pending { border-top: 4px dashed var(--pending); }
.detail-status { margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: 120px 1fr; gap: 9px 14px; margin: 0 0 18px; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 500; display: flex; align-items: center; }
.facts dd.pre { white-space: pre-line; display: block; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions p { margin: 0; }
.linked { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; padding: 8px 0; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.linked:last-child { border-bottom: 0; }
.linked:hover span:last-child { text-decoration: underline; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--primary); }

/* Historie */
.history { list-style: none; margin: 0; padding: 0; }
.history-day { font-weight: 700; font-size: .85rem; color: var(--muted); text-transform: capitalize; padding: 16px 0 6px; border-bottom: 1px solid var(--line); }
.history-day:first-child { padding-top: 0; }
.history-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf1f7; align-items: baseline; }
.history-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .88rem; }
.history-summary { display: block; color: var(--muted); font-size: .88rem; }
.act-approved .history-text strong, .act-change_approved .history-text strong, .act-cancel_approved .history-text strong { color: var(--success); }
.act-rejected .history-text strong { color: var(--danger); }

/* Nastavení */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px; align-items: start; }
.people { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.people li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.people .muted { margin-left: 6px; }
.child-row { flex-wrap: nowrap; align-items: center; margin-bottom: 8px; }
.child-row input[type=text] { flex: 1; min-width: 0; }
.child-row.add { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.secret { background: var(--accent-soft); border: 1px solid #b9e3ec; border-radius: var(--radius-sm); padding: 12px; margin-bottom: 14px; }
.copy-row { display: flex; gap: 8px; margin-bottom: 8px; }
.copy-row input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px !important; }
.steps { padding-left: 20px; }

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 4px; }

/* ---------- Responzivita ---------- */
@media (max-width: 1180px) {
  .cal-layout, .detail-layout { grid-template-columns: 1fr; }
  .cal-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .cal-side .panel + .panel { margin-top: 0; }
}

@media (max-width: 760px) {
  body.has-shell { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .shell { display: block; }
  .sidebar, .hide-mobile { display: none; }
  .mobile-only { display: block; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 10; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
    background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  .topbar .brand { padding: 0; }
  .main { padding: 16px 16px 28px; }
  h1 { font-size: 1.35rem; }
  .card { padding: 16px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 2px; font-size: .72rem; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: 10px;
  }
  .tabbar a.is-active { color: var(--primary); }
  .tabbar .icon { width: 23px; height: 23px; }
  .tabbar .count { position: absolute; top: 0; left: 55%; margin: 0; min-width: 18px; height: 18px; font-size: .68rem; padding: 0 5px; }

  .month-nav { width: 100%; justify-content: space-between; }
  .month-nav h1 { min-width: 0; flex: 1; }
  .cal-grid { display: none; }
  .agenda { display: flex; flex-direction: column; gap: 8px; }
  .agenda-day { display: grid; grid-template-columns: 46px 1fr; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
  .agenda-day.is-today { border-color: var(--primary); }
  .agenda-date { display: flex; flex-direction: column; align-items: center; }
  .agenda-dow { font-size: .72rem; text-transform: uppercase; color: var(--muted); font-weight: 700; }
  .agenda-num { font-size: 1.25rem; font-weight: 700; }
  .agenda-day.is-today .agenda-num { color: var(--primary); }
  .agenda-items { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .agenda .chip { font-size: .9rem; padding: 7px 10px; flex-direction: column; align-items: flex-start; gap: 1px; }
  .agenda .chip-time { font-size: .8rem; }
  .cal-side { grid-template-columns: 1fr; margin-top: 4px; }
  .cal-layout { gap: 16px; }

  .row-2 { grid-template-columns: 1fr; gap: 10px; }
  fieldset .row-2 { grid-template-columns: 1.4fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 100px 1fr; }
  .history-item { grid-template-columns: 44px 1fr; }
  .history-item > a { grid-column: 2; }
  .card-grid { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }
  .bare-main { padding-top: 28px; }
}

.forgot-link { align-self: center; }
.form label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
.form label.check input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--primary); }
.flash-warning, .callout-warn { background: #fdf3e3; border: 1px solid #efd3a4; color: #6e4a12; }
.callout-warn ul { margin: 6px 0; padding-left: 18px; }
.callout-warn a { color: #6e4a12; font-weight: 600; }
.ev-card-warn { margin: 6px 0 2px; font-size: .84rem; color: #6e4a12; background: #fdf3e3; border-radius: 7px; padding: 5px 8px; }
.ev-card-edited { margin: 2px 0 0; }

/* ---------- Svátky ---------- */
.cal-day.is-holiday { background: #fdf2f4; }
.cal-day.is-holiday .cal-num { color: #b8324a; }
.cal-day.is-holiday.is-today .cal-num { color: #fff; }
.cal-day-head { gap: 4px; }
.cal-holiday { font-size: .7rem; font-weight: 650; color: #b8324a; line-height: 1.2; padding: 0 3px; margin-top: -2px; }
.swatch-holiday { background: #fdf2f4; border: 1px solid #f3c6ce; }
.swatch-visit { background: #e3f4ea; border-left: 3px solid #2e8f5e; }
.agenda-holiday { font-size: .85rem; font-weight: 600; color: #b8324a; }
.agenda-day.is-holiday { background: #fff8f9; }
.holiday-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.hl-date { display: inline-block; min-width: 62px; color: #b8324a; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- Lékař ---------- */
.chip-visit { background: #e3f4ea; border-left: 3px solid #2e8f5e; color: #1b5236; }
.chip-visit:hover { background: #d2ecdd; color: #1b5236; }
.chip-visit .chip-time { color: #3a6b51; }

.subtabs { display: flex; gap: 6px; margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.subtabs a { padding: 9px 14px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.subtabs a:hover { color: var(--text); }
.subtabs a.is-active { color: var(--primary); border-bottom-color: var(--primary); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filters label { display: block; }
.filters select, .filters input[type=search], .filters input[type=date] { min-height: 38px; padding: 6px 10px; font-size: 15px; width: auto; }
.filters .grow { flex: 1 1 240px; }
.filters-docs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.filters-docs .grow { grid-column: 1 / -1; }
.filters-docs select { width: 100%; }
.filters-docs .date-f input { flex: 1; min-width: 0; }
.filters-docs .filter-btns { display: flex; gap: 8px; }
.filters .grow input { width: 100%; }
.filters .date-f { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg label { padding: 7px 13px; font-size: .9rem; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg label + label { border-left: 1px solid var(--line-strong); }
.seg label.is-on { background: var(--primary-soft); color: var(--primary-hover); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }

.visit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.visit-item a { display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--child); border-radius: 12px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.visit-item a:hover { border-color: var(--line-strong); }
.visit-item.vs-cancelled a { opacity: .6; }
.visit-item.vs-cancelled .visit-title strong { text-decoration: line-through; }
.visit-date { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.visit-day { font-size: 1.45rem; font-weight: 700; }
.visit-mon, .visit-year { font-size: .75rem; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: .03em; }
.visit-title { font-size: 1rem; }
.visit-meta { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.visit-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.vbadge-planned { background: #e3f4ea; color: #1d5a3c; }
.vbadge-done { background: var(--success-bg); color: #1d5a43; }
.vbadge-cancelled { background: #eaeff6; color: #4f5d72; }
.is-overdue .vbadge-planned { background: #fdf3e3; color: #6e4a12; }
.visit-detail { border-top-style: solid; }
.section-gap { margin-top: 18px; }
.empty-card { text-align: left; }

/* Dokumenty */
.doc-list { list-style: none; margin: 0 0 6px; padding: 0; }
.doc-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid #edf1f7; }
.doc-row:last-child { border-bottom: 0; }
.doc-icon { width: 44px; height: 52px; border-radius: 7px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px; font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-decoration: none; color: #fff; background: #6f7f96; position: relative; }
.doc-icon::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 12px 12px 0; border-color: transparent var(--surface) rgba(255,255,255,.35) transparent; }
.doc-pdf { background: #c4404f; }
.doc-img { background: #2f8fb0; }
.doc-doc { background: #2456a6; }
.doc-main { min-width: 0; }
.doc-title { font-weight: 650; color: var(--text); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-title:hover { text-decoration: underline; color: var(--text); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .84rem; margin-top: 3px; align-items: center; }
.doc-meta a { color: #237049; text-decoration: none; font-weight: 600; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-hover); font-weight: 650; font-size: .76rem; }
.doc-actions { display: flex; gap: 4px; align-items: flex-start; }
.del-box { position: relative; }
.del-box summary { list-style: none; }
.del-box summary::-webkit-details-marker { display: none; }
.del-box[open] form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 230px; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.actions .del-box[open] form { left: 0; right: auto; }
.list-count { margin: -4px 0 6px; }

.upload-form { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line-strong); }
.dropzone { position: relative; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 22px 16px; border: 2px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); cursor: pointer; font-weight: 400 !important; }
.dropzone:hover, .dropzone:focus-within { border-color: var(--primary); background: var(--primary-soft); }
.dropzone.has-files { border-style: solid; border-color: var(--primary); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dz-files { color: var(--primary-hover); font-weight: 600; word-break: break-word; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 12px; }
.ics-opt { margin-bottom: 14px; }

@media (max-width: 760px) {
  .tabbar a { font-size: .66rem; }
  .row-3 { grid-template-columns: 1fr; gap: 10px; }
  .filters select, .filters input[type=date] { flex: 1 1 140px; }
  .filters > label { flex: 1 1 140px; }
  .filters-docs { grid-template-columns: 1fr 1fr; }
  .filters select { width: 100%; }
  .seg { width: 100%; }
  .seg label { flex: 1; text-align: center; padding: 8px 4px; }
  .visit-item a { grid-template-columns: 46px 1fr; padding: 10px 12px; gap: 10px; }
  .visit-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }
  .doc-row { grid-template-columns: 38px 1fr; }
  .doc-icon { width: 38px; height: 46px; }
  .doc-actions { grid-column: 2; }
  .page-head .btn-primary { width: 100%; }
}

/* ---------- Režim a statistiky ---------- */
.stats-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 18px; }
.stats-month { margin: 0; min-width: 170px; text-align: center; font-size: 1.25rem; }
.child-pick select { min-height: 38px; padding: 6px 10px; width: auto; }
.seg-links a { display: inline-block; padding: 7px 13px; font-size: .9rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.seg-links a + a { border-left: 1px solid var(--line-strong); }
.seg-links a.is-on { background: var(--primary-soft); color: var(--primary-hover); }
.stats-pending { margin-bottom: 18px; }
.regime-empty { margin-bottom: 18px; border-top: 3px solid var(--primary); }
.regime-empty p { max-width: 64ch; }

.fulfil { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.fulfil-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.fulfil-card header { font-size: 1.05rem; margin-bottom: 10px; display: flex; align-items: center; }
.fulfil-big { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.fulfil-pct { font-size: 3.4rem; font-weight: 780; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.fulfil-lbl { color: var(--muted); font-weight: 600; }
.fulfil-main { margin: 0 0 10px; font-size: 1.02rem; }
.fv-ok .fulfil-pct, .pct.fv-ok { color: var(--success); }
.fv-under .fulfil-pct, .pct.fv-under { color: #b5631d; }
.fv-over .fulfil-pct, .pct.fv-over { color: var(--primary); }
.fulfil-none { color: var(--muted); }
.fulfil-verdict { font-weight: 650; margin: 8px 0 12px; }
.fv-ok .fulfil-verdict { color: var(--success); }
.fv-under .fulfil-verdict { color: #b5631d; }
.fv-over .fulfil-verdict { color: var(--primary); }
.meter { position: relative; height: 12px; border-radius: 6px; background: #e8eef6; overflow: visible; }
.meter-fill { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--c); }
.meter-plan { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--text); }
.fulfil-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: .9rem; }
.fulfil-facts dt { color: var(--muted); }
.fulfil-facts dd { margin: 0; font-variant-numeric: tabular-nums; }

.split-card { margin-bottom: 18px; }
.split { position: relative; display: flex; height: 36px; border-radius: 10px; overflow: visible; background: #e8eef6; margin: 26px 0 12px; }
.split-seg { display: flex; align-items: center; justify-content: center; background: var(--c); color: #fff; font-weight: 700; font-size: .85rem; min-width: 0; overflow: hidden; }
.split-seg:first-child { border-radius: 10px 0 0 10px; }
.split-seg:last-of-type { border-radius: 0 10px 10px 0; }
.split-none { background: repeating-linear-gradient(45deg, #dfe6f0 0 6px, #eef3f9 6px 12px); }
.split-plan { position: absolute; top: -8px; bottom: -8px; width: 3px; margin-left: -1.5px; background: var(--text); border-radius: 2px; }
.split-plan span { position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); font-size: .72rem; font-weight: 700; white-space: nowrap; color: var(--text); }
.split-legend { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; }
.split-legend li { display: inline-flex; align-items: center; gap: 7px; }
.swatch-none { background: repeating-linear-gradient(45deg, #dfe6f0 0 3px, #eef3f9 3px 6px); border: 1px solid var(--line-strong); }
.method { margin: 6px 0 0; max-width: 90ch; }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
.stats-table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.stats-table thead th { color: var(--muted); font-weight: 650; font-size: .84rem; }
.stats-table tbody th a { color: var(--text); text-decoration: none; font-weight: 600; }
.stats-table tr.is-current { background: var(--primary-soft); }
.pct { font-weight: 750; }

.regime-card { border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 11px; padding: 12px 14px; background: #fff; }
.regime-card.rg-pending { border-left: 4px dashed var(--pending); background: #fbfbff; }
.regime-split { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0; align-items: center; }
.regime-split span { display: inline-flex; align-items: center; }
.regime-list { list-style: none; margin: 0; padding: 0; }
.regime-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.regime-list li:last-child { border-bottom: 0; }
.share-in > span { display: flex; align-items: center; }
.hint-bad { color: var(--danger) !important; font-weight: 600; }

.panel-regime { border-top: 3px solid var(--primary); }
.mini-fulfil { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); }
.mf-row { display: flex; align-items: center; gap: 8px; }
.mf-name { flex: 1; font-weight: 600; }
.mf-row .pct { font-size: 1.15rem; }

@media (max-width: 760px) {
  .stats-bar .month-nav { width: 100%; }
  .stats-month { flex: 1; min-width: 0; }
  .fulfil-pct { font-size: 2.8rem; }
  .child-pick, .child-pick select, .seg-links { width: 100%; }
  .seg-links a { flex: 1; text-align: center; }
}
[data-sum-hint] { margin-top: 6px; }

/* ---------- Jízdy ---------- */
.ride-chip { display: block; font-size: .72rem; font-weight: 600; color: var(--text); text-decoration: none; padding: 1px 6px; border-radius: 6px; border: 1px dashed color-mix(in srgb, var(--c) 55%, #fff); background: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ride-chip:hover { background: color-mix(in srgb, var(--c) 10%, #fff); color: var(--text); }
.agenda .ride-chip { font-size: .82rem; padding: 5px 9px; white-space: normal; }
.ride-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 18px; }
.ride-sum-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.ride-sum-card header { display: flex; align-items: center; margin-bottom: 8px; }
.ride-count { font-size: 2.8rem; font-weight: 780; letter-spacing: -.03em; line-height: 1; color: var(--c); font-variant-numeric: tabular-nums; }
.ride-kinds { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .88rem; }
.ride-list { list-style: none; margin: 0; padding: 0; }
.ride-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid #edf1f7; }
.ride-row:last-child { border-bottom: 0; }
.ride-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 14%, #fff); border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); }
.ride-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; }
.ride-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: .84rem; color: var(--muted); margin-top: 2px; align-items: center; }
.ride-list.compact .ride-row { grid-template-columns: 30px 1fr; }
.ride-list.compact .ride-icon { width: 30px; height: 30px; }
.ride-list.compact .doc-actions { grid-column: 2; }
.ride-list.compact + .btn { margin-top: 8px; }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.form .pick { position: relative; flex-direction: row; font-weight: 600; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick > span { display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; cursor: pointer; }
.pick input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-hover); box-shadow: inset 0 0 0 1px var(--primary); }
.pick input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }
@media (max-width: 760px) {
  .ride-row { grid-template-columns: 32px 1fr; }
  .ride-row .doc-actions { grid-column: 2; }
}
.ride-title .dot { margin-left: 5px; margin-right: 4px; }

/* ---------- Instalace ---------- */
.bare-main:has(.install) { max-width: 760px; }
.install { display: flex; flex-direction: column; gap: 16px; }
.install h2 { margin-bottom: .4em; }
.install-form { gap: 16px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.ck-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; color: #fff; }
.ck-ok .ck-icon { background: var(--success); }
.ck-warn .ck-icon { background: #c98a1e; }
.ck-bad .ck-icon { background: var(--danger); }
.ck-warn .small, .ck-bad .small { color: var(--muted); }
.config-out { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px !important; }
.code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: .85rem; overflow-x: auto; }
[data-show][hidden] { display: none !important; }
.ev-card-batch { margin: 6px 0 0; color: var(--primary-hover); font-weight: 600; }
.ev-card-title .dot { margin-left: 3px; }
.pick-row + .hint { margin-top: 6px; }
.ride-slot { margin-bottom: 10px; }
.ride-slot-label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }

/* ---------- Adresář lékařů a statistiky kontrol ---------- */
.doctor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.doctor-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.doctor-card header { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.doctor-name { font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.doctor-name:hover { text-decoration: underline; color: var(--text); }
.doctor-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; }
.kid { display: inline-flex; align-items: center; margin-right: 10px; font-size: .88rem; }
.contacts { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.contacts a { text-decoration: none; }
.contacts a:hover { text-decoration: underline; }
.contacts .pre { white-space: pre-line; }
.compact-list .visit-item a { padding: 8px 12px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.kpi-num { font-size: 2rem; font-weight: 780; letter-spacing: -.03em; line-height: 1.1; color: var(--primary); font-variant-numeric: tabular-nums; }
.kpi-num.ok { color: var(--success); }
.kpi-num.warn { color: #b5631d; }
.kpi-num.muted { color: var(--muted); }
.kpi-lbl { color: var(--muted); font-size: .86rem; font-weight: 600; }
.stats-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin: 16px 0; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: .9rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; }
.bar { height: 10px; background: #e8eef6; border-radius: 5px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.bar-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.month-chart { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 18px; }
.mc-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.mc-bar { width: 70%; max-width: 44px; background: var(--primary); border-radius: 6px 6px 0 0; min-height: 2px; }
.mc-val { font-size: .78rem; font-weight: 700; margin-bottom: 3px; }
.mc-lbl { font-size: .72rem; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.section-gap .page-head { margin-bottom: 8px; }
@media (max-width: 760px) {
  .subtabs { overflow-x: auto; }
  .subtabs a { white-space: nowrap; padding: 9px 10px; }
  .bars li { grid-template-columns: 1fr auto; }
  .bars .bar { grid-column: 1 / -1; grid-row: 2; }
  .month-chart { height: 140px; gap: 3px; }
}

/* ===================================================== v4: moduly, tarify, správa, reporty, veřejný web */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; background: var(--surface); }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { color: var(--muted); font-weight: 650; font-size: .84rem; background: var(--surface-2); }
.table-compact th, .table-compact td { padding: 6px 8px; font-size: .86rem; }
.table tr.is-muted td { color: var(--muted); }
.nowrap { white-space: nowrap; }
.inline { display: inline-block; margin: 0 4px 4px 0; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 3px 0; }
.bad { color: var(--danger); }
.lead { font-size: 1.08rem; color: var(--muted); }
.narrow { max-width: 520px; margin: 32px auto; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h2, .section-head .pub-h2 { margin: 0; }
.seg label:has(input:checked) { background: var(--primary-soft); color: var(--primary-hover); }
.callout-confirmed { background: var(--success-bg); border: 1px solid #b7dfcb; color: #17573f; }
.callout-rejected { background: var(--danger-bg); border: 1px solid #f1c3cb; color: #8a2236; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 18px; }
.form fieldset .check-grid label.check { font-weight: 500; }
.badge-pending { white-space: normal; }

/* Režimy: podpora, demo */
.mode-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .92rem; }
.mode-banner span { flex: 1 1 260px; }
.mode-banner form { margin: 0; }
.mode-support { background: #fff4e0; border: 1px solid #f0cf94; color: #6e4a12; }
.mode-demo { background: var(--accent-soft); border: 1px solid #b6e1ea; color: #11545f; }
.role-tag { margin: -6px 0 12px; font-size: .8rem; color: var(--muted); }

/* Oprávnění dalších osob */
.perm-matrix { display: grid; gap: 6px; margin: 8px 0 12px; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.perm-row.is-off { opacity: .6; }
.perm-label { font-size: .92rem; }
.perm-levels { display: flex; gap: 6px; flex-wrap: wrap; }
.pick-sm span { padding: 4px 10px !important; font-size: .82rem !important; }
details.guest { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 8px; background: var(--surface-2); }
details.guest summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
details.guest[open] summary { margin-bottom: 10px; }
.guest-perms { flex-basis: 100%; color: var(--muted); }
.guest-invite p { margin: 0 0 6px; }
.guest-new > summary { list-style: none; display: inline-flex; margin: 6px 0; }
.guest-new > summary::-webkit-details-marker { display: none; }
.guest-new[open] > summary { margin-bottom: 12px; }

/* Tarify */
.module-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 16px; font-size: .92rem; }
.module-list .is-off, .plan-features .is-off { color: var(--muted); opacity: .65; }
.module-list .is-on span, .plan-features .is-on span { color: var(--success); font-weight: 700; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px 20px; box-shadow: var(--shadow); }
.plan.is-highlight { border: 2px solid var(--primary); }
.plan.is-current { border-color: var(--success); }
.plan-flag { position: absolute; top: -11px; left: 18px; background: var(--primary); color: #fff; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.plan.is-current .plan-flag { background: var(--success); }
.plan h3 { margin: 0 0 4px; font-size: 1.2rem; }
.plan-tagline { color: var(--muted); font-size: .9rem; min-height: 2.6em; margin: 0 0 10px; }
.plan-price { margin: 0 0 4px; font-size: .95rem; }
.plan-price strong { font-size: 1.7rem; letter-spacing: -.02em; }
.plan-price .save { display: inline-block; margin-left: 6px; font-size: .76rem; font-weight: 700; color: var(--success); background: var(--success-bg); padding: 2px 8px; border-radius: 99px; }
.plan-note { color: var(--muted); margin: 0 0 12px; }
.plan-features { list-style: none; padding: 0; margin: 0 0 16px; font-size: .9rem; flex: 1; }
.plan-features li { padding: 3px 0; }
.plan .btn, .plan form .btn { width: 100%; justify-content: center; }
.plan form { margin: 0; }
.plan-mini-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 16px; }
.plan-mini { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; min-width: 160px; }
.upgrade { max-width: none; }
.pay { max-width: none; }
.pay-amount { font-size: 2rem; font-weight: 780; color: var(--primary); margin: 0 0 12px; }
.pay-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 18px; padding: 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.pay-details dt { color: var(--muted); }
.pay-details dd { margin: 0; font-variant-numeric: tabular-nums; }

/* Report */
.intro-card .steps { margin: 8px 0; }
.lawyer-list { display: grid; gap: 8px; }
.lawyer { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-weight: 500 !important; }
.lawyer:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.lawyer input { margin-top: 3px; accent-color: var(--primary); }
.report-preview { overflow: hidden; }
.doc-embed { font-size: .9rem; }
.doc-embed h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; }
.doc-embed table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-variant-numeric: tabular-nums; }
.doc-embed th, .doc-embed td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-embed th { color: var(--muted); font-size: .8rem; background: var(--surface-2); }
.doc-embed .num { text-align: right; white-space: nowrap; }
.doc-embed .kpi { padding: 10px 12px; box-shadow: none; }
.doc-embed .kpi span { color: var(--muted); font-size: .8rem; }
.doc-embed .kpi strong { font-size: 1.2rem; }
.doc-embed .ok { color: var(--success); } .doc-embed .warn { color: #b5631d; } .doc-embed .bad { color: var(--danger); }
.doc-embed .verify { margin-top: 18px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .8rem; word-break: break-all; }

/* Administrace */
body.admin { background: var(--bg); }
.admin-top { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.admin-top .brand { text-decoration: none; }
.admin-tag { margin-left: 8px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--text); padding: 2px 8px; border-radius: 6px; }
.admin-nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.admin-nav a { padding: 7px 11px; border-radius: 8px; color: var(--muted); font-weight: 600; text-decoration: none; font-size: .92rem; }
.admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a.is-active { background: var(--primary-soft); color: var(--primary-hover); }
.admin-user { display: flex; align-items: center; gap: 10px; }
.admin-user form { margin: 0; }
.admin-main { max-width: 1280px; margin: 0 auto; padding: 22px 20px 60px; }
.admin .kpi small { color: var(--muted); font-size: .8rem; }
.admin .kpi strong { font-size: 1.6rem; color: var(--primary); letter-spacing: -.02em; }
.admin .kpi span { color: var(--muted); font-size: .84rem; font-weight: 600; }
.admin .kpi a { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.secret-code { display: inline-block; font-size: 1.05rem; letter-spacing: .08em; padding: 4px 8px; background: var(--surface-2); border-radius: 6px; user-select: all; }
.danger-zone { border-color: #f1c3cb; }

/* ===================================================== Veřejný web */
body.public { background: var(--surface); }
.pub-wrap { max-width: 1440px; margin: 0 auto; padding: 0 20px; }
.pub-top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.pub-top-in { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.pub-top .brand { text-decoration: none; }
.pub-nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.pub-nav a { padding: 8px 12px; color: var(--muted); font-weight: 600; text-decoration: none; border-radius: 8px; }
.pub-nav a:hover { color: var(--text); background: var(--surface-2); }
.pub-cta { display: flex; gap: 8px; align-items: center; }
.pub-user { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.pub-user-ava { width: 32px; height: 32px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .95rem; flex: none; }
.pub-user-txt { display: flex; flex-direction: column; line-height: 1.15; }
.pub-user-lbl { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pub-user-name { font-size: .95rem; color: var(--text); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-user-out { margin: 0 6px 0 4px; padding-left: 10px; border-left: 1px solid var(--line); }
.pub-user-out .link-btn { font-size: .85rem; color: var(--muted); }
.pub-user-out .link-btn:hover { color: var(--text); }
.pub-go { display: inline-flex; align-items: center; gap: 6px; }
.pub-go-short { display: none; }
@media (max-width: 900px) { .pub-user-out { display: none; } }
@media (max-width: 640px) {
  .pub-user { padding: 0; border: 0; background: none; }
  .pub-user-txt { display: none; }
  .pub-go-long { display: none; }
  .pub-go-short { display: inline; }
}
.btn-lg { padding: 13px 22px; font-size: 1.02rem; border-radius: 12px; }
.hero { background: linear-gradient(180deg, var(--bg) 0%, #f7faff 70%, var(--surface) 100%); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--accent); margin: 0 0 10px; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 780; margin-bottom: 18px; }
.hero h1 span { color: var(--primary); }
.hero .lead { font-size: 1.12rem; margin-bottom: 24px; max-width: 34em; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.hero-cta form { margin: 0; }
.hero-visual { position: relative; min-height: 300px; }
.shot { display: block; border-radius: 14px; box-shadow: 0 2px 6px rgba(23, 50, 90, .08), 0 24px 60px rgba(23, 50, 90, .18); background: var(--surface); }
.shot-desktop { width: 100%; height: auto; border: 1px solid var(--line); }
.shot-phone { position: absolute; width: 30%; height: auto; right: -2%; bottom: -10%; border-radius: 22px; border: 6px solid #16233a; }
.hero-mock { display: grid; place-items: center; height: 340px; border-radius: 20px; background: var(--primary-soft); }
.hero-mock .brand-mark { width: 140px; height: 140px; }
.pub-section { padding: 72px 0; }
.pub-alt { background: var(--bg); }
.pub-h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.02em; font-weight: 760; margin-bottom: 18px; }
.how { list-style: none; counter-reset: how; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.how li { counter-increment: how; display: flex; flex-direction: column; gap: 6px; padding-top: 52px; position: relative; }
.how li::before { content: counter(how); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 750; display: grid; place-items: center; }
.how span { color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.features-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature h3 { margin: 10px 0 6px; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--muted); font-size: .93rem; }
.feature-ico { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.feature-ico svg { width: 22px; height: 22px; }
.pub-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--success); font-weight: 800; }
.lawyer-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lawyer-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.lawyer-card p { margin: 6px 0 0; color: var(--muted); }
.report-teaser { padding: 26px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.rt-row { display: grid; grid-template-columns: 70px 1fr 56px; gap: 10px; align-items: center; margin-bottom: 14px; font-weight: 650; }
.rt-row b { display: block; height: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--primary) 0 calc(var(--w) / 1.1), #dfe6f0 0); }
.rt-row em { font-style: normal; color: var(--success); text-align: right; }
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line-strong); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 1.02rem; }
.faq details p { color: var(--muted); margin: 10px 0 0; }
.pub-final { text-align: center; }
.pub-final .hero-cta { justify-content: center; }
.pub-foot { background: #10203a; color: #c6d3e6; padding: 40px 0; }
.pub-foot a { color: #e3ecfa; }
.pub-foot .brand-word { color: #fff; }
.pub-foot-in { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 24px; }
.pub-foot-links { display: flex; flex-direction: column; gap: 6px; }
.legal { max-width: 820px; }
.legal h2 { margin-top: 28px; font-size: 1.1rem; }
.legal p, .legal li { color: #2c3a52; }
.narrow-text { max-width: 760px; }
@media (max-width: 900px) {
  .hero-in, .pub-split { grid-template-columns: 1fr; gap: 28px; }
  .hero-in { padding-top: 36px; padding-bottom: 48px; }
  .shot-phone { width: 34%; right: 2%; }
  .how { grid-template-columns: 1fr; }
  .pub-nav { display: none; }
  .pub-foot-in { grid-template-columns: 1fr; }
  .pub-section { padding: 48px 0; }
}
@media (max-width: 560px) {
  .pub-wrap { padding: 0 16px; }
  .pub-cta .btn-ghost { display: none; }
  .hero-cta .btn-lg, .hero-cta form, .hero-cta form .btn { width: 100%; justify-content: center; }
  .admin-top { padding: 10px 16px; }
  .admin-main { padding: 16px 16px 48px; }
  .admin-user .muted { display: none; }
  .pay-details { grid-template-columns: 1fr; gap: 2px; }
  .pay-details dd { margin-bottom: 8px; }
}
.settings-grid > * { min-width: 0; }
@media (max-width: 760px) {
  .admin-nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .admin-nav a { white-space: nowrap; }
  .admin-user { margin-left: auto; }
}
/* v5: plánování, limity */
.seg a { padding: 8px 14px; font-size: .9rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.seg a + a { border-left: 1px solid var(--line-strong); }
.seg a.is-on { background: var(--primary-soft); color: var(--primary-hover); }
.plan-switch { margin: 0 0 14px; }
.plan-choose { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.plan-choice { display: flex; flex-direction: column; gap: 6px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.plan-choice:hover { border-color: var(--primary); }
.plan-choice strong { font-size: 1.12rem; color: var(--primary); }
.plan-choice span:last-child { color: var(--muted); font-size: .93rem; }
.plan-choice-ico { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.callout.quota { margin: 0 0 14px; }
.plan-features .is-limit span { color: #b5631d; font-weight: 700; }
.pay-grid { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.pay-grid .pay-details { flex: 1 1 280px; }
.pay-qr { margin: 12px 0 18px; text-align: center; }
.pay-qr svg { width: 180px; height: 180px; display: block; margin: 0 auto 4px; border-radius: 8px; }
.usage { display: grid; gap: 6px; margin: 12px 0; max-width: 420px; }
.usage-bar { height: 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.usage-bar b { display: block; height: 100%; background: var(--primary); }
.sub-badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.sub-trial { background: var(--accent-soft); color: #11545f; }
.sub-active { background: var(--success-bg); color: #17573f; }
.sub-ending, .sub-overdue { background: #fff4e0; color: #8a5a12; }
.sub-expired, .sub-suspended { background: var(--danger-bg); color: #8a2236; }
.rev-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 170px; margin: 12px 0 4px; }
.rev-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; font-size: .72rem; color: var(--muted); }
.rev-col b { width: 100%; max-width: 34px; background: var(--primary); border-radius: 5px 5px 0 0; min-height: 2px; }
.rev-col em { font-style: normal; color: var(--text); font-weight: 650; white-space: nowrap; }
.totp-setup { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin: 8px 0 12px; }
.totp-qr { margin: 0; text-align: center; }
.totp-qr svg { width: 200px; height: 200px; display: block; border: 1px solid var(--line); border-radius: 10px; }
.totp-setup .steps { flex: 1 1 240px; margin: 0; }
/* Administrace – zarovnání přehledu */
.admin-top { padding: 0; display: block; }
.admin-top-in { display: flex; align-items: center; gap: 10px 20px; flex-wrap: wrap; padding: 10px 20px; }
.admin-top .admin-nav { flex: 1 1 0; min-width: 0; flex-wrap: wrap; }
.admin-user { flex-shrink: 0; }
.admin-main { max-width: none; }
.admin-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.admin .kpi { gap: 4px; text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--primary); }
.admin .kpi .kpi-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin .kpi strong { line-height: 1.15; }
.chart-meta { display: flex; gap: 6px 18px; flex-wrap: wrap; justify-content: flex-end; }
.chart-empty { margin: 8px 0; padding: 28px 16px; text-align: center; background: var(--surface-2); border-radius: var(--radius-sm); }
.admin-split { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2.4fr); gap: 18px; align-items: start; margin-top: 18px; }
.admin-split > * { min-width: 0; }
.plan-dist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.plan-dist li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.plan-dist i { grid-column: 1 / -1; display: block; height: 6px; border-radius: 3px; background: var(--primary); }
.plan-dist li { padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.plan-dist li:last-child { border-bottom: 0; }
@media (max-width: 900px) { .admin-split { grid-template-columns: 1fr; } }
@media (max-width: 1100px) {
  .admin-top .admin-nav { order: 3; flex: 1 1 100%; max-width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .admin-nav a { white-space: nowrap; }
  .admin-user { margin-left: auto; }
}
@media (max-width: 560px) { .admin-top { padding: 0; } .admin-top-in { padding: 10px 16px; } .admin-user .muted { display: none; } }

/* ===================================================== Jednotné mezery (rytmus 20 px mezi bloky, 14 px mezi poli) */
:root { --gap: 20px; --field-gap: 14px; }
:is(.main, .admin-main) > * { margin-top: 0 !important; margin-bottom: 0 !important; }
:is(.main, .admin-main) > * + * { margin-top: var(--gap) !important; }
:is(.main, .admin-main) > .page-head + * { margin-top: 16px !important; }
.section + .section { margin-top: var(--gap); }
.section > .section-head, .section > h2:first-child { margin-bottom: 14px; }
.cal-layout, .detail-layout, .card-grid, .settings-grid, .fulfil, .ride-summary, .doctor-grid, .kpis, .stats-cols,
.plans, .plan-choose, .admin-split, .lawyer-cards, .features { gap: var(--gap); }
.cal-side { gap: var(--gap); }
.panel + .panel { margin-top: var(--gap); }
@media (max-width: 1100px) { .cal-side .panel + .panel { margin-top: 0; } }
.fulfil, .ride-summary, .kpis, .stats-cols { margin-top: 0; margin-bottom: var(--gap); }
.main > .kpis, .admin-main > .kpis, .main > .fulfil, .main > .ride-summary, .main > .stats-cols { margin-bottom: 0; }
.admin-split { margin-top: 0; }
.row-2, .row-3 { gap: var(--field-gap); }
.form { gap: var(--field-gap); }
.plans > *, .card-grid > *, .settings-grid > *, .kpis > * { min-width: 0; }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.card > h2:first-child, .panel > h2:first-child { margin-top: 0; }
.table-wrap { margin: 0; border-radius: var(--radius-sm); }
.plan-tagline { min-height: 3em; }
.plan-note { min-height: 3em; }
.plan-price { min-height: 2.6rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
/* Karty v mřížce mají v řádku stejnou výšku – mezery mezi nimi jsou všude stejné */
.settings-grid, .card-grid, .doctor-grid, .fulfil, .ride-summary, .stats-cols, .admin-split { align-items: stretch; }
.settings-grid > .card, .settings-grid > form, .admin-split > .card { height: 100%; }
/* Administrace – detail rodiny */
.page-sub { margin: 4px 0 0; }
.page-head h1 .sub-badge, .page-head h1 .badge { vertical-align: middle; margin-left: 6px; }
.family-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--gap); align-items: start; }
.family-main, .family-side { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.family-side .card h2, .family-main .card h2 { margin-top: 0; }
.row-3.row-eq { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.inline-field { max-width: 220px; }
.input-suffix { display: flex; align-items: center; gap: 8px; }
.input-suffix input { width: 110px; }
.member-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.member-list li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.member-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.facts-compact { grid-template-columns: 1fr auto; gap: 6px 14px; margin: 0; }
.facts-compact dd { margin: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.facts-compact dt { color: var(--muted); }
@media (max-width: 1100px) { .family-layout { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .row-3.row-eq { grid-template-columns: 1fr; } }
.facts-compact dd { justify-self: end; }
.cust-no { display: inline-block; font-size: .78rem; font-weight: 650; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; font-variant-numeric: tabular-nums; letter-spacing: .02em; vertical-align: middle; }
h1 .cust-no { font-size: .9rem; margin-left: 6px; }

/* Větší logo */
.brand-mark { width: 44px; height: 44px; }
.brand { font-size: 1.35rem; gap: 12px; }
.sidebar .brand-mark { width: 48px; height: 48px; }
.admin-top .brand-mark { width: 42px; height: 42px; }
.admin-top .brand { font-size: 1.3rem; }
.pub-top .brand-mark { width: 44px; height: 44px; }
.topbar .brand-mark { width: 38px; height: 38px; }
.doc-brand .brand-mark { width: 40px; height: 40px; }
.family-name { padding-left: 70px; }
.sidebar .brand-mark { width: 58px; height: 58px; }
.sidebar .brand { font-size: 1.55rem; }
.family-name { padding-left: 80px; margin-top: -8px; }
.admin-top .brand-mark { width: 52px; height: 52px; }
.admin-top .brand { font-size: 1.5rem; }
.pub-top .brand-mark { width: 50px; height: 50px; }
.pub-top .brand { font-size: 1.45rem; }
