/* Rodinný plánovač – design 2.0 (docs/STYL-2.0.md). One stylesheet, no build.
   Order: tokens → base → icons → components → layout → screens. Values from design/2.0/handoff/DESIGN-SPEC.md. */

/* --- tokens -------------------------------------------------------------------------------- */
:root {
  color-scheme: light;
  --bg: #f6f7f2; --surface: #ffffff; --surface-alt: #eef1e9;
  --text: #20352c; --muted: #607067; --border: #dce3d9;
  --primary: #1f6f5f; --primary-hover: #175748; --primary-contrast: #ffffff; --primary-soft: #e6f1eb;
  --danger: #a83430; --danger-soft: #faeeeb;
  --success: #276b45; --success-soft: #eaf3e9;
  --info: #285e86; --info-soft: #edf2f8;
  --warning: #82561d; --warning-soft: #fbf0db;
  --focus: #1f6f5f;
  --readonly: #6a746d; --readonly-soft: #eef0ed;
  --line: #98a89d;
  --shadow: 0 4px 24px rgba(32, 53, 44, .04);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --text-xs: 12px; --text-sm: 14px; --text-base: 16px; --text-lg: 18px;
  --title-sm: 20px; --title: 30px; --display: 36px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --radius-sm: 10px; --radius-button: 12px; --radius: 20px; --radius-lg: 28px;
  --sidebar: 232px; --content-max: 1240px; --tap: 48px;
  --nav-height: 68px; /* bottom navigation: 52 px target + 8 px above and below */
  --cat: var(--line); /* category colour of an event, set per element: style="--cat: #hex" */
}
/* Dark: by the system unless the user picked light; or picked dark in the app (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121c17; --surface: #1b2922; --surface-alt: #24362b;
    --text: #eef4eb; --muted: #b0bdb1; --border: #3a4d3e;
    --primary: #8ad0b3; --primary-hover: #b0e0c8; --primary-contrast: #12271d; --primary-soft: #284437;
    --danger: #ffb4aa; --danger-soft: #492925;
    --success: #a8d6a0; --success-soft: #2a402d;
    --info: #a9cee9; --info-soft: #253d4f;
    --warning: #edc688; --warning-soft: #403520;
    --focus: #a8d6bf;
    --readonly: #b3beb3; --readonly-soft: #27332b;
    --line: #758a78;
    --shadow: 0 4px 24px rgba(0, 0, 0, .08);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121c17; --surface: #1b2922; --surface-alt: #24362b;
  --text: #eef4eb; --muted: #b0bdb1; --border: #3a4d3e;
  --primary: #8ad0b3; --primary-hover: #b0e0c8; --primary-contrast: #12271d; --primary-soft: #284437;
  --danger: #ffb4aa; --danger-soft: #492925;
  --success: #a8d6a0; --success-soft: #2a402d;
  --info: #a9cee9; --info-soft: #253d4f;
  --warning: #edc688; --warning-soft: #403520;
  --focus: #a8d6bf;
  --readonly: #b3beb3; --readonly-soft: #27332b;
  --line: #758a78;
  --shadow: 0 4px 24px rgba(0, 0, 0, .08);
}

/* --- base ------------------------------------------------------------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: var(--text-base)/1.5 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh;
}
button, input, textarea, select { font: inherit; color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { margin: 0; }
h1 { font-size: var(--display); line-height: 1.15; font-weight: 700; letter-spacing: -1.1px; }
h2 { font-size: var(--title-sm); line-height: 1.3; letter-spacing: -.35px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; line-height: 1.4; }
p { margin: 0 0 var(--space-3); }
p:last-child { margin-bottom: 0; }
small, .small { font-size: var(--text-sm); line-height: 1.45; }
.xs { font-size: var(--text-xs); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.prewrap { white-space: pre-wrap; }
.break { overflow-wrap: break-word; hyphens: auto; }
code { font-size: .9em; background: var(--surface-alt); padding: 0 4px; border-radius: 4px; overflow-wrap: break-word; hyphens: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; background: var(--surface); padding: 12px 16px; border-radius: 12px; }
.skip-link:focus { top: 8px; }
[hidden] { display: none !important; }

/* --- icons (sprite, macro icon() in _icons.html) ----------------------------------------------- */
svg.icon {
  width: 22px; height: 22px; flex: none; vertical-align: middle;
  stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; fill: none;
}
.icon--sm { width: 16px !important; height: 16px !important; }
.icon--md { width: 18px !important; height: 18px !important; }
.icon--lg { width: 28px !important; height: 28px !important; }
.icon--xl { width: 54px !important; height: 54px !important; stroke-width: 1.3; }

/* --- buttons ------------------------------------------------------------------------------------ */
.btn {
  min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); border-radius: var(--radius-button); padding: 10px 16px;
  background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; line-height: 1.3;
  text-align: center; text-decoration: none; cursor: pointer;
}
.btn:hover { text-decoration: none; background: var(--surface-alt); }
.btn .icon { width: 18px; height: 18px; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn--ghost { background: transparent; }
.btn--soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); }
.btn--small { padding: 8px 12px; font-size: 13px; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: default; opacity: .55; }
.btn[aria-pressed="true"] { border-color: var(--danger); color: var(--danger); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap);
  border: 1px solid transparent; background: transparent; border-radius: 12px; color: var(--muted); flex: none; padding: 0;
}
.icon-btn:hover { background: var(--surface-alt); text-decoration: none; }
.icon-btn--outline { border-color: var(--border); }
.icon-btn--danger { color: var(--danger); }
.action-link {
  display: inline-flex; min-height: var(--tap); align-items: center; gap: 8px; font-size: 14px; font-weight: 650;
  background: none; border: 0; padding: 8px 0; color: var(--primary);
}
.linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; font-size: 14px; font-weight: 650; margin: -8px 0 12px; color: var(--primary); }
.back-link .icon { width: 16px; height: 16px; }
@media (max-width: 599px) { .back-link { margin-bottom: 8px; font-size: 13px; } }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.btn-row form, form.inline { margin: 0; display: inline; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* --- forms -------------------------------------------------------------------------------------- */
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.field { display: grid; gap: 8px; margin-bottom: 18px; min-width: 0; }
.field__label, legend.field__label { font-size: 14px; font-weight: 650; padding: 0; }
.field__input {
  min-height: var(--tap); padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text); width: 100%; min-width: 0; font-size: 16px;
}
textarea.field__input { resize: vertical; }
.field__input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.field__hint { font-size: 12px; color: var(--muted); }
.field__error { font-size: 13px; color: var(--danger); display: flex; gap: 6px; align-items: flex-start; }
.field--error .field__input, .field__input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
.field__input--short { width: 110px; display: inline-block; }
.field__input--small { min-height: 40px; padding: 6px 10px; font-size: 14px; width: auto; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 160px; }
.row__label { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 20px; }
.form-grid .wide { grid-column: 1 / -1; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.check { display: flex; align-items: center; gap: 12px; min-height: var(--tap); font-size: 15px; margin: 0 0 8px; }
.check__input, .check input, .check-row input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; margin: 0; }
.check-row { display: flex; gap: 12px; align-items: center; min-height: var(--tap); }
.check-target { display: flex; align-items: center; justify-content: center; width: var(--tap); min-height: var(--tap); flex: none; border: 0; border-radius: 12px; background: transparent; color: var(--muted); padding: 0; }
.check-circle { width: 24px; height: 24px; border: 1.5px solid var(--line); border-radius: 50%; display: grid; place-items: center; }
.check-circle .icon { width: 16px; height: 16px; visibility: hidden; }
.is-done .check-circle, [aria-pressed="true"] .check-circle { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.is-done .check-circle .icon, [aria-pressed="true"] .check-circle .icon { visibility: visible; }
/* chips: days of the week (round 48 px), choices */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { width: 100%; margin-bottom: 8px; }
.chip { display: inline-flex; position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap);
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; background: var(--surface); font-size: 14px;
}
.chip input:checked + span { background: var(--primary); color: var(--primary-contrast); border-color: var(--primary); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.date-parts { margin: 0 0 18px; }
.date-parts__row { display: grid; grid-template-columns: minmax(76px, 1fr) 2fr minmax(88px, 1.3fr); gap: 8px; }
.dictate-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* --- badges, flashes, notes ----------------------------------------------------------------------- */
.badge {
  display: inline-flex; gap: 5px; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 8px;
  font-size: 12px; font-weight: 650; line-height: 1.4; background: var(--surface-alt); color: var(--muted); white-space: nowrap;
}
.badge .icon { width: 14px; height: 14px; }
.badge--primary { background: var(--primary-soft); color: var(--primary); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--readonly { background: var(--readonly-soft); color: var(--readonly); border: 1px dashed var(--line); }
.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: var(--surface); color: var(--warning); font-size: 13px; font-weight: 650; }
.flashes { display: grid; gap: 8px; margin-bottom: 20px; }
.flash { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--info-soft); color: var(--info); font-size: 14px; }
.flash .icon { width: 20px; height: 20px; margin-top: 1px; }
.flash--error { background: var(--danger-soft); color: var(--danger); }
.flash--success { background: var(--success-soft); color: var(--success); }
.flash--warning { background: var(--warning-soft); color: var(--warning); }
.soft-note { padding: 16px 18px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); font-size: 14px; display: flex; align-items: flex-start; gap: 10px; }
.soft-note .icon { margin-top: 1px; }
.problems { color: var(--danger); font-size: 14px; margin: 4px 0 0; padding-left: 18px; }

/* --- surfaces and structure --------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); min-width: 0; margin-bottom: 20px; }
.stack > .card, .columns .card { margin-bottom: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card__head h2, .card__title { display: flex; gap: 10px; align-items: center; font-size: var(--title-sm); line-height: 1.3; margin: 0 0 12px; }
.card__head .card__title, .card__head h2 { margin: 0; }
.card__title .icon, .card__head h2 .icon { color: var(--primary); }
.card--narrow { max-width: 440px; margin: 24px auto; }
.stack { display: grid; gap: 20px; align-content: start; min-width: 0; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 1000px) { .columns { grid-template-columns: minmax(0, 1fr) 280px; } }
@media (min-width: 1200px) { .columns { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; } }
@media (min-width: 1440px) { .columns { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; } }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 12px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: break-word; hyphens: auto; }
.dl--compact { grid-template-columns: auto 1fr; margin: 8px 0; font-size: 14px; }
.list { display: grid; gap: 10px; }
.list-link {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.list-link:hover { background: var(--surface-alt); text-decoration: none; }
.list-link > div, .list-link__text { flex: 1; min-width: 0; }
.list-link > .icon:first-child { color: var(--primary); }
.list-link > .icon:last-child { color: var(--muted); width: 18px; }
.list-link strong, .list-link b { font-weight: 650; }
.list-link small { display: block; color: var(--muted); margin-top: 2px; }
.tabs { display: flex; gap: 4px; background: var(--surface-alt); padding: 4px; border-radius: 12px; width: fit-content; max-width: 100%; margin-bottom: 20px; flex-wrap: wrap; }
.tab, .tabs > a { display: inline-flex; align-items: center; border: 0; background: none; min-height: 44px; padding: 10px 16px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 600; }
.tab:hover, .tabs > a:hover { text-decoration: none; color: var(--text); }
.tab[aria-current="page"], .tab[aria-selected="true"], .tabs > a.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.progress { height: 6px; border-radius: 10px; background: var(--surface-alt); overflow: hidden; margin: 10px 0 6px; }
.progress__bar { height: 100%; background: var(--primary); border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.table td.num, .table th.num { text-align: right; }
.empty-state { text-align: center; padding: 28px 16px; }
.empty-state img { width: 150px; height: 120px; object-fit: contain; margin: 0 auto 16px; display: block; }
.empty-state h2 { font-size: 20px; }
.empty-state p { color: var(--muted); max-width: 340px; margin: 8px auto 18px; font-size: 14px; }
.skeleton { background: var(--surface-alt); height: 14px; border-radius: 8px; margin-top: 12px; }
.skeleton--wide { width: 90%; }
.skeleton--short { width: 50%; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: middle; background: var(--cat); }
.swatch--big { width: 18px; height: 18px; }
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--cat); flex: none; }
.module-symbol { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: var(--primary-soft); color: var(--primary); font-weight: 700; border-radius: 50%; font-size: 14px; flex: none; text-transform: uppercase; }
.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.avatar--warm { background: var(--warning-soft); color: var(--warning); }
.avatar--blue { background: var(--info-soft); color: var(--info); }
.qr img { display: block; margin: 0 auto 8px; background: #fff; padding: 10px; border-radius: 12px; max-width: 100%; height: auto; }
.lead { margin: 0 0 16px; font-size: 18px; }

/* --- layout: skip link, sidebar, top bar, main, bottom navigation ------------------------------ */
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; background: var(--surface); color: var(--text); padding: 14px 18px; border-radius: 12px; box-shadow: var(--shadow); }
.skip-link:focus { top: 12px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--border); padding: 32px 20px 24px; display: flex; flex-direction: column; z-index: 30; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 750; line-height: 1.2; letter-spacing: -0.25px; color: var(--text); text-decoration: none; }
.brand img { width: 42px; height: 42px; flex: none; }
.brand small { display: block; font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-top: 5px; }
.side-nav { display: grid; gap: 8px; margin-top: 42px; }
.side-nav a, .sidebar-bottom a { display: flex; gap: 14px; align-items: center; color: var(--muted); border-radius: 14px; padding: 14px 16px; font-size: 15px; font-weight: 600; min-height: 52px; text-decoration: none; }
.side-nav a:hover, .sidebar-bottom a:hover { background: var(--surface-alt); color: var(--text); }
.side-nav a[aria-current="page"], .sidebar-bottom a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
.side-nav .count-pill { margin-left: auto; background: var(--warning-soft); }
.side-section { margin: 22px 16px 2px; font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); }
.sidebar-bottom { margin-top: auto; padding-top: 28px; display: grid; gap: 4px; }
.sidebar-bottom a { font-size: 14px; min-height: 48px; padding: 10px 16px; }
.sidebar-bottom .avatar { margin-left: -4px; }
.workspace { min-height: 100vh; }
body.has-nav .workspace { margin-left: var(--sidebar); }
.topbar { height: 84px; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); padding-top: env(safe-area-inset-top); box-sizing: content-box; }
.topbar-title { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.undo-form { margin: 0; }
.undo-btn { width: auto; min-height: 40px; gap: 6px; padding: 6px 12px; font-weight: 600; border: 1px solid var(--border); border-radius: 999px; color: var(--text); white-space: nowrap; }
.undo-btn .icon { width: 18px; height: 18px; }
.undo-btn:disabled { color: var(--muted); opacity: 0.6; cursor: default; }
.avatar-link { display: inline-flex; border-radius: 50%; text-decoration: none; }
.mobile-brand { display: none; align-items: center; gap: 10px; font-weight: 750; color: var(--text); text-decoration: none; letter-spacing: -0.2px; min-width: 0; }
.mobile-brand img { width: 36px; height: 36px; flex: none; }
.mobile-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { display: block; max-width: var(--content-max); margin: 0 auto; padding: 36px 40px 48px; }
.main:focus { outline: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-head p { margin: 10px 0 0; color: var(--muted); }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.page__title { font-size: var(--display); margin: 0 0 24px; }
.bottomnav { display: none; }
body.body--login .main { max-width: 480px; padding-top: 48px; }

@media (min-width: 1000px) and (max-width: 1199px) {
  :root { --sidebar: 206px; }
  .main { padding: 32px 28px 48px; }
  .topbar { padding: 0 28px; }
}
@media (min-width: 1440px) {
  .main { padding: 42px 48px 48px; }
  .topbar { padding: 0 48px; }
}
@media (max-width: 999px) {
  .sidebar { display: none; }
  body.has-nav .workspace { margin-left: 0; }
  .topbar { position: sticky; top: 0; z-index: 30; background: var(--bg); height: 76px; padding: 0 24px; padding-top: env(safe-area-inset-top); border-bottom: 0; }
  .topbar-title { display: none; }
  .mobile-brand { display: flex; font-size: 16px; }
  .topbar-actions { gap: 4px; }
  .main { max-width: 720px; padding: 24px 24px 48px; }
  body.has-nav .main { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
  body.keyboard-open .bottomnav { display: none; }  /* Design 2.3 / A34: the keyboard covers that space */
  body.has-nav.keyboard-open .main { padding-bottom: 24px; }
  .page-head { margin-bottom: 24px; }
  .page-head h1, .page__title { font-size: 32px; }
  .page-head p { font-size: 14px; margin-top: 8px; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); z-index: 40; }
  .bottomnav a { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 550; min-height: 52px; border-radius: 12px; position: relative; text-decoration: none; }
  .bottomnav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
  .bottomnav .icon { width: 22px; height: 22px; }
}
@media (max-width: 599px) {
  .topbar { height: 70px; padding: 0 16px; padding-top: env(safe-area-inset-top); }
  .mobile-brand { gap: 8px; font-size: 14px; }
  .mobile-brand img { width: 32px; height: 32px; }
  .topbar .undo-text-wide { display: none; }
  .undo-btn { padding: 6px 10px; }
  .mobile-brand span { font-size: 13px; max-width: 115px; line-height: 1.2; }
  .main { padding: 20px 16px 40px; }
  .page-head { gap: 12px; flex-wrap: wrap; }
  .page-head > div:first-child { flex: 1 1 220px; }
  .head-actions { justify-content: flex-start; }
  .page-head h1, .page__title { font-size: 30px; }
}
@media print {
  .sidebar, .topbar, .bottomnav, .skip-link { display: none !important; }
  body.has-nav .workspace { margin-left: 0; }
}

/* --- Dnes: attention, timeline entry, weather, layout ------------------------------------------ */
.today-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.today-main, .today-aside { min-width: 0; }
.page-head--today h1 { overflow-wrap: break-word; hyphens: auto; }
.attention { background: var(--warning-soft); border-color: transparent; box-shadow: none; }
.attention .card__head { margin-bottom: 6px; }
.attention .card__head h2 .icon, .attention-row > .icon { color: var(--warning); }
.attention-count { background: var(--surface); color: var(--warning); border-radius: 50%; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none; }
.attention-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-top: 1px solid color-mix(in srgb, var(--warning) 18%, transparent); color: var(--text); }
.attention-row > .icon { margin-top: 2px; flex: none; }
.attention-row--link { text-decoration: none; min-height: 48px; }
.attention-row--link:hover .attention-title { text-decoration: underline; }
.attention-row--link > .icon:last-child { color: var(--muted); align-self: center; }
.attention-copy { flex: 1; min-width: 0; }
.attention-title { display: block; font-size: 16px; font-weight: 650; line-height: 1.4; }
.attention-title a { color: inherit; }
.attention-copy p { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.attention-copy .btn-row { margin-top: 10px; }
.compact-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.compact-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.compact-row p { margin: 2px 0 0; }
.timeline-section { min-width: 0; }
.timeline-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; }
.timeline-head h2 { font-size: 22px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; position: relative; }
.time { font-size: 14px; font-weight: 650; color: var(--muted); padding-top: 17px; font-variant-numeric: tabular-nums; }
.time small { font-size: 12px; display: block; font-weight: 400; margin-top: 4px; }
.time--now { color: var(--primary); }
.now-line { height: 2px; background: var(--primary); margin: 0 0 0 70px; position: relative; border-radius: 2px; }
.now-line::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); position: absolute; left: -4px; top: -4px; }
.event { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--cat); border-radius: 16px; padding: 16px 18px; min-width: 0; box-shadow: var(--shadow); }
.event-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.event-title { font-size: 16px; font-weight: 650; line-height: 1.45; margin: 0; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.event-title a { color: inherit; }
.event-title .icon { width: 18px; height: 18px; color: var(--success); vertical-align: -3px; }
.event-top .badge { flex: none; }
.event-meta { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 5px 0 0; }
.event-meta .icon { width: 14px; height: 14px; }
.event-meta .cat-dot { width: 9px; height: 9px; }
.event-warn { display: flex; gap: 8px; align-items: flex-start; color: var(--danger); font-size: 14px; font-weight: 600; margin: 10px 0 0; }
.event-warn .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.event-soft { font-size: 14px; color: var(--text); margin: 10px 0 0; }
.event-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.event-actions > form { margin: 0; }
.event-more { flex: 1 1 auto; }
.event-more > summary { list-style: none; display: inline-flex; cursor: pointer; }
.event-more > summary::-webkit-details-marker { display: none; }
.event-more[open] > summary { background: var(--surface-alt); }
.event-more__body { display: grid; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.event-more__title { font-weight: 650; font-size: 14px; margin: 0 0 8px; }
.event-more__form .row { flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; }
.event-more__form .field { flex: 1 1 120px; }
/* kind */
.event--routine { background: var(--surface-alt); border-color: transparent; box-shadow: none; }
.event--external { box-shadow: none; }
/* permission */
.event--readonly { background: var(--readonly-soft); border: 1px dashed var(--line); border-left: 4px solid var(--readonly); box-shadow: none; }
/* state */
.event--now { border-color: var(--primary); border-left-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.event--done { background: var(--surface-alt); box-shadow: none; }
.event--done .event-title { text-decoration: line-through; text-decoration-thickness: 1px; }
.event--partial { border-color: var(--warning); }
.event--not-done .event-title, .event--cancelled .event-title { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--muted); }
.event--cancelled { background: transparent; box-shadow: none; border-style: dashed; }
.event--collision { border-color: var(--danger); border-left-color: var(--danger); box-shadow: 0 0 0 1px var(--danger) inset; }
.event--soft { border-color: var(--warning); }
.event--allday { padding-top: 12px; padding-bottom: 12px; }
.event--free { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: transparent; border: 1.5px dashed var(--line); box-shadow: none; color: var(--muted); font-size: 14px; padding: 14px 18px; }
.event--free .icon { color: var(--primary); flex: none; }
.event-partial { margin: 8px 0 0; font-size: 14px; color: var(--warning); font-weight: 600; }
/* weather */
.weather { background: var(--surface-alt); border-color: transparent; box-shadow: none; }
.weather .card__head { margin-bottom: 10px; }
.weather .card__head .action-link { min-height: 40px; padding: 0; }
.weather-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.weather-main .temperature { font-size: 36px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; }
.weather-main p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.weather-main > .icon { width: 60px; height: 60px; color: var(--warning); stroke-width: 1.3; flex: none; }
.weather-hours { display: flex; gap: 8px; overflow-x: auto; border-top: 1px solid var(--border); padding-top: 16px; }
.weather-hour { flex: 1 0 52px; text-align: center; display: grid; gap: 6px; justify-items: center; font-size: 12px; color: var(--muted); }
.weather-hour b { color: var(--text); font-size: 14px; }
.weather-hour .icon { width: 22px; height: 22px; color: var(--text); }
.weather-rain { color: var(--info); font-weight: 650; }
.weather-source { font-size: 12px; color: var(--muted); margin: 14px 0 0; }
.family-card .card__head > .icon { color: var(--primary); }
.family-item { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.family-item p { font-size: 13px; color: var(--muted); margin: 2px 0 0; }

@media (min-width: 1000px) {
  .today-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (min-width: 1200px) {
  .today-layout { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 599px) {
  .page-head--today .head-actions { display: none; }
  .attention { padding: 18px; }
  .attention-title { font-size: 15px; }
  .attention-copy p { font-size: 13px; }
  .timeline-row { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
  .time { font-size: 13px; padding-top: 15px; }
  .now-line { margin-left: 54px; }
  .event { padding: 14px; border-radius: 14px; }
  .event-title { font-size: 15px; }
  .event-meta { font-size: 12px; }
  .timeline-head h2 { font-size: 19px; }
}

/* --- Drafts ------------------------------------------------------------------------------------ */
.draft-list { gap: 14px; }
.draft-card-link { display: grid; gap: 6px; color: var(--text); text-decoration: none; margin: 0; }
.draft-card-link:hover { background: var(--surface-alt); text-decoration: none; }
.draft-card-link__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.draft-card-link__top > .icon { color: var(--muted); }
.draft-card-link__title { font-size: 17px; font-weight: 650; line-height: 1.4; }
.draft-card-link__meta { font-size: 13px; color: var(--muted); }
.draft-intro { display: flex; gap: 14px; align-items: flex-start; background: var(--primary-soft); color: var(--text); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 24px; }
.draft-intro > .icon { color: var(--primary); flex: none; margin-top: 2px; }
.draft-intro strong { display: block; }
.draft-intro p, .draft-intro ul { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.draft-intro .prewrap { color: var(--text); font-size: 15px; }
.draft-group { display: grid; gap: 10px; margin-bottom: 24px; }
.draft-group__title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin: 0 0 2px; }
.draft-group--unplaced .draft-group__title .icon { color: var(--info); }
.draft-item { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; }
.draft-item__body { flex: 1; min-width: 0; display: grid; gap: 4px; justify-items: start; }
.draft-item__title { font-weight: 650; line-height: 1.45; overflow-wrap: break-word; hyphens: auto; }
.draft-item__note { margin: 0; font-size: 14px; color: var(--muted); }
.draft-item .problems { list-style: none; padding: 0; display: grid; gap: 4px; }
.draft-item .problems li { display: flex; gap: 6px; align-items: flex-start; }
.draft-item .problems .icon { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.draft-item--invalid { background: var(--danger-soft); border-color: transparent; }
.draft-item--unplaced { background: var(--info-soft); border-color: transparent; }
.draft-check { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); margin: -12px -6px -12px -12px; flex: none; cursor: pointer; }
.draft-check input { width: 24px; height: 24px; accent-color: var(--primary); cursor: pointer; }
.draft-check input:disabled { cursor: not-allowed; }
.draft-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 0; margin-top: 8px; }
.draft-footer__count { margin: 0; font-weight: 650; font-size: 14px; }
.draft-footer .btn-row { margin: 0; }

/* --- Assistant: layout, conversations, chat, composer ------------------------------------------ */
.assistant-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.assistant-sidebar { display: none; }
.assistant-sidebar .tabs, .conversation-menu .tabs { margin: 16px 0 12px; }
.conversation-menu > summary { list-style: none; width: fit-content; }
.conversation-menu > summary::-webkit-details-marker { display: none; }
.conversation-menu[open] > summary .icon { transform: rotate(180deg); }
.conversation-menu__body { margin-top: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.conversation-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.conversation-link { display: grid; gap: 4px; padding: 12px 16px; border-radius: 14px; color: var(--text); text-decoration: none; min-height: var(--tap); border: 1px solid transparent; }
.conversation-link:hover { background: var(--surface-alt); text-decoration: none; }
.conversation-link[aria-current="page"] { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 18%, transparent); }
.conversation-link__title { font-weight: 650; font-size: 14px; overflow-wrap: break-word; hyphens: auto; }
.conversation-link__meta { font-size: 12px; color: var(--muted); }
.conversation-link.is-unread .conversation-link__title::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--primary); vertical-align: middle; }
.chat-card { display: grid; gap: 18px; margin: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.chat-head > div:nth-child(2) { flex: 1; min-width: 0; }
.chat-head h2, .chat-head__title { font-size: 20px; letter-spacing: 0; overflow-wrap: break-word; hyphens: auto; }
.chat-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.chat-head__icon { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.chat-head__actions { display: flex; gap: 4px; }
.chat-head__actions form { margin: 0; }
.chat-hint { margin: 0; color: var(--muted); font-size: 14px; }
.chat { display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: min(88%, 620px); padding: 14px 18px; border-radius: 18px; background: var(--surface-alt); color: var(--text); overflow-wrap: break-word; hyphens: auto; }
.bubble--user { align-self: flex-end; background: var(--primary-soft); border-bottom-right-radius: 6px; }
.bubble--assistant { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble--loading { width: min(88%, 420px); }
.bubble--loading .skeleton:first-child { margin-top: 2px; }
.bubble--loading p { margin: 10px 0 0; }
.chat > .flash { align-self: stretch; }
.bubble-error__body { display: grid; gap: 8px; flex: 1; }
.retry-form { display: grid; gap: 4px; justify-items: start; }
.retry-form .btn { color: var(--text); background: var(--surface); }
.retry-form__note { margin: 0; font-size: 12px; color: var(--muted); }
.bubble__meta { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.bubble__meta form { margin: 0; }
.icon-btn--small { width: 36px; height: 36px; margin: -8px 0; }
.bubble__attachment img { max-width: 100%; border-radius: 12px; margin-top: 8px; display: block; }
.bubble .md p { margin: 0 0 10px; }
.bubble .md p:last-child { margin-bottom: 0; }
.bubble .md ul, .bubble .md ol { margin: 4px 0 10px; padding-left: 20px; }
.draft-card { display: grid; gap: 8px; justify-items: start; margin-top: 14px; padding: 16px; border: 1px dashed var(--primary); border-radius: 14px; background: var(--surface); }
@media (max-width: 599px) { .draft-card { padding: 14px; } }
.draft-card--done { border-color: var(--line); }
.draft-card__title { margin: 2px 0 0; font-weight: 650; }
.draft-card__meta { margin: 0; font-size: 13px; color: var(--muted); }
.draft-card .btn { margin-top: 4px; }
.chat-composer { border-top: 1px solid var(--border); padding-top: 18px; }
.composer { display: grid; gap: 10px; }
.composer-box { display: flex; align-items: flex-end; gap: 8px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 16px; padding: 8px 8px 8px 16px; }
.composer-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus); }
.composer-box textarea { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; line-height: 1.5; padding: 8px 0; resize: none; min-height: 48px; max-height: 168px; }
.composer-box textarea:focus { outline: none; }
.composer-send { width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: var(--primary); color: var(--primary-contrast); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.composer-send:hover { filter: brightness(1.08); }
.composer-send:disabled { opacity: .5; cursor: not-allowed; }
.composer-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.composer-status { font-size: 13px; color: var(--muted); }
.attachment-preview { display: flex; align-items: center; gap: 12px; }
.attachment-preview[hidden], [data-dictate][hidden] { display: none; }
.usage { margin: 0; font-size: 12px; color: var(--muted); }
.tabs--compact > a { min-height: 40px; padding: 8px 14px; gap: 6px; }
.tabs--compact .icon { width: 18px; height: 18px; }

@media (min-width: 1000px) {
  .assistant-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 28px; }
  .assistant-sidebar { display: block; position: sticky; top: 24px; }
  .conversation-menu { display: none; }
}
@media (max-width: 599px) {
  .chat-card { padding: 18px; }
  .bubble { max-width: 94%; padding: 12px 14px; }
  .draft-footer { position: sticky; bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom)); background: var(--bg); padding: 12px 0; margin: 0 -2px; z-index: 5; }
  .draft-footer { gap: 8px; }
  .draft-footer .btn-row { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .draft-footer__count { font-size: 13px; }
  .draft-intro { padding: 16px; }
  .draft-item { padding: 14px; }
}

/* --- Úkoly ------------------------------------------------------------------------------------- */
.filter-row { margin-bottom: 20px; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.task { display: flex; align-items: flex-start; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.task:hover { background: var(--surface-alt); text-decoration: none; }
.task > .icon:last-child { color: var(--muted); align-self: center; flex: none; }
.task__state { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; color: var(--muted); }
.task__state .icon { width: 16px; height: 16px; }
.task__body { flex: 1; min-width: 0; display: grid; gap: 8px; }
.task__title { font-size: 17px; font-weight: 650; line-height: 1.4; overflow-wrap: break-word; hyphens: auto; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--muted); }
.task-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.task-meta .icon { width: 15px; height: 15px; }
.task .progress { margin: 2px 0 0; }
.task__remaining { font-size: 13px; color: var(--muted); }
.task--done { box-shadow: none; background: var(--surface-alt); }
.task--done .task__title { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--muted); }
.task--done .task__state { background: var(--success); border-color: var(--success); color: var(--primary-contrast); }
.card--form { max-width: 720px; }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-stats { display: flex; gap: 32px; flex-wrap: wrap; margin: 20px 0 6px; }
.detail-stats > div { display: grid; gap: 2px; }
.detail-stats strong { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.detail-stats span { font-size: 13px; color: var(--muted); }
.task-detail-hero .progress { margin: 14px 0; }
.task-detail-hero .btn-row { margin-top: 16px; }
.steps { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.step { padding: 8px 14px; border-radius: 999px; background: var(--surface-alt); font-size: 14px; font-weight: 600; }
.step--active { background: var(--primary-soft); color: var(--primary); }
.timeline--compact { gap: 10px; }
.timeline--compact > li { list-style: none; }
.work-list { list-style: none; margin: 0; padding: 0; }
.work-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.work-row:first-child { border-top: 0; padding-top: 4px; }
.work-row strong { font-size: 14px; }
.work-row p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.work-row > .icon { color: var(--success); flex: none; }
.form-grid--3 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* --- Týden ------------------------------------------------------------------------------------- */
.week-alert { margin-bottom: 20px; }
.week-day-selector { display: none; }
.week-grid { display: grid; gap: 20px; }
.week-day { min-width: 0; }
.week-day__title { display: flex; align-items: baseline; gap: 8px; font-size: 18px; margin: 0 0 12px; }
.week-day__name { font-weight: 700; }
.week-day__date { color: var(--muted); font-weight: 600; }
.week-day--today .week-day__date { color: var(--primary); }
.week-day__empty { margin: 0; color: var(--muted); font-size: 14px; padding: 14px 16px; border: 1px dashed var(--border); border-radius: 14px; }
.week-compact { display: none; }
.week-legend { display: none; }
.week-event { display: grid; gap: 3px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--cat); border-radius: 12px; padding: 10px 12px; font-size: 13px; min-width: 0; }
.week-event__time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.week-event__title { font-weight: 650; font-size: 14px; line-height: 1.35; overflow-wrap: break-word; hyphens: auto; }
.week-event__title a { color: inherit; }
.week-event__meta { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.week-event__warn { display: inline-flex; gap: 4px; align-items: center; color: var(--danger); font-weight: 650; font-size: 12px; }
.week-event .action-link { min-height: 36px; padding: 2px 0; font-size: 13px; }
.week-event .badge { justify-self: start; }
.week-event--routine { background: var(--surface-alt); border-color: transparent; border-left-color: var(--cat); }
.week-event--readonly { background: var(--readonly-soft); border: 1px dashed var(--line); border-left: 4px solid var(--readonly); }
.week-event--collision { border-color: var(--danger); border-left-color: var(--danger); background: var(--danger-soft); }
.week-event--done .week-event__title { text-decoration: line-through; color: var(--muted); }
.week-event--muted { opacity: 1; background: transparent; border-style: dashed; }
.week-event--muted .week-event__title { color: var(--muted); text-decoration: line-through; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--primary); }
.legend-dot--routine { background: var(--surface-alt); border: 1px solid var(--line); }
.legend-dot--readonly { background: var(--readonly); }
.legend-dot--collision { background: var(--danger); }

@media (max-width: 599px) {
  .page-head .head-actions .btn .action-label { display: none; }
}
/* Design 2.2 / A04: phones and tablets (up to 999 px) pick one day, from 1000 px the 7-column grid */
@media (max-width: 999px) {
  .week--js .week-day-selector { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 18px; }
  .day-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; border-radius: 14px; color: var(--muted); text-decoration: none; position: relative; font-size: 12px; }
  .day-chip strong { font-size: 18px; color: var(--text); }
  .day-chip--today strong { color: var(--primary); }
  .day-chip[aria-current="true"] { background: var(--primary); color: var(--primary-contrast); }
  .day-chip[aria-current="true"] strong { color: var(--primary-contrast); }
  .day-chip__dot { position: absolute; top: 6px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
  .week--js .week-day:not(.is-selected) { display: none; }
}
@media (min-width: 1000px) {
  .week-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: start; }
  .week-day__title { flex-direction: column; align-items: center; gap: 2px; font-size: 13px; margin-bottom: 14px; }
  .week-day__name { font-weight: 500; color: var(--muted); }
  .week-day__date { font-size: 22px; font-weight: 700; color: var(--text); }
  .week-day__title .badge { display: none; }
  .week-agenda { display: none; }
  .week-compact { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
  .week-day__empty { text-align: center; padding: 12px 6px; font-size: 13px; }
  .week-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 24px 0 0; padding: 0; font-size: 12px; color: var(--muted); }
}

/* --- Kalendáře --------------------------------------------------------------------------------- */
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 14px; font-weight: 700; flex: none; }
.calendar-row { display: grid; gap: 16px; padding: 20px 0; border-top: 1px solid var(--border); }
.calendar-row h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; margin: 0; overflow-wrap: break-word; hyphens: auto; }
.calendar-row .swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.calendar-row__info { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.calendar-row__info p { margin: 0; }
.calendar-row__owner { font-size: 14px; color: var(--text); }
.calendar-row__facts { font-size: 13px; color: var(--muted); }
.calendar-row__warn { white-space: normal; line-height: 1.4; padding: 6px 10px; }
.calendar-row__fields { display: grid; gap: 12px; align-content: start; }
.calendar-row--unused .calendar-row__info h3, .calendar-row--unused .calendar-row__owner { color: var(--muted); }
@media (min-width: 720px) {
  .calendar-row { grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: 24px; }
}

/* --- Platby ------------------------------------------------------------------------------------ */
.payment-list { list-style: none; margin: 0; padding: 0; }
.payment-row { display: flex; align-items: flex-start; gap: 16px; padding: 18px 0; border-top: 1px solid var(--border); }
.payment-row:first-child { border-top: 0; padding-top: 4px; }
.payment-row__main { flex: 1; min-width: 0; }
.payment-row__title { font-weight: 650; color: var(--text); }
.payment-row__main p { margin: 6px 0 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.payment-row__main .icon { width: 15px; height: 15px; }
.payment-row__side { display: grid; justify-items: end; gap: 8px; text-align: right; }
.amount { font-weight: 700; font-size: 17px; white-space: nowrap; }
.payment-detail { display: grid; gap: 20px; align-items: start; }
.payment-info__amount { font-size: clamp(30px, 9vw, 40px); font-weight: 700; letter-spacing: -1px; margin: 6px 0 18px; }
.payment-side { display: grid; gap: 14px; text-align: center; }
.payment-side .eyebrow { margin: 0; }
.payment-side .qr img { margin: 0 auto; border: 1px solid var(--border); }
.payment-side form { display: grid; gap: 10px; }
.payment-side p { margin: 0; }
.payment-side__paid { display: inline-flex; justify-content: center; align-items: center; gap: 6px; color: var(--success); font-weight: 650; }
.list { list-style: none; margin: 0; padding: 0; }
@media (min-width: 1000px) {
  .payment-detail { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* --- Přihlášení, registrace -------------------------------------------------------------------- */
body.body--login .main:has(.auth-shell) { max-width: none; padding: 0; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
.auth-story { display: none; }
.auth-form { display: flex; flex-direction: column; padding: 24px 16px 40px; background: var(--bg); }
.auth-form__brand { display: flex; align-items: center; gap: 10px; font-weight: 750; color: var(--text); text-decoration: none; margin-bottom: 32px; }
.auth-form__inner { width: 100%; max-width: 400px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); }
.auth-form__inner h1 { font-size: 32px; }
.auth-form__lead { color: var(--muted); margin: 10px 0 24px; }
.auth-form__inner form { display: grid; gap: 16px; }
.auth-form__alt { text-align: center; margin: 20px 0 8px; font-size: 14px; color: var(--muted); }
.auth-form__foot { text-align: center; font-size: 12px; margin: 16px 0 0; }
.auth-form__icon { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; align-items: center; justify-content: center; background: var(--warning-soft); color: var(--warning); margin-bottom: 16px; }
.empty-state__title { font-size: 24px; letter-spacing: -0.4px; margin-bottom: 8px; }
@media (min-width: 1000px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .auth-story { display: flex; flex-direction: column; gap: 32px; padding: 48px 60px 40px; background: var(--primary-soft); }
  .auth-story__copy { margin-top: 48px; }
  .auth-story__title { font-size: 48px; line-height: 1.12; font-weight: 750; letter-spacing: -1.6px; margin: 12px 0 18px; }
  .auth-story__lead { font-size: 18px; color: var(--muted); max-width: 26em; margin: 0; }
  .auth-story__art { width: min(340px, 80%); height: auto; margin: auto auto 0; }
  .auth-story__note { display: flex; align-items: center; gap: 8px; color: var(--primary); font-size: 14px; margin: 0; }
  .auth-form { justify-content: center; background: var(--surface); padding: 48px; }
  .auth-form__brand { display: none; }
  .auth-form__inner { border: 0; box-shadow: none; padding: 0; max-width: 380px; }
  .auth-form__inner h1 { font-size: 36px; }
}

.avatar--lg { width: 64px; height: 64px; font-size: 20px; }
.profile-card__head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.profile-card__head h2 { font-size: 20px; }
.profile-card__head p { margin: 2px 0 0; }
.settings-list { gap: 10px; }
.settings-list .list-link > .icon:first-child { color: var(--primary); }

/* --- Nákupy ------------------------------------------------------------------------------------ */
.shopping-list { list-style: none; margin: 0 0 16px; padding: 0; }
.shopping-row { border-top: 1px solid var(--border); }
.shopping-row:first-child { border-top: 0; }
.shopping-row form { display: flex; align-items: center; gap: 8px; }
.shopping-row .check-row { flex: 1; min-height: 52px; cursor: pointer; }
.shopping-row input:checked + .check-circle { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.shopping-row input:checked + .check-circle .icon { visibility: visible; }
.shopping-row input:focus-visible + .check-circle { outline: 3px solid var(--focus); outline-offset: 2px; }
.shopping-row .check-circle { flex: none; }
.shopping-row--done .shopping-row__name { color: var(--muted); }
.shopping-draft { display: grid; gap: 10px; margin-top: 16px; }

/* --- older screens: generic rows in the 2.0 look (lists not yet given their own component) ----- */
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--cat); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; }
.item__main { display: grid; gap: 4px; color: var(--text); text-decoration: none; }
.item__main:hover .item__title { text-decoration: underline; }
.item__title { font-weight: 650; }
.item__meta { color: var(--muted); font-size: 14px; }
.item__time { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 14px; }
.item__warn { color: var(--danger); font-size: 14px; }
.item .btn-row { margin-top: 6px; }
.item--done .item__title, .item--cancelled .item__title { text-decoration: line-through; color: var(--muted); }
.item--collision { border-color: var(--danger); background: var(--danger-soft); }

/* --- Kategorie: color swatches ----------------------------------------------------------------- */
.swatches { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.swatches legend { margin-bottom: 8px; }
.swatch-choice { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 4px 8px 4px 4px; border-radius: 12px; cursor: pointer; font-size: 14px; }
.swatch-choice:hover { background: var(--surface-alt); }
.swatch-choice__dot { width: 36px; height: 36px; border-radius: 50%; background: var(--cat); display: grid; place-items: center; color: #fff; flex: none; }
.swatch-choice__dot .icon { width: 18px; height: 18px; visibility: hidden; }
.swatch-choice input:checked + .swatch-choice__dot { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--text); }
.swatch-choice input:checked + .swatch-choice__dot .icon { visibility: visible; }
.swatch-choice input:focus-visible + .swatch-choice__dot { outline: 3px solid var(--focus); outline-offset: 4px; }

/* --- Více, moduly ------------------------------------------------------------------------------ */
.section-title { font-size: 20px; margin: 28px 0 14px; }
.more-top { gap: 10px; }
.module-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.module-tile { display: grid; gap: 6px; align-content: start; height: 100%; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; box-shadow: var(--shadow); min-height: 150px; }
.module-tile:hover { background: var(--surface-alt); text-decoration: none; }
.module-tile .module-symbol { margin-bottom: 10px; }
.module-tile strong { font-size: 16px; font-weight: 650; }
.module-tile span:last-child:not(.module-symbol) { font-size: 13px; color: var(--muted); line-height: 1.45; }
.more-all { margin: 12px 0 0; }
@media (min-width: 720px) { .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1200px) { .module-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* --- Můj režim --------------------------------------------------------------------------------- */
.routine-week { display: grid; gap: 14px; margin-bottom: 16px; }
.routine-day__title { font-size: 15px; margin: 0 0 8px; }
.routine-day__empty { margin: 0; font-size: 13px; color: var(--muted); padding: 10px 12px; border: 1px dashed var(--border); border-radius: 12px; }
.routine-blocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.routine-block { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--surface-alt); color: var(--text); text-decoration: none; min-height: var(--tap); }
.routine-block:hover { text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
.routine-block__icon { color: var(--primary); flex: none; }
.routine-block__icon .icon { width: 20px; height: 20px; }
.routine-block__body { display: grid; gap: 2px; min-width: 0; justify-items: start; }
.routine-block__time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.routine-block__title { font-weight: 650; font-size: 14px; overflow-wrap: break-word; hyphens: auto; }
.routine-block__meta { font-size: 12px; color: var(--muted); }
.routine-block .badge { margin-top: 4px; }
@media (min-width: 720px) { .routine-week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .routine-week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.weather-days { display: grid; gap: 16px; margin: 20px 0; }
.weather-days .card { margin: 0; }
.weather-hours--parts { list-style: none; margin: 0; padding: 16px 0 0; }
.weather-hours--parts .weather-hour { text-align: center; }
@media (min-width: 1000px) { .weather-days { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* --- Rodina ------------------------------------------------------------------------------------ */
.occasion-list { list-style: none; margin: 0; padding: 0; }
.occasion-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.occasion-row:first-child { border-top: 0; }
.occasion-row > div { flex: 1; min-width: 0; }
.occasion-row p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.occasion-row--today strong { color: var(--primary); }
.item__main--person { grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.item__main--person .avatar { grid-row: span 2; }

/* --- Upozornění, tečky v navigaci --------------------------------------------------------------- */
.notifications-btn { position: relative; }
.nav-dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 2px var(--bg); }
.bottomnav .nav-dot { top: 6px; right: calc(50% - 19px); width: 7px; height: 7px; box-shadow: 0 0 0 2px var(--surface); }
.bottomnav a[aria-current="page"] .nav-dot { box-shadow: 0 0 0 2px var(--primary-soft); }
.notification-list { list-style: none; margin: 0; padding: 0; }
.notification { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-top: 1px solid var(--border); }
.notification:first-child { border-top: 0; padding-top: 4px; }
.notification--unread { background: var(--primary-soft); border-radius: 14px; border-top-color: transparent; padding: 18px 16px; margin: 4px 0; box-shadow: inset 4px 0 0 var(--primary); }
.notification--unread + .notification { border-top-color: transparent; }
.notification__body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.notification__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.notification__title { font-weight: 650; overflow-wrap: break-word; hyphens: auto; }
.notification__title a { color: inherit; }
.notification__body p { margin: 0; font-size: 14px; color: var(--muted); }
.notification__body p, .attention-copy p { overflow-wrap: anywhere; }
@media (max-width: 599px) {
  .notification { gap: 12px; }
  .notification--unread { padding: 14px 12px; }
  .notification .module-symbol { width: 36px; height: 36px; border-radius: 10px; }
}
.notification__body .btn-row { margin-top: 6px; }
.notification__body .notification__time { font-size: 12px; }

/* --- Garáž ------------------------------------------------------------------------------------- */
.vehicle-card .card__head h2 { display: flex; align-items: center; gap: 10px; }
.vehicle-card .card__head h2 a { color: inherit; }
.vehicle-card__km { font-size: 30px; font-weight: 700; letter-spacing: -0.5px; margin: 0; }
.vehicle-card__km-label { margin: 2px 0 8px; font-size: 13px; color: var(--muted); }
.due-list { list-style: none; margin: 0 0 18px; padding: 0; }
.due-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.due-row p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.due-row > .icon { color: var(--muted); flex: none; }
.due-row .badge { flex: none; }
.item__title .icon { width: 18px; height: 18px; color: var(--primary); vertical-align: -3px; }

/* --- Přepínač vzhledu --------------------------------------------------------------------------- */
.theme-toggle .theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle .theme-toggle__moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .theme-toggle__sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .theme-toggle__moon { display: none; }
}
.theme-toggle[hidden] { display: none; }

/* --- dialog (Vrátit změnu, skenování QR) ------------------------------------------------------- */
.dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(10, 20, 15, 0.45); }
.dialog__body { padding: 24px; margin: 0; }
.dialog__body h2 { display: flex; align-items: center; gap: 10px; font-size: var(--title-sm); margin: 0 0 14px; }
.dialog__body h2 .icon { color: var(--primary); }
.dialog__body p { margin: 0 0 10px; overflow-wrap: anywhere; }
.undo-dialog__when { color: var(--muted); font-size: 14px; }
@media (max-width: 379px) {
  .mobile-brand span { max-width: 80px; font-size: 12px; }
  .mobile-brand { gap: 6px; }
  .topbar .theme-toggle, .topbar .notifications-btn, .topbar .avatar-link { width: 44px; min-width: 44px; }
}

/* --- Platby: rychlé zadání (QR, hlas) – design/2.1 round2: .upload-zone, .disclosure, .process-card ------- */
.quick-entry { display: grid; gap: 16px; margin-bottom: 24px; }
.quick-entry__tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.quick-tile { min-height: 0; padding: 16px; text-align: left; font: inherit; cursor: pointer; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.quick-tile .module-symbol { grid-row: span 2; margin: 0; }
.quick-tile[aria-expanded="true"] { background: var(--primary-soft); border-color: var(--primary); }
.quick-card { padding: 20px; }
.form-heading { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 0 0 16px; }
.form-heading .icon { color: var(--primary); }
.upload-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border: 1px dashed var(--line); border-radius: 18px; padding: 28px 20px; background: var(--bg); text-align: center; margin-bottom: 16px; }
.upload-zone > .icon { width: 42px; height: 42px; color: var(--primary); stroke-width: 1.5; }
.upload-zone p { font-size: 14px; color: var(--muted); max-width: 390px; margin: 0; }
.upload-zone .btn-row { justify-content: center; margin: 0; }
.upload-zone label.btn { cursor: pointer; }
.qr-status:empty { display: none; }
.upload-zone .qr-status { color: var(--text); font-weight: 600; }
.disclosure { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.disclosure > summary { list-style: none; min-height: var(--tap); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 650; cursor: pointer; color: var(--primary); }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure[open] > summary { border-bottom: 1px solid var(--border); color: var(--text); }
.disclosure-content { padding: 16px; margin: 0; }
.process-card { padding: 24px; margin-bottom: 24px; }
.process-title { display: flex; align-items: flex-start; gap: 14px; }
.process-title > .icon { width: 28px; height: 28px; color: var(--primary); flex: none; }
.process-title h2 { font-size: var(--title-sm); margin: 0; }
.process-title p { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.qr-video { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: #000; margin-bottom: 12px; }
@media (max-width: 599px) {
  .upload-zone { padding: 22px 14px; }
  .upload-zone .btn-row .btn { flex: 1 1 100%; }
}

/* --- opakování (Opravy 3): jedna komponenta pro platby, úkoly a přání ---------------------------------- */
.recurrence { display: grid; gap: 14px; }
.recurrence__part { display: grid; gap: 8px; }
.recurrence__part[hidden] { display: none; }
.recurrence .mini-label { font-size: 13px; font-weight: 650; color: var(--muted); }
.recurrence .radio-options { display: grid; gap: 4px; }
.recurrence .radio-options .check span { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.recurrence .date-parts { margin: 0; }
.recurrence .check input[type=number] { width: 84px; height: auto; min-height: 44px; }
.recurrence [data-rec-until][hidden] { display: none; }
.recurrence__summary { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); color: var(--text); font-size: 14px; }

/* --- photo_input (Opravy 3): jediná cesta pro fotky a dokumenty ------------------------------------------ */
.photo-input:not(.is-js) .file-btn { flex-direction: column; align-items: flex-start; height: auto; }
.photo-input:not(.is-js) .file-btn input { position: static; opacity: 1; font-size: 13px; max-width: 100%; }
.photo-input .file-btn input:disabled + * { opacity: .5; }
.photo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; }
.photo-list:empty { display: none; }
.photo-item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-align: left; }
.photo-item img, .photo-item__pdf { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--surface-alt); color: var(--primary); }
.photo-item__text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.photo-item__text small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.photo-status:empty { display: none; }
.photo-status { font-size: 14px; color: var(--text); font-weight: 600; margin: 0; }
.photo-input--compact { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* --- rodinný režim (Opravy 3): přenechané záznamy -------------------------------------------------------- */
.delegated-back { padding: 0 16px 12px; margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vehicle-card .delegated-back { padding: 0 0 12px; }
.match-row .btn-row { margin-top: 8px; }

/* --- nákupy partnerovi (Opravy 3) ---------------------------------------------------------------------- */
.handover-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.handover-state form, .handover-send { margin: 0; display: inline-flex; gap: 8px; align-items: center; }
.handover-send .field__input { width: auto; min-height: 40px; padding: 6px 10px; }
.handover--received { border: 1px solid var(--primary); }
.check-circle.is-checked { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.check-circle.is-checked .icon { visibility: visible; }

/* --- Práce (noc 4): pracovní položky na ose a v hubu ---------------------------------------------------- */
.event--work { border-left: 4px solid var(--info, var(--primary)); }
.event--work .event-meta .icon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.week-event--work { border-left-color: var(--info, var(--primary)); }
.work-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.work-list .btn-row { margin-top: 8px; }
.detail-list { display: grid; gap: 12px; margin: 0; }
.detail-list div { display: grid; gap: 2px; }
.detail-list dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.detail-list + .form-heading { margin-top: 24px; }

.work-buy__list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; }
.work-buy__row { display: flex; align-items: center; gap: 10px; min-height: var(--tap); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.work-buy__row:last-child { border-bottom: 0; }
.work-buy__row form { margin: 0; }
.work-buy__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.work-buy__more { margin-left: auto; }
.work-buy__add { margin-top: 16px; }
.work-buy .card__head h2 .icon, #purchases .card__head h2 .icon { color: var(--primary); }

/* --- Noc 6: work links, work vehicles, work tasks ------------------------------------------------ */
.work-task-toggle { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-alt); }
.work-task-toggle .field__hint { margin: 0 0 4px; }
.check--strong { font-weight: 700; margin: 0; }
.check--strong .icon { color: var(--primary); margin-right: 6px; }
.connection--work h3 .icon { color: var(--primary); margin-right: 6px; }
.work-scope { margin: 4px 0 8px; }
.work-task-list .item__meta { display: block; }

/* Noc 6 / D – address field with suggestions (Mapy.com) */
.address-field__box { position: relative; }
.address-suggest { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; }
.address-suggest__list { list-style: none; margin: 0; padding: 4px 0; max-height: 300px; overflow-y: auto; }
.address-suggest__option { min-height: 48px; padding: 6px 14px; display: flex; flex-direction: column; justify-content: center; cursor: pointer; }
.address-suggest__option[aria-selected="true"], .address-suggest__option:hover { background: var(--primary-soft); }
.address-suggest__main { font-weight: 600; font-size: var(--text-base); }
.address-suggest__sub { color: var(--muted); font-size: var(--text-sm); }
.address-suggest__note { margin: 0; padding: 10px 14px; font-size: var(--text-sm); color: var(--muted); }
.address-suggest__logo { display: flex; justify-content: flex-end; padding: 6px 10px; border-top: 1px solid var(--line); }
.address-suggest__logo img { height: 12px; width: 56px; display: block; overflow: hidden; font-size: 10px; color: var(--muted); object-fit: contain; }

/* Noc 6 / E – day strip (a running job above the timeline), jobs */
.day-banners { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.day-banner a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); border-left: 4px solid var(--primary); background: var(--surface-alt); color: var(--text); text-decoration: none; }
.day-banner a:hover { background: var(--primary-soft); }
.day-banner .icon { color: var(--primary); flex: none; }
.day-banner__label { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.day-banner__meta { margin-left: auto; color: var(--muted); font-size: var(--text-sm); white-space: nowrap; }
.day-banner--more a { border-left-color: var(--line); color: var(--muted); font-size: var(--text-sm); min-height: 36px; }
.job-card { border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface); }
.card.job-card { padding: 24px; border-radius: var(--radius); }
.job-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; }
.job-card__title { margin: 0; font-size: var(--text-lg); }
.job-card__title a { color: inherit; text-decoration: none; }
.job-card__desc { margin: 6px 0; color: var(--muted); }
.job-card .meta-line { margin: 4px 0; }
.job-list { display: grid; gap: 12px; }
.job-contact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.job-linked { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* Noc 6 / F – Pracovní týden (shared grid of Rozvrh týdne) */
.work-week__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.work-week__filters .chips { margin: 0; }
.work-week__filters a.chip { align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.work-week__filters a.chip.is-active { background: var(--primary); color: var(--primary-contrast); border-color: var(--primary); }
.work-week__jobs { display: grid; grid-template-columns: 56px repeat(var(--days, 5), minmax(110px, 1fr)); gap: 4px 0; padding: 6px 0;
  min-width: 840px; border-bottom: 1px solid var(--border); }
.work-week__job { grid-row: auto; display: flex; align-items: center; gap: 6px; margin: 0 3px; padding: 4px 8px; border-radius: 8px;
  background: color-mix(in srgb, var(--child) 22%, var(--surface)); border-left: 5px solid var(--child); color: var(--text);
  text-decoration: none; font-size: 12px; min-height: 32px; overflow: hidden; }
.work-week__job b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-week__job span { color: var(--muted); white-space: nowrap; }
.work-week__job.is-shared { border-left-style: dashed; }
.work-week__job--company { --child: var(--muted); background: var(--surface-alt); border: 1px solid var(--border);
  border-left: 5px solid var(--muted); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.timetable-block--company { --child: var(--muted); background: var(--surface-alt); }
.timetable-block--task { border-left-style: dashed; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--child) 14%, var(--surface)) 0 6px, var(--surface) 6px 10px); }
.timetable-block--event { color: var(--muted); }
.timetable-dot--task { background: var(--surface); border: 2px dashed var(--muted); }
.work-week__unscheduled { margin-top: 16px; }
.work-week__unscheduled .item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }

/* Noc 7 / C – Doprava: the departure card on Dnes, the timeline line, the journey detail (STYL 2.0 tokens only) */
.travel-card { position: relative; border-left: 4px solid var(--primary); }
.travel-card--warn { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 40%, var(--line)); border-left-color: var(--warning); }
.travel-card__lead { font-size: var(--text-base); font-weight: 600; margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.travel-card__lead .icon { color: var(--primary); align-self: center; }
.travel-card__lead a { color: inherit; }
.travel-card__inline-time { font-size: var(--title-sm); }
.travel-card__badge { margin-bottom: 8px; }
.travel-card__time { font-size: 48px; font-weight: 750; line-height: 1.05; letter-spacing: -0.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.travel-card__diff { color: var(--warning); font-weight: 600; margin: 0 0 6px; }
.travel-card__meta, .travel-card__text { margin: 4px 0; color: var(--text); display: flex; align-items: flex-start; gap: 6px; }
.travel-card__meta .icon { flex: none; margin-top: 3px; color: var(--muted); }
.travel-card__fresh { margin: 4px 0 0; color: var(--muted); font-size: var(--text-sm); display: flex; align-items: center; gap: 4px; }
.travel-card__fresh--stale { color: var(--warning); font-weight: 600; }
.travel-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.travel-card__source { display: flex; justify-content: flex-end; margin-top: 10px; line-height: 0; color: var(--muted); font-size: var(--text-xs); }
.travel-card__source img { height: 10px; width: auto; }
.position-use { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex-basis: 100%; }
.position-use small { font-size: var(--text-xs); }
.today-top { display: grid; gap: 12px; }
.event-travel { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); }
.event-travel a { color: inherit; font-weight: 600; }
.event-travel .icon { color: var(--primary); }
.event-travel--warn { color: var(--warning); }
.event-travel--warn .icon { color: var(--warning); }
.journey-card--warn { border-left: 4px solid var(--warning); }
.journey-route { display: flex; gap: 10px; align-items: flex-start; }
.journey-route > .icon { color: var(--primary); margin-top: 3px; flex: none; }
.journey-route__title { font-size: var(--text-lg); margin: 0; overflow-wrap: anywhere; }
.journey-route__meta { margin: 2px 0 0; color: var(--muted); }
.journey-duration { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.journey-duration__value { font-size: 48px; font-weight: 750; line-height: 1; margin: 0; font-variant-numeric: tabular-nums; }
.journey-duration__meta { margin: 6px 0 0; color: var(--muted); }
.journey-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; }
.journey-stats div { background: var(--surface-alt); border-radius: var(--radius-sm); padding: 10px 12px; }
.journey-stats dt { color: var(--muted); font-size: var(--text-sm); }
.journey-stats dd { margin: 2px 0 0; font-size: var(--title-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.journey-alert, .journey-missing, .journey-ok { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); }
.journey-alert { background: var(--warning-soft); color: var(--text); }
.journey-alert .icon { color: var(--warning); flex: none; margin-top: 2px; }
.journey-missing { background: var(--info-soft); }
.journey-missing .icon { color: var(--info); flex: none; margin-top: 2px; }
.journey-ok { background: var(--success-soft); }
.journey-ok .icon { color: var(--success); flex: none; margin-top: 2px; }
.journey-fresh { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; color: var(--muted); font-size: var(--text-sm); }
.journey-fresh--stale { color: var(--warning); font-weight: 600; }
.journey-actions { margin-top: 16px; }
/* Noc 10 / C: a company from ARES, the VAT label */
.registry-ico-row { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.registry-ico-row .field { flex: 1 1 160px; }
.registry-load { margin-bottom: 16px; min-height: 44px; }
.registry-ico-error { color: var(--danger); margin-top: -8px; }
.registry-ended { margin: 8px 0 0; }
.vat-status { margin: -6px 0 12px; min-height: 1em; font-size: var(--text-sm); }
.company-vat { align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.journey-traffic { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: var(--text-sm); color: var(--warning); font-weight: 600; } /* Noc 10 */
.maps-attribution { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 10px 0 0; font-size: var(--text-xs); color: var(--muted); }
.maps-attribution img { height: 13px; width: auto; display: block; }
.maps-attribution a { color: inherit; }
/* Noc 10: places found by the assistant (find_places) – a card with Navigovat under the bubble */
.place-cards { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.place-card { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.place-card__text { flex: 1 1 170px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.place-card__name { overflow-wrap: anywhere; }
.place-card__meta, .place-card__drive { font-size: var(--text-sm); color: var(--muted); }
.place-card__drive { color: var(--text); }
.place-card__go { flex: none; min-height: 44px; }
/* Noc 12: routes of plan_trip under the answer (numbered – the assistant refers to them by the number) */
.route-cards { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.route-card { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 6px 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.route-card__number { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--text-sm); background: var(--primary-soft); color: var(--primary); }
.route-card__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.route-card__name { overflow-wrap: anywhere; }
.route-card__summary { font-variant-numeric: tabular-nums; }
.route-card__meta, .route-card__note { font-size: var(--text-sm); color: var(--muted); }
.route-card__actions, .route-card__note { grid-column: 2; }
.route-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.route-card__actions .btn { min-height: 44px; }
.route-card__plan { grid-column: 2; min-height: 44px; display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-sm); }
.route-card__show { grid-column: 2; min-height: 44px; display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-sm); }
.route-card__preview { grid-column: 1 / -1; }
.route-card__preview img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.route-card__more { min-height: 44px; display: inline-flex; align-items: center; font-size: var(--text-sm); }
.stepper { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.stepper__label { flex: 1; font-weight: 600; }
.stepper__value { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.stepper form { margin: 0; }
.mode-switch { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.radio-option.is-disabled { opacity: .6; }
.plan-options { display: grid; gap: 10px; }
.plan-options .radio-option b { display: block; }
.plan-options .badge { margin-bottom: 4px; }
.plan-change { margin: 4px 0 0; font-size: clamp(32px, 9vw, 44px); font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plan-option__note { color: var(--muted); font-size: var(--text-sm); margin: 4px 0 0; }

/* --- misc ------------------------------------------------------------------------------------- */
.input-entry { margin-top: 8px; }

/* --- Asistence u formulářů (noc 4): assist_entry, karta „Asistent se ptá“ --------------------------------- */
.assist-entry { padding: 0; margin-bottom: 16px; overflow: hidden; }
.assist-entry__summary { list-style: none; min-height: var(--tap); padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-weight: 650; cursor: pointer; color: var(--primary); }
.assist-entry__summary::-webkit-details-marker { display: none; }
.assist-entry__summary span { flex: 1; }
.assist-entry[open] > .assist-entry__summary { border-bottom: 1px solid var(--border); color: var(--text); }
.assist-entry[open] > .assist-entry__summary > .icon:last-child { transform: rotate(180deg); }
.assist-entry > form { padding: 16px; margin: 0; }
.assist-question { border: 1px solid var(--primary); margin-bottom: 16px; }
.assist-question .form-heading .icon { color: var(--primary); }
.assist-question__text { font-size: 16px; margin: 0 0 12px; overflow-wrap: anywhere; }
.assist-question form { margin: 0 0 8px; }
.conversation-list__section { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; color: var(--muted); padding: 8px 4px 2px; }

/* --- Pokladna (noc 4) ---------------------------------------------------------------------------------- */
.cash-summary .detail-stats { margin: 0; }
.cash-kinds { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.cash-people, .cash-timeline, .cash-receipts { list-style: none; margin: 0; padding: 0; display: grid; }
.cash-person-row { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 10px 0; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; flex-wrap: wrap; }
.cash-people li:last-child .cash-person-row { border-bottom: 0; }
.cash-person-row__name { flex: 1; min-width: 8em; font-weight: 650; overflow-wrap: anywhere; }
.cash-person-row__badges { display: flex; gap: 6px; flex-wrap: wrap; }
.cash-balance { text-align: center; }
.cash-balance__label { margin: 0; color: var(--muted); font-weight: 600; }
.cash-balance__amount { margin: 4px 0 8px; font-size: 40px; font-weight: 750; letter-spacing: -1px; }
.cash-balance--open .cash-balance__amount { color: var(--warning); }
.cash-balance--owe .cash-balance__amount { color: var(--danger); }
.cash-balance--even .cash-balance__amount { color: var(--success); }
.cash-entry { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cash-entry:last-child { border-bottom: 0; }
.cash-entry__icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2, var(--primary-soft)); color: var(--primary); }
.cash-entry__body { min-width: 0; overflow-wrap: anywhere; }
.cash-entry__meta { display: block; font-size: 13px; color: var(--muted); }
.cash-entry__amount { font-weight: 700; white-space: nowrap; }
.cash-entry--receipt .cash-entry__amount, .cash-entry--return .cash-entry__amount { color: var(--success); }
.cash-entry__actions { grid-column: 2 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.cash-entry__actions form { margin: 0; }
.cash-entry.is-settled { opacity: .65; }
.cash-receipt { padding: 12px 0; border-bottom: 1px solid var(--border); }
.cash-receipt-job { margin: 12px 0 0; }
.cash-receipt-job a { display: inline-flex; align-items: center; gap: 6px; }
.cash-person-row > .icon { flex: none; order: 2; }
.cash-person-row__badges { order: 3; flex-basis: 100%; }

/* --- Nezapomenout (Opravy 4): pracovní poznámky bez času ------------------------------------------------- */
.work-note-list { list-style: none; margin: 0; padding: 0; display: grid; }
.work-note { display: flex; align-items: center; gap: 10px; min-height: var(--tap); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.work-note:last-child { border-bottom: 0; }
.work-note form { margin: 0; }
.work-note__text { flex: 1 1 160px; min-width: 0; overflow-wrap: break-word; }
.work-note__text a { font-weight: 650; white-space: nowrap; }
.work-note__more { display: block; font-size: 13px; color: var(--muted); }
.work-note__menu { margin-left: auto; }
.work-note.is-done .work-note__text { color: var(--muted); text-decoration: line-through; }
.work-note-add { margin-bottom: 12px; }
.work-note-add__row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.work-note-add__row > :first-child { flex: 1 1 14em; min-width: 0; }
.work-note-add__row .field__input { width: 100%; }
.work-note__menu, .work-buy__more { flex: none; }
.work-note__menu[open], .work-buy__more[open] { flex: 1 1 100%; }
.work-note__menu[open] > summary, .work-buy__more[open] > summary { margin-left: auto; display: flex; width: max-content; }
.work-note-bulk, .work-note-done { margin-top: 12px; }
.work-notes .card__head h2 .icon, #notes .card__head h2 .icon { color: var(--primary); }

/* --- Garáž: údaje z registru vozidel (Opravy 5) ------------------------------------------------------------ */
.registry-card .card__head h2 .icon { color: var(--primary); }
.registry-list { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); column-gap: 16px; }
.registry-diff { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--info-soft); }
.registry-diff__title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-weight: 650; }
.registry-diff ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.registry-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.registry-foot form { margin: 0; }
.registry-saved, .registry-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; }
.registry-saved { background: var(--success-soft); color: var(--text); }
.registry-saved > .icon { color: var(--success); flex: none; margin-top: 2px; }
.registry-note { background: var(--surface-alt); }
.registry-note > .icon { flex: none; margin-top: 2px; }
.registry-caption { margin: 0 0 8px; font-size: 13px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.registry-mark { color: var(--success); font-weight: 650; white-space: nowrap; }
.registry-mark .icon { vertical-align: -2px; margin-right: 2px; }


/* === Design 2.2 (převod doplnění 2.1) ========================================================================== */
/* A01 – Dnes: „Čeká na tebe“ nejvýše 3 řádky + Zobrazit všech N */
.attention-compact .attention-row { padding: 12px 0; }
.attention-compact .attention-title { font-size: 15px; }
.attention-compact .attention-row small { color: var(--muted); display: block; margin-top: 4px; font-size: 12px; }
.attention-compact .attention-row .attention-copy { min-width: 0; }
.attention-more { margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
/* A02 – patička draftu: počet nerozdělitelný s popiskem, na telefonu 2:1 */
.draft-number { white-space: nowrap; }
.draft-footer .btn { min-height: 48px; }
/* A03 – placeholder čitelný i v tmavém režimu */
.composer textarea::placeholder, .field__input::placeholder { color: var(--muted); opacity: 1; }
@media (max-width: 599px) {
  .attention-compact { padding: 18px; }
  .attention-compact .attention-title { font-size: 14px; }
  .attention-compact .attention-row { padding: 10px 0; gap: 8px; }
  .draft-footer .btn-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .draft-footer .btn { white-space: normal; font-size: 13px; padding: 12px 8px; gap: 5px; }
}
/* A10 – výběr souboru: skutečný input zůstává (průhledný v tlačítku), ovladatelný klávesnicí */
.file-btn:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.upload-zone__format { font-size: 13px; color: var(--muted); }
/* A13 – stavové stránky 403 / 404 / 500 (offline má vlastní ilustraci) */
.state-shell { max-width: 520px; margin: 30px auto 0; }
.state-shell .card { text-align: center; padding: 32px; }
.state-symbol { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: var(--primary-soft); color: var(--primary); margin: 0 auto 24px; }
.state-symbol .icon { width: 32px; height: 32px; }
.state-symbol--warning { background: var(--warning-soft); color: var(--warning); }
.state-symbol--danger { background: var(--danger-soft); color: var(--danger); }
.state-shell h1 { font-size: 30px; }
.state-shell p { color: var(--muted); font-size: 15px; margin-top: 16px; }
.state-shell .btn { margin-top: 24px; }
.state-shell .state-meta { font-size: 12px; margin-top: 18px; }
@media (max-width: 599px) {
  .state-shell { margin-top: 16px; }
  .state-shell .card { padding: 26px 20px; }
  .state-shell h1 { font-size: 28px; }
  .state-shell p { font-size: 14px; }
}
/* H – dialog Vzhled */
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.theme-options { display: grid; gap: 10px; }
.theme-option { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.theme-option > span:not(.theme-option__check) { flex: 1; }
.theme-option__check { display: none; color: var(--primary); }
.theme-option[aria-checked="true"] { background: var(--primary-soft); border-color: var(--primary); }
.theme-option[aria-checked="true"] .theme-option__check { display: inline-flex; }
.theme-option:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.list-link--button { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.list-link--button[hidden] { display: none; }
/* B – Garáž: detail vozidla, tachometr, servis, čtení dokumentu */
.hero-inline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-inline .module-symbol { width: 52px; height: 52px; }
.hero-inline__name { display: block; font-size: 22px; }
.hero-inline small { color: var(--muted); display: block; margin-top: 4px; }
.vehicle-summary { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin: 22px 0 8px; }
.metric { font-size: 40px; line-height: 1.15; letter-spacing: -1.4px; font-weight: 650; font-variant-numeric: tabular-nums; margin: 0; }
.metric small { font-size: 14px; letter-spacing: 0; color: var(--muted); font-weight: 400; }
.metric-caption { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.stat-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.stat-strip > div { padding: 14px 16px; border-radius: 12px; background: var(--surface-alt); }
.stat-strip b { display: block; font-size: 17px; margin-top: 4px; }
.stat-strip small { color: var(--muted); font-size: 12px; }
.rule-block { padding: 16px 0; border-bottom: 1px solid var(--border); }
.rule-block:last-of-type { margin-bottom: 16px; }
.rule-block .disclosure { margin-top: 12px; }
.form-help { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.service-log { padding: 16px 0; border-bottom: 1px solid var(--border); }
.service-log p { font-size: 14px; margin: 8px 0 0; }
.service-log small { color: var(--muted); display: block; margin-top: 4px; }
.service-log .amount { font-size: 16px; font-weight: 650; white-space: nowrap; }
.document-tile { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.document-tile > .icon { flex: none; color: var(--muted); }
.document-tile > div { flex: 1; min-width: 0; }
.document-tile small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.file-name { overflow-wrap: anywhere; font-size: 14px; font-weight: 650; }
.process-title { margin-bottom: 24px; }
.process-steps { list-style: none; display: grid; gap: 18px; padding: 20px 0; margin: 0 0 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.process-step { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.process-step.is-complete { color: var(--success); }
.process-step.is-current { color: var(--primary); font-weight: 650; }
.step-circle { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-alt); flex: none; font-size: 12px; }
.process-step.is-complete .step-circle, .process-step.is-current .step-circle { background: var(--primary-soft); color: var(--primary); }
.step-circle .icon { width: 15px; height: 15px; }
.process-hint { font-size: 13px; color: var(--muted); margin: 16px 0; }
.form-actions--center { justify-content: center; }
@media (max-width: 999px) { .metric { font-size: 36px; } .vehicle-summary { gap: 16px; } }
@media (max-width: 599px) {
  .vehicle-summary { grid-template-columns: 1fr; margin: 20px 0; }
  .vehicle-summary .btn { width: 100%; }
  .stat-strip { gap: 8px; }
  .stat-strip > div { padding: 12px; }
  .stat-strip b { font-size: 15px; }
  .hero-inline .module-symbol { width: 44px; height: 44px; }
  .hero-inline__name { font-size: 19px; }
}
/* C – Zdraví a Rodina */
.privacy-note { padding: 16px 18px; display: flex; gap: 12px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); font-size: 14px; margin: 0; }
.privacy-note .icon { flex: none; }
.private-content { margin-top: 16px; padding: 18px; border: 1px dashed var(--line); border-radius: 14px; font-size: 14px; }
.private-details > summary { list-style: none; display: inline-flex; }
.private-details > summary::-webkit-details-marker { display: none; }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; }
.detail-rows { list-style: none; margin: 16px 0 0; padding: 0; }
.detail-rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.detail-rows p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.radio-option { display: flex; align-items: flex-start; gap: 12px; min-height: 52px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; }
.radio-option input { width: 20px; height: 20px; accent-color: var(--primary); margin: 2px 0; flex: none; }
.radio-option b { font-size: 14px; }
.radio-option p { font-size: 13px; color: var(--muted); margin: 5px 0 0; }
.radio-option:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.radio-options--row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.radio-options--row .radio-option { min-width: 0; padding: 12px; gap: 8px; }
.account-row { display: flex; align-items: flex-start; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.account-row:last-child { border-bottom: 0; }
.account-row > div { flex: 1; min-width: 0; }
.account-row small { display: block; color: var(--muted); overflow-wrap: anywhere; margin-top: 5px; }
.account-row .row, .account-row .btn-row { margin-top: 14px; flex-wrap: wrap; }
.account-row--link { align-items: center; color: inherit; text-decoration: none; padding: 16px 0; }
.account-row--link:hover { text-decoration: none; }
.readonly-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 16px; border-radius: 12px; background: var(--surface-alt); margin-bottom: 12px; font-weight: 600; }
.readonly-row small { color: var(--muted); font-weight: 400; }
.readonly-row .icon { color: var(--primary); }
form .disclosure { margin-bottom: 16px; }
/* Design 2.2 / D: Můj režim */
.routine-links { margin-top: 16px; }
.routine-week--today { display: block; }
.chips.day-chips .chip span { min-height: 48px; min-width: 48px; justify-content: center; }
@media (max-width: 599px) {
  .chips.day-chips { display: grid; grid-template-columns: repeat(4, minmax(48px, 1fr)); gap: 8px; }
  .chips.day-chips legend { grid-column: 1 / -1; }
  .chips.day-chips .chip, .chips.day-chips .chip span { width: 100%; }
}
.large-textarea { min-height: 210px; resize: vertical; }
.bulk-row { padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); margin-bottom: 14px; }
.bulk-row__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bulk-row .form-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; gap: 0 12px; }
.bulk-summary { padding: 16px 18px; border-radius: 14px; background: var(--primary-soft); font-size: 14px; color: var(--primary); margin: 20px 0; }
@media (max-width: 599px) {
  .bulk-row { padding: 14px; }
  .bulk-row .form-grid { grid-template-columns: 1fr 1fr; }
  .bulk-row .form-grid .field:first-child { grid-column: 1 / -1; }
}
/* Design 2.2 / E: Nastavení */
.settings-subnav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.settings-subnav .list-link { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); min-height: 72px; }
@media (max-width: 999px) { .settings-subnav { grid-template-columns: 1fr; } }
.device-state { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--surface-alt); border-radius: 14px; margin: 18px 0; }
.device-state p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.device-state .icon { color: var(--primary); flex: none; }
.connection { padding: 20px; border: 1px solid var(--border); border-radius: 16px; margin-top: 14px; }
.connection--pending { background: var(--warning-soft); border: 1px solid transparent; }
.connection h3 { font-size: 16px; }
.connection p { font-size: 13px; color: var(--muted); margin-top: 6px; }
.connection .row { margin-top: 16px; flex-wrap: wrap; gap: 8px; display: flex; }
.connection .field { margin: 18px 0 0; }
.account-row .row { display: flex; gap: 8px; }
.account-limit { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding: 14px 16px; background: var(--surface-alt); border-radius: 12px; font-size: 14px; }
.account-limit span { display: inline-flex; align-items: center; gap: 8px; }
.fine-print { font-size: 12px; color: var(--muted); margin-top: 16px; }
.category-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.category-row:last-child { border: 0; }
.category-dot { display: block; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line); background: var(--cat); }
.category-row .category-name { flex: 1; min-width: 0; }
.category-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.category-row form { margin: 0; }
.color-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.color-choice { position: relative; min-height: 48px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); display: flex; align-items: center; gap: 8px; font-size: 12px; cursor: pointer; }
.color-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.color-choice:has(input:checked) { outline: 2px solid var(--primary); outline-offset: 1px; background: var(--primary-soft); }
.color-choice:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--focus); }
.color-choice .color-dot { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--cat); border: 1px solid var(--line); }
.color-choice small { color: var(--muted); display: block; }
@media (max-width: 599px) { .color-picker { grid-template-columns: 1fr 1fr; } }
/* Design 2.2 / F: task plan, inline options, shopping draft */
.schedule-preview { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--surface-alt); border-radius: 14px; margin-bottom: 20px; }
.schedule-preview[hidden] { display: none; }
.schedule-preview p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.schedule-preview .icon { color: var(--primary); flex: none; }
.event-inline-options { margin-top: 16px; flex-basis: 100%; }
.event-inline-options > summary { font-size: 14px; }
.option-block { padding: 20px 0; border-bottom: 1px solid var(--border); }
.option-block:first-child { padding-top: 0; }
.option-block:last-child { padding-bottom: 0; border: 0; }
.option-block h3 { margin-bottom: 14px; font-size: 15px; }
.option-block .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.shopping-draft { border: 1px dashed var(--primary); padding: 22px; border-radius: 18px; background: var(--surface); }
.shopping-draft h2 { margin-top: 12px; }
.shopping-draft > p { font-size: 14px; color: var(--muted); margin: 10px 0 18px; }
.shopping-draft .shopping-row { display: flex; align-items: center; gap: 10px; min-height: 58px; }
.shopping-draft .shopping-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }
.shopping-draft .shopping-row .field__input { min-height: 42px; font-size: 14px; padding: 8px 10px; }
.shopping-draft .shopping-row .quantity { max-width: 90px; }
.message-preview { white-space: pre-wrap; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.message-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 599px) {
  .shopping-draft { padding: 18px; }
  .shopping-draft .shopping-row .field__input { font-size: 16px; min-height: 48px; }
  .shopping-draft .shopping-row .quantity { max-width: 78px; }
  .message-preview { font-size: 14px; padding: 18px; }
}
/* Design 2.2 / G */
.draft-card-link__top .draft-origin + .badge { margin-right: auto; }
.draft-origin { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); flex: none; }
.auth-status { text-align: left; }
.auth-status-header { margin-bottom: 8px; }
.auth-status .state-symbol { margin: 0 0 20px; }
.auth-status-main h1 { margin-bottom: 8px; }
.auth-status .btn { margin-top: 24px; }
.notfit-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 999px) { .report-grid { grid-template-columns: 1fr; } }
.report-card .icon { color: var(--primary); margin-bottom: 12px; }
.report-card b { display: block; font-size: 20px; margin: 10px 0; line-height: 1.25; }
.report-card p { font-size: 14px; color: var(--muted); }
.empty-chart { height: 72px; display: flex; align-items: flex-end; gap: 8px; margin-top: 18px; }
.empty-chart i { display: block; flex: 1; background: var(--surface-alt); border-radius: 5px 5px 0 0; height: 45%; }
.empty-chart i:nth-child(2) { height: 80%; }
.empty-chart i:nth-child(3) { height: 60%; }
.empty-chart i:nth-child(4) { height: 95%; }
.empty-chart i:nth-child(5) { height: 70%; }
/* ===== Design 2.3 (převod Doplnění 2.2 – 3. kolo) ===== */
/* A29: the web has the main panel and a 340 px side column (B: „Web od 1000 px“); DOM order unchanged */
@media (min-width: 1000px) { .columns { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; } }
@media (min-width: 1440px) { .columns { gap: 32px; } }
.form-group { border: 0; margin: 0 0 8px; padding: 0; min-width: 0; }
.form-group + .form-group { border-top: 1px solid var(--border); padding-top: 20px; }
.form-group > legend.form-heading { display: flex; float: left; width: 100%; padding: 0; font-weight: 650; }
.form-group > legend.form-heading + * { clear: both; }
.columns > .card--form { max-width: none; }
/* A30: real touch targets on the phone (measured with Playwright at 390 px, see CHECKPOINT-DESIGN-2.3) */
.undo-btn { min-height: 48px; }
.tab, .tabs > a { min-height: 48px; }
.check { min-height: 48px; }
code { font-size: max(12px, .9em); }
.check-target { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; flex: none; cursor: pointer; }
/* --- Design 2.3 / B: sdílené komponenty ---------------------------------------------------------------- */
.icon-tile { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.meta-line { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }
.meta-line .icon { width: 18px; height: 18px; }
.dialog-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 599px) { .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; } .dialog-actions:has(.btn:only-child) { grid-template-columns: 1fr; } }
/* B01 Vrátit */
.undo-record { padding: 18px; background: var(--surface-alt); border-radius: 14px; margin: 4px 0 16px; }
.undo-record p { margin-top: 8px; }
.topbar .undo-btn { min-width: 82px; border-radius: 24px; font-size: 14px; }
.undo-btn:disabled .undo-text { color: var(--muted); }
/* B02 rychlé zadání platby */
.quick-entry__tiles { grid-template-columns: 1fr 1fr; }
.quick-entry__tile { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px solid var(--border); background: var(--surface); border-radius: 16px; color: var(--text); text-align: left; min-height: 88px; font: inherit; cursor: pointer; width: 100%; }
.quick-entry__tile:hover { background: var(--surface-alt); }
.quick-entry__tile b { display: block; font-size: 16px; }
.quick-entry__tile small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.quick-entry__tile[aria-expanded="true"] { border-color: var(--primary); background: var(--primary-soft); }
@media (max-width: 599px) { .quick-entry__tiles { grid-template-columns: 1fr; } .quick-entry__tile { padding: 16px; min-height: 80px; } }
.qr-panel .photo-input { margin-bottom: 16px; }
.qr-notes:not(:has(> :not([hidden]))) { display: none; }
.qr-notes > .flash { margin-bottom: 16px; }
.qr-text summary { min-height: 48px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; color: var(--primary); list-style: none; }
.qr-text summary::-webkit-details-marker { display: none; }
.qr-text summary .icon:last-child { margin-left: auto; }
.qr-text[open] summary .icon:last-child { transform: rotate(180deg); }
.qr-text form { margin-top: 12px; }
.scanner-frame { aspect-ratio: 1; background: var(--readonly-soft, var(--surface-alt)); border-radius: 16px; position: relative; display: flex; align-items: center; justify-content: center; margin: 16px 0; overflow: hidden; }
.scanner-frame .qr-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; background: transparent; }
.scanner-frame__target { position: relative; width: 64%; height: 64%; border: 3px solid var(--primary); border-radius: 20px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .18); }
.scanner-frame__label { position: absolute; bottom: 14px; left: 16px; right: 16px; font-size: 12px; text-align: center; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
/* B03 opakování */
.recurrence { display: grid; gap: 16px; border-top: 1px solid var(--border); padding-top: 24px; margin-top: 8px; }
.recurrence > legend.recurrence__title { float: left; width: 100%; display: flex; margin: 0; padding: 0; }
.recurrence > legend.recurrence__title + * { clear: both; }
.recurrence__summary { display: flex; gap: 10px; padding: 16px; border-radius: 12px; background: var(--primary-soft); font-size: 14px; line-height: 1.55; color: var(--text); }
.recurrence__summary .icon { flex: none; color: var(--primary); }
.recurrence__end { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.recurrence input:disabled { opacity: .5; }
/* B04 fotky a dokumenty */
.photo-input:not(.photo-input--compact) { border: 1px dashed var(--line); border-radius: 16px; background: var(--surface-alt); padding: 24px; display: grid; gap: 16px; text-align: left; }
.photo-input__title { display: flex; gap: 12px; align-items: center; }
.photo-input__title p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.photo-input__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.photo-input__foot { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.photo-input__foot b:empty { visibility: hidden; }
.photo-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; }
.photo-item img, .photo-item__pdf { width: 64px; height: 80px; border: 1px solid var(--border); border-radius: 8px; }
.photo-item__pdf { display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center; }
.photo-item__pdf small { font-size: 12px; font-weight: 700; color: var(--muted); }
.photo-item b { font-size: 14px; display: block; }
.photo-item small { color: var(--muted); display: block; font-size: 12px; }
.photo-item--error { border-color: var(--danger); background: var(--danger-soft); }
.photo-item--error .photo-item__pdf { color: var(--danger); background: var(--surface); }
@media (max-width: 599px) {
  .photo-input:not(.photo-input--compact) { padding: 16px; }
  .photo-input__actions { grid-template-columns: 1fr; }
  .photo-item { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; padding: 10px; }
  .photo-item img, .photo-item__pdf { width: 56px; height: 72px; }
}
/* B10 Asistence */
.assist-status { margin-bottom: 16px; }
.assist-status .process-steps { margin: 12px 0; }
.form-results .form-result { padding: 16px 0; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.form-results .form-result:first-of-type { border-top: 0; padding-top: 0; }
.date-parts__row { grid-template-columns: minmax(70px, .8fr) minmax(0, 1.6fr) minmax(100px, 1.2fr); }
.date-parts__row select { padding-left: 8px; padding-right: 22px; background-position: right 6px center; }
.photo-input__title { align-items: flex-start; }
.photo-input:not(.photo-input--compact) { margin-bottom: 16px; }
/* --- Design 2.3 / C: Práce, karty na Dnes, Týden ----------------------------------------------------------- */
.work-task .event-copy { display: grid; gap: 8px; flex: 1; min-width: 0; }
.work-task__time { font-weight: 700; font-size: 15px; }
.work-task__actions { display: grid; gap: 8px; margin-top: 6px; }
.work-task__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.work-task__pair:has(> :only-child) { grid-template-columns: 1fr; }
.phone-contact { margin-left: auto; }
.work-note { flex-wrap: wrap; }
.masked { font-variant-numeric: tabular-nums; white-space: nowrap; }
.event--work .event-meta .icon { width: 16px; height: 16px; }
/* --- Design 2.3 / D: Pokladna a účtenky ---------------------------------------------------------------------- */
.cash-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.cash-stat { padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); display: grid; gap: 6px; }
.cash-stat small { color: var(--muted); font-size: 14px; }
.cash-stat b { font-size: 26px; letter-spacing: -.5px; }
.cash-stat span { color: var(--muted); font-size: 13px; }
.cash-stat--wide { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: end; }
.cash-stat--wide small { grid-column: 1 / -1; }
@media (min-width: 1000px) { .cash-stats { grid-template-columns: repeat(4, 1fr); } .cash-stat--wide { grid-column: auto; grid-template-columns: 1fr; } }
.cash-people { list-style: none; margin: 0; padding: 0; }
.cash-person { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.cash-people li:last-child .cash-person { border-bottom: 0; }
.cash-person:hover { text-decoration: none; }
.cash-person__body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.cash-person__amount { font-size: 18px; font-weight: 700; }
.cash-receipts-badge { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cash-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cash-kind .radio-option { align-items: center; min-height: 52px; padding: 10px 14px; gap: 10px; cursor: pointer; }
.cash-kind .radio-option .icon { color: var(--primary); flex: none; }
.cash-kind .radio-option:last-child:nth-child(odd) { grid-column: 1 / -1; }
.cash-balance { padding: 24px; border-radius: 20px; background: var(--primary-soft); margin-bottom: 24px; text-align: left; }
.cash-balance small { color: var(--muted); font-size: 14px; }
.cash-balance h2 { font-size: 40px; letter-spacing: -1.4px; margin: 8px 0 12px; }
.cash-balance p { font-size: 14px; line-height: 1.55; }
.cash-balance--owe { background: var(--danger-soft); }
.cash-balance--even { background: var(--surface-alt); }
.cash-timeline { display: grid; }
.cash-record { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 0; position: relative; }
.cash-record + .cash-record { border-top: 1px solid var(--border); }
.cash-record__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-alt); color: var(--primary); border: 1px solid var(--border); }
.cash-record__top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.cash-record small { color: var(--muted); font-size: 13px; display: block; margin-top: 4px; }
.cash-record p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.cash-record__actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.amount--plus { color: var(--success); font-weight: 700; white-space: nowrap; }
.amount--minus { color: var(--danger); font-weight: 700; white-space: nowrap; }
.receipt-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); margin-top: 12px; }
.receipt-card__body { display: grid; gap: 6px; align-content: start; }
.receipt-card__body small { color: var(--muted); font-size: 13px; }
.receipt-card__actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.receipt-card__actions form .btn { width: 100%; }
.receipt-preview { width: 88px; height: 110px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-alt); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.receipt-preview img { width: 100%; height: 100%; object-fit: cover; }
.receipt-card--review { grid-template-columns: 88px minmax(0, 1fr); }
@media (max-width: 599px) { .receipt-card--review { grid-template-columns: 1fr; } .receipt-card--review .receipt-preview { width: 100%; height: 180px; } }
/* --- Design 2.3 / E: rodinný režim – shody a nákupy ---------------------------------------------------------- */
.section-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.section-nav a { display: inline-flex; align-items: center; padding: 10px 16px; min-height: 48px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; color: var(--text); font-weight: 600; }
.section-nav a:hover { text-decoration: none; background: var(--surface-alt); }
.shopping-hero { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.shopping-hero h2 { font-size: 22px; }
.shopping-hero p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.shopping-owner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface-alt); margin-bottom: 12px; font-size: 14px; }
.shopping-state-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.shopping-state-actions form { margin: 0; }
.shopping-state-actions .handover-send { display: grid; gap: 8px; width: 100%; }
.shopping-row--readonly { color: var(--muted); }
.share-preview { margin-top: 16px; }
/* Opravy 15: the list header is its own card (Přidat položky, the assistant's work and drafts under it, items below) */
.shopping-list-card > .shopping-hero:last-child { padding-bottom: 0; border-bottom: 0; margin-bottom: 0; }
.shopping-list-card > :last-child { margin-bottom: 0; }
.shopping-job > .job-progress { margin: 0; }
.add-items > summary { justify-content: flex-start; }
.add-items > summary > .icon:last-child { margin-left: auto; }
.shopping-items-card > h2 + .shopping-state-actions, .shopping-items-card > h2 + .share-preview { margin-top: 0; }
.add-items > summary, details.card.disclosure > summary { padding: 0; min-height: 48px; }
details.card.disclosure { padding: 16px 20px; }
details.card.disclosure[open] > summary { margin-bottom: 8px; }
.add-items__form .btn-row { margin-top: 4px; }
.partner-choice .radio-option { align-items: center; min-height: 52px; gap: 10px; }
.match-card { padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); margin-top: 12px; display: grid; gap: 10px; }
.match-card h3 { font-size: 17px; }
.match-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.match-actions form { margin: 0; }
.responsibility { display: inline-flex; align-items: center; gap: 6px; }
/* --- Design 2.3 / F: registr a pojištění ----------------------------------------------------------------------- */
.registry-status { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--primary-soft); margin-bottom: 16px; font-size: 14px; }
.registry-status .icon { color: var(--primary); flex: none; }
.registry-status p { margin-top: 4px; color: var(--text); }
.registry-status--warning { background: var(--warning-soft); }
.registry-status--warning .icon { color: var(--warning); }
.registry-stk { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 16px; }
.registry-stk strong { display: block; font-size: 22px; margin-top: 4px; }
.registry-conflict { color: var(--warning); }
.registry-data { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin: 8px 0 16px; }
.registry-data dt { font-size: 12px; color: var(--muted); }
.registry-data dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.registry-differences { padding: 16px; border-radius: 14px; background: var(--warning-soft); margin-bottom: 16px; display: grid; gap: 10px; }
.registry-differences h3 { font-size: 16px; }
.registry-differences table { width: 100%; border-collapse: collapse; font-size: 14px; }
.registry-differences th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 4px; }
.registry-differences td { padding: 6px 4px; border-top: 1px solid var(--border); vertical-align: middle; }
.registry-differences .check { margin: 0; }
.insurance-list { display: grid; gap: 12px; margin: 12px 0; }
.insurance-item { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); display: grid; gap: 12px; }
.insurance-item__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.insurance-item__head > .icon { color: var(--primary); margin-top: 2px; }
.insurance-item__head h3 { font-size: 16px; }
.insurance-item__head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.insurance-item .stat-strip { margin-top: 0; }
.insurance-summary { font-size: 14px; }
.insurance-limit { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-alt); font-size: 14px; line-height: 1.5; }
.insurance-limit > .icon { color: var(--primary); flex: none; }
.insurance-item .form-actions { margin-top: 0; }
@media (max-width: 599px) { .insurance-item__head { grid-template-columns: auto minmax(0, 1fr); } .insurance-item__head .badge { grid-column: 2; justify-self: start; } }

/* Design 2.3 G – 360 px phone at 200 % zoom (≈ 180 CSS px): nothing scrolls sideways */
@media (max-width: 300px) {
  .topbar { flex-wrap: wrap; height: auto; min-height: 56px; padding: 6px 8px; padding-top: calc(6px + env(safe-area-inset-top)); row-gap: 4px; }
  .topbar-actions { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-end; }
  .cash-stats { grid-template-columns: 1fr; }
  .cash-stat--wide { grid-column: auto; }
  .main *:not(svg):not(use) { min-width: 0 !important; max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }
  .main :where(.spread, .event-top, .list-link, .card__head, .form-actions, .badge-row, .cash-record__top) { flex-wrap: wrap; }
  .main :where(.cash-person, .cash-record, .receipt-card, .photo-input__title) { grid-template-columns: 1fr !important; flex-wrap: wrap; }
  .main .cash-person__body { flex-basis: 100%; }
  .main .num { white-space: normal; }
  .main :where(.date-parts__row, .quick-entry__tiles, .form-grid, .cash-stat, .button-pair, .detail-actions, .radio-options) { grid-template-columns: 1fr !important; }
  .btn, .badge { white-space: normal; height: auto; }
  .dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow: auto; }
  .dialog__body h2, .dialog-head h2 { font-size: 16px; }
  .dialog-head { gap: 4px; align-items: flex-start; }
  .dialog-head .icon-btn { width: 40px; height: 40px; flex: none; }
  .undo-record { padding: 10px; }
  h1, .page-title { font-size: 22px; }
  .main h2 { font-size: 17px; }
  .dialog__body { padding: 14px; }
  .dialog__body *:not(svg):not(use) { min-width: 0 !important; max-width: 100%; overflow-wrap: break-word; hyphens: auto; }
  .dialog__body :where(code, .file-name) { overflow-wrap: anywhere; }
  .dialog-actions > * { flex: 1 1 100%; }
  .dialog-actions { grid-template-columns: 1fr !important; }  /* A42: actions under each other, never clipped */
  .undo-record b, .undo-record strong { font-size: 14px; }  /* „Tachometr:“ fits 180 px without a split */
  .main :where(.account-row, .account-limit) { flex-wrap: wrap; }
  .main .account-row > :not(.avatar) { flex: 1 1 100%; }
  .main .diagnostics-row { grid-template-columns: 1fr; }
}

/* Opravy 6 / A – sharing switch: named linked accounts, or off with a hint where to link */
.share-toggle--off .check { opacity: .7; margin-bottom: 2px; }
.share-toggle--off .field__hint { margin: 0 0 8px; }

/* Opravy 6 / B – Diagnostika serveru: one row per service; stacked on a phone, a table from 600 px */
.diagnostics-list { list-style: none; margin: 0; padding: 0; }
.diagnostics-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.diagnostics-row:last-child { border-bottom: 0; }
.diagnostics-row__name { min-width: 0; overflow-wrap: break-word; }
.diagnostics-row__note { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--muted); }
.diagnostics-row__note small { display: block; margin-top: 2px; }
@media (min-width: 600px) {
  .diagnostics-row { grid-template-columns: minmax(180px, 1fr) 130px minmax(0, 2fr); }
  .diagnostics-row__note { grid-column: auto; }
}

/* Opravy 6 / C – O aplikaci and Nápověda */
.about-version { font-size: 18px; margin: 0 0 8px; }
.about-tech { display: grid; gap: 8px; margin: 12px 0 0; }
.about-tech div { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.about-tech dt { color: var(--muted); min-width: 10em; }
.about-tech dd { margin: 0; overflow-wrap: anywhere; }
.about-credits { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.help-text { line-height: 1.6; max-width: 72ch; }
.help-text h2 { font-size: 19px; margin: 22px 0 8px; }
.help-text h2:first-child { margin-top: 0; }
.help-text h3 { font-size: 16px; margin: 16px 0 6px; }
.help-text ul, .help-text ol { padding-left: 22px; }
.help-text li { margin: 4px 0; }
.help-link { color: var(--primary); }

/* Opravy 6 / D – Z fotky in the assist card */
.assist-photo { margin: 4px 0 12px; }
.assist-photo .photo-input { margin-bottom: 8px; }
.assist-photo__note { display: flex; gap: 6px; align-items: flex-start; }

/* Opravy 6 / F – annual insurance price and the vehicle total */
.insurance-price { margin: 4px 0 0; font-size: 15px; }
.insurance-total { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--surface-alt); margin: 0 0 12px; }


/* Opravy 7 / D – Doplnění 2.3 (A41 + B7): below 300 CSS px the bottom navigation keeps all five labelled
   destinations in two rows (3 + 2, targets ≥ 48 px); its real height (ResizeObserver → --nav-measured, the
   rect already holds the safe area) is added to the content once; the top bar scrolls with the content. */
@media (max-width: 299px) {
  .bottomnav { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; height: auto; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .bottomnav a { grid-column: span 2; min-width: 0; min-height: 52px; padding: 4px 0; font-size: 12px; line-height: 1.2; gap: 4px; white-space: normal; text-align: center; }
  .bottomnav a:nth-child(4) { grid-column: 2 / span 2; }
  .bottomnav a:nth-child(5) { grid-column: 4 / span 2; }
  .bottomnav .icon { width: 20px; height: 20px; }
  .bottomnav a span { max-width: 100%; }
  body.has-nav .main { padding-bottom: calc(var(--nav-measured, 124px) + 24px); }
  body.has-nav.keyboard-open .main { padding-bottom: 24px; }
  .topbar { position: static; height: auto; min-height: 0; display: grid; grid-template-columns: 1fr; gap: 8px; padding: 8px 4px; padding-top: calc(8px + env(safe-area-inset-top)); }
  .topbar .mobile-brand { margin-left: 4px; }
  .topbar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 100%; flex: none; }
  .topbar-actions > * { min-width: 0; }
  .topbar .undo-btn { width: 100%; min-width: 0; min-height: 48px; padding: 8px 4px; font-size: 12px; }
  .topbar .icon-btn, .topbar .avatar-link { width: 100%; min-width: 44px; min-height: 48px; display: flex; align-items: center; justify-content: center; }
  .main :where(h1, h2, h3, .dialog-head h2) { overflow-wrap: normal; hyphens: auto; }
  .main h1 { font-size: 24px; }
}


/* Opravy 7 / D – components from the designer's additions.css (Doplnění 2.3), production names without a prefix */
.note-block { display: flex; gap: 12px; background: var(--primary-soft); border-radius: 14px; padding: 16px; margin-bottom: 20px; font-size: 14px; }
.note-block > .icon { flex: none; color: var(--primary); }
.note-block > div { min-width: 0; }
.note-block p { margin: 6px 0 0; color: var(--muted); }
.note-block--warning { background: var(--warning-soft); }
.note-block--warning > .icon { color: var(--warning); }
.note-block--success { background: var(--success-soft); }
.note-block--success > .icon { color: var(--success); }
.diagnostic-head { display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.diagnostic-list { margin: 0; }
.diagnostic-list > div { padding: 20px 0; border-top: 1px solid var(--border); }
.diagnostic-list dt { display: flex; gap: 10px; align-items: center; }
.diagnostic-list dt > .icon { color: var(--warning); flex: none; }
.diagnostic-row--ok dt > .icon { color: var(--success); }
.diagnostic-list dd { margin: 12px 0 0 34px; }
.diagnostic-list code { display: inline-block; font-size: 14px; background: var(--surface-alt); padding: 6px 8px; border-radius: 8px; overflow-wrap: anywhere; max-width: 100%; }
.diagnostic-list p { margin: 10px 0; font-size: 14px; color: var(--muted); }
@media (max-width: 299px) {
  .diagnostic-list dd { margin-left: 0; }
  .diagnostic-list dt { align-items: flex-start; }
  .diagnostic-list code { font-size: 12px; }
  .note-block { padding: 12px; gap: 8px; }
  .note-block > .icon { width: 18px; height: 18px; }
}

/* A45 / B2 – the assistant's proposal next to a field changed while waiting (02-asistencni-soubeh) */
.assist-diff { padding: 16px; background: var(--info-soft); border: 1px solid var(--border); border-radius: 14px; margin: -4px 0 20px; }
.assist-diff > b { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.assist-diff > b .icon { flex: none; color: var(--info); }
.assist-diff dl, .value-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.assist-diff dl > div, .value-comparison > div { min-width: 0; padding: 12px; background: var(--surface); border-radius: 12px; }
.assist-diff dt, .value-comparison dt { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.assist-diff dd, .value-comparison dd { margin: 0; overflow-wrap: anywhere; }
.diff-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.diff-actions .btn { font-size: 14px; padding: 12px; }
.diff-feedback { margin: 0; }
.diff-feedback:not(:empty) { margin-top: 12px; }
.assist-diff--resolved { background: var(--success-soft); }
.assist-diff--resolved dl { margin-bottom: 0; }
.save-blocked { display: flex; gap: 8px; align-items: flex-start; color: var(--warning-text, var(--text)); background: var(--warning-soft); border-radius: 12px; padding: 12px; margin: 16px 0 8px; }
.save-blocked .icon { flex: none; color: var(--warning); }
button[aria-disabled="true"] { opacity: .6; }
@media (max-width: 599px) { .assist-diff dl { grid-template-columns: 1fr; } }
@media (max-width: 299px) { .diff-actions, .value-comparison { grid-template-columns: 1fr; } }

/* A46 / B3 – where a value came from, at the value itself (03-puvod-hodnot) */
.origin-field { position: relative; }
.origin-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.origin-label .field__label { margin-bottom: 0; }
.origin-label { margin-bottom: 6px; }
.value-origin { display: inline-flex; gap: 4px; align-items: center; border-radius: 8px; padding: 4px 8px; font-size: 12px; line-height: 1.3; background: var(--info-soft); color: var(--info); }
.value-origin--manual { background: var(--surface-alt); color: var(--muted); }
.prefill-note { margin-bottom: 20px; }

/* A38 / A47 / B4 – photos: a readable thumbnail in the composer, error rows, counts (04-fotky) */
.composer-preview { margin-top: 8px; }
.composer-preview img { width: 56px; height: 72px; min-width: 44px; min-height: 56px; flex-shrink: 0; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.attachment-preview[hidden] { display: none; }
.photo-item > img, .photo-item > .photo-item__pdf, .file-error-icon { flex-shrink: 0; }
.photo-name { font-size: 12px; overflow-wrap: anywhere; }
.photo-item--error { grid-template-columns: 44px minmax(0, 1fr); align-items: start; }
.photo-item--error .file-error-icon { width: 44px; height: 56px; border-radius: 8px; background: var(--surface); display: grid; place-items: center; color: var(--danger); }
.photo-item--error .photo-item__text p { font-size: 14px; margin: 8px 0 0; }
.photo-item--error .photo-error-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-item--error .photo-error-actions .btn { font-size: 14px; min-height: 48px; }
.photo-item--error .retry-feedback { grid-column: 1 / -1; margin: 0; }
.photo-item--error .retry-feedback:empty { display: none; }
.photo-count { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; font-size: 12px; }
.accepted-icon { display: grid; place-items: center; width: 44px; height: 44px; color: var(--success); }
@media (max-width: 299px) {
  .photo-item { grid-template-columns: 44px minmax(0, 1fr); padding: 8px; gap: 8px; }
  .photo-item > img { width: 44px; height: 56px; }
  .photo-item > .icon-btn { grid-column: 1 / -1; justify-self: end; }
  .photo-item--error .photo-error-actions { grid-template-columns: 1fr; }
}

/* A37 / A48 / B5 – STK from two sources side by side, warranty by date or km (05-stk-zaruka) */
.value-comparison > div { background: var(--surface-alt); padding: 16px; }
.value-comparison dd { display: flex; flex-direction: column; gap: 8px; }
.value-comparison .badge { align-self: flex-start; }
.registry-stk--conflict { display: grid; gap: 4px; }
.registry-stk--conflict .value-comparison { margin: 12px 0 4px; }
.registry-stk--conflict .note-block { margin-bottom: 0; }
.warranty-limit { margin-top: 20px; display: grid; gap: 12px; }
.warranty-limit .note-block { margin-bottom: 0; }

/* A40 – receipts in one batch (07-uctenky-davka) */
.receipt-item { border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.receipt-card.receipt-item { margin: 0 0 16px; }
.receipt-item > .receipt-select { grid-column: 1 / -1; }
.receipt-select { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; }
.receipt-select input { flex: none; width: 22px; height: 22px; accent-color: var(--primary); }
.receipt-select .badge { margin-left: auto; }
.batch-summary { background: var(--surface-alt); border-radius: 12px; padding: 16px; margin: 20px 0; }
.batch-summary p { margin: 8px 0 0; font-size: 14px; }
@media (max-width: 599px) { .receipt-select { flex-wrap: wrap; } }
@media (max-width: 299px) { .receipt-card.receipt-item { padding: 12px; } .receipt-select .badge { margin-left: 0; } }
body.keyboard-open .main { padding-bottom: 24px; }  /* A49 / B6 – the bottom navigation is hidden, no reserve for it */

/* Opravy 7 / E – Výplata: its own sum, outside the expense balance */
.cash-wages .cash-balance--wage { margin: 0 0 12px; display: grid; gap: 8px; justify-items: start; }
.cash-wages .cash-balance--wage h2 { margin: 0; }
.cash-wages .cash-balance--wage p { margin: 0; }
.cash-record .badge { margin-top: 6px; }
.badge--plan { background: var(--surface-alt); color: var(--muted); }  /* Opravy 7 / F: a planned item says „Plán“ */
.ai-tier-form .field__input { min-height: 48px; }  /* A30: a target of at least 48 px */

/* Noc 5 / A – Nákupy: ⋯ menu of an item, Z fotky */
.shopping-row__main { display: flex; align-items: center; gap: 4px; }
.shopping-row__main > form { flex: 1; min-width: 0; }
.row-menu { position: relative; flex: none; }
.row-menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu[open] > summary { background: var(--surface-alt); }
.row-menu__panel { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; min-width: 180px; display: grid; gap: 4px;
  padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.row-menu__panel .btn { width: 100%; justify-content: flex-start; min-height: 48px; }
.add-items__photo { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); display: grid; gap: 12px; }

/* Noc 5 / D – Kroužky: activity cards, timeline accent (no new icon: target) */
.event--activity { --cat: var(--info); }
.activity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.activity-card .event-top { align-items: flex-start; }
.activity-card__when { margin: 6px 0 4px; font-weight: 600; }
.activity-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.activity-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.activity-child .action-link { margin-top: 12px; display: inline-flex; }
.activity-upcoming li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 48px; }
.activity-upcoming li.is-muted { color: var(--muted); }
.inline-form { display: inline; }
.name-day .date-parts__row { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }

/* Noc 5 / F – Rozvrh týdne: days × half hours, a child's colour only as a complement (the name is written) */
.timetable-weeks { margin-bottom: 12px; }
.timetable-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; margin: 0 0 12px; font-size: 14px; }
.timetable-legend li { display: inline-flex; align-items: center; gap: 6px; }
.timetable-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--child); border: 1px solid var(--border); }
.timetable-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.timetable-grid { display: grid; grid-template-columns: 56px repeat(var(--days, 7), minmax(110px, 1fr)); grid-template-rows: 44px repeat(var(--slots), 34px); min-width: 840px; position: relative; }
.timetable-corner, .timetable-day { position: sticky; top: 0; background: var(--surface); z-index: 2; border-bottom: 1px solid var(--border); }
.timetable-day { grid-row: 1; display: grid; place-items: center; font-weight: 700; font-size: 14px; line-height: 1.1; }
.timetable-day small { font-weight: 400; color: var(--muted); font-size: 12px; }
.timetable-time { grid-column: 1; font-size: 12px; color: var(--muted); padding: 0 6px; transform: translateY(-7px); }
.timetable-cell { border-top: 1px dashed var(--border); border-left: 1px solid var(--border); }
.timetable-block { position: relative; z-index: 1; margin: 1px 3px; padding: 4px 6px 4px 9px; border-radius: 8px; overflow: hidden;
  background: color-mix(in srgb, var(--child) 18%, var(--surface)); border-left: 5px solid var(--child); font-size: 12px; line-height: 1.25;
  display: flex; flex-direction: column; gap: 1px; color: var(--text); }
.timetable-block b { font-size: 13px; overflow-wrap: anywhere; }
a.timetable-block, button.timetable-block { text-decoration: none; text-align: left; font: inherit; font-size: 12px; cursor: pointer;
  border-top: 0; border-right: 0; border-bottom: 0; }
a.timetable-block:hover, button.timetable-block:hover { background: color-mix(in srgb, var(--child) 30%, var(--surface)); }
.timetable-block.is-shared { border-style: dashed; }
.timetable-rides { display: inline-flex; align-items: center; gap: 4px; }
.rotate-overlay { display: none; }
@media (orientation: portrait) and (max-width: 899px) {
  .timetable-page:not(.is-forced) .rotate-overlay { display: grid; place-items: center; text-align: center; gap: 12px;
    position: fixed; inset: 0; z-index: 60; padding: 24px; background: var(--bg, var(--surface)); }
  .timetable-page:not(.is-forced) .rotate-overlay .icon { width: 64px; height: 64px; color: var(--primary); }
}
@media print {
  @page { size: landscape; margin: 10mm; }
  .topbar, .bottomnav, .side-nav, .page-actions, .back-link, .timetable-weeks, .rotate-overlay { display: none !important; }
  .timetable-scroll { overflow: visible; border: 0; }
  .timetable-grid { min-width: 0; }
}
/* a phone held sideways: the grid gets the height (header and bottom navigation step aside on this page) */
@media (orientation: landscape) and (max-height: 500px) {
  body:has([data-timetable]) .bottomnav { display: none; }
  body:has([data-timetable]) .main { padding-top: 8px; padding-bottom: 16px; }
  body:has([data-timetable]) .topbar { position: static; }
  body:has([data-timetable]) .page-head { margin-bottom: 8px; }
  body:has([data-timetable]) .page-head h1 { font-size: 20px; }
  body:has([data-timetable]) .page-head p, body:has([data-timetable]) .back-link { display: none; }
  .timetable-weeks { margin-bottom: 6px; }
  .timetable-legend { margin-bottom: 6px; font-size: 12px; }
  .work-week__filters { margin-bottom: 4px; }
  .work-week__filters a.chip, .work-week__filters .btn { min-height: 32px; }
  .work-week__job { min-height: 24px; padding: 2px 6px; }
}
.timetable-rides { position: absolute; right: 4px; bottom: 3px; padding: 1px 4px; border-radius: 6px; background: var(--surface); font-size: 11px; }

/* Opravy 8: partner participation – an item of a linked account that counts with the viewer („Počítá s tebou“,
   read only, busy time) and the „Účastní se i …“ line of an own item. Text + icon, never colour alone. */
.badge--partner { background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary); }
.event--with-me { border-left-style: solid; border-left-color: var(--primary); }
.event-with, .week-event__with { color: var(--primary); }
.week-event__with { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; }
.partner-field .field__hint { margin-top: 2px; }

/* Opravy 9 / A: slots replaced after an inline form (data-inline) – they do not change the layout */
.undo-slot, .flash-slot { display: contents; }
.undo-slot > * { min-width: 0; }
.card__head h2 a.card-title-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); }
.card__head h2 a.card-title-link:hover, .card__head h2 a.card-title-link:focus-visible { text-decoration: underline; }
.card__head h2 a.card-title-link .icon-chevron { color: var(--muted); }

/* Opravy 9 / B: Týden – Přidat (empty day, end of a day, column head on the web, free slots) and the menu */
.week-day__empty { display: grid; gap: 10px; justify-items: start; }
.week-day__empty p { margin: 0; }
.week-day__add { margin-top: 10px; }
.week-day__add-head { display: none; }
.week-slot { padding: 0; border: 1px dashed var(--border); background: transparent; }
.week-free { display: grid; gap: 2px; padding: 8px 10px; min-height: var(--tap); color: var(--muted); text-decoration: none; border-radius: inherit; }
.week-free:hover, .week-free:focus-visible { color: var(--primary); background: var(--primary-soft); }
.week-free__label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.week-compact--slots { display: none; }
@media (min-width: 1000px) {
  .week-day__add-head { display: inline-flex; margin: -6px auto 10px; }
  .week-day__add { display: none; }
  .week-day__empty { justify-items: center; }
  .week-day__empty .btn { display: none; }
  .week-compact--slots { display: grid; margin-top: 8px; }
}
.add-dialog { width: min(480px, calc(100vw - 32px)); }
.add-menu__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.add-menu__option { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; color: var(--text); text-decoration: none; background: var(--surface); }
.add-menu__option:hover, .add-menu__option:focus-visible { border-color: var(--primary); background: var(--primary-soft); }
.add-menu__option > .icon:first-child { color: var(--primary); flex: none; }
.add-menu__option span { display: grid; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.add-menu__option small { color: var(--muted); font-size: 13px; }
.add-menu__go { color: var(--muted); flex: none; }
.add-menu__option--small { padding: 6px 12px; }
.add-menu__heading { font-size: 14px; margin: 18px 0 8px; color: var(--muted); }
.add-menu__assist { margin-top: 16px; }

/* Opravy 9 / C: Měsíc – read-only grid 7 × 5–6, no sideways scroll: on a phone only icons / dots and „+N“,
   the text of marks from 600 px. Today = primary ring, other months muted, state holidays grey. */
.view-tabs { margin-bottom: 16px; }
.month-grid { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; }
.month-grid th { font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.month-grid abbr { text-decoration: none; }
.month-cell { padding: 0; vertical-align: top; }
.month-day { display: flex; flex-direction: column; gap: 4px; min-height: 64px; padding: 6px 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; -webkit-touch-callout: none; user-select: none; overflow: hidden; }
.month-day:hover, .month-day:focus-visible { border-color: var(--primary); text-decoration: none; }
.month-day__num { font-weight: 700; font-size: 14px; line-height: 1; }
.month-cell.is-other .month-day { background: transparent; color: var(--muted); border-style: dashed; }
.month-cell.is-today .month-day { border: 2px solid var(--primary); }
.month-cell.is-today .month-day__num { color: var(--primary); }
.month-cell.is-holiday .month-day__num { color: var(--muted); }
.month-marks { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; min-width: 0; }
.month-mark { display: inline-flex; align-items: center; gap: 4px; min-width: 0; color: var(--primary); }
.month-mark .icon { width: 14px; height: 14px; flex: none; }
.month-mark--holiday { color: var(--muted); }
.month-mark--payment { color: var(--warning, var(--primary)); }
.month-mark--birthday, .month-mark--anniversary { color: var(--danger); }
.month-mark--event, .month-mark--with_me { color: var(--muted); }
.month-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--primary)); flex: none; }
.month-mark__text { display: none; }
.month-more { font-size: 11px; font-weight: 700; color: var(--muted); }
.month-legend li { display: inline-flex; align-items: center; gap: 4px; }
@media (min-width: 600px) {
  .month-day { min-height: 96px; padding: 8px; }
  .month-marks { display: grid; gap: 3px; }
  .month-mark { font-size: 12px; color: var(--text); }
  .month-mark .icon { color: var(--primary); }
  .month-mark--holiday, .month-mark--holiday .icon { color: var(--muted); }
  .month-mark__text { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .month-mark--allday { background: var(--surface-alt); border-radius: 6px; padding: 1px 4px; }
}
@media (max-width: 380px) { .month-grid { border-spacing: 2px; } .month-day { padding: 4px 2px; min-height: 56px; } }

/* Opravy 9 / D: the trash in the corner of a shopping list card (44 px), the options card */
.remove-list--icon { margin: 0 0 0 auto; align-self: flex-start; }
.remove-list__btn { width: 44px; height: 44px; color: var(--muted); }
.remove-list__btn:hover, .remove-list__btn:focus-visible { color: var(--danger); }
.shopping-hero > div { min-width: 0; }
.rename-list { margin-top: 16px; display: grid; gap: 6px; }
.rename-list__row { display: flex; gap: 8px; flex-wrap: wrap; }
.rename-list__row .field__input { flex: 1 1 12em; min-width: 0; }

/* Opravy 9 / E: draft versions, uncertain rows read from a photo (text + icon, never colour alone) */
.draft-versions { margin: 8px 0 0; }
.draft-merge { margin: 8px 0; padding: 10px 12px; }
.draft-uncertain-note { display: flex; gap: 8px; align-items: flex-start; color: var(--warning); font-size: 14px; margin: 8px 0; }
.draft-item--uncertain { background: var(--warning-soft); border-radius: 10px; }
.draft-item--uncertain .field__input { border-color: var(--warning); }

.draft-item__unsure { margin: -2px 0 8px; padding-left: 56px; }
.shopping-draft-answer { margin-top: 12px; display: grid; gap: 8px; }
.draft-version .btn-row { margin-top: 8px; }
.week-day__empty--routine { margin-top: 10px; }
@media (min-width: 1000px) { .week-day__empty--routine { display: none; } }
/* Opravy 9: the Předané / Hotové rows overflowed by 2 px at 390 px (a long badge in a flex item of a grid list) */
.handover-list { grid-template-columns: minmax(0, 1fr); padding: 0; list-style: none; }
.handover-list .badge { white-space: normal; max-width: 100%; }

/* Opravy 10: foreign events – ⋯ menu, „z kalendáře“ on a taken-over work task, a cancelled event, a note */
.badge--calendar { background: var(--surface-alt); color: var(--muted); border: 1px dashed var(--line); }
.event-linked { gap: 6px; }
.event-cancelled { border-left: 3px solid var(--warning); padding-left: 8px; }
.event-menu > summary { list-style: none; }
.event-menu > summary::-webkit-details-marker { display: none; }
.event-menu > summary.btn { width: auto; height: auto; min-height: 44px; display: inline-flex; gap: 6px; padding: 0 12px; }
/* the menu opens to the right of the button – the card sits at the left edge, right: 0 pushed it off screen */
.event-menu .row-menu__panel { display: grid; gap: 4px; left: 0; right: auto; max-width: calc(100vw - 32px); }
.event-note { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 6px; row-gap: 8px; }
.event-note span { overflow-wrap: anywhere; }
.event-note > .btn { grid-column: 2; justify-self: start; }
.event-detail dl { margin: 0; }

/* Opravy 11 / A: a handed-over shopping – „Je nákup dokončený?“ strip, Odstranit seznam blocked with the reason */
.done-ask { display: grid; gap: 10px; margin: 0 0 12px; padding: 12px; border-radius: 12px;
  background: var(--surface-alt); border: 1px solid var(--line); }
.done-ask p { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.done-ask .btn-row form { margin: 0; }
.remove-list--blocked { display: grid; gap: 4px; }
.remove-list--blocked .field__hint { margin: 0; }
.shopping-row .badge--info { margin-left: 6px; flex: none; }
/* Opravy 11 / B: only the circle and the name tick an item – not the empty rest of the row (no accidental ticks) */
.shopping-row .check-row { flex: 0 1 auto; }
.shopping-row__main > form { flex: 1; }
/* Opravy 11 / B: the draft card never grows past its frame; a sentence to split is a full-width text area */
.shopping-draft { grid-template-columns: minmax(0, 1fr); }
.shopping-draft .shopping-row .field__input { min-width: 0; flex: 1 1 auto; }
.shopping-draft .shopping-row .quantity { flex: 0 0 auto; }
.shopping-draft .draft-split-text { resize: vertical; line-height: 1.4; }
.shopping-draft .shopping-row.draft-item--uncertain { flex-wrap: wrap; padding: 8px; }
.shopping-draft .shopping-row .draft-split-text { flex: 1 1 calc(100% - 40px); }
.shopping-draft .draft-item__unsure { padding-left: 0; }
.shopping-draft .draft-item__unsure .badge { white-space: normal; }

/* Opravy 12 / B: the assistant's work above the items of the list (text, not only an animation) */
.job-progress { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 12px; border-radius: 12px;
  background: var(--primary-soft, var(--surface-alt)); border: 1px solid var(--line); }
.job-progress p { margin: 0; }
.job-progress__title { font-weight: 700; }
.job-progress__text { color: var(--muted); font-size: 14px; margin-top: 4px !important; overflow-wrap: anywhere; }
.job-progress__icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; color: var(--primary); }
.job-progress__icon.is-working .icon { animation: job-pulse 1.4s ease-in-out infinite; }
.job-progress--error { background: var(--danger-soft, var(--surface-alt)); border-color: var(--danger); }
.job-progress--error .job-progress__icon, .job-progress--error .job-progress__title { color: var(--danger); }
@keyframes job-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.85); } }
@media (prefers-reduced-motion: reduce) { .job-progress__icon.is-working .icon { animation: none; } }
#drafts-to-confirm { scroll-margin-top: 72px; }

/* Opravy 12 / C: the assistant's field – taller (three rows) and framed so it is the first thing to see */
.composer-box { padding: 12px 12px 12px 16px; background: var(--surface); border: 1.5px solid var(--line);
  box-shadow: 0 2px 10px rgba(32, 53, 44, .08); }
.composer-box textarea { min-height: 84px; }
.composer-box:focus-within { border-color: var(--primary); }
.composer-hint { margin: 6px 0 0 4px; }

/* Noc 8 – Tarif, Firma a role, oprávnění (STYL 2.0 tokens only; without a design – brief 5) */
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plan-list li { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.plan-list li.is-on .icon { color: var(--success); }
.plan-list li.is-off { color: var(--muted); }
.plan-list li small { margin-left: auto; }
.company-card .meta-line { margin-top: 0; }
.company-edit { margin: 8px 0 12px; }
.company-edit > summary { list-style: none; display: inline-flex; }
.company-edit > summary::-webkit-details-marker { display: none; }
.company-people { list-style: none; margin: 0 0 16px; padding: 0; }
.company-person { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.company-person:last-child { border-bottom: 0; }
.company-person__main { flex: 1 1 160px; min-width: 0; }
.company-person__main small { display: block; color: var(--muted); margin-top: 2px; }
.company-person__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.company-person__actions .row { display: flex; gap: 8px; align-items: center; }
.company-invite, .company-permissions { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.table-scroll { position: relative; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.perm-matrix { border-collapse: collapse; width: 100%; min-width: 560px; font-size: var(--text-sm); }
.perm-matrix th, .perm-matrix td { padding: 6px 6px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.perm-matrix thead th { color: var(--muted); font-weight: 600; }
.perm-matrix tbody th { font-weight: 600; min-width: 140px; }
.perm-matrix select { min-width: 124px; }
.field__input--compact { min-height: 40px; padding: 6px 8px; font-size: var(--text-sm); }
.company-label { display: inline-flex; align-items: center; gap: 4px; }

/* Noc 9 – Přidělená práce (STYL 2.0 tokens only; without a design – brief 5) */
.assigned-list { list-style: none; margin: 0 0 8px; padding: 0; }
.assigned-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.assigned-row:last-child { border-bottom: 0; }
.assigned-row__main { flex: 1 1 200px; min-width: 0; color: var(--text); text-decoration: none; display: grid; gap: 2px; }
.assigned-row__main small { color: var(--muted); overflow-wrap: anywhere; }
.assigned-row__reason { font-style: italic; }
.assigned-row__actions { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
.assigned-row__actions form { margin: 0; }
.assigned-group { margin-top: 16px; }
.assigned-card--todo { border-left: 4px solid var(--warning); }
.assigned-form { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; display: grid; gap: 12px; }
.assigned-banner { margin-bottom: 12px; }
.assign-warning { border-left: 4px solid var(--warning); background: var(--warning-soft); }
.assign-kinds { margin-top: 12px; }
.timetable-block.is-assigned { outline: 2px dashed color-mix(in srgb, var(--child, var(--primary)) 70%, transparent); outline-offset: -2px; }
/* Noc 11: one type of calendar per account – choice cards (Google / Outlook / iCloud), an expired connection */
.soft-note--warning { background: var(--warning-soft); color: var(--warning); }
.provider-cards { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.provider-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.provider-card > div { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.provider-card small { color: var(--muted); font-size: var(--text-sm); }
.provider-card .btn { flex: none; min-height: 44px; }
.calendar-connection { overflow-wrap: anywhere; }
.calendar-expired { margin: 8px 0; }
.icloud-form { display: grid; gap: 12px; }
.icloud-steps { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 6px; }
.calendar-disconnect { margin-top: 8px; }
.calendar-disconnect > summary { list-style: none; display: inline-flex; cursor: pointer; }
.calendar-disconnect > summary::-webkit-details-marker { display: none; }
.calendar-disconnect form { display: grid; gap: 8px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
/* Opravy 14: Waze – *Pak dál do cíle* (the waypoint cannot be in its link) and the note on foot */
.place-card__next { flex-basis: 100%; text-align: right; font-size: var(--text-sm); min-height: 44px; display: inline-flex; align-items: center; justify-content: flex-end; }
.place-card__note { flex-basis: 100%; font-size: var(--text-sm); color: var(--muted); }
