/* ==========================================================================
   Fakturace — světlý vzhled inspirovaný iOS / iPadOS
   ========================================================================== */

:root {
  --bg: #ffffff;
  --yellow: #ffcc00;
  --gray: #8e8e93;
  --gray-soft: rgba(142, 142, 147, 0.14);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.45;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; }
p { margin: 0 0 0.75em; }
hr { border: 0; border-top: 1px solid var(--sep); margin: 20px 0; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ─── Rozvržení aplikace ─────────────────────────────────────────────────── */

.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; padding: 6px 10px 16px; color: var(--label); }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; color: #fff;
}
.brand-mark .icon { width: 20px; height: 20px; }
.nav-section { font-size: 12px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.04em; padding: 16px 12px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 10px;
  color: var(--label); font-weight: 500; font-size: 15px;
}
.nav-link:hover { background: var(--fill-2); text-decoration: none; }
.nav-link.active { background: var(--blue); color: #fff; }
.nav-link.active .nav-icon { background: rgba(255, 255, 255, 0.22) !important; }
.nav-icon { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: #fff; flex: none; }
.nav-icon .icon { width: 17px; height: 17px; stroke-width: 2; }
.nav-badge { margin-left: auto; font-size: 12px; font-weight: 600; background: var(--red); color: #fff; border-radius: 99px; padding: 1px 7px; }
.nav-link.active .nav-badge { background: #fff; color: var(--blue); }
.sidebar-footer { margin-top: auto; padding-top: 16px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--sep); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.user-chip .meta { min-width: 0; flex: 1; }
.user-chip .name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .sub { font-size: 12px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.c-blue { background: var(--blue); } .c-green { background: var(--green); } .c-red { background: var(--red); }
.c-orange { background: var(--orange); } .c-purple { background: var(--purple); } .c-indigo { background: var(--indigo); }
.c-teal { background: var(--teal); } .c-pink { background: var(--pink); } .c-gray { background: var(--gray); } .c-yellow { background: #f5b800; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--sep); }
.topbar-inner { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 32px; max-width: 1240px; width: 100%; margin: 0 auto; }
.topbar .compact-title { font-weight: 600; font-size: 17px; opacity: 0; transition: opacity .2s; }
.topbar.scrolled .compact-title { opacity: 1; }
.topbar .spacer { flex: 1; }
.back-link { display: inline-flex; align-items: center; gap: 2px; color: var(--blue); font-size: 17px; margin-left: -6px; }
.back-link .icon { width: 22px; height: 22px; stroke-width: 2.2; }
.menu-toggle { display: none; }

.content { padding: 4px 32px 64px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 22px; }
.page-title { line-height: 1.1; }
.page-sub { margin-top: 6px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.impersonation-bar { background: var(--orange); color: #fff; font-size: 14px; padding: 8px 32px; display: flex; align-items: center; gap: 12px; justify-content: center; }
.impersonation-bar button { background: rgba(255,255,255,.25); color: #fff; border: 0; border-radius: 8px; padding: 4px 10px; font: inherit; font-weight: 600; cursor: pointer; }
.sub-bar { font-size: 14px; padding: 9px 32px; display: flex; align-items: center; gap: 10px; justify-content: center; text-align: center; }
.sub-bar.trial { background: var(--blue-soft); color: #004fa8; }
.sub-bar.expired { background: var(--red-soft); color: var(--red-ink); }
.sub-bar a { font-weight: 600; }

/* ─── Karty, seznamy, mřížky ─────────────────────────────────────────────── */

.card { background: var(--bg); border: 1px solid var(--sep); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-title { font-size: 17px; font-weight: 600; }
.card-body { padding: 16px 20px 20px; }
.card + .card, .section + .section { margin-top: 20px; }
.section-title { font-weight: 600; text-transform: uppercase; margin: 28px 4px 8px; }
.section-title:first-child { margin-top: 0; }
.section-foot { font-size: 13px; color: var(--label-2); margin: 8px 4px 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.faint { color: var(--label-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 600; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ink-green { color: var(--green-ink); } .ink-red { color: var(--red-ink); } .ink-orange { color: var(--orange-ink); } .ink-blue { color: var(--blue); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; }

/* Seskupený seznam (Inset Grouped) */
.list { background: var(--bg); border: 1px solid var(--sep); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px; color: var(--label); position: relative; }
.list-row + .list-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--sep); }
.list-row.with-icon + .list-row.with-icon::before { left: 58px; }
a.list-row:hover, button.list-row:hover { background: var(--fill-2); text-decoration: none; }
button.list-row { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .subtitle { font-size: 13px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .value { color: var(--label-2); text-align: right; }
.list-row .chev { color: var(--label-3); width: 16px; height: 16px; stroke-width: 2.4; }
.list-empty { padding: 36px 20px; text-align: center; color: var(--label-2); }
.row-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.row-icon .icon { width: 18px; height: 18px; stroke-width: 2; }

/* Dlaždice nástrojů */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--sep); background: var(--bg); color: var(--label); transition: transform .15s, box-shadow .15s; }
.tile:hover { text-decoration: none; }
.tile .row-icon { width: 40px; height: 40px; border-radius: 11px; }
.tile .row-icon .icon { width: 22px; height: 22px; }
.tile-title { font-weight: 600; font-size: 16px; }
.tile-text { font-size: 13px; color: var(--label-2); margin: 0; }

/* Statistiky */
.stat { padding: 16px 18px; }
.stat-label { font-size: 13px; color: var(--label-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 13px; color: var(--label-2); margin-top: 2px; }

/* ─── Tlačítka ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 8px 16px;
  font: inherit; font-size: 15px; letter-spacing: -0.01em;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background-color .15s, opacity .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled, .btn.disabled { opacity: .45; pointer-events: none; }
.btn .icon { width: 18px; height: 18px; stroke-width: 2.1; }
.btn-primary { background: var(--blue); color: #fff; }

.btn-plain { background: transparent; padding-left: 8px; padding-right: 8px; }

.btn-sm { min-height: 32px; padding: 5px 12px; font-size: 14px; border-radius: 9px; }
.btn-lg { min-height: 50px; padding: 12px 22px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* Rozbalovací menu akcí */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 230px;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--sep); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: none;
}
.dropdown.open .dropdown-menu { display: block; }
/* Blok s otevřeným menu vždy nad sousedy — i když má zrovna vlastní vrstvu (vstupní animace) */
.content > *:has(.dropdown.open), .list-row:has(.dropdown.open) { position: relative; z-index: 40; }
.dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; border: 0; background: none; font: inherit; color: var(--label); text-align: left; cursor: pointer; }
.dropdown-item:hover { background: var(--fill-2); text-decoration: none; }
.dropdown-item.danger { color: var(--red-ink); }
.dropdown-item .icon { width: 18px; height: 18px; color: var(--label-2); }
.dropdown-item.danger .icon { color: var(--red); }
.dropdown-sep { border-top: 1px solid var(--sep); margin: 6px 4px; }

/* ─── Formuláře ──────────────────────────────────────────────────────────── */

.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.col-12 { grid-column: span 12; } .col-9 { grid-column: span 9; } .col-8 { grid-column: span 8; } .col-7 { grid-column: span 7; } .col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; } .col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; } .col-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 500; color: var(--label-2); }
.field .hint { font-size: 12px; color: var(--label-2); }
.field .error { font-size: 12px; color: var(--red-ink); }
.ui-tip { position: fixed; z-index: 400; max-width: min(280px, calc(100vw - 12px)); padding: 6px 10px; border-radius: 8px; background: rgba(28, 28, 30, .94); color: #fff; font-size: 12.5px; font-weight: 500; line-height: 1.35; pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity .12s, transform .12s; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.ui-tip.is-below { transform: translateY(-3px); }
.ui-tip.is-shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ui-tip { transition: none; } }
@media print { .ui-tip { display: none !important; } }
.field-error { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--red-ink, #c4302b); margin-top: 2px; animation: fe-in .18s ease-out; }
.field-error::before { content: "!"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--red-ink, #c4302b); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red-ink, #c4302b); box-shadow: 0 0 0 3px rgba(196, 48, 43, .14); }
@keyframes fe-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .field-error { animation: none; } }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  font: inherit; font-size: 15px; color: var(--label); border: 1px solid transparent;
  outline: none; transition: border-color .15s, box-shadow .15s, background-color .15s;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--label-3); }
.input:focus, .select:focus, .textarea:focus { background: #fff; }
.input.invalid { border-color: var(--red); }
.input[readonly] { color: var(--label-2); }
.textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.select { padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-group { display: flex; align-items: stretch; gap: 8px; }
.input-group .input { flex: 1; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 44px; }
.input-suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--label-2); pointer-events: none; font-size: 14px; }
.input.num, .input-num { text-align: right; font-variant-numeric: tabular-nums; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
.form-card { padding: 20px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Přepínač iOS */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 51px; height: 31px; border-radius: 99px; background: rgba(120, 120, 128, 0.16); position: relative; transition: background-color .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .2s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.25); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.switch-row + .switch-row { border-top: 1px solid var(--sep); }
.switch-row .text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-row .text .t { font-weight: 500; }
.switch-row .text .d { font-size: 13px; color: var(--label-2); }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }

/* Segmentový přepínač */
.segmented { display: inline-flex; background: var(--fill); border-radius: 10px; padding: 2px; gap: 2px; max-width: 100%; overflow-x: auto; }
.segmented a, .segmented button, .segmented label {
  border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--label);
  padding: 6px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; text-decoration: none; position: relative;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented .active, .segmented label:has(input:checked) { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04); font-weight: 600; }
.segmented .count { color: var(--label-2); font-weight: 500; margin-left: 4px; }

/* Vyhledávací pole */
.search { position: relative; }
.search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--label-2); width: 17px; height: 17px; }
.search .input { padding-left: 34px; min-height: 38px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { flex: 1; min-width: 200px; max-width: 360px; }

/* ─── Odznaky, upozornění ───────────────────────────────────────────────── */

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; }

.badge-green { background: var(--green-soft); color: var(--green-ink); }
.badge-red { background: var(--red-soft); color: var(--red-ink); }
.badge-orange { background: var(--orange-soft); color: var(--orange-ink); }

.badge-purple { background: var(--purple-soft); color: #8e38bb; }
.badge-teal { background: var(--teal-soft); color: #1b7d8f; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 14px; font-size: 14px; margin-bottom: 16px; }
.alert .icon { margin-top: 1px; }

.alert-success { background: var(--green-soft); color: #1d6f31; }
.alert-warning { background: var(--orange-soft); color: #8a3b00; }
.alert-error { background: var(--red-soft); color: #a3000f; }
.alert p:last-child { margin-bottom: 0; }

.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--sep); box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; animation: toast-in .35s cubic-bezier(.2,.9,.3,1.2); }
.toast.hide { opacity: 0; transform: translateY(-8px); transition: all .3s; }
.toast .icon { width: 22px; height: 22px; }
.toast-success .icon { color: var(--green); } .toast-error .icon { color: var(--red); } .toast-warning .icon { color: var(--orange); } .toast-info .icon { color: var(--blue); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(.96); } }

/* ─── Tabulky ────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .03em; padding: 10px 14px; border-bottom: 1px solid var(--sep); white-space: nowrap; background: var(--bg); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--sep); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: var(--fill-2); }
.table .right { text-align: right; }
.table a.row-link { color: var(--label); font-weight: 600; }
.table .cell-sub { font-size: 12px; color: var(--label-2); }
.table tfoot td { font-weight: 600; border-top: 1px solid var(--sep-strong); border-bottom: 0; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.pagination a, .pagination span { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; font-weight: 500; padding: 0 8px; }
.pagination a:hover { background: var(--fill); text-decoration: none; }
.pagination .current { background: var(--blue); color: #fff; }

/* ─── Editor faktury ─────────────────────────────────────────────────────── */

.items-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.items-table th { font-size: 12px; color: var(--label-2); font-weight: 600; text-align: left; padding: 0 6px 8px; white-space: nowrap; }
.items-table td { padding: 4px 6px; vertical-align: top; }
.items-table .input, .items-table .select { min-height: 40px; }
.items-table .c-name { width: 100%; min-width: 220px; }
.items-table .c-qty { width: 90px; } .items-table .c-unit { width: 80px; } .items-table .c-price { width: 130px; }
.items-table .c-vat { width: 92px; } .items-table .c-total { width: 130px; text-align: right; }
.items-table .line-total { padding: 10px 4px 0; font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.items-table .drag { color: var(--label-3); cursor: grab; padding-top: 10px; }
.item-remove { color: var(--label-3); background: none; border: 0; cursor: pointer; padding: 8px 4px; border-radius: 8px; }
.item-remove:hover { color: var(--red); background: var(--red-soft); }
.totals { margin-left: auto; width: min(100%, 360px); }
.totals-row { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-variant-numeric: tabular-nums; }
.totals-row.grand { border-top: 1px solid var(--sep-strong); margin-top: 6px; padding-top: 12px; font-size: 22px; font-weight: 700; font-family: var(--font-display); }
.sticky-side { position: sticky; top: 72px; }

.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: #fff; border: 1px solid var(--sep); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; padding: 4px; }
.suggest-item { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--label); }
.suggest-item:hover, .suggest-item.active { background: var(--blue-soft); }
.suggest-item .s-sub { display: block; font-size: 12px; color: var(--label-2); }

/* ─── Náhled dokladu (A4) ───────────────────────────────────────────────── */

.doc-preview { background: var(--bg-grouped); border-radius: var(--radius); padding: 28px; overflow-x: auto; }
.paper { background: #fff; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 16mm 16mm 14mm; box-shadow: 0 2px 20px rgba(0,0,0,.08); color: #111; font-size: 12.5px; line-height: 1.45; position: relative; }
.paper h1 { font-size: 24px; letter-spacing: -0.02em; }
.paper .doc-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.paper .doc-logo { max-height: 56px; max-width: 200px; }
.paper .doc-no { text-align: right; }
.paper .doc-no .t { font-size: 13px; color: #6e6e73; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.paper .doc-no .n { font-size: 24px; font-weight: 700; }
.paper .accent-line { height: 4px; border-radius: 4px; margin: 14px 0 20px; }
.paper .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 18px; }
.paper .party-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6e6e73; font-weight: 600; margin-bottom: 6px; }
.paper .party-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.paper .party-box { border: 1px solid #e5e5ea; border-radius: 10px; padding: 12px 14px; }
.paper .meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid #e5e5ea; border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
.paper .meta-grid > div { padding: 9px 12px; border-right: 1px solid #e5e5ea; }
.paper .meta-grid > div:last-child { border-right: 0; }
.paper .meta-grid .k { font-size: 10.5px; color: #6e6e73; text-transform: uppercase; letter-spacing: .04em; }
.paper .meta-grid .v { font-weight: 600; font-size: 13px; }
.paper table.lines { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.paper table.lines th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #6e6e73; text-align: left; padding: 7px 8px; border-bottom: 1.5px solid #1c1c1e; }
.paper table.lines td { padding: 8px; border-bottom: 1px solid #e5e5ea; vertical-align: top; }
.paper table.lines .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.paper .bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.paper .recap { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.paper .recap th, .paper .recap td { padding: 4px 6px; text-align: right; }
.paper .recap th:first-child, .paper .recap td:first-child { text-align: left; }
.paper .recap th { color: #6e6e73; font-weight: 600; border-bottom: 1px solid #e5e5ea; }
.paper .grand-box { border-radius: 10px; padding: 12px 14px; color: #fff; display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.paper .grand-box .t { font-size: 12px; opacity: .9; }
.paper .grand-box .v { font-size: 22px; font-weight: 700; }
.paper .pay-box { display: flex; gap: 14px; align-items: center; border: 1px solid #e5e5ea; border-radius: 10px; padding: 10px 12px; }
.paper .pay-box svg { width: 112px; height: 112px; flex: none; }
.paper .pay-row { display: flex; gap: 8px; }
.paper .pay-row .k { color: #6e6e73; min-width: 110px; }
.paper .pay-row .v { font-weight: 600; }
.paper .note { margin-top: 16px; }
.paper .foot { position: absolute; left: 16mm; right: 16mm; bottom: 10mm; font-size: 10px; color: #8e8e93; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #e5e5ea; padding-top: 6px; }
.paper .stamp { max-height: 90px; max-width: 180px; margin-top: 10px; }
.paper .paid-stamp { position: absolute; top: 58mm; right: 22mm; transform: rotate(-12deg); border: 3px solid #34c759; color: #248a3d; font-weight: 800; font-size: 22px; padding: 4px 14px; border-radius: 10px; letter-spacing: .08em; opacity: .75; }
.paper .cancel-stamp { border-color: #ff3b30; color: #d70015; }

/* ─── Přihlášení a veřejné stránky ──────────────────────────────────────── */

.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: min(420px, 100%); }
.auth-card .brand { justify-content: center; padding-bottom: 8px; font-size: 20px; }

.auth-title { font-size: 28px; font-weight: 700; text-align: center; margin: 12px 0 6px; }
.auth-sub { text-align: center; color: var(--label-2); margin-bottom: 24px; }
.auth-foot { text-align: center; margin-top: 18px; color: var(--label-2); font-size: 14px; }

.site-header { position: sticky; top: 0; z-index: 30; backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.site-header .inner, .site-section .inner, .site-footer .inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.site-header .inner { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.site-header nav { display: flex; margin-left: auto; align-items: center; }

.site-section h2 { text-align: center; margin-bottom: 10px; }
.site-section .lead { text-align: center; }
.price-card { padding: 26px; display: flex; flex-direction: column; gap: 14px; }

.price-card .price { font-size: 38px; font-family: var(--font-display); }
.price-card .price small { font-size: 15px; font-weight: 500; color: var(--label-2); }
.price-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.price-card li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.price-card li .icon { width: 18px; height: 18px; stroke-width: 2.4; margin-top: 1px; }
.site-footer { padding: 32px 0 48px; color: var(--label-2); font-size: 14px; border-top: 1px solid var(--sep); }
.site-footer .inner { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { text-align: left; font-size: 22px; margin: 28px 0 10px; }

/* ─── Dialog (sheet) ─────────────────────────────────────────────────────── */

dialog.sheet { border: 0; border-radius: 20px; padding: 0; width: min(520px, calc(100% - 24px)); box-shadow: var(--shadow-lg); color: var(--label); }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.28); backdrop-filter: blur(2px); }
dialog.sheet[open] { animation: sheet-in .28s cubic-bezier(.2,.9,.3,1.1); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--sep); }
.sheet-head h3 { font-size: 17px; }
.sheet-body { padding: 20px; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 20px 20px; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }

/* ─── Graf ───────────────────────────────────────────────────────────────── */

.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar-stack { width: 100%; max-width: 30px; display: flex; gap: 3px; align-items: flex-end; height: calc(100% - 22px); }
.bar { flex: 1; border-radius: 5px 5px 2px 2px; min-height: 2px; transition: opacity .15s; }

.bar-col:hover .bar { opacity: .8; }
.bar-label { font-size: 11px; color: var(--label-2); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--label-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Kalkulačky */
.calc-result { background: var(--bg-soft); border: 1px solid var(--sep); border-radius: var(--radius); padding: 18px 20px; }
.calc-big { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--sep); font-variant-numeric: tabular-nums; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--label-2); }
.kv .v { font-weight: 600; text-align: right; }
.kv.total { border-top: 1px solid var(--sep-strong); border-bottom: 0; margin-top: 4px; padding-top: 12px; font-size: 17px; }
.kv.total .k { color: var(--label); font-weight: 600; }
.timeline { position: relative; }
.deadline { display: flex; gap: 14px; padding: 12px 16px; align-items: center; }
.deadline + .deadline { border-top: 1px solid var(--sep); }
.deadline .date { width: 56px; text-align: center; flex: none; border-radius: 12px; background: var(--bg-grouped); padding: 6px 0; }
.deadline .date .d { font-size: 20px; font-weight: 700; line-height: 1; }
.deadline .date .m { font-size: 11px; color: var(--label-2); text-transform: uppercase; }
.deadline.past { opacity: .5; }

.dropzone { border: 2px dashed var(--sep-strong); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--label-2); cursor: pointer; transition: all .15s; display: block; }
.dropzone:hover, .dropzone.over { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.file-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--bg-grouped); font-size: 13px; }

/* ─── Mobilní zobrazení ─────────────────────────────────────────────────── */

.tabbar { display: none; }

@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .sticky-side { position: static; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 90; transform: translateX(-102%);
    transition: transform .28s cubic-bezier(.2,.9,.3,1); box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 80; }
  .menu-toggle { display: inline-flex; }
  .topbar-inner, .content, .sub-bar, .impersonation-bar { padding-left: 16px; padding-right: 16px; }
  .content { padding-bottom: 96px; }
  .page-title { font-size: 30px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .form-grid > [class*="col-"] { grid-column: span 12; }
  .form-grid > .col-m-6 { grid-column: span 6; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(250, 250, 252, 0.9); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--sep); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 500; color: var(--gray); background: none; border: 0; font-family: inherit; padding: 2px 0; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .icon { width: 25px; height: 25px; }
  .tabbar .active { color: var(--blue); }
  .tabbar .tab-plus .icon { background: var(--blue); color: #fff; border-radius: 50%; padding: 4px; width: 30px; height: 30px; stroke-width: 2.4; }
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; border-bottom: 1px solid var(--sep); padding: 10px 4px; }
  .table.responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 10px; }
  .table.responsive td[data-label]::before { content: attr(data-label); color: var(--label-2); font-size: 13px; }
  .table.responsive td.hide-m { display: none; }
  .items-table thead { display: none; }
  .items-table tr { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--sep); }
  .items-table td { padding: 0; }
  .items-table td.drag { display: none; }
  .items-table td.c-name { grid-column: span 6; min-width: 0; }
  .items-table td.c-qty, .items-table td.c-unit { grid-column: span 1; width: auto; }
  .items-table td.c-price { grid-column: span 2; width: auto; }
  .items-table td.c-vat { grid-column: span 2; width: auto; }
  .items-table td.c-total { grid-column: span 5; width: auto; }
  .items-table td.c-remove { grid-column: span 1; text-align: right; }
  .doc-preview { padding: 0; background: none; }
  .paper { transform-origin: top left; }
  .site-header nav a:not(.btn) { display: none; }
}

/* ─── Tisk ───────────────────────────────────────────────────────────────── */

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .sidebar, .topbar, .tabbar, .no-print, .toasts, .sub-bar, .impersonation-bar, .page-head { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  .doc-preview { padding: 0; background: none; }
  .paper { box-shadow: none; margin: 0; width: 210mm; min-height: 296mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Doplňky */
.list-row .title, .list-row .subtitle { display: block; }
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }
.grow { flex: 1; min-width: 0; }
.settings-nav { margin-bottom: 20px; }
.logo-preview { width: 100%; height: 96px; border: 1px dashed var(--sep-strong); border-radius: 12px; display: grid; place-items: center; background: var(--bg-soft); overflow: hidden; }
.logo-preview img { max-height: 80px; max-width: 90%; }
.color-input { width: 52px; height: 42px; padding: 3px; border-radius: 10px; border: 1px solid var(--sep); background: #fff; cursor: pointer; }

/* ==========================================================================
   Verze 2 — klidnější menu, přehled a marketingový web
   ========================================================================== */

/* Oprava: .card + .card přidávalo odsazení kartám v mřížce (posunutá první dlaždice) */
.grid > .card + .card, .kpis > .card + .card, .tiles > .tile + .tile, .split > .card + .card { margin-top: 0; }

/* Menu: jednobarevné ikony, barva jen u aktivní položky */

.sidebar .nav-icon { background: transparent !important; color: var(--label-2); }
.sidebar .nav-icon .icon { width: 19px; height: 19px; stroke-width: 1.9; }
.sidebar .nav-link { font-weight: 500; padding: 8px 10px; }

.sidebar .nav-link.active { font-weight: 600; }

.sidebar .nav-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; }
.sidebar .nav-link { position: relative; }
.sidebar .nav-link.active .nav-badge { background: var(--red); color: #fff; }
.sidebar .nav-section { font-size: 11px; letter-spacing: .06em; padding-top: 18px; color: var(--label-3); }

/* KPI dlaždice */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 14px; color: var(--label); transition: box-shadow .15s, transform .15s; }
.kpi:hover { text-decoration: none; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }

.kpi-value { font-family: var(--font-display); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--label-2); min-height: 30px; }
.spark { width: 76px; height: 30px; flex: none; }
.trend { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; padding: 2px 7px; white-space: nowrap; }
.trend .icon { width: 13px; height: 13px; stroke-width: 2.4; }

/* Onboarding */
.onboarding { padding: 18px 20px; }
.onboarding-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.progress { height: 6px; border-radius: 6px; background: var(--fill); width: min(220px, 100%); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 6px; }
.onboarding-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.onboarding-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--sep); color: var(--label); font-weight: 600; font-size: 14px; }
.onboarding-step:hover { text-decoration: none; }
.onboarding-step .step-check { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.onboarding-step.done { color: var(--label-2); font-weight: 500; }

/* Co dnes udělat */
.actions { display: flex; flex-direction: column; }
.action { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: 12px; color: var(--label); }
.action + .action { border-top: 1px solid var(--sep); }
.action:hover { text-decoration: none; }
.action-cta { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.all-done { display: flex; align-items: center; gap: 12px; padding: 8px 0; }

/* Plošný graf */
.area-chart { position: relative; }
.area-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.area-chart .grid-line { stroke: var(--sep); stroke-width: 1; }
.area-chart .line-revenue { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.area-chart .line-costs { fill: none; stroke-dasharray: 5 5; stroke-linejoin: round; }
.area-chart .chart-label { font-size: 12px; fill: var(--label-2); font-family: var(--font); }

.area-axis { position: absolute; top: 0; left: 8px; background: rgba(255,255,255,.85); padding: 0 4px; border-radius: 4px; }
.card-head .legend { align-items: center; }

/* Pravý panel */
.forecast { padding: 18px 20px; }
.forecast-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 14px; }
.forecast-row span { display: inline-flex; align-items: center; gap: 8px; color: var(--label-2); }
.stacked { display: flex; height: 8px; border-radius: 8px; overflow: hidden; background: var(--fill); gap: 2px; }
.stacked i { display: block; height: 100%; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick a { display: flex; align-items: center; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--sep); color: var(--label); font-size: 14px; font-weight: 600; }
.quick a:hover { text-decoration: none; }
.quick .icon { width: 18px; height: 18px; }
.avatar-soft { font-size: 12px; width: 32px; height: 32px; }

/* ─── Marketingový web ─────────────────────────────────────────────────── */

body.site { background: #fff; }
.site-header nav a.current { color: var(--blue); font-weight: 600; }
.btn-ghost { background: transparent; color: var(--label); }
.btn-ghost:hover { background: var(--fill-2); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 8px 4px; }
.step h3 { font-size: 19px; margin-bottom: 6px; }
.step p { color: var(--label-2); margin: 0; }

.compare-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
.compare th, .compare td { padding: 14px 18px; text-align: center; border-bottom: 1px solid var(--sep); }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare th { font-size: 13px; color: var(--label-2); font-weight: 600; }
.compare tr:last-child td { border-bottom: 0; }

.compare th.us { font-size: 15px; }
.compare .yes .icon { stroke-width: 2.8; }
.compare .no { color: var(--label-3); }

.pricing-grid { align-items: stretch; }
.price-card { height: 100%; }

.faq { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.faq details { background: #fff; border: 1px solid var(--sep); border-radius: 14px; padding: 0 20px; }
.faq summary { cursor: pointer; padding: 18px 28px 18px 0; font-weight: 600; font-size: 16px; position: relative; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--label-2); margin: 0 0 18px; }

.cta-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 40px; padding: 28px 32px; color: #fff; }
.cta-card h3 { font-size: 22px; margin-bottom: 6px; }
.cta-card p { margin: 0; opacity: .92; }
.crumbs { display: flex; align-items: center; gap: 4px; color: var(--label-2); margin-bottom: 18px; }
.calc-page .page-head { margin-top: 0; }

.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid a:not(.brand) { display: block; color: var(--label-2); padding: 3px 0; font-size: 14px; }
.footer-title { font-weight: 600; color: var(--label); margin-bottom: 8px; font-size: 14px; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .onboarding-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .sidebar .nav-link.active::before { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-value { font-size: 22px; }
  .kpi-foot span { display: none; }
  .spark { width: 100%; }
  .onboarding-steps { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
  .cta-card { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Fakturna — prémiový minimalismus (v3)
   Bílé pozadí, inkoustová čerň, jediný modrý akcent, vlasové linky.
   ========================================================================== */

:root {
  --ink: #0b0c0f;
  --ink-soft: #23262e;
  --label: #14161a;
  --label-2: #6b7078;
  --label-3: #a6abb3;
  --sep: rgba(11, 12, 15, 0.08);
  --sep-strong: rgba(11, 12, 15, 0.16);
  --fill: rgba(11, 12, 15, 0.05);
  --fill-2: rgba(11, 12, 15, 0.035);
  --bg-soft: #fbfbfc;
  --bg-grouped: #f5f6f7;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 12, 15, 0.04);
  --shadow-lg: 0 24px 60px rgba(11, 12, 15, 0.12);
  --sidebar: 252px;
}

body { font-size: 15px; letter-spacing: -0.011em; color: var(--label); }
h1, h2, h3, h4 { letter-spacing: -0.028em; }
a { text-decoration-color: var(--sep-strong); }

.muted { color: var(--label-2); }

/* Značka */
.brand { font-weight: 600; letter-spacing: -0.03em; font-size: 18px; gap: 9px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; padding: 0; overflow: hidden; }
.brand-mark svg, .brand-mark img { width: 100%; height: 100%; display: block; }
.auth-card .brand-mark { width: 40px; height: 40px; border-radius: 11px; }

/* Tlačítka: inkoustová primární, ostatní vlasové */
.btn { border-radius: 10px; font-weight: 550; box-shadow: none; background: transparent; color: var(--label); border: 1px solid var(--sep-strong); }
.btn:hover { background: var(--fill-2); }

.btn-primary:hover { background: #2b2e36; }
.btn-success { color: #fff; }

.btn-danger { background: transparent; color: var(--red-ink); border-color: rgba(215, 0, 21, .25); }
.btn-danger:hover { background: var(--red-soft); }
.btn-plain { border-color: transparent; }
.btn-plain:hover { background: var(--fill-2); }
.btn-lg { border-radius: 12px; font-size: 16px; }
.btn-ghost { box-shadow: none; border-color: var(--sep-strong); }
.cta-btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta-btn:hover { background: #eef0f3; }

/* Plochy */
.card, .list { border-radius: var(--radius); box-shadow: none; border-color: var(--sep); }
.card:hover { box-shadow: none; }
.tile { box-shadow: none; }
.tile:hover { transform: none; box-shadow: var(--shadow); border-color: var(--sep-strong); }
.input, .select, .textarea { background: #fff; border-color: var(--sep-strong); border-radius: 10px; }

.badge { font-weight: 550; border-radius: 6px; padding: 3px 8px; }

.badge-gray { background: var(--fill); color: var(--label-2); }
.section-title { letter-spacing: .08em; font-size: 11px; color: var(--label-3); }

/* Ikony: barevné čtverce jen tam, kde nesou význam (stav dokladu) */
.tile .row-icon, .quick .icon{
  background: var(--fill) !important; color: var(--ink) !important; box-shadow: none;
}

.list-row .row-icon { background: var(--fill) !important; color: var(--label) !important; }
.action .row-icon, .deadline .date{ background: var(--fill) !important; color: var(--ink) !important; }
.brand-mark { box-shadow: none; }

/* Aplikace */
.sidebar { border-right: 1px solid var(--sep); padding: 20px 14px 24px; }
.sidebar .nav-link { border-radius: 9px; font-size: 14.5px; color: #3c4149; }

.sidebar .nav-link.active .nav-icon, .sidebar .nav-link:hover .nav-icon { color: var(--ink); }

.topbar { background: rgba(255, 255, 255, 0.86); }
.page-title { font-size: 30px; font-weight: 650; }
.page-sub { color: var(--label-2); font-size: 14.5px; }
.content { padding-bottom: 80px; }
.kpi { border-radius: var(--radius); }
.kpi:hover { transform: none; box-shadow: var(--shadow); }
.kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kpi-value { font-size: 27px; font-weight: 650; }
.trend { border-radius: 6px; font-weight: 600; }

.onboarding-step { border-radius: 10px; }

.quick a { box-shadow: none; border-radius: 12px; }

/* Marketingový web */
.site-header { background: rgba(255, 255, 255, 0.9); border-bottom: 1px solid var(--sep); }
.site-header nav { gap: 26px; }
.site-header nav a:not(.btn) { font-size: 14px; color: var(--label-2); font-weight: 500; }

.eyebrow { border: 1px solid var(--sep-strong); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 7px 14px; }

.site-section { padding: 88px 0; }

.site-section h2 { font-size: 40px; font-weight: 600; letter-spacing: -0.035em; }
.site-section .lead { font-size: 17px; color: var(--label-2); margin-bottom: 44px; }

.compare th.us { font-weight: 600; }

.price-card { border-radius: 16px; }
.price-card.featured { border: 1px solid var(--ink); }
.price-card .price { font-weight: 600; letter-spacing: -0.04em; }

.cta-card { background: var(--ink); border-radius: 18px; }
.site-footer { background: #fff; }

@media (max-width: 860px) {
  .site-section { padding: 56px 0; }
  .site-section h2 { font-size: 30px; }
  .page-title { font-size: 26px; }
}

/* ==========================================================================
   Fakturna — barevná identita (v4)
   Fialovo-modrá značka, jantarový akcent, barevné tónované ikony.
   Platí pro web i pro aplikaci po přihlášení.
   ========================================================================== */

:root {
  --accent: #ff8f3d;
  --accent-2: #ffc24a;
  --accent-soft: rgba(255, 143, 61, 0.13);
  --green: #17b26a;
  --green-ink: #0f7a3d;
  --green-soft: rgba(23, 178, 106, 0.12);
  --red: #f0433a;
  --red-ink: #c81e14;
  --red-soft: rgba(240, 67, 58, 0.10);
  --orange: #ff8f3d;
  --orange-ink: #c2570a;
  --orange-soft: rgba(255, 143, 61, 0.13);
  --teal: #10a8b8;
  --teal-soft: rgba(16, 168, 184, 0.12);
  --pink: #f43f7f;
}

a { color: var(--brand-ink); }
a:hover { color: var(--brand-2); }

/* Tlačítka */
.btn-primary, .btn-primary:hover { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-success { background: var(--green); border-color: var(--green); }
.btn-success:hover { background: var(--green-ink); }
.btn:hover { border-color: var(--sep-strong); }
.btn-plain { color: var(--brand-ink); }
.cta-btn, .cta-btn:hover { background: #fff; color: var(--brand-ink); box-shadow: 0 10px 24px rgba(0,0,0,.14); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Barevné tónované ikony — místo plných barevných čtverců */
.row-icon, .nav-icon { background: var(--fill); color: var(--label); }
.row-icon.c-blue, .nav-icon.c-blue { background: rgba(37, 99, 235, .12) !important; color: #1b4bc4 !important; }

.row-icon.c-green, .nav-icon.c-green { background: rgba(23, 178, 106, .13) !important; color: #0f8a51 !important; }
.row-icon.c-teal, .nav-icon.c-teal { background: rgba(16, 168, 184, .13) !important; color: #0c8592 !important; }
.row-icon.c-orange, .nav-icon.c-orange { background: rgba(255, 143, 61, .15) !important; color: #c2570a !important; }
.row-icon.c-yellow, .nav-icon.c-yellow { background: rgba(255, 194, 74, .18) !important; color: #a97400 !important; }
.row-icon.c-red, .nav-icon.c-red { background: rgba(240, 67, 58, .12) !important; color: #c81e14 !important; }
.row-icon.c-pink, .nav-icon.c-pink { background: rgba(244, 63, 127, .12) !important; color: #c8235c !important; }
.row-icon.c-gray, .nav-icon.c-gray { background: var(--fill) !important; color: #545a63 !important; }
.brand-mark { background: none !important; }

/* Menu v aplikaci */
.sidebar { background: #fcfcfe; }
.sidebar .nav-icon { width: 28px; height: 28px; border-radius: 8px; }
.sidebar .nav-link.active { background: var(--brand-soft); color: var(--brand-ink); }
.sidebar .nav-link.active::before { background: var(--brand-grad); }
.sidebar .nav-link:hover { background: var(--brand-softer); }
.sidebar .nav-link.active .nav-icon { background: var(--brand-grad) !important; color: #fff !important; }
.sidebar .nav-link:hover .nav-icon { color: inherit; }
.user-chip { border-color: var(--sep); }
.avatar { background: var(--brand-grad); color: #fff; }
.avatar-soft { background: var(--brand-soft) !important; color: var(--brand-ink) !important; }
.tabbar .active { color: var(--brand-ink); }
.tabbar .tab-plus .icon { background: var(--brand-grad); }

/* Přehled */
.kpi { position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--brand-grad); opacity: 0; transition: opacity .15s; }
.kpi:hover::after { opacity: 1; }

.kpi-label { color: var(--label-2); }
.trend.up { background: var(--green-soft); color: var(--green-ink); }
.trend.down { background: var(--red-soft); color: var(--red-ink); }
.onboarding { background: linear-gradient(135deg, rgba(37,99,235,.07), rgba(23,64,181,.05)); border-color: rgba(37,99,235,.18); }
.onboarding-step:hover { border-color: var(--brand); }
.onboarding-step .step-check { background: var(--brand-soft); color: var(--brand-ink); }
.onboarding-step.done .step-check { background: var(--green); color: #fff; }
.progress i { background: var(--brand-grad); }
.action:hover { background: var(--brand-softer); }
.action-cta { color: var(--brand-ink); }
.quick a:hover { border-color: var(--brand); color: var(--brand-ink); }
.quick .icon { color: var(--brand); }
.area-chart .line-revenue { stroke: var(--brand); stroke-width: 2.4; }
.area-chart .line-costs { stroke: var(--accent); stroke-width: 1.8; }
.area-chart .chart-point:hover rect { fill: var(--brand-softer); }
.bar { background: var(--brand); }
.bar.cost { background: var(--accent-2); }
.deadline.soon .date { background: var(--orange-soft); color: var(--orange-ink); }
.deadline.urgent .date { background: var(--red-soft); color: var(--red-ink); }
.paid-stamp { border-color: var(--green); color: var(--green-ink); opacity: .7; }
.paid-stamp.cancel-stamp { border-color: var(--red); color: var(--red-ink); }
.badge-blue { background: var(--brand-soft); color: var(--brand-ink); }
.segmented .active, .segmented label:has(input:checked) { color: var(--brand-ink); }
.list-row.with-icon:hover { background: var(--brand-softer); }
.auth { background: radial-gradient(900px 480px at 15% -10%, rgba(37,99,235,.10), transparent 60%), radial-gradient(700px 420px at 100% 110%, rgba(23,64,181,.09), transparent 60%), #fff; }
.alert-info { background: var(--brand-soft); color: var(--brand-ink); }

/* Web */
.eyebrow { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.eyebrow .icon { color: var(--brand); }

.compare .us { background: var(--brand-softer); }
.compare th.us { color: var(--brand-ink); }
.compare .yes .icon { color: var(--green); }
.price-card.featured { border-color: var(--brand); box-shadow: 0 24px 56px rgba(37, 99, 235, .18); }
.price-card .price { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-card li .icon { color: var(--green); }
.faq summary::after { color: var(--brand); }
.cta-card { background: var(--brand-grad); }
.site-header nav a:not(.btn):hover, .site-header nav a.current { color: var(--brand-ink); }
.site-footer .footer-grid a:not(.brand):hover { color: var(--brand-ink); }

/* Doladění palety: safírová modř jako značková barva, indigo jen jako doplněk */
:root {
  --brand: #2563eb;
  --brand-2: #1740b5;
  --brand-ink: #1b4bc4;
  --brand-grad: linear-gradient(135deg, #3b82f6 0%, #2563eb 52%, #1740b5 100%);
  --brand-soft: rgba(37, 99, 235, 0.10);
  --brand-softer: rgba(37, 99, 235, 0.055);
  --shadow-brand: 0 10px 24px rgba(37, 99, 235, 0.24);
  --purple: #4b56d2;
  --purple-soft: rgba(75, 86, 210, 0.12);
  --indigo: #1f5fe0;
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.10);
}
.row-icon.c-purple, .nav-icon.c-purple { background: rgba(75, 86, 210, .12) !important; color: #3a45b8 !important; }
.row-icon.c-indigo, .nav-icon.c-indigo { background: rgba(31, 95, 224, .12) !important; color: #1748b5 !important; }
.kpi:hover { border-color: rgba(37, 99, 235, .28); }

/* Ukázky kódu v návodu na napojení */
.code-block { background: #0f1115; color: #e8eaf0; border-radius: 12px; padding: 14px 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; overflow-x: auto; white-space: pre; margin: 6px 0 16px; }

/* ── v5: přepínač účtů, zálohy, pokladní doklady, rychlé hledání ───────── */
.account-switch { padding: 0 4px 8px; }
.account-switch .select { width: 100%; }
.select-sm { padding: 6px 28px 6px 10px; font-size: 13px; border-radius: 10px; }

/* Rychlé hledání (Cmd+K) */
.palette-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(15, 20, 30, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: center; padding: 12vh 16px 16px; }
.palette-backdrop[hidden] { display: none; }
.palette { width: min(640px, 100%); background: var(--card, #fff); border-radius: 18px; box-shadow: 0 30px 80px rgba(15, 23, 42, .28); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; }
.palette-input { border: 0; border-bottom: 1px solid var(--sep, #e6e8ee); padding: 18px 20px; font-size: 17px; width: 100%; outline: none; background: transparent; color: inherit; }
.palette-list { overflow-y: auto; }
.palette-item { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: baseline; padding: 11px 20px; text-decoration: none; color: inherit; }
.palette-item.active, .palette-item:hover { background: var(--fill, #f3f5f9); }
.palette-group { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #8a8f98); }
.palette-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-sub { font-size: 13px; color: var(--muted, #8a8f98); white-space: nowrap; }
.palette-empty { padding: 22px 20px; color: var(--muted, #8a8f98); font-size: 14px; }
.palette-foot { display: flex; gap: 16px; padding: 10px 20px; border-top: 1px solid var(--sep, #e6e8ee); font-size: 12px; color: var(--muted, #8a8f98); }
@media (max-width: 640px) { .palette-item { grid-template-columns: 1fr; gap: 2px; } .palette-sub { white-space: normal; } }

/* ═══ v6: pohyb ══════════════════════════════════════════════════════════
   Animace jsou tiché a krátké — mají vést oko, ne strhávat pozornost.
   Všechno respektuje prefers-reduced-motion a nikdy neposouvá layout.      */

@media (prefers-reduced-motion: no-preference) {

  /* Odkrývání při scrollu */
  [data-reveal] { opacity: 0; transform: translateY(16px); }
  [data-reveal].in { opacity: 1; transform: none; transition: opacity .65s cubic-bezier(.22,.8,.3,1) var(--d, 0ms), transform .65s cubic-bezier(.22,.8,.3,1) var(--d, 0ms); }

  /* Vstup obsahu po načtení stránky v aplikaci */
  .content > * { animation: page-in .45s cubic-bezier(.22,.8,.3,1) backwards; }
  .content > *:nth-child(2) { animation-delay: .05s; }
  .content > *:nth-child(3) { animation-delay: .1s; }
  @keyframes page-in { from { opacity: 0; transform: translateY(10px); } }

  /* Řádky seznamů a dlaždice nabíhají po sobě */
  .list > .list-row:nth-child(-n+10) { animation: row-in .4s cubic-bezier(.22,.8,.3,1) backwards; }
  .list > .list-row:nth-child(2) { animation-delay: .03s; }
  .list > .list-row:nth-child(3) { animation-delay: .06s; }
  .list > .list-row:nth-child(4) { animation-delay: .09s; }
  .list > .list-row:nth-child(5) { animation-delay: .12s; }
  .list > .list-row:nth-child(6) { animation-delay: .15s; }
  .list > .list-row:nth-child(7) { animation-delay: .18s; }
  .list > .list-row:nth-child(8) { animation-delay: .21s; }
  .list > .list-row:nth-child(n+9) { animation-delay: .24s; }
  @keyframes row-in { from { opacity: 0; transform: translateY(6px); } }

  .sub-bar { animation: bar-in .4s cubic-bezier(.22,.9,.3,1.1) backwards; }
  @keyframes bar-in { from { opacity: 0; transform: translateY(-100%); } }

  /* Úvod webu: text nabíhá postupně */
  @keyframes hero-in { from { opacity: 0; transform: translateY(18px); } }

  /* Hlavní tlačítko: jemný přejezd světla */
  .btn-primary { position: relative; overflow: hidden; }
  .btn-primary::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-18deg); opacity: 0;
  }
  .btn-primary:hover::before { opacity: 1; animation: shine .9s ease; }
  @keyframes shine { to { left: 120%; } }

  /* Karty se při najetí nadlehčí */
  .tile, .price-card, .step{ transition: transform .25s cubic-bezier(.2,.8,.3,1), box-shadow .25s; }
  .tile:hover, .price-card:hover, .step:hover{ transform: translateY(-4px); box-shadow: var(--shadow-lg); }

  /* Sloupce v přehledech vyrostou, až je vidět */
  .bars .bar { transform-origin: bottom; }
            @keyframes bar-grow { from { transform: scaleY(.04); opacity: .4; } }
  .bars .bar { animation: bar-grow .7s cubic-bezier(.22,.8,.3,1) backwards; }

  /* Srovnávací tabulka: náš sloupec dýchá */
  .compare td.us .yes { animation: tick-pop .5s cubic-bezier(.2,.9,.3,1.4) backwards; }
  @keyframes tick-pop { from { transform: scale(.4); opacity: 0; } }

  /* Pruh s výzvou k akci */

  /* Otevírání častých otázek */
  .faq details[open] > *:not(summary) { animation: faq-in .3s ease backwards; }
  @keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }

  /* Navigace v aplikaci */
  .nav-link { transition: background-color .18s, color .18s, transform .18s; }
  .nav-link:hover { transform: translateX(2px); }

  /* Uložení, odeslání: potvrzovací puls u zelených odznaků */
  .badge-green { animation: badge-in .4s cubic-bezier(.2,.9,.3,1.3) backwards; }
  @keyframes badge-in { from { transform: scale(.82); opacity: 0; } }
}

/* Číslo, které se dopočítává, nesmí skákat do šířky */
[data-count] { font-variant-numeric: tabular-nums; }

/* Pruh s čísly na úvodní stránce */

/* Naklánění hero vizuálu za myší (nastavuje JS) */
.site-header { transition: box-shadow .25s, background-color .25s; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(15, 23, 42, .07); }

@media (prefers-reduced-motion: no-preference) {
  /* Graf tržeb se vykreslí zleva doprava */
  .area-chart .line-revenue, .area-chart .line-costs {
    stroke-dasharray: 1200; stroke-dashoffset: 1200;
    animation: draw-line 1.1s cubic-bezier(.22,.8,.3,1) .1s forwards;
  }
  .area-chart .line-costs { animation-delay: .22s; }
  @keyframes draw-line { to { stroke-dashoffset: 0; } }
  .area-chart path[fill^="url"] { animation: fade-up .9s cubic-bezier(.22,.8,.3,1) .25s backwards; }
  @keyframes fade-up { from { opacity: 0; transform: translateY(8px); } }
  .area-chart .chart-point { animation: fade-up .5s ease .5s backwards; }
}

/* Tisk: doklad se nikdy nesmí vytisknout rozanimovaný nebo poloprůhledný */
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* Stav skladu pod položkou dokladu */
.stock-hint { display: block; margin-top: 3px; font-size: 12px; }
.stock-hint.error { color: var(--red-ink); }

.onboarding-foot { padding: 10px 16px 12px; border-top: 1px solid var(--sep); }

/* Kroky průvodce, které klient nechce dělat — křížek je vidět vždy (i na dotyku), jen nenápadně */
.onboarding-step { padding: 0; gap: 0; }
.onboarding-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 10px 12px; color: inherit; }
.onboarding-link:hover { text-decoration: none; }
.step-skip { flex: none; margin-right: 6px; }
.step-skip button { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--label-3, #a1a1aa); cursor: pointer; transition: background-color .15s, color .15s; }
.step-skip button:hover, .step-skip button:focus-visible { background: var(--fill-2); color: var(--label); }
.step-skip .icon { width: 14px; height: 14px; }
.list-section-title { padding: 18px 16px 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--label-2); border-top: 1px solid var(--sep); }
.list-row.is-skipped .title { color: var(--label-2); }
.onboarding-list .list-row { flex-wrap: wrap; }
.onboarding-list .list-row form { margin: 0; }
@media (max-width: 640px) { .onboarding-list .list-row:has(form) .grow { flex-basis: calc(100% - 52px); } .onboarding-list .list-row:has(form) form:first-of-type { margin-left: 52px; } }

/* Trychtýř v konverzním přehledu */
.funnel-row { padding: 10px 0; border-bottom: 1px solid var(--sep); }
.funnel-row:last-child { border-bottom: 0; }
.funnel-row .progress { margin: 6px 0 4px; }
.funnel-row .progress i.c-blue { background: var(--blue); }
.funnel-row .progress i.c-indigo { background: #5856d6; }
.funnel-row .progress i.c-purple { background: #af52de; }
.funnel-row .progress i.c-gray { background: var(--label-3, #a1a1aa); }
.funnel-row .progress i.c-green { background: var(--green, #17b26a); }

/* Hromadné akce v seznamu dokladů */
.bulk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--sep); background: var(--fill, #f3f5f9); }
.bulk-bar .grow { flex: 1; font-size: 14px; }
.bulk-bar .bulk-group { display: inline-flex; align-items: center; gap: 6px; }
.bulk-bar .input-sm, .bulk-bar .select-sm { height: 32px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; width: auto; }
.table .c-check { width: 38px; }
.table .c-check input { width: 17px; height: 17px; cursor: pointer; }
@media (max-width: 760px) { .table.responsive .c-check { display: none; } .bulk-bar { display: none; } }

/* ═══ v7: úvodní stránka ═════════════════════════════════════════════════
   Hodně vzduchu, zakulacené tučné nadpisy, pilulková tlačítka, pastelové
   panely a diagonální výřez se žlutým trojúhelníkem. Vše pod .lp.          */
.lp {
  --lp-ink: #0b0d12;
  --lp-text: #3a3f4a;
  --lp-mint: #eefaf7;
  --lp-lav: #f5f5fd;
  --lp-cream: #fefbe9;
  --lp-yellow: #ffd84a;
  --lp-round: ui-rounded, "SF Pro Rounded", "Nunito", var(--font-display);
  color: var(--lp-text);
  overflow-x: clip;
}
.lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.lp h1, .lp h2 { font-family: var(--lp-round); color: var(--lp-ink); font-weight: 800; letter-spacing: -0.02em; }
.lp h2 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.12; margin-bottom: 14px; }
.lp p { font-size: 17px; line-height: 1.6; }
.lp-title { text-align: center; }
.lp-lead { text-align: center; max-width: 640px; margin: 0 auto 36px; color: var(--label-2); }
.lp-center { text-align: center; margin-top: 28px; }
.lp-muted { color: var(--label-2); font-size: 15px !important; }
.lp-kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; margin-bottom: 8px; }

/* Tlačítka */
.lp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid transparent; transition: transform .15s, box-shadow .15s, background-color .15s, border-color .15s; cursor: pointer; white-space: nowrap; }
.lp-btn:hover { text-decoration: none; transform: translateY(-1px); }
.lp-btn-primary, .lp-btn-primary:hover { background: var(--brand-grad); color: #fff; box-shadow: var(--shadow-brand); }
.lp-btn-outline { background: #fff; color: var(--brand-ink); border-color: rgba(37, 99, 235, .28); }
.lp-btn-outline:hover { border-color: var(--brand); color: var(--brand-ink); }
.lp-btn-white, .lp-btn-white:hover { background: #fff; color: var(--brand-ink); }
.lp-btn-ghost-white, .lp-btn-ghost-white:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
.lp-btn-lg { min-height: 56px; padding: 0 34px; font-size: 17px; }
.lp-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--brand-ink); }

/* Úvod */
.lp-hero { padding: 40px 0 72px; }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: center; }
.lp-hero h1 { font-size: clamp(44px, 5.6vw, 72px); line-height: 1.02; margin-bottom: 20px; }
.lp-hero-sub { font-size: 19px !important; font-weight: 600; color: var(--lp-ink); max-width: 440px; margin-bottom: 30px; }
.lp-hero-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 40px; }
.lp-badges { display: flex; gap: 14px 22px; flex-wrap: wrap; }
.lp-badges > div { display: flex; flex-direction: column; gap: 4px; }
.lp-badge-label { font-size: 12.5px; font-weight: 700; color: var(--lp-ink); }
.lp-badge-value { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--label-2); white-space: nowrap; }
.lp-badge-value .icon { color: var(--brand); }

.lp-hero-art { position: relative; min-height: 520px; }
.lp-slant { position: absolute; inset: 0 0 0 12%; border-radius: 0 24px 24px 0; clip-path: polygon(24% 0, 100% 0, 100% 100%, 0 100%); background:
  radial-gradient(circle at 78% 22%, rgba(255, 255, 255, .9) 0, rgba(255, 255, 255, 0) 38%),
  radial-gradient(circle at 30% 85%, rgba(139, 92, 246, .22) 0, rgba(139, 92, 246, 0) 42%),
  linear-gradient(140deg, #cfdcff 0%, #e6edff 48%, #efe9ff 100%); }
.lp-slant.has-photo { background-size: cover; background-position: center; }
.lp-tri { position: absolute; left: 0; bottom: 0; width: 58%; height: 46%; background: var(--lp-yellow); clip-path: polygon(0 100%, 100% 100%, 42% 0); z-index: 0; }
.lp-hero-art > .lp-slant { z-index: 1; }
.lp-paper-hero { transition: transform .35s cubic-bezier(.2,.8,.3,1); }

/* Papír faktury (maketa) */
.lp-paper { background: #fff; border-radius: 16px; box-shadow: 0 30px 70px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .05); padding: 22px 24px; }
.lp-paper-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lp-paper-kicker { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--label-2); }
.lp-paper-no { font-family: var(--lp-round); font-size: 22px; font-weight: 800; color: var(--lp-ink); }
.lp-paper-bar { height: 4px; border-radius: 4px; background: var(--brand-grad); margin: 14px 0 16px; }
.lp-paper-bar.teal { background: linear-gradient(90deg, #10a8b8, #6ee7d2); }
.lp-paper-rows > div, .lp-paper-total { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; padding: 6px 0; }
.lp-paper-rows > div.muted { color: var(--label-2); }
.lp-paper-rows b { font-weight: 600; font-variant-numeric: tabular-nums; }
.lp-paper-total { border-top: 1px solid var(--sep); margin-top: 8px; padding-top: 12px; font-size: 16px; }
.lp-paper-total b { font-family: var(--lp-round); font-size: 20px; font-weight: 800; color: var(--lp-ink); }
.lp-paper-qr { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px; border-radius: 12px; background: var(--brand-softer); font-size: 13px; color: var(--label-2); }
.lp-paper-qr svg { width: 64px; height: 64px; flex: none; }
.lp-pill-green { font-size: 12px; font-weight: 700; color: #0f7a3d; background: rgba(23, 178, 106, .14); border-radius: 999px; padding: 4px 10px; }
.lp-paper-hero { position: absolute; z-index: 2; width: min(360px, 70%); left: 30%; top: 12%; transform: rotate(-2deg); }
.lp-toast { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 10px 14px 10px 10px; box-shadow: 0 16px 36px rgba(15, 23, 42, .14); }
.lp-toast b { display: block; font-size: 13.5px; color: var(--lp-ink); }
.lp-toast span:not(.row-icon) { display: block; font-size: 12px; color: var(--label-2); }
.lp-toast-1 { right: 2%; top: 58%; }
.lp-toast-2 { left: 16%; bottom: 7%; }

/* Bloky */
.lp-block { padding: 56px 0; }
.lp-block-tight { padding: 24px 0; }
.lp-tinted { background: var(--lp-lav); }

/* Ukázková faktura */
.lp-sample { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.lp-sample-form { background: var(--lp-lav); border-radius: 24px; padding: 40px; }
.lp-sample-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 20px; }
.lp-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 180px; font-size: 13px; font-weight: 700; color: var(--lp-ink); }
.lp-field .input { height: 48px; border-radius: 12px; background: #fff; font-size: 17px; letter-spacing: .04em; }
.lp-fine { font-size: 13px !important; color: var(--label-2); margin: 14px 0 0; }
.lp-alert { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--red-soft); color: var(--red-ink); font-size: 14px; font-weight: 600; }
.lp-sample-art { position: relative; min-height: 360px; }
.lp-sample-art .lp-paper { position: absolute; z-index: 1; width: min(340px, 78%); }
.lp-paper-back { right: 0; top: 0; transform: rotate(6deg); opacity: .9; }
.lp-paper-front { left: 6%; top: 44px; transform: rotate(-4deg); }
.lp-paper-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.lp-paper-parties span { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--label-2); }
.lp-paper-parties b { display: block; font-size: 14px; color: var(--lp-ink); margin: 2px 0 6px; }
.lp-lines i, .lp-paper-parties i { display: block; height: 7px; border-radius: 4px; background: #eef0f4; margin: 7px 0; }
.lp-lines i.short, .lp-paper-parties i.short { width: 60%; }
.lp-squiggle { position: absolute; z-index: 0; left: -6%; bottom: 2%; width: 110px; color: var(--lp-ink); }

/* Napojení */
.lp-logos { display: flex; align-items: center; justify-content: center; gap: 12px 26px; flex-wrap: wrap; background: #f8f9fb; border-radius: 20px; padding: 26px 30px; }
.lp-logos-label { font-weight: 700; color: var(--lp-ink); font-size: 15px; }
.lp-logo { font-family: var(--lp-round); font-weight: 800; font-size: 16px; white-space: nowrap; color: #8d929c; letter-spacing: -.01em; transition: color .2s; }
.lp-logo:hover { color: var(--lp-ink); }

/* Funkce po jedné */
.lp-features { display: flex; flex-direction: column; gap: 28px; }
.lp-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; border-radius: 28px; padding: 56px; }
.lp-feature.flip .lp-feature-art { order: 2; }
.lp-feature.tone-mint { background: var(--lp-mint); }
.lp-feature.tone-lavender { background: var(--lp-lav); }
.lp-feature.tone-cream { background: var(--lp-cream); }
.lp-feature-copy p { margin-bottom: 18px; }
.lp-ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.lp-ticks li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--lp-ink); font-size: 15.5px; }
.lp-ticks .icon { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--brand); color: #fff; stroke-width: 3; flex: none; }
.lp-device { background: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 24px 60px rgba(15, 23, 42, .12); }

.lp-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.lp-kpis > div { background: #f7f8fb; border-radius: 12px; padding: 10px 12px; }
.lp-kpis span { display: block; font-size: 11.5px; color: var(--label-2); }
.lp-kpis b { display: block; font-family: var(--lp-round); font-size: 17px; font-weight: 800; color: var(--lp-ink); white-space: nowrap; }
.lp-chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 6px; }
.lp-chart i { flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #3b82f6, #1740b5); transform-origin: bottom; }
.lp-chart i:nth-child(odd) { background: linear-gradient(180deg, #6ee7d2, #10a8b8); }

.lp-form-row { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; color: var(--label-2); }
.lp-input { border: 1px solid var(--sep-strong); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--lp-ink); background: #fff; }
.lp-input em { font-style: normal; color: #0f8a51; font-weight: 600; }
.lp-form-split { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; margin: 0 0 14px 100px; }
.lp-form-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--sep); padding-top: 14px; }
.lp-chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); }
.lp-btn-mini { margin-left: auto; font-size: 13px; font-weight: 700; color: #fff; background: var(--brand-grad); border-radius: 999px; padding: 7px 16px; }

.lp-timeline { display: flex; flex-direction: column; gap: 4px; }
.lp-event, .lp-inbox-row, .lp-package-head { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; }
.lp-event b, .lp-inbox-row b, .lp-package-head b, .lp-cal b { display: block; font-size: 14px; color: var(--lp-ink); }
.lp-event span:not(.row-icon), .lp-inbox-row span:not(.row-icon), .lp-package-head span:not(.row-icon), .lp-cal div span { display: block; font-size: 12.5px; color: var(--label-2); }
.lp-event:nth-child(3) { background: rgba(23, 178, 106, .08); }

.lp-package-head { padding: 4px 4px 14px; border-bottom: 1px solid var(--sep); margin-bottom: 8px; }
.lp-file { display: flex; align-items: center; gap: 10px; padding: 10px 6px; font-size: 14px; color: var(--lp-ink); border-bottom: 1px dashed var(--sep); }
.lp-file:last-child { border-bottom: 0; }
.lp-file .icon { color: var(--label-2); }
.lp-file em { margin-left: auto; font-style: normal; font-weight: 700; font-size: 12px; background: #f1f3f7; border-radius: 999px; padding: 2px 9px; }

.lp-inbox-row.unread { background: rgba(240, 67, 58, .06); }
.lp-inbox-row.unread b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-left: 8px; vertical-align: middle; }
.lp-cal { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--lp-cream); }
.lp-cal-day { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 12px; background: #fff; font-size: 10px; font-weight: 700; color: var(--red-ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .06); }
.lp-cal-day b { font-family: var(--lp-round); font-size: 22px; line-height: 1; color: var(--lp-ink); }

/* Provedeme vás */
.lp-demo { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; background: var(--brand-grad); color: #fff; border-radius: 28px; padding: 40px 48px; box-shadow: 0 24px 60px rgba(37, 99, 235, .25); }
.lp-demo h2 { color: #fff; margin-bottom: 8px; }
.lp-demo p { color: rgba(255, 255, 255, .88); max-width: 560px; margin: 0; }
.lp-demo-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Kdo za tím stojí */
.lp-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; background: #f8f9fb; border-radius: 28px; padding: 56px 0 56px 56px; overflow: hidden; }
.lp-story h2 { font-size: clamp(32px, 3.8vw, 46px); }
.lp-quote { font-size: 18px !important; font-weight: 600; color: var(--lp-ink); }
.lp-quote-by { font-size: 14px !important; color: var(--label-2); }
.lp-story-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.lp-story-art { position: relative; min-height: 380px; align-self: stretch; margin: -56px 0; }
.lp-slant-story { inset: 0; border-radius: 0; clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%); z-index: 1; }
.lp-tri-story { width: 50%; height: 40%; z-index: 1; }
.lp-chat { position: absolute; z-index: 2; left: 24%; right: 8%; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; }
.lp-bubble { max-width: 88%; padding: 12px 16px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; box-shadow: 0 10px 26px rgba(15, 23, 42, .10); }
.lp-bubble.them { background: #fff; color: var(--lp-ink); border-bottom-left-radius: 6px; }
.lp-bubble.us { align-self: flex-end; background: var(--brand-grad); color: #fff; border-bottom-right-radius: 6px; }
.lp-bubble-by { align-self: flex-end; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--lp-ink); background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 5px 12px; }

/* Proč si nás oblíbíte */
.lp-love { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 30px; }
.lp-love-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; min-height: 170px; padding: 22px 16px; border-radius: 20px; transition: transform .2s; }
.lp-love-tile:hover { transform: translateY(-4px); }
.lp-love-tile b { font-family: var(--lp-round); font-size: 16.5px; font-weight: 800; line-height: 1.3; color: var(--lp-ink); }
.lp-love-tile .icon { width: 30px; height: 30px; }
.lp-love-tile.t1 { background: #eeedf9; } .lp-love-tile.t1 .icon { color: #4b56d2; }
.lp-love-tile.t2 { background: #fdeee8; } .lp-love-tile.t2 .icon { color: #d9582b; }
.lp-love-tile.t3 { background: #e9f7f4; } .lp-love-tile.t3 .icon { color: #0c8592; }
.lp-love-tile.t4 { background: #fdf8e1; } .lp-love-tile.t4 .icon { color: #a97400; }
.lp-love-tile.t5 { background: #eaf1fe; } .lp-love-tile.t5 .icon { color: #1b4bc4; }

/* Závěr */
.lp-final { padding: 72px 0 96px; text-align: center; }
.lp-final h2 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 28px; }
.lp-final .lp-muted { margin-top: 14px; }

/* Hlavička webu v tomto stylu (platí pro všechny veřejné stránky) */
.site-header .btn-primary { border-radius: 999px; padding-left: 18px; padding-right: 18px; font-weight: 700; }
.site-header nav a.nav-login { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-ink); font-weight: 600; }
/* Na telefonu zůstane z odkazu na účet jen ikona — přihlášení musí jít i tam */
@media (max-width: 860px) {
  .site-header nav a.nav-login { display: inline-flex; width: 40px; height: 40px; justify-content: center; border-radius: 50%; background: var(--brand-soft); font-size: 0; gap: 0; }
  .site-header nav a.nav-login .icon { width: 20px; height: 20px; }
  .site-header nav { gap: 8px; }
}

@media (max-width: 980px) {
  .lp-hero-grid, .lp-sample, .lp-feature, .lp-story { grid-template-columns: 1fr; }
  .lp-hero { padding-top: 24px; }
  .lp-hero-art { min-height: 440px; }
  .lp-feature { padding: 36px 28px; gap: 32px; }
  .lp-feature.flip .lp-feature-art { order: 0; }
  .lp-story { padding: 40px 28px 0; }
  .lp-story-art { margin: 0 -28px; min-height: 340px; }
  .lp-love { grid-template-columns: repeat(2, 1fr); }
  .lp-love-tile:last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .lp-wrap { padding: 0 16px; }
  .lp-hero-art { min-height: 480px; margin: 0 -16px; }
  .lp-slant { inset: 0 0 0 6%; border-radius: 0; }
  .lp-paper-hero { left: 14%; width: 76%; top: 8%; }
  .lp-toast-1 { right: 3%; top: 64%; }
  .lp-toast-2 { left: 4%; bottom: 4%; }
  .lp-sample-form { padding: 28px 22px; }
  .lp-sample-art { min-height: 380px; }
  .lp-feature { padding: 28px 20px; border-radius: 22px; }
  .lp-device { padding: 16px; }
  .lp-kpis { grid-template-columns: 1fr 1fr; }
  .lp-kpis > div:last-child { display: none; }
  .lp-form-split { margin-left: 0; }
  .lp-form-row { grid-template-columns: 1fr; gap: 4px; }
  .lp-demo { padding: 30px 24px; border-radius: 22px; }
  .lp-logos { gap: 10px 20px; padding: 20px; }
  .lp-logos-label { width: 100%; text-align: center; }
  .lp-love { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lp-love-tile { min-height: 140px; }
}

@media (prefers-reduced-motion: no-preference) {
  .lp-hero-copy > * { animation: hero-in .7s cubic-bezier(.2,.8,.3,1) backwards; }
  .lp-hero-copy > :nth-child(2) { animation-delay: .08s; }
  .lp-hero-copy > :nth-child(3) { animation-delay: .16s; }
  .lp-hero-copy > :nth-child(4) { animation-delay: .24s; }
  .lp-hero-art .lp-slant { animation: lp-wipe .9s cubic-bezier(.2,.8,.3,1) .1s backwards; }
  .lp-hero-art .lp-tri { animation: lp-rise .8s cubic-bezier(.2,.8,.3,1) .3s backwards; }
  .lp-paper-hero { animation: lp-drop .9s cubic-bezier(.2,.9,.3,1.15) .35s backwards; }
  .lp-toast-1 { animation: lp-pop .6s cubic-bezier(.2,.9,.3,1.3) .9s backwards, lp-float 6s ease-in-out 1.6s infinite; }
  .lp-toast-2 { animation: lp-pop .6s cubic-bezier(.2,.9,.3,1.3) 1.1s backwards, lp-float 7s ease-in-out 2s infinite reverse; }
  .lp-chart i { animation: bar-grow .7s cubic-bezier(.22,.8,.3,1) backwards; animation-delay: calc(var(--i, 0) * 45ms); animation-play-state: paused; }
  .lp-feature.in .lp-chart i { animation-play-state: running; }
  @keyframes lp-wipe { from { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); } }
  @keyframes lp-rise { from { transform: translateY(40%); opacity: 0; } }
  @keyframes lp-drop { from { transform: translateY(40px) rotate(4deg); opacity: 0; } }
  @keyframes lp-pop { from { transform: scale(.7); opacity: 0; } }
  @keyframes lp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
}

/* ═══ v8: aplikace ve stylu webu ═════════════════════════════════════════
   Stejný jazyk jako úvodní stránka: zaoblené tučné nadpisy, pilulková
   tlačítka, měkké karty na světlém podkladu a pastelové plochy. Vše pod
   .app-ui (jen rozhraní po přihlášení) — web, přihlášení a tiskový náhled
   dokladu (.paper) zůstávají beze změny. Mobil má vlastní blok níže.      */
.app-ui {
  --font-round: ui-rounded, "SF Pro Rounded", "Nunito", var(--font-display);
  --app-bg: #f6f7fb;
  --card-border: rgba(15, 23, 42, 0.07);
  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.045);
  --radius: 18px;
  --mint: #eefaf7; --lavender: #f3f3fd; --cream: #fefbe9; --sky: #edf4ff; --blush: #fdf1ec;
  background: var(--app-bg);
}

/* Písmo: nadpisy a velká čísla zaobleně jako na webu */
.app-ui .page-title, .app-ui .card-title, .app-ui .kpi-value, .app-ui .stat-value, .app-ui .brand,
.app-ui .totals-row.grand, .app-ui .calc-big, .app-ui .section-heading, .app-ui dialog.sheet h3 { font-family: var(--font-round); }
.app-ui .page-title { font-size: 32px; font-weight: 800; letter-spacing: -0.025em; }
.app-ui .page-sub { font-size: 15px; }
.app-ui .card-title { font-size: 17.5px; font-weight: 750; letter-spacing: -0.015em; }
.app-ui .section-title { font-size: 11.5px; font-weight: 700; color: var(--label-2); letter-spacing: .07em; }

/* Rozvržení: bílé menu, světlý podklad obsahu */
.app-ui .sidebar { background: #fff; border-right: 1px solid var(--card-border); padding: 22px 14px 20px; }
.app-ui .sidebar .brand { font-size: 19px; font-weight: 800; padding: 4px 10px 18px; }
.app-ui .sidebar .nav-section { color: var(--label-3); font-weight: 700; }
.app-ui .sidebar .nav-link { border-radius: 12px; padding: 8px 10px; color: #3a3f4a; }
.app-ui .sidebar .nav-link::before { display: none; }
.app-ui .sidebar .nav-link:hover { background: var(--app-bg); }
.app-ui .sidebar .nav-link.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.app-ui .sidebar .nav-link .nav-icon { border-radius: 9px; }
.app-ui .sidebar .nav-link.active .nav-icon { background: var(--brand-grad) !important; color: #fff !important; box-shadow: 0 4px 10px rgba(37, 99, 235, .25); }
.app-ui .nav-badge { border-radius: 999px; font-weight: 700; }
.app-ui .user-chip { border: 0; background: var(--app-bg); border-radius: 16px; }
.app-ui .topbar { background: rgba(246, 247, 251, 0.82); }
/* .btn stojí v souboru až za .menu-toggle a přebíjelo mu skrytí — na počítači tlačítko menu nemá co dělat */
.app-ui .menu-toggle { display: none; }
.app-ui .topbar .compact-title { font-family: var(--font-round); font-weight: 750; }
.app-ui .sub-bar { font-weight: 600; }
.app-ui .sub-bar.trial { background: var(--lavender); color: var(--brand-ink); }

/* Plochy */
.app-ui .card, .app-ui .list { background: #fff; border: 1px solid var(--card-border); border-radius: 20px; box-shadow: var(--card-shadow); }
.app-ui .card-head { padding: 18px 22px 0; }
.app-ui .card-body { padding: 16px 22px 22px; }
.app-ui .card-pad, .app-ui .form-card, .app-ui .forecast { padding: 22px; }
.app-ui .list-row { min-height: 56px; padding: 12px 18px; }
.app-ui .list-row + .list-row::before { left: 18px; }
.app-ui a.list-row:hover, .app-ui button.list-row:hover { background: var(--brand-softer); }
.app-ui .list-row .row-icon, .app-ui .action .row-icon { border-radius: 11px; width: 36px; height: 36px; }
.app-ui .avatar-soft { width: 38px; height: 38px; font-size: 13px; font-weight: 700; }

/* KPI: pastelové dlaždice jako „Proč si nás oblíbíte“ na webu */
.app-ui .kpi { border: 0; box-shadow: none; padding: 18px 20px 16px; border-radius: 20px; }
.app-ui .kpis > .kpi:nth-child(4n+1) { background: var(--sky); }
.app-ui .kpis > .kpi:nth-child(4n+2) { background: var(--mint); }
.app-ui .kpis > .kpi:nth-child(4n+3) { background: var(--cream); }
.app-ui .kpis > .kpi:nth-child(4n+4) { background: var(--lavender); }
.app-ui .kpi::after { display: none; }
.app-ui .kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, .07); }
.app-ui .kpi-label { font-size: 12.5px; letter-spacing: .02em; text-transform: none; font-weight: 650; color: #4a505b; }
.app-ui .kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: #0b0d12; }
.app-ui .kpi-foot { color: #5b616c; }
.app-ui .trend { border-radius: 999px; background: rgba(255, 255, 255, .7); }
.app-ui .stat { border-radius: 20px; }

/* Průvodce, rychlé odkazy, termíny */
.app-ui .onboarding { background: var(--lavender); border: 0; box-shadow: none; }
.app-ui .onboarding-step { border-radius: 14px; border-color: transparent; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.app-ui .quick a { border-radius: 16px; border-color: var(--card-border); box-shadow: var(--card-shadow); padding: 14px; }
.app-ui .quick .icon { color: var(--brand); }
.app-ui .deadline .date { border-radius: 12px; }
.app-ui .action { border-radius: 14px; }
.app-ui .tile { border-radius: 20px; border-color: var(--card-border); box-shadow: var(--card-shadow); }
.app-ui .tile:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 23, 42, .08); }
.app-ui .tile .row-icon { border-radius: 13px; }

/* Tlačítka: pilulky */
.app-ui .btn { border-radius: 999px; font-weight: 650; padding-left: 18px; padding-right: 18px; background: #fff; border-color: rgba(15, 23, 42, .12); }
.app-ui .btn:hover { background: #fff; border-color: rgba(37, 99, 235, .35); color: var(--brand-ink); }
.app-ui .btn-primary, .app-ui .btn-primary:hover { background: var(--brand-grad); border-color: transparent; color: #fff; }
.app-ui .btn-plain, .app-ui .btn-plain:hover { background: transparent; border-color: transparent; padding-left: 10px; padding-right: 10px; }
.app-ui .btn-plain:hover { background: var(--brand-softer); }
.app-ui .btn-danger { background: #fff; }
.app-ui .btn-danger:hover { background: var(--red-soft); color: var(--red-ink); border-color: rgba(215, 0, 21, .3); }
.app-ui .btn-success { background: var(--green); color: #fff; border-color: transparent; }
.app-ui .btn-success:hover { background: var(--green-ink); color: #fff; border-color: transparent; }
.app-ui .btn-icon { padding: 0; }
.app-ui .btn-sm { border-radius: 999px; padding-left: 14px; padding-right: 14px; }
.app-ui .btn-lg { border-radius: 999px; font-weight: 700; }
.app-ui .item-remove { border-radius: 10px; }

/* Formuláře */
.app-ui .input, .app-ui .select, .app-ui .textarea { border-radius: 12px; border-color: rgba(15, 23, 42, .12); min-height: 44px; }
.app-ui .input:hover, .app-ui .select:hover, .app-ui .textarea:hover { border-color: rgba(15, 23, 42, .22); }
.app-ui .input:focus, .app-ui .select:focus, .app-ui .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.app-ui .field > label, .app-ui .label { font-weight: 650; color: #4a505b; }
.app-ui .search .input { border-radius: 999px; padding-left: 38px; }
.app-ui .search .icon { left: 13px; }
.app-ui .segmented { border-radius: 999px; padding: 3px; background: rgba(15, 23, 42, .06); }
.app-ui .segmented a, .app-ui .segmented button, .app-ui .segmented label { border-radius: 999px; padding: 7px 16px; }
.app-ui .segmented .active, .app-ui .segmented label:has(input:checked) { box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

/* Odznaky, upozornění, menu, oznámení */
.app-ui .badge { border-radius: 999px; padding: 4px 10px; font-weight: 650; }
.app-ui .alert { border-radius: 16px; }
.app-ui .dropdown-menu { border-radius: 18px; padding: 8px; border-color: var(--card-border); box-shadow: 0 24px 60px rgba(15, 23, 42, .16); }
.app-ui .dropdown-item { border-radius: 11px; padding: 10px 12px; }
.app-ui .dropdown-item:hover { background: var(--brand-softer); }
.app-ui .toast { border-radius: 18px; }
.app-ui .suggest-list { border-radius: 16px; }
.app-ui .pagination a, .app-ui .pagination span { border-radius: 999px; }
.app-ui .pagination .current { background: var(--brand-grad); }
.app-ui .progress { background: rgba(15, 23, 42, .07); }

/* Tabulky */
.app-ui .table th { background: transparent; color: var(--label-3); font-weight: 700; padding: 14px 16px 10px; }
.app-ui .table td { padding: 13px 16px; }
.app-ui .table tbody tr.clickable:hover td { background: var(--brand-softer); }
.app-ui .bulk-bar { background: var(--lavender); border-radius: 20px 20px 0 0; }

/* Dialog */
.app-ui dialog.sheet { border-radius: 24px; }
.app-ui dialog.sheet::backdrop { background: rgba(15, 23, 42, .32); backdrop-filter: blur(4px); }

/* ─── Mobil ─────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  /* iOS přibližuje stránku při psaní do pole s písmem pod 16 px */
  .app-ui .input, .app-ui .select, .app-ui .textarea { font-size: 16px; min-height: 48px; }
  .app-ui .btn { min-height: 46px; }
  .app-ui .btn-sm { min-height: 38px; }
  .app-ui .btn-icon { width: 46px; }
  .app-ui .btn-icon.btn-sm { width: 38px; }

  .app-ui .content { padding: 4px 16px calc(124px + env(safe-area-inset-bottom)); }
  .app-ui .topbar-inner { min-height: 56px; padding-top: calc(6px + env(safe-area-inset-top)); }
  .app-ui .menu-toggle { display: inline-flex; width: 42px; min-height: 42px; background: #fff; border: 1px solid var(--card-border); box-shadow: var(--card-shadow); }
  .app-ui .page-head { margin: 2px 0 18px; gap: 14px; align-items: stretch; }
  .app-ui .page-title { font-size: 29px; }
  /* Akce v hlavičce stránky přes celou šířku — dobře se trefují palcem */
  .app-ui .page-actions { width: 100%; }
  .app-ui .page-actions > .btn, .app-ui .page-actions > .dropdown, .app-ui .page-actions > form { flex: 1 1 35%; min-width: 0; }
  /* Tlačítko jen s ikonou (⋯, šipky) se neroztahuje — přidá se vedle ostatních */
  .app-ui .page-actions > .btn-icon, .app-ui .page-actions > .dropdown:has(> .btn-icon) { flex: 0 0 auto; }
  .app-ui .page-actions > .dropdown > .btn:not(.btn-icon), .app-ui .page-actions > form > .btn:not(.btn-icon) { width: 100%; }
  .app-ui .page-actions .btn:not(.btn-icon) { padding-left: 12px; padding-right: 12px; }
  .app-ui .sub-bar { font-size: 13px; padding-top: 8px; padding-bottom: 8px; }

  /* Menu jako vysouvací panel se zaoblenými rohy */
  .app-ui .sidebar { border-radius: 0 26px 26px 0; padding-top: calc(22px + env(safe-area-inset-top)); padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .app-ui.nav-open::after { background: rgba(15, 23, 42, .35); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

  /* Spodní lišta: plovoucí pilulka s výrazným tlačítkem „Nová“ */
  .app-ui .tabbar {
    left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px 6px;
    border: 1px solid var(--card-border); border-radius: 26px; background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .14); align-items: flex-end;
  }
  .app-ui .tabbar a, .app-ui .tabbar button { gap: 3px; font-size: 11px; font-weight: 650; color: #7a808b; padding: 4px 0 2px; border-radius: 18px; }
  .app-ui .tabbar .icon { width: 24px; height: 24px; padding: 3px 12px; box-sizing: content-box; border-radius: 999px; transition: background-color .2s; }
  .app-ui .tabbar .active { color: var(--brand-ink); }
  .app-ui .tabbar .active .icon { background: var(--brand-soft); }
  .app-ui .tabbar .tab-plus { color: var(--brand-ink); }
  .app-ui .tabbar .tab-plus .icon { width: 28px; height: 28px; padding: 13px; margin-top: -26px; border-radius: 50%; background: var(--brand-grad); color: #fff; stroke-width: 2.4; box-shadow: 0 10px 22px rgba(37, 99, 235, .38), 0 0 0 5px #fff; }

  /* KPI dvě vedle sebe, čísla o chlup menší */
  .app-ui .kpis { gap: 10px; }
  .app-ui .kpi { padding: 14px 14px 12px; border-radius: 18px; }
  .app-ui .kpi-value { font-size: 21px; }
  .app-ui .kpi-foot > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .app-ui .kpi .spark { width: 52px; }
  .app-ui .kpi-top { flex-wrap: wrap; row-gap: 6px; }

  /* Co dnes udělat: z tlačítka zůstane šipka, text dostane celou šířku */
  .app-ui .action { align-items: flex-start; padding: 12px 4px; }
  .app-ui .action-cta { font-size: 0; gap: 0; align-self: center; }
  .app-ui .action-cta .icon { width: 18px; height: 18px; }

  /* Filtry: přepínač přes celou šířku se posouvá do strany, hledání na samostatném řádku */
  .app-ui .toolbar { gap: 8px; }
  .app-ui .toolbar .segmented { flex: 1 1 100%; margin: 0 -16px; padding: 3px 16px; max-width: none; border-radius: 0; background: none; scrollbar-width: none; }
  .app-ui .toolbar .segmented::-webkit-scrollbar { display: none; }
  .app-ui .toolbar .segmented a, .app-ui .toolbar .segmented button, .app-ui .toolbar .segmented label { background: rgba(15, 23, 42, .06); }
  .app-ui .toolbar .segmented .active { background: var(--brand-grad); color: #fff; box-shadow: var(--shadow-brand); }
  .app-ui .toolbar .search { flex: 1 1 100%; max-width: none; }
  .app-ui .toolbar > .select { flex: 1 1 0; width: auto !important; min-width: 0; padding-left: 12px; padding-right: 24px; background-position: right 9px center; text-overflow: ellipsis; }

  /* Statistiky nad seznamem: dvě vedle sebe, lichá poslední přes celou šířku — nic neuteče mimo obrazovku */
  .app-ui .grid:has(> .stat) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .app-ui .grid:has(> .stat) > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .app-ui .grid:has(> .stat) > .stat { padding: 14px; min-width: 0; }
  .app-ui .grid:has(> .stat) .stat-label { font-size: 12px; }
  .app-ui .stat-value { font-size: 20px; overflow-wrap: anywhere; }
  .app-ui .grid:has(> .stat) .stat-foot { font-size: 12px; }

  /* Tabulky se mění v karty: karta obalu zmizí, každý řádek je vlastní karta */
  .app-ui .card:has(.table.responsive) { background: transparent; border: 0; box-shadow: none; }
  .app-ui .table.responsive tbody { display: flex; flex-direction: column; gap: 10px; }
  .app-ui .table.responsive tr { background: #fff; border: 1px solid var(--card-border); border-radius: 18px; box-shadow: var(--card-shadow); padding: 12px 4px; }
  .app-ui .table.responsive td { padding: 4px 12px; align-items: baseline; }
  .app-ui .table.responsive td[data-label]::before { font-weight: 600; flex: none; }
  .app-ui .table.responsive td { flex-wrap: wrap; column-gap: 12px; row-gap: 0; }
  .app-ui .table.responsive td > * { text-align: right; }
  .app-ui .table.responsive td > .cell-sub { flex-basis: 100%; }
  .app-ui .table.responsive td:first-of-type:not(.c-check) , .app-ui .table.responsive td.c-check + td { font-size: 16px; }
  .app-ui .table.responsive tfoot tr { background: var(--lavender); }
  .app-ui .bulk-bar { border-radius: 18px; margin-bottom: 10px; }


  /* Rozbalovací menu vyjede zespodu jako panel — nikdy neuteče mimo obrazovku */
  .app-ui .dropdown-menu {
    position: fixed; left: 10px; right: 10px; top: auto; bottom: calc(10px + env(safe-area-inset-bottom));
    min-width: 0; z-index: 120; padding: 10px; border-radius: 24px; max-height: 70vh; overflow-y: auto;
  }
  .app-ui .dropdown-item { padding: 14px; font-size: 16px; }
  /* Menu je fixed, vlastní vrstvu rodiče nepotřebuje — bez ní ztmavení překryje i zbytek hlavičky */
  .app-ui .content > *:has(.dropdown.open), .app-ui .list-row:has(.dropdown.open) { z-index: auto; }
  .app-ui:has(.dropdown.open)::after { content: ""; position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, .32); }

  /* Dialogy jako spodní panel */
  .app-ui dialog.sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom); max-height: 92vh; }
  .app-ui dialog.sheet .sheet-foot .btn { flex: 1; }

  .app-ui .toasts { top: calc(12px + env(safe-area-inset-top)); }
  .app-ui .card-head { padding: 16px 18px 0; }
  .app-ui .card-body { padding: 14px 18px 18px; }
  .app-ui .card-pad, .app-ui .form-card, .app-ui .forecast { padding: 18px; }
  .app-ui .list-row { padding: 12px 16px; }
}
/* Úzké telefony: KPI jako posuvný pás, další karta vykoukne a napoví, že jde posunout */
@media (max-width: 480px) {
  .app-ui .kpis { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin-left: -16px; margin-right: -16px; padding: 2px 16px 6px; scroll-padding: 0 16px; scrollbar-width: none; }
  .app-ui .kpis::-webkit-scrollbar { display: none; }
  .app-ui .kpis > .kpi { flex: 0 0 74%; scroll-snap-align: start; }
  .app-ui .kpi-value { font-size: 26px; }
  .app-ui .kpi .spark { width: 64px; }
}
/* Položky dokladu jako karty s popisky. Klasická tabulka potřebuje ~800 px, ale sloupec vedle
   panelu dokladu má i na velkém monitoru jen ~770 px — useklo by se množství, jednotka i DPH. */
@media all {
  .app-ui .items-table thead { display: none; }
  .app-ui .items-table tr { display: grid; }
  .app-ui .items-table td { padding: 0; width: auto; min-width: 0; }
  .app-ui .items-table td.drag { display: none; }
  .app-ui .items-table tbody { display: flex; flex-direction: column; gap: 10px; }
  .app-ui .items-table tr { background: var(--app-bg); border: 0; border-radius: 16px; padding: 12px; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; }
  .app-ui .items-table td.c-name { grid-column: span 12; }
  .app-ui .items-table td.c-qty { grid-column: span 3; }
  .app-ui .items-table td.c-unit { grid-column: span 3; }
  .app-ui .items-table td.c-price { grid-column: span 6; }
  .app-ui .items-table td.c-vat { grid-column: span 5; }
  .app-ui .items-table td.c-total { grid-column: span 5; align-self: center; }
  .app-ui .items-table td.c-remove { grid-column: span 2; align-self: center; }
  .app-ui .items-table .input, .app-ui .items-table .select { padding-left: 10px; padding-right: 10px; }
  .app-ui .items-table .c-vat .select { padding-right: 26px; background-position: right 8px center; }
  .app-ui .items-table .line-total { padding: 0; font-size: 16px; }
  /* Bez hlavičky tabulky by nebylo poznat, co je které pole */
  .app-ui .items-table td.c-qty::before, .app-ui .items-table td.c-unit::before, .app-ui .items-table td.c-price::before, .app-ui .items-table td.c-vat::before {
    display: block; font-size: 11.5px; font-weight: 650; color: var(--label-2); margin: 0 0 4px 4px;
  }
  .app-ui .items-table td.c-qty::before { content: "Množství"; }
  .app-ui .items-table td.c-unit::before { content: "Jedn."; }
  .app-ui .items-table td.c-price::before { content: "Cena/jedn."; }
  .app-ui .items-table td.c-vat::before { content: "DPH"; }
}
/* Na počítači a tabletu se čísla položky vejdou do jednoho řádku pod popis */
@media (min-width: 861px) {
  .app-ui .items-table td.c-qty, .app-ui .items-table td.c-unit, .app-ui .items-table td.c-vat, .app-ui .items-table td.c-total { grid-column: span 2; }
  .app-ui .items-table td.c-price { grid-column: span 3; }
  .app-ui .items-table td.c-remove { grid-column: span 1; }
  .app-ui .items-table td.c-total, .app-ui .items-table td.c-remove { align-self: end; padding-bottom: 12px; }
}
@media (max-width: 380px) {
  /* V hlavičce stránky se dvě tlačítka vejdou jen bez ikon — text je dost jasný sám */
  .app-ui .page-actions .btn:not(.btn-icon) > .icon { display: none; }
  .app-ui .page-title { font-size: 26px; }
  .app-ui .tabbar a, .app-ui .tabbar button { font-size: 10.5px; }
  .app-ui .tabbar .icon { padding: 3px 8px; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 860px) {
  .app-ui .dropdown.open .dropdown-menu { animation: sheet-up .28s cubic-bezier(.2,.9,.3,1.05); }
  .app-ui dialog.sheet[open] { animation: sheet-up .32s cubic-bezier(.2,.9,.3,1.05); }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
}
@media print {
  .app-ui { background: #fff; }
}

/* ═══ Vytěžení nákladu a kalkulačka DPH ═══════════════════════════════════ */
.extract { margin-top: 14px; border-radius: 16px; padding: 14px 16px; background: var(--fill-2); border: 1px solid var(--sep); }
.extract.busy { background: var(--brand-softer); border-color: rgba(37, 99, 235, .18); }
.extract.done { background: rgba(23, 178, 106, .07); border-color: rgba(23, 178, 106, .25); }
.extract.attention { background: rgba(255, 143, 61, .08); border-color: rgba(255, 143, 61, .3); }
.extract.error { background: var(--red-soft); border-color: rgba(240, 67, 58, .25); }
.extract-head { display: flex; align-items: center; gap: 12px; }
.extract-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #fff; color: var(--brand); }
.extract.done .extract-icon { color: var(--green); }
.extract.attention .extract-icon { color: var(--orange-ink); }
.extract.error .extract-icon { color: var(--red); }
.extract.busy .extract-icon .icon { animation: extract-spin .9s linear infinite; }
@keyframes extract-spin { to { transform: rotate(360deg); } }
.extract-checks { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.extract-checks:empty { display: none; }
.extract-checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; padding: 7px 10px; border-radius: 10px; background: #fff; }
.extract-checks li .icon { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.extract-checks li.ok .icon { color: var(--green); }
.extract-checks li.info .icon { color: var(--brand); }
.extract-checks li.warn .icon { color: var(--orange-ink); }
.extract-checks li.error { background: #fff5f4; }
.extract-checks li.error .icon { color: var(--red); }
/* Shrnutí kontrol: štítky, seznam se rozbalí kliknutím */
.extract-checks[hidden], .extract-sum[hidden] { display: none; }
.extract-errors:empty { display: none; }
.extract-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.extract-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 8px; border-radius: 999px; border: 1px solid var(--sep); background: #fff; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--label-2); cursor: pointer; }
.extract-chip .icon { width: 15px; height: 15px; }
.extract-chip.ok .icon { color: var(--green); }
.extract-chip.warn { color: var(--orange-ink); border-color: rgba(255, 143, 61, .35); }
.extract-chip.warn .icon { color: var(--orange-ink); }
.extract-chip.info .icon { color: var(--brand); }
.extract-chip:hover { background: var(--fill-2); }
.extract-more { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--brand); cursor: pointer; padding: 4px 6px; }

/* Pole doplněná z dokladu: modře jisté, žlutě odhad ke kontrole */
.input.is-extracted, .select.is-extracted { background: #f3f7ff; border-color: rgba(37, 99, 235, .35); }
.input.is-uncertain, .select.is-uncertain { background: #fffaeb; border-color: rgba(217, 160, 0, .55); }
.switch-row.is-extracted .t::after, .switch-row.is-uncertain .t::after { content: " · z dokladu"; font-weight: 500; color: var(--label-2); font-size: 12px; }

/* Kalkulačka DPH */
.vat-calc { border-radius: 14px; background: var(--fill-2); padding: 12px; display: flex; flex-direction: column; gap: 8px; container-type: inline-size; }
.vat-calc-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; flex-wrap: wrap; }
.vat-calc-title .muted { font-weight: 500; font-size: 12px; }
.vat-calc-head, .vat-row { display: grid; grid-template-columns: 70px repeat(3, minmax(0, 1fr)) 26px; gap: 6px; align-items: center; }
.vat-calc-head span { font-size: 11px; font-weight: 650; color: var(--label-2); text-align: right; padding-right: 4px; }
.vat-calc-head span:first-child { text-align: left; padding-left: 4px; }
.vat-row .input, .vat-row .select { min-height: 38px; padding: 7px 8px; font-size: 14px; }
.vat-row .select { padding-right: 22px; background-position: right 7px center; }
.vat-cell { display: block; min-width: 0; }
.vat-cell span { display: none; }
.vat-row.is-extracted .input { background: #f3f7ff; }
.vat-calc .btn-plain { align-self: flex-start; }
.vat-calc-check:empty { display: none; }
.calc-msg { font-size: 12.5px; padding: 6px 9px; border-radius: 9px; background: #fff; }
.calc-msg.ok { color: var(--green-ink); }
.calc-msg.info { color: var(--brand-ink); }
.calc-msg.warn { color: var(--orange-ink); }
.calc-msg + .calc-msg { margin-top: 4px; }
.readonly-value { display: flex; align-items: center; justify-content: flex-end; background: var(--fill-2); color: var(--label-2); }
.fx-line { padding: 8px 12px; border-radius: 12px; background: var(--brand-softer); color: var(--label); line-height: 1.5; }

@media (max-width: 860px) {
  .vat-row .input, .vat-row .select { min-height: 44px; font-size: 16px; }
}
/* Úzká kalkulačka (telefon i postranní panel na počítači): sazba a odebrání nahoře,
   základ a DPH vedle sebe, celkem přes celou šířku. Rozhoduje šířka kalkulačky, ne okna. */
@container (max-width: 460px) {
  .vat-calc-head { display: none; }
  .vat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; border-radius: 12px; background: #fff; }
  .vat-row + .vat-row { margin-top: 2px; }
  .vat-row > .select { grid-column: 1; grid-row: 1; }
  .vat-row > .item-remove { grid-column: 2; grid-row: 1; justify-self: end; }
  .vat-row > .vat-cell:nth-of-type(1) { grid-column: 1; grid-row: 2; }
  .vat-row > .vat-cell:nth-of-type(2) { grid-column: 2; grid-row: 2; }
  .vat-row > .vat-cell:nth-of-type(3) { grid-column: 1 / -1; grid-row: 3; }
  .vat-cell span { display: block; font-size: 11px; font-weight: 650; color: var(--label-2); margin: 0 0 3px 3px; }
}
/* Nejužší telefony (320 px): šestimístné částky potřebují celou šířku */
@container (max-width: 270px) {
  .vat-row > .vat-cell:nth-of-type(1), .vat-row > .vat-cell:nth-of-type(2), .vat-row > .vat-cell:nth-of-type(3) { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 360px) {
  .app-ui .form-grid > .col-m-6 { grid-column: span 12; }
}

/* ── Náhled dokladu vedle formuláře nákladu (v1.8) ─────────────────────────── */
.doc-viewer[hidden], .viewer-fab[hidden] { display: none !important; }
.doc-viewer { position: relative; display: flex; flex-direction: column; min-height: 0; background: #fff; border: 1px solid var(--card-border, var(--sep)); border-radius: 20px; box-shadow: var(--card-shadow, var(--shadow)); overflow: hidden; }
.viewer-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px 18px; border-bottom: 1px solid var(--sep); }
.viewer-titles { min-width: 0; }
.viewer-titles .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-tools { display: flex; align-items: center; gap: 2px; flex: none; }
.viewer-tools [data-zoom] { width: 32px; padding: 0; justify-content: center; font-size: 18px; }
.viewer-tools [data-zoom-value] { min-width: 44px; text-align: center; }
.viewer-close { display: none; margin-left: 6px; }
.viewer-pick { position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 52px; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; background: var(--brand-ink, #1e3a8a); color: #fff; font-size: 13.5px; border-radius: 14px; box-shadow: 0 12px 30px rgba(15, 23, 42, .25); }
.viewer-pick .btn { color: #fff; }
.viewer-pick[hidden] { display: none; }
.viewer-body { --zoom: 1; flex: 1; min-height: 0; overflow: auto; padding: 16px; background: #eef1f6; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; overscroll-behavior: contain; }
.vpage { position: relative; width: calc(100% * var(--zoom)); max-width: none; flex: none; margin: 0 auto; aspect-ratio: 210 / 297; background: #fff; border-radius: 4px; box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 8px 24px rgba(15, 23, 42, .08); overflow: hidden; }
.vpage.is-image { aspect-ratio: auto; }
.vpage > canvas, .vpage > img { display: block; width: 100%; height: 100%; }
.vpage.is-image > img { height: auto; }
.vpage:not(.is-rendered):not(.is-image)::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #fff 0, #f4f6fa 40%, #fff 80%); background-size: 200% 100%; animation: vload 1.4s linear infinite; }
@keyframes vload { to { background-position: -200% 0; } }
.text-mode .vpage::before { display: none; }
.vlayer { position: absolute; inset: 0; user-select: none; -webkit-user-select: none; cursor: text; }
.vrun { position: absolute; color: transparent; white-space: pre; line-height: 1; overflow: hidden; border-radius: 2px; }
.text-mode .vrun { color: #1d1d1f; overflow: visible; }
.doc-viewer:not(.is-picking) .vrun:hover, .is-picking .vrun:hover { background: rgba(37, 99, 235, .12); }
.vrun.is-sel { background: rgba(37, 99, 235, .22); }
.vrun.is-flash { animation: vflash .6s ease-out; }
@keyframes vflash { 0%, 40% { background: rgba(240, 67, 58, .3); } 100% { background: transparent; } }
.is-picking .vlayer { cursor: crosshair; touch-action: none; }
.is-picking .vbox { opacity: .45; }
.vselect { position: absolute; border: 1.5px solid var(--brand); background: rgba(37, 99, 235, .1); border-radius: 3px; pointer-events: none; }
.vbox { position: absolute; border: 2px solid; border-radius: 4px; transition: box-shadow .15s, opacity .15s; }
.vbox-tag { opacity: 0; transition: opacity .12s; position: absolute; left: -2px; bottom: 100%; margin-bottom: 1px; padding: 1px 6px; border-radius: 4px 4px 4px 0; font-size: 10.5px; font-weight: 700; line-height: 1.5; color: #fff; white-space: nowrap; pointer-events: none; }
.vbox.is-sure { border-color: rgba(23, 178, 106, .8); background: rgba(23, 178, 106, .07); }
.vbox.is-sure .vbox-tag { background: #17b26a; }
.vbox.is-guess { border-color: rgba(217, 160, 0, .9); background: rgba(255, 204, 0, .1); border-style: dashed; }
.vbox.is-guess .vbox-tag { background: #c28e00; }
.vbox.is-template { border-color: rgba(124, 58, 237, .8); background: rgba(124, 58, 237, .07); }
.vbox.is-template .vbox-tag { background: #7c3aed; }
.vbox.is-marked { border-color: var(--brand); background: rgba(37, 99, 235, .08); }
.vbox.is-marked .vbox-tag { background: var(--brand); }
.vbox.is-active, .vbox:hover { box-shadow: 0 0 0 4px rgba(37, 99, 235, .2); opacity: 1; z-index: 2; }
.vbox.is-active .vbox-tag, .vbox:hover .vbox-tag { opacity: 1; }
.viewer-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 9px 18px; border-top: 1px solid var(--sep); color: var(--label-2); }
.viewer-legend .lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; border: 2px solid; margin-right: 6px; vertical-align: -1px; }
.lg-sure::before { border-color: #17b26a !important; }
.lg-guess::before { border-color: #d9a000 !important; border-style: dashed !important; }
.lg-template::before { border-color: #7c3aed !important; }
.lg-marked::before { border-color: var(--brand) !important; }
.viewer-more { text-align: center; margin: 0; }
.viewer-frame { width: 100%; height: 100%; min-height: 70vh; border: 0; border-radius: 4px; background: #fff; }
.viewer-pop { position: absolute; z-index: 5; width: 280px; max-width: calc(100% - 24px); background: #fff; border: 1px solid var(--card-border, var(--sep)); border-radius: 14px; box-shadow: 0 18px 40px rgba(15, 23, 42, .18); padding: 6px; }
.viewer-pop[hidden] { display: none; }
.viewer-pop-head { padding: 6px 10px 8px; font-size: 13px; overflow-wrap: anywhere; }
.viewer-pop-item { display: flex; width: 100%; justify-content: space-between; gap: 12px; padding: 9px 10px; border: 0; background: none; border-radius: 9px; font: inherit; font-size: 14px; text-align: left; cursor: pointer; color: inherit; }
.viewer-pop-item span { color: var(--label-2); }
.viewer-pop-item strong { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-pop-item:hover, .viewer-pop-item:focus-visible { background: var(--brand-soft); outline: none; }

/* Tlačítko „v dokladu“ u popisku pole a propojení pole ↔ rámeček */
.field > label:has(.pick-btn) { display: flex; align-items: center; gap: 8px; }
.pick-btn { margin-left: auto; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 24px; height: 20px; padding: 0; border: 0; border-radius: 999px; background: var(--brand-softer, #f3f7ff); color: var(--brand-ink); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; line-height: 1.6; }
.pick-btn[hidden] { display: none; }
.pick-btn .icon { width: 14px; height: 14px; }
.pick-btn:hover, .pick-btn.is-active { background: var(--brand); color: #fff; }
.input.is-marked { background: #f1f5ff; border-color: var(--brand); }
.field.is-linked .input, .field.is-linked .select { box-shadow: 0 0 0 3px var(--brand-soft); border-color: var(--brand); }
.field.is-flash .input { animation: fflash .9s ease-out; }
@keyframes fflash { 0% { box-shadow: 0 0 0 6px rgba(37, 99, 235, .35); } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); } }
.extract-memory { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(0, 0, 0, .06); font-size: 13px; color: #5b21b6; }
.extract-memory[hidden] { display: none; }

/* Počítač: doklad vlevo, pole vpravo */
@media (min-width: 1200px) {
  .content:has(.review.has-viewer) { max-width: 1680px; }
  .review.has-viewer { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(460px, 1fr); gap: 20px; align-items: start; }
  /* Pole vždy pod sebou — dva sloupce vedle dokladu a menu nechaly polím pás 300 px a text se lámal po slovech */
  .review.has-viewer .split { grid-template-columns: minmax(0, 1fr); }
  .review.has-viewer .sticky-side { position: static; }
  .review.has-viewer .doc-viewer { position: sticky; top: 72px; height: calc(100vh - 92px); }
  .viewer-fab { display: none !important; }
  /* Nahraný doklad už je vlevo — velká nahrávací plocha jen zabírá místo */
  .review.has-viewer .dropzone { padding: 10px 14px; display: flex; align-items: center; justify-content: center; gap: 10px; }
  .review.has-viewer .dropzone .icon-lg { width: 18px; height: 18px; }
  .review.has-viewer .dropzone .strong { margin: 0 !important; font-size: 14px; }
  .review.has-viewer .dropzone .small { display: none; }

  /* Režim „doklad na celou šířku“: boční menu se stáhne na lištu ikon, po najetí myší se rozbalí přes obsah.
     Texty se neskrývají (display), jen zprůhlední — ikony tak zůstanou na místě a nic neposkočí. Menu se rozbalí
     s krátkým zpožděním (náhodné přejetí myší k dokladu ho neotevře) a texty se ukážou až po rozbalení. */
  .app:has(.review.has-viewer) { grid-template-columns: 76px minmax(0, 1fr); }
  /* Rozšíření přesahuje sloupec mřížky, takže se menu rozbalí nad obsah a stránka se při najetí nerozhodí */
  .app:has(.review.has-viewer) .sidebar { position: sticky; top: 0; z-index: 70; width: 76px; overflow: hidden; transition: width .2s ease, box-shadow .2s ease; }
  .app:has(.review.has-viewer) .sidebar:hover { width: var(--sidebar, 252px); box-shadow: 18px 0 40px rgba(15, 23, 42, .12); overflow-y: auto; transition-delay: .15s; }
  .app:has(.review.has-viewer) .sidebar .brand > span:not(.brand-mark),
  .app:has(.review.has-viewer) .sidebar .nav-section,
  .app:has(.review.has-viewer) .sidebar .nav-link > span:not(.nav-icon),
  .app:has(.review.has-viewer) .sidebar .account-switch,
  .app:has(.review.has-viewer) .sidebar .user-chip .meta,
  .app:has(.review.has-viewer) .sidebar .user-chip form,
  .app:has(.review.has-viewer) .sidebar .sidebar-footer .small { white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity .1s ease, visibility 0s linear .1s; }
  .app:has(.review.has-viewer) .sidebar:hover .brand > span:not(.brand-mark),
  .app:has(.review.has-viewer) .sidebar:hover .nav-section,
  .app:has(.review.has-viewer) .sidebar:hover .nav-link > span:not(.nav-icon),
  .app:has(.review.has-viewer) .sidebar:hover .account-switch,
  .app:has(.review.has-viewer) .sidebar:hover .user-chip .meta,
  .app:has(.review.has-viewer) .sidebar:hover .user-chip form,
  .app:has(.review.has-viewer) .sidebar:hover .sidebar-footer .small { opacity: 1; visibility: visible; transition: opacity .15s ease .3s, visibility 0s linear .3s; }
  .app:has(.review.has-viewer) .sidebar .nav-link,
  .app:has(.review.has-viewer) .sidebar .brand { white-space: nowrap; }
  /* Odznak (počet faktur po splatnosti) jako tečka u ikony, dokud je menu stažené */
  .app:has(.review.has-viewer) .sidebar:not(:hover) .nav-badge { position: absolute; left: 36px; top: 4px; min-width: 8px; height: 8px; padding: 0; font-size: 0; }
  .app:has(.review.has-viewer) .sidebar .nav-link { position: relative; }

}

/* Tablet a telefon: doklad na celou obrazovku, otevře se tlačítkem nebo „v dokladu“ u pole */
@media (max-width: 1199px) {
  .doc-viewer { position: fixed; inset: 0; z-index: 120; border-radius: 0; border: 0; box-shadow: none; visibility: hidden; opacity: 0; transform: translateY(24px); transition: opacity .2s, transform .25s, visibility 0s .25s; padding-top: env(safe-area-inset-top); }
  .doc-viewer.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .25s; }
  .viewer-close { display: inline-flex; }
  .viewer-titles [data-viewer-hint] { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .viewer-head { padding-left: 14px; }
  .viewer-body { padding: 10px; }
  .viewer-legend { padding-bottom: calc(9px + env(safe-area-inset-bottom)); }
  .viewer-pop { position: fixed; left: 10px !important; right: 10px; top: auto !important; bottom: calc(52px + env(safe-area-inset-bottom)); width: auto; max-width: none; max-height: 50vh; overflow: auto; }
  .viewer-pop-item { padding: 12px 12px; font-size: 15px; }
  html.viewer-locked, html.viewer-locked body { overflow: hidden; }
  .viewer-fab { position: fixed; right: 16px; bottom: 24px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px 11px 14px; border: 0; border-radius: 999px; background: var(--brand-grad, var(--brand)); color: #fff; font: inherit; font-weight: 650; font-size: 15px; box-shadow: 0 12px 26px rgba(37, 99, 235, .35); cursor: pointer; }
  .viewer-fab .icon { width: 20px; height: 20px; }
}
@media (max-width: 860px) {
  .viewer-fab { bottom: calc(104px + env(safe-area-inset-bottom)); }
  .pick-btn { width: 30px; height: 24px; }
  .pick-btn .icon { width: 16px; height: 16px; }
}

/* Kurz cizí měny u nákladu */
.fx-box[hidden] { display: none; }
.fx-box { display: flex; flex-direction: column; gap: 6px; }
.fx-box .fx-line { color: var(--label-2); }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--brand); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

.extract-learn { margin-top: 8px; color: #5b21b6; }
.extract-learn[hidden] { display: none; }

/* Platba předplatného */
.pay-card { padding: 22px; }
.pay-grid { display: flex; gap: 28px; align-items: flex-start; }
.pay-qr { flex: none; width: 200px; text-align: center; }
.pay-qr svg { width: 100%; height: auto; display: block; border-radius: 12px; background: #fff; }
.pay-body { flex: 1; min-width: 0; }
.pay-rows { display: grid; gap: 2px; margin-bottom: 12px; }
.pay-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--sep); }
.pay-row strong { overflow-wrap: anywhere; }
.pay-tip { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--brand-softer, #f3f7ff); color: var(--label); }
.pay-tip .icon { flex: none; margin-top: 2px; color: var(--brand); }
.pay-actions { gap: 8px; flex-wrap: wrap; }
.pay-actions form { display: inline-flex; }
@media (max-width: 720px) {
  .pay-grid { flex-direction: column; align-items: stretch; }
  .pay-qr { width: 190px; margin: 0 auto; }
  .pay-row { grid-template-columns: 1fr auto; }
  .pay-row .muted { grid-column: 1 / -1; font-size: 12.5px; }
  .pay-actions .btn { width: 100%; justify-content: center; }
  .pay-actions form { display: flex; width: 100%; }
}

/* Druh dokladu: účtovat / jen DPH / neúčtovat */
.doc-kind-pill { display: inline-flex; margin-top: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.doc-kind-pill[hidden] { display: none; }
.doc-kind-pill.is-yes { background: rgba(23, 178, 106, .12); color: #0f7a4a; }
.doc-kind-pill.is-vat { background: var(--brand-soft); color: var(--brand-ink); }
.doc-kind-pill.is-no { background: rgba(255, 143, 61, .16); color: var(--orange-ink); }
.doc-kind-note.is-no { color: var(--orange-ink); font-weight: 600; }
.doc-kind-note.is-vat { color: var(--brand-ink); }

/* ═══ v9: široký veřejný web + pohyb ═════════════════════════════════════
   Na velkém monitoru se web roztáhne (obsah až 1520 px, okraje rostou s oknem)
   a hero má pozadí přes celou šířku. Animace jen přes transform/opacity —
   text v klidovém stavu nikdy není transformovaný, takže zůstává ostrý.   */
body.site { --site-max: 1440px; --site-pad: clamp(20px, 3.4vw, 72px); }
body.site .lp-wrap, .site-header .inner, .site-section .inner, .site-footer .inner {
  max-width: calc(var(--site-max) + 2 * var(--site-pad)); padding-left: var(--site-pad); padding-right: var(--site-pad);
}
@media (min-width: 1600px) {
  body.site { --site-max: 1520px; }
  .lp p { font-size: 18px; }
  .lp h2 { font-size: clamp(38px, 2.4vw, 46px); }
  .lp-hero h1 { font-size: clamp(72px, 4.6vw, 96px); }
  .lp-hero-sub { font-size: 21px !important; max-width: 520px; }
  .lp-hero-art { min-height: 620px; }
  .lp-paper-hero { width: min(420px, 66%); }
  .lp-feature { padding: 72px 80px; gap: 80px; }
  .lp-lead { max-width: 760px; }
  .lp-love-tile { min-height: 200px; }
}
@media (max-width: 600px) { body.site { --site-pad: 16px; } }

/* Hero: pozadí přes celou šířku okna */
.lp-hero { position: relative; isolation: isolate; }
.lp-hero::before { content: ""; position: absolute; z-index: -1; inset: -120px 0 0; pointer-events: none; background:
  radial-gradient(40% 55% at 8% 20%, rgba(59, 130, 246, .10), transparent 70%),
  radial-gradient(35% 50% at 96% 12%, rgba(139, 92, 246, .10), transparent 70%),
  radial-gradient(30% 40% at 70% 96%, rgba(16, 168, 184, .08), transparent 70%); }
.lp-grad-text { background: linear-gradient(90deg, #1d4ed8, #7c3aed 45%, #10a8b8 90%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Ukazatel posunu stránky pod hlavičkou */
.site-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand-grad); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* Pás napojení jako běžící páska */
.lp-marquee { flex: 1 1 0; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.lp-marquee-track { display: flex; gap: 40px; width: max-content; padding-right: 40px; }
.lp-logos.is-marquee { justify-content: flex-start; flex-wrap: nowrap; }

.lp-device { transition: transform .35s cubic-bezier(.2,.8,.3,1), box-shadow .35s; }
.lp-feature:hover .lp-device { transform: translateY(-6px); box-shadow: 0 34px 70px rgba(15, 23, 42, .16); }
.lp-btn-primary { position: relative; overflow: hidden; }
.lp-btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-18deg); pointer-events: none; opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .lp-hero::before { animation: lp-aurora 22s ease-in-out infinite alternate; }
  @keyframes lp-aurora { 0% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(2%, 14px, 0); } 100% { transform: translate3d(-2%, -10px, 0); } }
  .lp-grad-text { animation: lp-grad 7s ease-in-out infinite alternate; }
  @keyframes lp-grad { to { background-position: 100% 0; } }

  /* Tlačítko: odlesk při najetí a jednou za čas samo od sebe v hero */
  .lp-btn-primary:hover::after { opacity: 1; animation: lp-shine .9s ease; }
  .lp-hero .lp-btn-primary::after { animation: lp-shine 1.1s ease 2.2s, lp-shine 1.1s ease 9s; }
  @keyframes lp-shine { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 1; } }

  /* Funkce: obrázek přijede ze strany, body seznamu postupně */
  .lp-feature[data-reveal] .lp-feature-art { opacity: 0; translate: 48px 0; transition: opacity .8s cubic-bezier(.22,.8,.3,1) .12s, translate .8s cubic-bezier(.22,.8,.3,1) .12s; }
  .lp-feature.flip[data-reveal] .lp-feature-art { translate: -48px 0; }
  .lp-feature.in .lp-feature-art { opacity: 1; translate: 0 0; }
  .lp-feature[data-reveal] .lp-ticks li { opacity: 0; translate: 0 10px; transition: opacity .5s ease, translate .5s cubic-bezier(.22,.8,.3,1); }
  .lp-feature.in .lp-ticks li { opacity: 1; translate: 0 0; }
  .lp-feature.in .lp-ticks li:nth-child(1) { transition-delay: .25s; }
  .lp-feature.in .lp-ticks li:nth-child(2) { transition-delay: .35s; }
  .lp-feature.in .lp-ticks li:nth-child(3) { transition-delay: .45s; }
  .lp-feature.in .lp-ticks li:nth-child(4) { transition-delay: .55s; }
  .lp-feature.in .lp-ticks .icon { animation: tick-pop .5s cubic-bezier(.2,.9,.3,1.4) backwards; animation-delay: inherit; }

  /* Ukázka faktury: papíry se po odkrytí rozloží */
  .lp-sample[data-reveal] .lp-paper-back { transform: rotate(0deg) translate(-30px, 20px); transition: transform 1s cubic-bezier(.2,.8,.3,1) .2s; }
  .lp-sample[data-reveal] .lp-paper-front { transform: rotate(0deg) translate(30px, -10px); transition: transform 1s cubic-bezier(.2,.8,.3,1) .2s; }
  .lp-sample.in .lp-paper-back { transform: rotate(6deg); }
  .lp-sample.in .lp-paper-front { transform: rotate(-4deg); }

  .lp-marquee-track { animation: lp-marquee 36s linear infinite; }
  .lp-marquee:hover .lp-marquee-track { animation-play-state: paused; }
  @keyframes lp-marquee { to { transform: translateX(-50%); } }

  /* Dlaždice: ikona poskočí */
  .lp-love-tile:hover .icon { animation: lp-hop .6s cubic-bezier(.2,.9,.3,1.4); }
  @keyframes lp-hop { 40% { transform: translateY(-8px) rotate(-6deg); } 70% { transform: translateY(0) rotate(3deg); } }

  /* Modrý pruh a příběh: pomalu se přelévající barva, bubliny chatu postupně */
  .lp-demo { background-size: 180% 180%; animation: lp-flow 14s ease-in-out infinite alternate; }
  @keyframes lp-flow { from { background-position: 0% 40%; } to { background-position: 100% 60%; } }
  .lp-story[data-reveal] .lp-bubble, .lp-story[data-reveal] .lp-bubble-by { opacity: 0; translate: 0 14px; transition: opacity .5s ease, translate .6s cubic-bezier(.2,.9,.3,1.2); }
  .lp-story.in .lp-bubble, .lp-story.in .lp-bubble-by { opacity: 1; translate: 0 0; }
  .lp-story.in .lp-chat > :nth-child(1) { transition-delay: .3s; }
  .lp-story.in .lp-chat > :nth-child(2) { transition-delay: .8s; }
  .lp-story.in .lp-chat > :nth-child(3) { transition-delay: 1.3s; }
  .lp-story.in .lp-chat > :nth-child(4) { transition-delay: 1.7s; }

  /* Paralaxa hero vizuálu (JS nastavuje --py podle posunu) */
  .lp-hero-art .lp-slant { translate: 0 calc(var(--py, 0) * -0.06px); }
  .lp-hero-art .lp-tri { translate: 0 calc(var(--py, 0) * 0.12px); }
  .lp-hero-art .lp-toast-1 { translate: 0 calc(var(--py, 0) * -0.18px); }
  .lp-hero-art .lp-toast-2 { translate: 0 calc(var(--py, 0) * -0.1px); }
}
@media (max-width: 600px) {
  .lp-logos.is-marquee { flex-wrap: wrap; }
  .lp-logos.is-marquee .lp-marquee { flex: 1 1 100%; }
}

/* ─── E-shopy a schránka dokladů (nastavení) ─────────────────────────────── */
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.shop-logo { width: 44px; height: 44px; border-radius: 12px; flex: none; box-shadow: 0 2px 8px rgba(15, 23, 42, .10); }
.shop-providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; margin-top: 18px; align-items: start; }
.shop-provider { border: 1px solid var(--sep); border-radius: 16px; background: var(--card-bg, #fff); transition: border-color .2s, box-shadow .2s; }
.shop-provider[open] { border-color: rgba(37, 99, 235, .35); box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }
.shop-provider > summary { display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; list-style: none; }
.shop-provider > summary::-webkit-details-marker { display: none; }
.shop-provider-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.shop-provider-text b { font-size: 15.5px; color: var(--label); }
.shop-provider-text span { font-size: 12.5px; color: var(--label-2); line-height: 1.35; }
.shop-provider[open] .shop-provider-btn { visibility: hidden; }
.shop-channels { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin-top: 6px; }
.shop-channels img { height: 20px; width: auto; }
.shop-form { padding: 4px 14px 16px; border-top: 1px solid var(--sep); margin: 0; padding-top: 14px; }
.shop-statuses { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 12px; border-radius: 12px; background: var(--fill); }
.shop-cred > summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; }
.shop-conn .card-title .badge { vertical-align: 2px; margin-left: 4px; }
@media (max-width: 640px) {
  .shop-provider > summary { align-items: flex-start; }
  .shop-provider-btn { font-size: 0; gap: 0; width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 50%; flex: none; }
  .shop-provider-btn .icon { width: 18px; height: 18px; }
  .shop-channels img { height: 16px; }
}

/* Karty sekce (Ceník a sklad · Faktury a pravidelné faktury) */
.section-tabs { margin: -4px 0 18px; }
.section-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.section-tabs .icon-sm { width: 15px; height: 15px; }

/* ─── Levé menu: vlastní pořadí (podržet a přetáhnout) a připnuté položky ─── */
.nav-groups, .nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-item { position: relative; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: pan-y; }
.nav-item .nav-link { transition: transform .32s cubic-bezier(.2,.8,.3,1), box-shadow .2s, background-color .15s; }
.nav-item.is-holding .nav-link { transform: scale(.97); }
.nav-item.is-dragging { z-index: 5; }
.nav-item.is-dragging .nav-link { transform: scale(1.03); background: #fff; box-shadow: 0 12px 28px rgba(15, 23, 42, .18), 0 0 0 1px rgba(37, 99, 235, .28); cursor: grabbing; }
body.nav-sorting, body.nav-sorting * { cursor: grabbing !important; user-select: none; }
.nav-pin { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--label-3); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s, background-color .15s, color .15s; }
.nav-pin .icon { width: 15px; height: 15px; }
.nav-item:hover .nav-pin, .nav-pin:focus-visible { opacity: 1; }
.nav-pin:hover { background: var(--fill-2); color: var(--brand-ink); }
.nav-pin.is-on { color: var(--brand-ink); }
.nav-pin.is-on .icon { fill: currentColor; }
.nav-item:hover .nav-badge { margin-right: 30px; }
.nav-groups.is-sorting .nav-pin { opacity: 0 !important; }
.nav-section.is-pinned { display: flex; align-items: center; gap: 6px; }
.nav-section.is-pinned .icon { width: 12px; height: 12px; fill: currentColor; }
.nav-hint { font-size: 12px; line-height: 1.45; color: var(--label-3); padding: 14px 12px 0; margin: 0; }
@media (hover: none) {
  .nav-pin { opacity: .5; }
  .nav-link .nav-badge { margin-right: 30px; }
}
.app:has(.review.has-viewer) .sidebar:not(:hover) .nav-pin, .app:has(.review.has-viewer) .sidebar .nav-hint { display: none; }
@media (prefers-reduced-motion: reduce) { .nav-item .nav-link { transition: none; } }
.nav-group[data-nav-group="pinned"] { padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--sep); }
/* Špendlík překrývá konec dlouhého názvu — plynulý přechod do pozadí položky */
.nav-pin { right: 0; width: 44px; height: 100%; top: 0; transform: none; border-radius: 0 9px 9px 0; justify-items: end; padding-right: 8px; background: linear-gradient(90deg, rgba(252, 252, 254, 0), #fcfcfe 48%); }
.nav-item:hover .nav-pin { background: linear-gradient(90deg, rgba(240, 244, 253, 0), #f0f4fd 48%); }   /* --brand-softer na pozadí menu */
.nav-item:hover .nav-link.active + .nav-pin, .nav-link.active + .nav-pin { background: linear-gradient(90deg, rgba(231, 237, 252, 0), #e7edfc 48%); }   /* --brand-soft na pozadí menu */
.nav-pin:hover { background-color: transparent; }
.nav-pin:hover .icon { transform: scale(1.12); }
.nav-pin .icon { transition: transform .15s; }

/* ═══ Vzhledy aplikace (users.ui_theme) ═══════════════════════════════════
   Klasický = výchozí modrý vzhled výše. Heritage (tmavomodrá + šampaňská) a Verde (máta, tmavý tyrkys,
   korálová) podle návrhu fakturna-mockup.html: tmavé levé menu, teplé plochy, hlavní tlačítko v akcentu. */

/* ── Heritage ── */
.app-ui[data-theme="heritage"] {
  --app-bg: #f7f5f1;
  --card-border: #e8e4dc;
  --card-shadow: 0 1px 2px rgba(39, 43, 49, .03), 0 12px 32px rgba(39, 43, 49, .045);
  --brand: #b3874d;
  --brand-2: #8c663a;
  --brand-ink: #8c663a;
  --brand-grad: linear-gradient(135deg, #e6c896 0%, #d8b47e 55%, #c9a26a 100%);
  --brand-soft: rgba(216, 180, 126, .20);
  --brand-softer: rgba(216, 180, 126, .10);
  --shadow-brand: 0 8px 20px rgba(179, 130, 66, .23);
  --blue: #334b61;
  --blue-soft: rgba(51, 75, 97, .10);
  --label: #232936;
  --ink: #232936;
  --sky: #fffefa; --mint: #fffefa; --cream: #fffefa; --lavender: #f5efe5;
  --th-side: #1d2735; --th-side-hover: #2c3948; --th-side-active: #354153; --th-side-line: #303b49;
  --th-side-text: #c0c7ce; --th-side-muted: #929ba5; --th-side-icon: #8c9aa5; --th-accent: #d8b47e; --th-accent-icon: #e6c38c;
  --th-on-accent: #202936;
}
/* ── Indigo (hluboká indigová + fialová, inspirace Stripe / Linear) ── */
.app-ui[data-theme="indigo"] {
  --app-bg: #f5f5fb;
  --card-border: #e4e3f1;
  --card-shadow: 0 1px 2px rgba(27, 24, 64, .03), 0 12px 30px rgba(27, 24, 64, .055);
  --brand: #6d4dff;
  --brand-2: #4c32d9;
  --brand-ink: #5436e6;
  --brand-grad: linear-gradient(135deg, #9a86ff 0%, #7c5cff 55%, #6541f5 100%);
  --brand-soft: rgba(109, 77, 255, .12);
  --brand-softer: rgba(109, 77, 255, .06);
  --shadow-brand: 0 8px 22px rgba(109, 77, 255, .30);
  --blue: #6d4dff;
  --blue-soft: rgba(109, 77, 255, .11);
  --label: #1b1840;
  --ink: #1b1840;
  --sky: #ffffff; --mint: #ffffff; --cream: #ffffff; --lavender: #efedff;
  --th-side: #1b1840; --th-side-hover: #28245a; --th-side-active: #332d73; --th-side-line: #2c2862;
  --th-side-text: #c9c6ec; --th-side-muted: #8f8bc0; --th-side-icon: #a19ddb; --th-accent: #8f7bff; --th-accent-icon: #b3a6ff;
  --th-on-accent: #ffffff;
}

/* Společné pro oba tmavé vzhledy */
.app-ui[data-theme] .sidebar { background: var(--th-side); border-right-color: var(--th-side-line); }
.app-ui[data-theme] .sidebar .brand { color: #f8f5ec; }
.app-ui[data-theme] .sidebar .nav-section { color: var(--th-side-muted); }
.app-ui[data-theme] .sidebar .nav-link { color: var(--th-side-text); transition: background-color .22s ease, color .22s ease, transform .22s ease; }
.app-ui[data-theme] .sidebar .nav-icon { color: var(--th-side-icon); }
.app-ui[data-theme] .sidebar .nav-link:hover { background: var(--th-side-hover); color: #fff; transform: translateX(2px); }
.app-ui[data-theme] .sidebar .nav-link:hover .nav-icon { color: #fff; }
.app-ui[data-theme] .sidebar .nav-link.active { background: var(--th-side-active); color: #fff; box-shadow: inset 3px 0 0 var(--th-accent); }
.app-ui[data-theme] .sidebar .nav-link.active .nav-icon { background: transparent !important; color: var(--th-accent-icon) !important; box-shadow: none; }
.app-ui[data-theme] .sidebar .user-chip { background: rgba(255, 255, 255, .06); color: #eef0ed; }
.app-ui[data-theme] .sidebar .user-chip .sub, .app-ui[data-theme] .sidebar .small { color: var(--th-side-muted); }
.app-ui[data-theme] .sidebar .user-chip .btn-plain { color: var(--th-side-text); }
.app-ui[data-theme] .sidebar .user-chip .btn-plain:hover { background: var(--th-side-hover); color: #fff; }
.app-ui[data-theme] .sidebar .account-switch .select { background-color: var(--th-side-hover); color: #fff; border-color: var(--th-side-line); }
.app-ui[data-theme] .nav-group[data-nav-group="pinned"] { border-bottom-color: var(--th-side-line); }
.app-ui[data-theme] .nav-hint { color: var(--th-side-muted); }
.app-ui[data-theme] .nav-pin { color: var(--th-side-muted); background: linear-gradient(90deg, transparent, var(--th-side) 48%); }
.app-ui[data-theme] .nav-item:hover .nav-pin { background: linear-gradient(90deg, transparent, var(--th-side-hover) 48%); }
.app-ui[data-theme] .nav-item:hover .nav-link.active + .nav-pin, .app-ui[data-theme] .nav-link.active + .nav-pin { background: linear-gradient(90deg, transparent, var(--th-side-active) 48%); }
.app-ui[data-theme] .nav-pin.is-on, .app-ui[data-theme] .nav-pin:hover { color: var(--th-accent); }
.app-ui[data-theme] .nav-item.is-dragging .nav-link { background: var(--th-side-hover); box-shadow: 0 12px 28px rgba(0, 0, 0, .35), 0 0 0 1px var(--th-accent); }

/* Plochy, nadpisy, tlačítka */
.app-ui[data-theme] .card, .app-ui[data-theme] .list, .app-ui[data-theme] dialog.sheet { background: #fffefa; }
.app-ui[data-theme] .topbar { background: color-mix(in srgb, var(--app-bg) 85%, transparent); }
.app-ui[data-theme] .page-title, .app-ui[data-theme] .card-title, .app-ui[data-theme] .kpi-value { color: var(--label); }
.app-ui[data-theme] .btn { transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease, border-color .22s ease; }
.app-ui[data-theme] .btn:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(48, 52, 55, .08); }
.app-ui[data-theme] .btn-primary, .app-ui[data-theme] .btn-primary:hover { color: var(--th-on-accent); box-shadow: var(--shadow-brand); }
.app-ui[data-theme] .content > .page-head .page-title { letter-spacing: -0.03em; }

/* KPI: první dlaždice jako tmavá „hero“ karta, ostatní světlé s jemným okrajem */
.app-ui[data-theme] .kpis > .kpi { background: #fffefa; border: 1px solid var(--card-border); box-shadow: var(--card-shadow); }
.app-ui[data-theme] .kpis > .kpi:nth-child(4n+1) { background: linear-gradient(128deg, #182334 0%, #25354a 66%, #27384c 100%); border-color: transparent; box-shadow: 0 20px 36px rgba(27, 39, 53, .11); }
.app-ui[data-theme] .kpis > .kpi:nth-child(4n+1) .kpi-label, .app-ui[data-theme] .kpis > .kpi:nth-child(4n+1) .kpi-foot { color: #bfccd3; }
.app-ui[data-theme] .kpis > .kpi:nth-child(4n+1) .kpi-value { color: #fffdf8; }
.app-ui[data-theme] .kpis > .kpi:nth-child(4n+1) .trend { background: rgba(255, 255, 255, .12); color: #e7c693; }
.app-ui[data-theme="heritage"] .kpis > .kpi:hover, .app-ui[data-theme] .tile:hover { border-color: #d9c7ab; }

/* Mobilní spodní lišta */
.app-ui[data-theme] .tabbar a.active { color: var(--brand-ink); }
.app-ui[data-theme] .tabbar .tab-plus .icon { background: var(--brand-grad); color: var(--th-on-accent); }

/* ─── Výběr vzhledu (Nastavení → Můj účet) ─── */
.theme-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.theme-option { position: relative; cursor: pointer; border: 2px solid var(--card-border, var(--sep)); border-radius: 16px; padding: 10px; background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s; }
.theme-option:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, .08); }
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-option:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.theme-option:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.theme-swatch { display: grid; grid-template-columns: 30% 1fr; height: 78px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(15, 23, 42, .08); }
.theme-swatch .s-side { display: flex; flex-direction: column; gap: 5px; padding: 9px 7px; }
.theme-swatch .s-side i { display: block; height: 5px; border-radius: 3px; opacity: .55; }
.theme-swatch .s-side i:nth-child(2) { opacity: 1; }
.theme-swatch .s-main { padding: 9px; display: flex; flex-direction: column; gap: 6px; }
.theme-swatch .s-hero { height: 26px; border-radius: 6px; }
.theme-swatch .s-row { display: flex; gap: 5px; align-items: center; }
.theme-swatch .s-row i { display: block; height: 5px; flex: 1; border-radius: 3px; background: rgba(15, 23, 42, .1); }
.theme-swatch .s-row b { display: block; width: 26px; height: 11px; border-radius: 999px; }
.theme-option .t-name { display: block; font-weight: 700; margin-top: 9px; font-size: 14.5px; }
.theme-option .t-desc { display: block; font-size: 12px; color: var(--label-2); margin-top: 1px; }
.theme-option .t-check { position: absolute; top: 16px; right: 16px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: none; place-items: center; }
.theme-option .t-check .icon { width: 13px; height: 13px; stroke-width: 3; }
.theme-option:has(input:checked) .t-check { display: grid; }
@media (max-width: 640px) { .theme-picker { grid-template-columns: 1fr; } .theme-swatch { height: 64px; } }
/* Tmavé menu: jednobarevné ikony bez barevných dlaždic (jako v návrhu) */
.app-ui[data-theme] .sidebar .nav-icon[class*="c-"] { background: transparent !important; color: var(--th-side-icon) !important; }
.app-ui[data-theme] .sidebar .nav-link:hover .nav-icon[class*="c-"] { color: #fff !important; }
.app-ui[data-theme] .sidebar .nav-link.active .nav-icon[class*="c-"] { color: var(--th-accent-icon) !important; }
/* Křivka v tmavé / mátové hlavní dlaždici */
.app-ui[data-theme="heritage"] .spark * { stroke: #b3874d; }
.app-ui[data-theme="heritage"] .kpis > .kpi:nth-child(4n+1) .spark * { stroke: #e7c693; }

/* ─── Online přijetí nabídky (veřejná stránka dokladu) ─── */
.quote-accept { max-width: 560px; margin: 0 auto 48px; padding: 0 16px; }
.quote-card { background: #fff; border-radius: 20px; box-shadow: 0 18px 44px rgba(15, 23, 42, .10); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.quote-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 17px; }
.quote-total { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.quote-card .field { display: flex; flex-direction: column; gap: 6px; }
.quote-reject { text-align: center; margin-top: 14px; }
.quote-reject summary { cursor: pointer; color: var(--label-2); }
.quote-state { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 18px; padding: 18px 20px; box-shadow: 0 10px 28px rgba(15, 23, 42, .08); }
.quote-state .icon { width: 26px; height: 26px; flex: none; color: var(--label-2); }
.quote-state.is-ok .icon { color: var(--green); }
.quote-state.is-warn .icon { color: var(--orange); }
.late-interest .calc-big { font-family: var(--font-display); font-size: 24px; font-weight: 800; }

/* ─── Daně a odvody ─── */
.tax-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: end; padding: 26px 28px; margin-bottom: 20px; background: linear-gradient(128deg, #182334 0%, #25354a 66%, #2c3f57 100%); color: #fff; border: 0 !important; }
.tax-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #bfccd3; }
.tax-big { font-family: var(--font-round, var(--font-display)); font-size: clamp(34px, 4vw, 48px); font-weight: 800; letter-spacing: -.03em; margin: 6px 0 4px; }
.tax-sub { color: #cfd8de; font-size: 14px; }
.tax-sub strong { color: #fff; }
.tax-progress { display: flex; flex-direction: column; gap: 8px; color: #dfe6ea; }
.tax-progress .muted { color: #aebcc4 !important; }
.tax-progress .progress { background: rgba(255, 255, 255, .14); }
.tax-progress .progress i { background: linear-gradient(90deg, #e6c896, #d8b47e); }
.table tr.is-current td { background: var(--brand-softer); }
.tax-mini { display: block; color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.tax-mini:hover { text-decoration: none; transform: translateY(-2px); }
.tax-mini-value { font-family: var(--font-round, var(--font-display)); font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
@media (max-width: 760px) { .tax-hero { grid-template-columns: 1fr; padding: 22px; } }

/* ─── Pracovní stůl klient ↔ účetní ─── */
.req-card { padding: 18px 20px; }
.req-head { display: flex; gap: 14px; align-items: flex-start; }
.req-head .row-icon { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.req-kind { font-size: 12px; color: var(--label-2); font-weight: 600; }
.req-title { font-size: 17px; margin: 2px 0 4px; }
.req-body { margin: 0 0 4px; color: var(--label-2); font-size: 14px; }
.req-answer { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--sep); }
.req-drop { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; border: 2px dashed rgba(37, 99, 235, .3); border-radius: 14px; background: var(--brand-softer); color: var(--brand-ink); font-weight: 650; cursor: pointer; transition: background-color .2s, border-color .2s; }
.req-drop:hover { background: var(--brand-soft); }
.req-drop.has-file { border-style: solid; border-color: var(--green); background: var(--green-soft); color: var(--green-ink); }
.req-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.req-choice { display: flex; gap: 10px; }
.req-choice label { flex: 1; }
.req-choice input { position: absolute; opacity: 0; }
.req-choice span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; border-radius: 12px; border: 1px solid var(--sep-strong); font-weight: 650; cursor: pointer; }
.req-choice input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.req-choice input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.req-clear { display: flex; gap: 12px; align-items: center; padding: 18px 20px; }
.req-clear > .icon { width: 28px; height: 28px; color: var(--green); flex: none; }
.req-kinds label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.req-row { gap: 10px; }
.req-history > summary { cursor: pointer; list-style: none; }
.month-checks .list-row { min-height: 44px; font-size: 14px; }
.month-checks .list-row .icon { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }
.month-checks .is-ok .icon { color: var(--green); }
.month-checks .is-bad { color: var(--orange-ink); }
.dash-requests .list-row { min-height: 50px; }

/* Identifikovaná osoba k DPH */
.inline-form { display: inline; margin: 0; }
.app-ui .idp-card.is-alert { border: 1px solid rgba(217, 58, 43, .38); background: linear-gradient(135deg, #fff1ef 0%, #ffe6e1 45%, #fff 100%); overflow: hidden; box-shadow: 0 14px 34px rgba(196, 48, 43, .10); }
.idp-head { display: flex; gap: 14px; padding: 18px 20px 4px; }
.idp-icon { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: #d93a2b; color: #fff; animation: idp-pulse 2s ease-out infinite; }
.idp-icon .icon { width: 22px; height: 22px; }
.app-ui .idp-card.is-alert .card-title { color: #a3241a; font-size: 17px; }
.idp-kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #d93a2b; margin-bottom: 2px; }
.idp-body { padding: 0 20px; }
.idp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px 18px; }
.idp-foot .icon { width: 16px; height: 16px; vertical-align: -3px; color: var(--green); }
.idp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 600px) { .idp-head { padding: 16px 16px 4px; } .idp-body { padding: 0 16px; } .idp-foot { padding: 12px 16px 16px; } }


/* Hromadné nahrání dokladů a postupná kontrola */
.bulk-drop { padding: 38px 22px; }
.bulk-summary { margin-top: 18px; }
.bulk-summary .progress, .review-progress { width: 100%; margin-top: 8px; }
.bulk-list { margin-top: 14px; max-height: 60vh; overflow-y: auto; }
.bulk-row .subtitle { white-space: normal; }
.bulk-row .subtitle .badge { margin-left: 4px; font-size: 11px; }
.bulk-row a.title { color: inherit; }
.bulk-row a.title:hover { color: var(--brand); }
.bulk-icon { font-weight: 700; font-size: 15px; }
.bulk-row.is-waiting { opacity: .55; }
.bulk-row.is-waiting .bulk-spin { display: none; }
.bulk-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: bulk-spin .8s linear infinite; }
@keyframes bulk-spin { to { transform: rotate(360deg); } }
.bulk-row.is-busy .bulk-icon { color: var(--brand); }
.bulk-done { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.bulk-steps { padding-left: 18px; margin: 10px 0; display: grid; gap: 8px; }
.review-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 14px 18px; margin-bottom: 16px; }
.review-bar-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; }
.review-bar .review-progress { flex: 1 1 200px; margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .bulk-spin { animation: none; } }

/* Import dat z jiné služby */
.import-sources { display: flex; flex-wrap: wrap; gap: 8px; }
.import-source input { position: absolute; opacity: 0; pointer-events: none; }
.import-source span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--sep-strong); font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s; }
.import-source input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.import-source input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.import-help { background: var(--fill); border-radius: 14px; padding: 12px 16px; }
.import-help ul, .import-list { padding-left: 18px; margin: 0; display: grid; gap: 6px; }

.bank-help summary { cursor: pointer; color: var(--brand-ink); }
.leave-reasons { display: flex; flex-wrap: wrap; gap: 8px; }

/* Doporučení (NPS) */
.nps-scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.nps-num input { position: absolute; opacity: 0; pointer-events: none; }
.nps-num span { display: grid; place-items: center; height: 38px; border-radius: 10px; border: 1px solid var(--sep-strong); font-weight: 600; font-size: 14px; cursor: pointer; transition: all .15s; }
.nps-num span:hover { border-color: var(--brand); }
.nps-num input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.nps-num input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.nps-legend { display: flex; justify-content: space-between; margin-top: 4px; }
@media (max-width: 520px) { .nps-scale { gap: 3px; } .nps-num span { height: 34px; font-size: 13px; border-radius: 8px; } }
.review-item { padding: 12px 0; border-top: 1px solid var(--sep); }
.review-item:first-of-type { border-top: 0; }

/* Recenze na úvodní stránce */
.lp-reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 28px; }
.lp-review { margin: 0; background: #fff; border: 1px solid var(--sep); border-radius: 20px; padding: 22px 24px; box-shadow: 0 10px 30px rgba(15, 23, 42, .05); }
.lp-review blockquote { margin: 10px 0 12px; font-size: 16px; line-height: 1.55; color: var(--label); }
.lp-review figcaption { font-size: 14px; color: var(--label-2); font-weight: 600; }
.lp-stars { color: #f5b301; letter-spacing: 2px; font-size: 15px; }

/* ── Pomoc: plovoucí tlačítko, panel s chatem, upozornění pro správce ── */
.help-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 70; display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px 12px 14px; border: 0; border-radius: 999px; background: var(--brand-grad, #007aff); color: #fff;
  font-weight: 600; font-size: 15px; line-height: 1; font-family: inherit; cursor: pointer; box-shadow: 0 12px 30px rgba(0, 60, 180, .28);
  transition: transform .2s cubic-bezier(.2,.9,.3,1.2), opacity .2s, box-shadow .2s;
}
.help-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0, 60, 180, .34); }
.help-fab .icon { width: 20px; height: 20px; }
.help-fab.is-hidden { opacity: 0; transform: scale(.8); pointer-events: none; }
.help-dot { position: absolute; top: 6px; right: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--red, #ff3b30); border: 2px solid #fff; transform: scale(0); transition: transform .25s; }
.help-fab.has-unread .help-dot { transform: scale(1); animation: help-pulse 1.6s ease-out infinite; }
.help-fab.has-unread { animation: help-nudge 2.8s ease-in-out infinite; }
@keyframes help-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, .55); } 100% { box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); } }
@keyframes help-nudge { 0%, 88%, 100% { transform: none; } 92% { transform: translateY(-4px) rotate(-3deg); } 96% { transform: translateY(0) rotate(2deg); } }

.help-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 80; width: min(390px, calc(100vw - 32px)); height: min(600px, calc(100vh - 44px));
  display: flex; flex-direction: column; background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .28), 0 0 0 1px rgba(15, 23, 42, .06);
  opacity: 0; transform: translateY(16px) scale(.97); transform-origin: bottom right; transition: opacity .2s ease, transform .25s cubic-bezier(.2,.9,.3,1.1);
}
.help-panel.is-open { opacity: 1; transform: none; }
.help-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; background: var(--brand-grad, #007aff); color: #fff; }
.help-head .btn { color: #fff; }
.help-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .22); flex: none; }
.help-avatar .icon { width: 22px; height: 22px; }
.help-title { font-weight: 700; font-size: 16px; }
.help-sub { font-size: 12.5px; opacity: .88; line-height: 1.35; }
.help-body { flex: 1; overflow-y: auto; padding: 16px; background: var(--fill, #f2f2f7); display: flex; flex-direction: column; gap: 10px; }
.help-empty p { background: #fff; border-radius: 16px 16px 16px 4px; padding: 12px 14px; margin: 0 0 10px; font-size: 14px; line-height: 1.5; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.help-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.help-topic { border: 1px solid var(--brand); color: var(--brand-ink); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 500; font-size: 13px; font-family: inherit; cursor: pointer; }
.help-topic:hover { background: var(--brand-soft); }
.help-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--sep); background: #fff; }
.help-form textarea, .chat-form textarea { resize: none; min-height: 44px; max-height: 140px; }
.help-foot { font-size: 12px; color: var(--label-2); padding: 0 14px 12px; background: #fff; }

.chat-msg { display: flex; flex-direction: column; max-width: 84%; }
.chat-msg.is-me { align-self: flex-end; align-items: flex-end; }
.chat-msg.is-them { align-self: flex-start; }
.chat-bubble { padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.chat-msg.is-me .chat-bubble { background: var(--brand, #007aff); color: #fff; border-bottom-right-radius: 5px; }
.chat-msg.is-them .chat-bubble { background: #fff; color: var(--label); border-bottom-left-radius: 5px; box-shadow: 0 1px 2px rgba(15, 23, 42, .07); }
.chat-time { font-size: 11px; color: var(--label-2); margin: 3px 6px 0; }
.chat-msg.is-new { animation: chat-in .3s cubic-bezier(.2,.9,.3,1.2); }
@keyframes chat-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }

/* Administrace: konverzace */
.chat { display: flex; flex-direction: column; height: min(640px, calc(100vh - 220px)); overflow: hidden; }
.chat-list { flex: 1; overflow-y: auto; padding: 18px; background: var(--fill, #f2f2f7); display: flex; flex-direction: column; gap: 10px; }
.chat-seen { padding: 6px 16px; background: var(--fill, #f2f2f7); }
.chat-form { display: flex; gap: 10px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--sep); }
.support-row.is-unread .title { font-weight: 700; }
.support-row .avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 13px; flex: none; }
.nav-badge.is-live { background: var(--blue, #007aff); animation: help-pulse-blue 1.8s ease-out infinite; }
@keyframes help-pulse-blue { 0% { box-shadow: 0 0 0 0 rgba(0, 122, 255, .5); } 100% { box-shadow: 0 0 0 8px rgba(0, 122, 255, 0); } }

.support-toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 210; display: flex; gap: 12px; align-items: flex-start; width: min(360px, calc(100vw - 32px));
  padding: 14px 16px; border-radius: 18px; background: #fff; color: var(--label); text-decoration: none;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25), 0 0 0 1px rgba(15, 23, 42, .06);
  opacity: 0; transform: translateX(40px) scale(.96); transition: opacity .3s, transform .45s cubic-bezier(.2,.9,.3,1.25);
}
.support-toast.is-in { opacity: 1; transform: none; }
.support-toast:hover { text-decoration: none; box-shadow: 0 28px 70px rgba(15, 23, 42, .3), 0 0 0 1px var(--brand); }
.support-toast-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-grad, #007aff); color: #fff; font-weight: 700; flex: none; animation: help-pulse-blue 1.8s ease-out infinite; }
.support-toast-text { display: flex; flex-direction: column; gap: 3px; font-size: 14px; line-height: 1.4; min-width: 0; }
.support-toast-text span { color: var(--label-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.support-toast-text em { font-style: normal; color: var(--brand-ink); font-weight: 600; font-size: 13px; }

/* Pomoc v horní liště — jen na telefonu, kde by plovoucí tlačítko zakrývalo částky a data dokladů */
.topbar-help { display: none; position: relative; }
.topbar-help .help-dot { position: absolute; top: 6px; right: 6px; }
.topbar-help.has-unread .help-dot { transform: scale(1); animation: help-pulse 1.6s ease-out infinite; }
.topbar-help.is-hidden { opacity: .5; }
@media (max-width: 860px) {
  .help-fab { display: none; }
  .topbar-help { display: inline-flex; }
  .help-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; transform-origin: bottom center; }
  .help-head { padding-top: calc(14px + env(safe-area-inset-top)); }
  .help-form { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .support-toast { right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); }
  .chat { height: calc(100vh - 260px); }
}
@media (prefers-reduced-motion: reduce) {
  .help-fab, .help-fab.has-unread, .help-fab.has-unread .help-dot, .nav-badge.is-live, .support-toast-avatar, .chat-msg.is-new { animation: none; }
}
@media print { .help-fab, .help-panel, .support-toast { display: none !important; } }

/* Přihlášení přes Face ID / Touch ID */
.passkey-alt { display: flex; flex-direction: column; gap: 10px; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--label-2); font-size: 13px; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--sep); }
.passkey-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.otp-input { font-size: 22px; letter-spacing: 6px; text-align: center; }
.passkey-list .list-row .icon { color: var(--brand-ink); }
.twofa-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.twofa-option { border: 1px solid var(--sep); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.twofa-option .strong { display: flex; align-items: center; gap: 6px; }
.twofa-option .icon { width: 18px; height: 18px; color: var(--brand-ink); }
.twofa-option p { margin: 0 0 4px; }
a.help-fab, a.help-fab:hover { text-decoration: none; color: #fff; }

/* Kontrola protistrany */
.cp-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; padding: 22px 24px; margin-bottom: 20px; border-left: 6px solid var(--green); }
.cp-hero.cp-orange { border-left-color: var(--orange); }
.cp-hero.cp-red { border-left-color: var(--red); }
.cp-verdict { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--green); }
.cp-orange .cp-verdict { color: var(--orange-ink, #b25000); }
.cp-red .cp-verdict { color: var(--red); }
.cp-light { width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 20%, transparent); }
.cp-name { font-size: 26px; margin: 6px 0 4px; line-height: 1.2; }
.cp-meta { font-size: 14px; color: var(--label-2); }
.cp-hero-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.cp-findings { grid-column: 1 / -1; list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.cp-findings li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.cp-findings .icon { flex: none; margin-top: 2px; }
.cp-findings .is-red { color: var(--red); font-weight: 600; }
.cp-findings .is-orange { color: var(--orange-ink, #b25000); }
.cp-findings .is-green .icon { color: var(--green); }
.cp-facts .value { text-align: right; }
.cp-case { padding: 8px 0; border-top: 1px solid var(--sep); }
.cp-case:first-child { border-top: 0; }
@media (max-width: 700px) { .cp-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; } .cp-hero-actions { justify-content: flex-start; } .cp-name { font-size: 22px; } }
.tester-bar { background: linear-gradient(90deg, #fff4d6, #ffe9b8); color: #7a4b00; }
.tester-bar .btn-link { color: #7a4b00; margin-left: 6px; }
.help-form textarea { min-height: 44px; }
.dropdown-menu form { margin: 0; }
.dropdown-menu button.dropdown-item { width: 100%; background: none; border: 0; text-align: left; font: inherit; cursor: pointer; }
.tester-fresh { border: 2px solid var(--brand); }

/* ── Prohlídka s kočičkou Bublíkem ── */
.tour { position: fixed; inset: 0; z-index: 400; opacity: 0; transition: opacity .3s ease; }
.tour.is-in { opacity: 1; }
.tour.is-leaving { opacity: 0; }
.tour-dim { position: fixed; inset: 0; background: rgba(12, 16, 28, .5); opacity: 0; transition: opacity .35s ease; }
.tour-dim.is-on { opacity: 1; }
.tour-spot {
  position: fixed; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(12, 16, 28, .5), 0 0 0 3px rgba(255, 255, 255, .9), 0 0 24px 6px rgba(255, 255, 255, .35);
  transition: left .45s cubic-bezier(.2,.8,.3,1), top .45s cubic-bezier(.2,.8,.3,1), width .45s cubic-bezier(.2,.8,.3,1), height .45s cubic-bezier(.2,.8,.3,1);
}
.tour-card {
  position: fixed; width: min(340px, calc(100vw - 32px)); padding: 26px 18px 14px; border-radius: 20px; background: #fff; color: var(--label);
  box-shadow: 0 24px 70px rgba(10, 14, 30, .35); transform: scale(.96); transition: left .45s cubic-bezier(.2,.8,.3,1), top .45s cubic-bezier(.2,.8,.3,1), transform .3s ease;
}
.tour.is-in .tour-card { transform: none; }
.tour-cat { position: absolute; top: -70px; left: 14px; width: 88px; height: 82px; overflow: visible; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .18)); }
.tour-cat .tour-tail { transform-box: fill-box; transform-origin: 0% 100%; animation: tour-tail 2.6s ease-in-out infinite; }
.tour-cat .tour-eyes { transform-box: fill-box; transform-origin: center; animation: tour-blink 5s infinite; }
.tour-cat.is-hop { animation: tour-hop .5s cubic-bezier(.3,1.6,.5,1); }
/* Bublík v pohybu: sedící kočička zepředu ↔ z profilu při chůzi a skoku */
.tour-cat { transition-property: left; transition-timing-function: linear; }
.tour-cat.is-left { scale: -1 1; }
.tour-cat .cat-sit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: opacity .12s; }
.tour-cat .cat-walk { position: absolute; left: -12px; bottom: -4px; width: 112px; height: 72px; overflow: visible; opacity: 0; transition: opacity .12s; }
.tour-cat.is-walking .cat-sit, .tour-cat.is-leaping .cat-sit { opacity: 0; }
.tour-cat.is-walking .cat-walk, .tour-cat.is-leaping .cat-walk { opacity: 1; }
.cat-walk .leg { transform-box: fill-box; transform-origin: 50% 0%; transition: transform .14s ease; }
.cat-walk .side-tail { transform-box: fill-box; transform-origin: 100% 100%; animation: side-tail 1.2s ease-in-out infinite; }
.cat-walk .side-head { transform-box: fill-box; transform-origin: 0% 100%; }
/* Chůze: úhlopříčné nohy spolu (přední blízká + zadní vzdálená), tělo i hlava se pohupují */
.tour-cat.is-walking .cat-walk { animation: walk-bob .26s ease-in-out infinite alternate; }
.tour-cat.is-walking .leg-fn, .tour-cat.is-walking .leg-bf { animation: leg-swing .52s linear infinite; }
.tour-cat.is-walking .leg-ff, .tour-cat.is-walking .leg-bn { animation: leg-swing .52s linear -.26s infinite; }
.tour-cat.is-walking .side-head { animation: head-nod .52s ease-in-out infinite; }
@keyframes walk-bob { from { translate: 0 0; } to { translate: 0 -2.5px; } }
@keyframes leg-swing { 0%, 100% { transform: rotate(26deg); } 50% { transform: rotate(-26deg); } }
@keyframes head-nod { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-3deg); } }
@keyframes side-tail { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(10deg); } }
/* Skok: přikrčení → oblouk s nataženýma nohama → dopad */
.tour-cat.is-leaping .cat-walk { animation: leap-arc .78s cubic-bezier(.33, 0, .3, 1) forwards; }
.tour-cat.is-leaping .leg-fn, .tour-cat.is-leaping .leg-ff { animation: leap-front .78s ease forwards; }
.tour-cat.is-leaping .leg-bn, .tour-cat.is-leaping .leg-bf { animation: leap-back .78s ease forwards; }
@keyframes leap-arc {
  0% { translate: 0 0; rotate: 0deg; scale: 1 1; }
  16% { translate: 0 5px; rotate: 4deg; scale: 1.04 .9; }
  52% { translate: 0 -46px; rotate: -12deg; scale: 1 1.02; }
  86% { translate: 0 0; rotate: 8deg; scale: 1 1; }
  100% { translate: 0 2px; rotate: 0deg; scale: 1.05 .93; }
}
@keyframes leap-front { 0%, 16% { transform: rotate(20deg); } 45%, 70% { transform: rotate(-62deg); } 90%, 100% { transform: rotate(-8deg); } }
@keyframes leap-back { 0%, 16% { transform: rotate(-20deg); } 45%, 70% { transform: rotate(56deg); } 90%, 100% { transform: rotate(10deg); } }
@keyframes tour-tail { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-12deg); } }
@keyframes tour-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes tour-hop { 0% { transform: translateY(0); } 40% { transform: translateY(-14px) rotate(-3deg); } 100% { transform: translateY(0); } }
.tour-title { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.tour-text { font-size: 14.5px; line-height: 1.5; color: var(--label-2); }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.tour-dots { display: flex; gap: 5px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--sep-strong, #d1d1d6); transition: all .25s; }
.tour-dots i.on { width: 16px; border-radius: 4px; background: var(--brand, #007aff); }
.tour-buttons { display: flex; gap: 6px; margin-left: auto; }
.tour.is-calm, .tour.is-calm * { transition: none !important; animation: none !important; }
@media print { .tour { display: none !important; } }
.tester-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tester-actions form { margin: 0; }
.tester-actions .btn span { margin-left: 4px; }

/* Úvod: modul „Napojeno na“ hned pod ním, bez velké mezery */
.lp-hero { padding-bottom: 36px; }


/* Indigo — přepisy obecných pravidel vzhledů (musí být až za nimi) */
.app-ui[data-theme="indigo"] .card, .app-ui[data-theme="indigo"] .list, .app-ui[data-theme="indigo"] .kpis > .kpi, .app-ui[data-theme="indigo"] dialog.sheet { background: #fff; }
.app-ui[data-theme="indigo"] .kpis > .kpi:nth-child(4n+1) { background: linear-gradient(128deg, #1b1840 0%, #2e2870 62%, #4a37b8 100%); box-shadow: 0 20px 38px rgba(43, 34, 120, .18); }
.app-ui[data-theme="indigo"] .kpis > .kpi:nth-child(4n+1) .kpi-label, .app-ui[data-theme="indigo"] .kpis > .kpi:nth-child(4n+1) .kpi-foot { color: #c3bdf2; }
.app-ui[data-theme="indigo"] .kpis > .kpi:nth-child(4n+1) .trend { background: rgba(255, 255, 255, .14); color: #d7ceff; }
.app-ui[data-theme="indigo"] .kpis > .kpi:nth-child(4n+2) { border-top: 3px solid #7c5cff; }
.app-ui[data-theme="indigo"] .kpis > .kpi:nth-child(4n+3) { border-top: 3px solid #2ec4b6; }
.app-ui[data-theme="indigo"] .kpis > .kpi:nth-child(4n+4) { border-top: 3px solid #ff8a65; }
.app-ui[data-theme="indigo"] .kpis > .kpi:hover, .app-ui[data-theme="indigo"] .tile:hover { border-color: #c4b8ff; }
.app-ui[data-theme="indigo"] .spark * { stroke: #6d4dff; }
.app-ui[data-theme="indigo"] .kpis > .kpi:nth-child(4n+1) .spark * { stroke: #b3a6ff; }

/* ── Vítejte — první obrazovka po registraci ── */
.icon-xs { width: 13px; height: 13px; }
.welcome { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; padding-bottom: 20px; }
.welcome-steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0; }
.welcome-steps li { display: flex; align-items: center; gap: 8px; color: var(--label-2); font-size: 13.5px; font-weight: 600; }
.welcome-steps li + li::before { content: ''; width: 42px; height: 2px; margin: 0 12px; border-radius: 2px; background: var(--sep-strong, #d1d1d6); }
.welcome-steps li:nth-child(2)::before { background: linear-gradient(90deg, var(--brand) 40%, var(--sep-strong, #d1d1d6) 40%); }
.ws-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; background: var(--fill, #eef0f4); color: var(--label-2); }
.welcome-steps .is-current { color: var(--label); }
.welcome-steps .is-current .ws-dot { background: var(--brand-grad); color: var(--th-on-accent, #fff); box-shadow: 0 0 0 5px var(--brand-soft); animation: ws-pulse 2.4s ease-in-out infinite; }
@keyframes ws-pulse { 50% { box-shadow: 0 0 0 9px var(--brand-softer, rgba(0,0,0,.03)); } }

.welcome-hero { position: relative; padding: 4px 0 2px; animation: w-rise .6s cubic-bezier(.2,.8,.3,1) both; }
.welcome-title { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.02em; margin: 0; font-weight: 800; color: var(--label); }
.welcome-title .wave { display: inline-block; transform-origin: 70% 70%; animation: w-wave 2.4s ease-in-out 1s 2; }
@keyframes w-wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } }
.welcome-lead { font-size: 17px; color: var(--label-2); margin: 10px 0 0; max-width: 640px; line-height: 1.5; }
.welcome-who { display: inline-flex; align-items: center; gap: 7px; margin: 12px 0 0; padding: 6px 12px 6px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 13.5px; font-weight: 600; }

.welcome-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.app-ui .welcome-card { border-radius: 22px; padding: 22px 24px; }
.welcome-card-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; margin-bottom: 14px; color: var(--label); }
.wc-num { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 12.5px; background: var(--brand-soft); color: var(--brand-ink); }
.welcome-ico-input { font-size: 18px; letter-spacing: .08em; }
.welcome-form .wf, .welcome-ico { animation: w-rise .55s cubic-bezier(.2,.8,.3,1) both; }
.welcome-ico { animation-delay: .05s; }
.welcome-form .wf:nth-of-type(1) { animation-delay: .12s; } .welcome-form .wf:nth-of-type(2) { animation-delay: .18s; }
.welcome-form .wf:nth-of-type(3) { animation-delay: .24s; } .welcome-form .wf:nth-of-type(4) { animation-delay: .30s; }
.welcome-form .wf:nth-of-type(5) { animation-delay: .36s; } .welcome-form .wf:nth-of-type(6) { animation-delay: .42s; }
@keyframes w-rise { from { opacity: 0; transform: translateY(12px); } }
.welcome-switch { justify-content: flex-end; }
.welcome-found {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; border-radius: 14px; padding: 12px 16px; font-size: 14.5px;
  background: linear-gradient(120deg, var(--green-soft), rgba(255, 255, 255, .6)); color: #17612b; border: 1px solid rgba(52, 168, 83, .22);
}
.welcome-found .icon { width: 20px; height: 20px; flex: none; }
.welcome-found::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%); transform: translateX(-100%); animation: w-shine 1.8s .6s ease forwards; }
@keyframes w-shine { to { transform: translateX(100%); } }
.src-badge { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #1d6f31; background: var(--green-soft); padding: 2px 7px 2px 5px; border-radius: 999px; vertical-align: 1px; animation: w-pop .4s cubic-bezier(.3,1.6,.5,1) .5s both; }
@keyframes w-pop { from { transform: scale(.6); opacity: 0; } }
.welcome-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--sep); }
.welcome-go { gap: 8px; padding-left: 26px; padding-right: 22px; }
.welcome-go .icon { transition: transform .2s; }
.welcome-go:hover .icon { transform: translateX(3px); }

.welcome-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.welcome-preview { animation: w-rise .7s .15s cubic-bezier(.2,.8,.3,1) both; }
.wp-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--label-2); margin: 0 0 10px 4px; }
.wp-paper {
  background: #fff; border-radius: 18px; padding: 20px 20px 18px; border: 1px solid var(--card-border, #e8e4dc);
  box-shadow: 0 30px 60px rgba(20, 24, 40, .12), 0 2px 6px rgba(20, 24, 40, .05); transform: rotate(-1.2deg);
  animation: wp-float 6s ease-in-out infinite; font-size: 12.5px; color: #222;
}
@keyframes wp-float { 0%, 100% { transform: rotate(-1.2deg) translateY(0); } 50% { transform: rotate(-.6deg) translateY(-6px); } }
.wp-head { display: flex; justify-content: space-between; align-items: flex-start; }
.wp-kicker { font-size: 10px; font-weight: 800; letter-spacing: .14em; color: #8a8f99; }
.wp-no { font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: #111; }
.wp-vat { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); }
.wp-bar { height: 3px; border-radius: 3px; background: var(--brand-grad); margin: 12px 0 14px; }
.wp-party { display: flex; flex-direction: column; gap: 2px; line-height: 1.4; }
.wp-party b { font-size: 14px; color: #111; }
.wp-cap { font-size: 9.5px; font-weight: 800; letter-spacing: .12em; color: #9aa0aa; margin-bottom: 2px; }
.wp-ids { color: #555; margin-top: 3px; }
.wp-reg { font-size: 10.5px; color: #8a8f99; }
.wp-reg:empty { display: none; }
.wp-lines { display: grid; gap: 7px; margin: 16px 0; }
.wp-lines i { height: 7px; border-radius: 4px; background: #eef0f4; }
.wp-lines i.short { width: 55%; }
.wp-foot { display: flex; gap: 14px; align-items: center; padding-top: 14px; border-top: 1px dashed #e3e5ea; }
.wp-qr { width: 74px; height: 74px; flex: none; border-radius: 8px; overflow: hidden; background: #fff; }
.wp-qr svg { width: 100%; height: 100%; display: block; }
.wp-qr-empty { width: 100%; height: 100%; display: grid; place-items: center; background: repeating-linear-gradient(45deg, #f2f3f6 0 6px, #e8eaef 6px 12px); color: #9aa0aa; font-weight: 800; }
.wp-pay { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wp-pay b { font-size: 13px; color: #111; }
.wp-pay span:last-child { color: #777; overflow: hidden; text-overflow: ellipsis; }
[data-pv-out].is-bump { animation: pv-bump .5s ease; }
@keyframes pv-bump { 0% { background: var(--brand-soft); border-radius: 4px; } 100% { background: transparent; } }
.welcome-loaded ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.welcome-loaded li { display: flex; align-items: center; gap: 10px; font-size: 14px; animation: w-rise .45s cubic-bezier(.2,.8,.3,1) both; animation-delay: calc(.5s + var(--i, 0) * .12s); }
.wl-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.is-ok .wl-mark { background: var(--green); color: #fff; animation: w-pop .4s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(.6s + var(--i, 0) * .12s); }
.is-miss .wl-mark { background: var(--fill, #eef0f4); color: var(--label-2); }
.welcome-note { margin: 0 4px; }
@media (max-width: 1000px) {
  .welcome-grid { grid-template-columns: minmax(0, 1fr); }
  .welcome-side { position: static; order: -1; }
  .wp-paper { transform: none; animation: none; }
  .welcome-loaded { display: none; }
}
@media (max-width: 600px) {
  .welcome-steps .ws-label { display: none; }
  .welcome-steps li.is-current .ws-label { display: inline; }
  .welcome-actions { flex-direction: column-reverse; align-items: stretch; }
  .welcome-actions .btn { justify-content: center; }
  .app-ui .welcome-card { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .welcome *, .welcome *::before, .welcome *::after { animation: none !important; }
}
.reg-code summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; }
/* Zaškrtávátko s delším textem a odkazy: text je jeden blok vedle políčka */
.check > span { flex: 1; min-width: 0; line-height: 1.45; }
.check:has(> span) { display: flex; align-items: flex-start; }
.check:has(> span) input { margin-top: 1px; flex: none; }
.cell-check { width: 34px; }
.cell-check input { width: 17px; height: 17px; accent-color: var(--brand); }
.bulk-delete-bar { position: sticky; top: 10px; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 14px; border-radius: 14px; background: #fff4f3; border: 1px solid rgba(255, 59, 48, .25); box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }
.bulk-delete-bar .input-sm { height: 32px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
.danger-card { border-color: rgba(255, 59, 48, .25) !important; }
.danger-card .card-title { display: flex; align-items: center; gap: 8px; }

/* Identifikovaná osoba — výrazné upozornění ve vytěžení nákladu */
.extract-idp { display: flex; gap: 12px; margin: 10px 0 4px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, #fff1ef, #ffe4df); border: 1px solid rgba(255, 59, 48, .35); box-shadow: 0 8px 22px rgba(196, 48, 43, .10); animation: idp-in .4s cubic-bezier(.3,1.4,.5,1); }
.extract-idp-icon { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #d93a2b; color: #fff; animation: idp-pulse 2s ease-out infinite; }
.extract-idp-icon .icon { width: 20px; height: 20px; }
.extract-idp-title { font-weight: 800; color: #a3241a; font-size: 15px; }
.extract-idp p { margin: 4px 0 10px; font-size: 13.5px; line-height: 1.5; color: #5c2520; }
.extract-idp .btn { margin-right: 8px; }
@keyframes idp-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes idp-pulse { 0% { box-shadow: 0 0 0 0 rgba(217, 58, 43, .45); } 100% { box-shadow: 0 0 0 10px rgba(217, 58, 43, 0); } }
@media (prefers-reduced-motion: reduce) { .extract-idp, .extract-idp-icon { animation: none; } }

/* ── Cena s DPH / bez DPH (ceník, příjemka) ── */
.th-note { display: block; font-size: 11px; font-weight: 500; color: var(--label-3, var(--label-2)); text-transform: none; letter-spacing: 0; }
.price-basis { display: flex; flex-direction: column; gap: 10px; }
.price-basis-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.price-basis-title { font-size: 13px; font-weight: 600; color: var(--label); }
.segmented-sm label, .app-ui .segmented-sm label { padding: 5px 14px; font-size: 13px; }
.price-basis-out { margin: -2px 0 0; font-size: 13px; color: var(--brand-ink, var(--blue)); font-weight: 600; min-height: 1.3em; font-variant-numeric: tabular-nums; }
.price-basis-out:empty { display: none; }

/* ── Import zásob ── */
.imp-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 18px; flex-wrap: wrap; }
.imp-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--fill, rgba(15, 23, 42, .05)); color: var(--label-2); font-size: 13px; font-weight: 600; }
.imp-steps .imp-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-size: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.imp-steps li.is-current { background: var(--brand-soft, var(--blue-soft)); color: var(--brand-ink, var(--blue)); }
.imp-steps li.is-current .imp-dot { background: var(--brand-grad, var(--blue)); color: #fff; }
.imp-steps li.is-done .imp-dot { background: var(--green, #34c759); color: #fff; }
.imp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.imp-grid > .card { margin: 0; }
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; border-radius: 20px; }
.imp-drop-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--brand-soft, var(--blue-soft)); color: var(--brand-ink, var(--blue)); margin-bottom: 4px; transition: transform .2s; }
.imp-drop:hover .imp-drop-icon, .imp-drop.over .imp-drop-icon { transform: translateY(-3px); }
.imp-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.imp-fieldset legend { font-size: 13px; font-weight: 500; color: var(--label-2); margin-bottom: 8px; padding: 0; }
.imp-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.imp-choice { position: relative; display: block; cursor: pointer; }
.imp-choice input { position: absolute; opacity: 0; pointer-events: none; }
.imp-choice-body { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border: 1.5px solid var(--card-border, var(--sep)); border-radius: 16px; background: #fff; transition: border-color .15s, box-shadow .15s, background .15s; }
.imp-choice-title { display: flex; align-items: center; gap: 6px; font-weight: 650; color: var(--label); }
.imp-choice input:checked + .imp-choice-body { border-color: var(--brand, var(--blue)); background: var(--brand-soft, var(--blue-soft)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #007aff) 14%, transparent); }
.imp-choice input:focus-visible + .imp-choice-body { outline: 2px solid var(--brand, var(--blue)); outline-offset: 2px; }
.imp-guide { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.imp-guide-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.imp-sheet { overflow-x: auto; border: 1px solid #d7dbe0; border-radius: 10px; background: #fff; font-size: 12px; font-family: -apple-system, "Segoe UI", Calibri, sans-serif; }
.imp-sheet table { border-collapse: collapse; min-width: 640px; width: 100%; }
.imp-sheet th, .imp-sheet td { border: 1px solid #e3e6ea; padding: 5px 8px; white-space: nowrap; text-align: left; }
.imp-sheet thead th, .imp-sheet tbody th { background: #f3f4f6; color: #6b7280; font-weight: 500; text-align: center; width: 28px; }
.imp-sheet .imp-sheet-head td { background: #eaf6ee; font-weight: 700; color: #14532d; }
.imp-sheet td.r { text-align: right; font-variant-numeric: tabular-nums; }
.imp-cols { width: 100%; border-collapse: collapse; font-size: 13px; }
.imp-cols th { text-align: left; font-size: 12px; font-weight: 600; color: var(--label-2); padding: 6px 8px; border-bottom: 1px solid var(--sep); }
.imp-cols td { padding: 9px 8px; border-bottom: 1px solid var(--sep); vertical-align: top; line-height: 1.45; }
.imp-cols tr:last-child td { border-bottom: 0; }
.imp-tips { list-style: none; margin: 0; padding: 14px; border-radius: 14px; background: var(--fill, rgba(15, 23, 42, .04)); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.imp-tips li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.imp-tips .icon { flex: none; margin-top: 1px; color: var(--green-ink, #1a7f37); }
.imp-summary { padding: 18px 20px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 14px; }
.imp-summary-top { display: flex; align-items: center; gap: 12px; }
.imp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.imp-stat { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--fill, rgba(15, 23, 42, .04)); font-size: 13px; color: var(--label-2); }
.imp-stat-num { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--label); font-variant-numeric: tabular-nums; }
.imp-stat.is-new { background: #eaf8ee; } .imp-stat.is-new .imp-stat-num { color: #1a7f37; }
.imp-stat.is-update { background: #eef4ff; } .imp-stat.is-update .imp-stat-num { color: #1d4ed8; }
.imp-stat.is-error { background: #fdecea; } .imp-stat.is-error .imp-stat-num { color: #c4302b; }
.imp-mapped { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.imp-map { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--fill, rgba(15, 23, 42, .05)); font-size: 12px; }
.imp-map .icon { opacity: .5; }
.imp-row.is-error td { background: #fff6f5; }
.imp-msg { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 12px; color: var(--label-2); }
.imp-msg.is-error { color: #c4302b; font-weight: 600; }
.imp-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 8px; flex-wrap: wrap; }
@media (max-width: 1000px) { .imp-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .imp-choices, .imp-stats { grid-template-columns: minmax(0, 1fr); }
  .imp-guide-head { flex-direction: column; }
  .imp-actions > form, .imp-actions .btn { width: 100%; }
}

/* ── EET 2.0 ── */
.eet-strip { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border-radius: 16px; border: 1px solid var(--card-border, var(--sep)); background: #fff; color: var(--label); text-decoration: none; font-size: 14px; line-height: 1.45; transition: box-shadow .15s, transform .15s; }
.eet-strip:hover { text-decoration: none; box-shadow: 0 8px 22px rgba(15, 23, 42, .08); transform: translateY(-1px); }
.eet-strip-badge { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .02em; background: var(--brand-soft, var(--blue-soft)); color: var(--brand-ink, var(--blue)); }
.eet-strip.is-todo { background: linear-gradient(135deg, #fff8ec, #fff 70%); border-color: rgba(214, 130, 20, .3); }
.eet-strip.is-todo .eet-strip-badge { background: #f59e0b; color: #fff; }
.eet-strip.is-on .eet-strip-badge { background: #e7f7ec; color: #1a7f37; }
.eet-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; padding: 24px; margin-bottom: 18px; border-radius: 22px; background: linear-gradient(135deg, #fff8ec 0%, #fff 60%); border: 1px solid rgba(214, 130, 20, .25); }
.eet-hero.is-live { background: linear-gradient(135deg, #eaf8ee 0%, #fff 60%); border-color: rgba(26, 127, 55, .25); }
.eet-hero.is-test { background: linear-gradient(135deg, #eef4ff 0%, #fff 60%); border-color: rgba(29, 78, 216, .2); }
.eet-hero.is-off { background: linear-gradient(135deg, #f3f4f6 0%, #fff 60%); border-color: var(--sep); }
.eet-status { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(15, 23, 42, .06); font-size: 12px; font-weight: 700; }
.eet-hero.is-live .eet-status { background: #1a7f37; color: #fff; }
.eet-hero.is-todo .eet-status { background: #f59e0b; color: #fff; }
.eet-count { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 10px 0 6px; }
.eet-count .num { font-variant-numeric: tabular-nums; }
.eet-hero p { margin: 0; color: var(--label-2); line-height: 1.55; }
.eet-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; }
.eet-facts li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .8); border: 1px solid rgba(15, 23, 42, .06); }
.eet-facts .icon { flex: none; margin-top: 2px; }
.eet-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.eet-grid > * > .card, .eet-grid > .stack > .card { margin: 0; }
.eet-step { padding: 20px; border-left: 4px solid transparent; }
.eet-step.is-current { border-left-color: var(--brand, var(--blue)); }
.eet-step.is-done { border-left-color: var(--green, #34c759); }
.eet-step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.eet-num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--fill, rgba(15, 23, 42, .06)); }
.eet-step.is-current .eet-num { background: var(--brand-grad, var(--blue)); color: #fff; }
.eet-step.is-done .eet-num { background: var(--green, #34c759); color: #fff; }
.eet-cert { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #eaf8ee; color: #14532d; font-size: 14px; margin-bottom: 10px; }
.eet-cert.is-warn { background: #fff4e5; color: #8a4b00; }
.eet-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; }
.eet-dates { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.eet-dates li { display: flex; gap: 10px; }
.eet-dates span { flex: none; width: 82px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ink-orange { color: #c2570a; }
@media (max-width: 900px) { .eet-hero, .eet-grid { grid-template-columns: minmax(0, 1fr); } }

/* ── Přepínač firem (více IČO) v horní liště ── */
.co-switch { margin-right: 4px; }
.co-switch-btn { display: inline-flex; align-items: center; gap: 10px; max-width: 320px; padding: 5px 10px 5px 5px; border-radius: 14px; border: 1px solid var(--card-border, var(--sep)); background: #fff; color: var(--label); font: inherit; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.co-switch-btn:hover, .co-switch.open .co-switch-btn { border-color: var(--brand, var(--blue)); box-shadow: 0 4px 14px rgba(15, 23, 42, .08); }
.co-avatar { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-grad, var(--blue)); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.co-avatar.is-client { background: #64748b; }
.co-text { display: flex; flex-direction: column; min-width: 0; text-align: left; line-height: 1.2; }
.co-name { display: block; font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-ico { display: block; font-size: 12px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.co-caret { flex: none; transform: rotate(90deg); color: var(--label-2); transition: transform .15s; }
.co-switch.open .co-caret { transform: rotate(-90deg); }
.co-menu { min-width: 300px; max-height: 70vh; overflow-y: auto; }
.co-menu form { margin: 0; }
.co-group { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--label-2); }
.co-item { gap: 10px; }
.co-item .grow { min-width: 0; }
.co-item.is-current { background: var(--brand-soft, var(--blue-soft)); }
.co-item.is-current .icon { color: var(--brand-ink, var(--blue)); }
.co-add { font-weight: 650; color: var(--brand-ink, var(--blue)); }
.co-add .icon { color: var(--brand-ink, var(--blue)); }
.co-preview { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: var(--fill, rgba(15, 23, 42, .05)); color: var(--label-2); }
.co-preview.is-found { background: #eaf8ee; color: #14532d; }
.co-preview.is-found strong { color: #0f3d22; }
.co-preview.is-missing { background: #fff4e5; color: #8a4b00; }
@media (max-width: 860px) {
  .co-switch-btn { max-width: 180px; padding: 4px 8px 4px 4px; gap: 8px; }
  .co-avatar { width: 28px; height: 28px; }
  .co-ico { display: none; }
  .co-switch-btn .co-ico { display: none; }
  .co-menu .co-ico { display: block; }
  .co-name { font-size: 13px; }
}

/* ── E-shopy: kdy fakturovat, přihlášení k Allegru ── */
.shop-trigger .imp-choices { margin-bottom: 10px; }
.shop-when-status, .shop-when-paid { display: flex; flex-direction: column; gap: 6px; }
form:has(input[name="trigger"][value="paid_or_cod"]:checked) .shop-when-status { display: none; }
form:has(input[name="trigger"][value="status"]:checked) .shop-when-paid { display: none; }
.allegro-auth { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, #fff4ec, #fff 70%); border: 1px solid rgba(255, 90, 0, .25); }
.allegro-auth-step { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.allegro-auth-step .eet-num { background: #ff5a00; color: #fff; }
@media (max-width: 700px) { .allegro-auth { grid-template-columns: minmax(0, 1fr); } }

/* Fakturna: jednotná zlatá a tmavě modrá značka na veřejném webu. */
.site { --brand:#986f20; --brand-ink:#765315; --brand-soft:#fbf4e4; --brand-grad:linear-gradient(120deg,#87611b,#a67928); --shadow-brand:0 8px 24px rgba(118,83,21,.16); }
.site .lp { --lp-ink:#182237; --lp-yellow:#e8ba60; --lp-lav:#faf6ec; }
.site .lp-slant:not(.has-photo) { background:radial-gradient(circle at 78% 22%,#fff 0,transparent 38%),linear-gradient(140deg,#f4e3bd,#fbf7ed); }
.site main.lp-block { padding:48px 0 64px; }
.site main.lp-block h1 { font-size:clamp(32px,4.5vw,52px);line-height:1.13;margin-bottom:24px; }
.site main.lp-block h2 { margin:32px 0 14px; }
.site main.lp-block h3 { margin-bottom:12px; }
.site main.lp-block p, .site main.lp-block li { line-height:1.65; }
.site .card-pad { padding:24px; }
@media (max-width:640px) { .site .lp-btn, .site main .btn-lg {white-space:normal;text-align:center;} }

.site .lp-grad-text { background-image:linear-gradient(110deg,#765315,#a67928); }

/* Počet firem je součást ceny, nikoli skrytá funkce tarifu. */
.company-offer {margin:22px 0;padding:18px 22px;border:1px solid #d8b47e;border-left:4px solid #ba8c47;border-radius:14px;background:#fbf7ef;color:#1d2735}
.company-offer p {margin:4px 0;line-height:1.6}
.company-offer p:first-child {font-size:22px}
.plan-companies {display:flex;flex-direction:column;gap:3px;margin:18px 0 4px;padding:16px;border-radius:12px;background:#f7f1e6;color:#1d2735}
.plan-companies strong {font-size:30px;line-height:1.15}
.plan-companies span {font-size:13px}
.comparison-summary {margin:38px 0;text-align:left}
.comparison-summary h2 {font-size:clamp(24px,4vw,34px);line-height:1.2}
.comparison-summary td,.comparison-summary th {vertical-align:top;white-space:normal;line-height:1.5}
.comparison-summary th[scope=row] {min-width:135px}
@media(max-width:760px){.site-header .inner{flex-wrap:wrap;gap:10px}.site-header nav{flex-wrap:wrap;gap:12px}.site-header nav>a{display:inline-flex}.comparison-summary .responsive th[scope=row]{display:block;background:#f7f1e6;padding:12px}.company-offer{padding:14px 16px}}

@media(max-width:760px){.site-header nav a:not(.btn){display:inline-flex}}
@media(max-width:760px){.site-header nav a[href$="#funkce"],.site-header nav a[href$="/kalkulacky"]{display:none}}

/* ── Návod: zálohy a konečné faktury u nahrávání nákladů ── */
.adv-guide { padding: 0; overflow: hidden; }
.adv-guide.card { padding: 0; }
.adv-guide summary { display: flex; align-items: center; gap: 8px; padding: 14px 18px; cursor: pointer; font-weight: 650; font-size: 14px; list-style: none; }
.adv-guide summary::-webkit-details-marker { display: none; }
.adv-guide summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .5; transition: transform .15s; }
.adv-guide[open] summary::after { transform: rotate(225deg); }
.adv-guide-body { padding: 0 18px 16px; }
.adv-guide-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; line-height: 1.5; }
.adv-guide-list li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; align-items: start; }
.adv-guide-list .badge { justify-self: start; white-space: nowrap; }
.adv-guide.is-compact { margin-top: 10px; border-radius: 14px; background: var(--fill, rgba(15, 23, 42, .04)); }
.adv-guide.is-compact summary { padding: 10px 14px; font-size: 13px; }
.adv-guide.is-compact .adv-guide-body { padding: 0 14px 12px; }
@media (max-width: 560px) { .adv-guide-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* ── Úvod: výřez přehledu (roste, zelená čísla, účetní v zádech) ── */
.lp-hero-art:has(.lp-dash) { min-height: 600px; }
.lp-dash { width: min(390px, 70%); left: 22%; top: 3%; padding: 20px 22px; transform: rotate(-1.5deg); }
.lp-dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.lp-dash-firm { font-family: var(--lp-round); font-size: 17px; font-weight: 800; color: var(--lp-ink); }
.lp-dash-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--label-2); }
.lp-dash-note { display: block; font-size: 12px; color: var(--label-2); }
.lp-dash-kpi { padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, #ecfbf2, #f7fdf9 70%); border: 1px solid rgba(23, 178, 106, .18); }
.lp-dash-value { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 2px 0; }
.lp-dash-value b { font-family: var(--lp-round); font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: #0c6b37; font-variant-numeric: tabular-nums; }
.lp-dash-trend { display: inline-flex; align-items: center; gap: 2px; padding: 3px 8px; border-radius: 999px; background: #17b26a; color: #fff; font-size: 13px; font-weight: 800; }
.lp-dash-trend .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.lp-dash-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; height: 118px; margin: 16px 2px 4px; }
.lp-dash-bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.lp-dash-bar i { display: block; width: 100%; height: var(--h); border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #cdeedb, #b3e4c8); transform-origin: bottom; }
.lp-dash-bar.is-now i { background: linear-gradient(180deg, #2fd083, #12a35f); box-shadow: 0 8px 18px rgba(23, 178, 106, .35); }
.lp-dash-bar span { font-size: 11px; font-weight: 600; color: var(--label-2); }
.lp-dash-bar.is-now span { color: #0c6b37; font-weight: 800; }
.lp-dash-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.lp-dash-stat { padding: 12px 14px; border-radius: 14px; background: var(--brand-softer, #faf6ec); display: flex; flex-direction: column; gap: 2px; }
.lp-dash-stat b { font-family: var(--lp-round); font-size: 20px; font-weight: 800; color: var(--lp-ink); font-variant-numeric: tabular-nums; }
.lp-dash-meter { display: block; height: 6px; margin-top: 6px; border-radius: 999px; background: rgba(15, 23, 42, .08); overflow: hidden; }
.lp-dash-meter i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #12a35f, #2fd083); transform-origin: left; }
.lp-toast-money { border: 1px solid rgba(23, 178, 106, .25); }
.lp-toast-money b { color: #0c6b37 !important; }
.lp-toast-1.lp-toast-money { right: 0; top: auto; bottom: 16%; }
.lp-toast-chat { max-width: 290px; align-items: flex-start; border-radius: 18px 18px 18px 6px; }
.lp-toast-2.lp-toast-chat { left: 2%; bottom: 2%; }
.lp-toast-chat span:not(.lp-chat-avatar) { line-height: 1.4; margin-top: 2px; }
.lp-chat-avatar { flex: none; position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-grad); color: #fff; }
.lp-chat-avatar .icon { width: 18px; height: 18px; }
.lp-chat-avatar::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #17b26a; border: 2px solid #fff; }
@media (prefers-reduced-motion: no-preference) {
  .lp-dash-bar i { animation: lp-bar .8s cubic-bezier(.22,.8,.3,1) backwards; animation-delay: calc(.75s + var(--i) * 90ms); }
  .lp-dash-meter i { animation: lp-meter 1s cubic-bezier(.22,.8,.3,1) 1.2s backwards; }
  .lp-dash-trend { animation: lp-pop .5s cubic-bezier(.2,.9,.3,1.4) 1.35s backwards; }
  .lp-toast-1.lp-toast-money { animation: lp-pop .6s cubic-bezier(.2,.9,.3,1.3) 1.6s backwards, lp-float 6s ease-in-out 2.3s infinite; }
  .lp-toast-2.lp-toast-chat { animation: lp-chat .6s cubic-bezier(.2,.9,.3,1.2) 2.1s backwards, lp-float 7s ease-in-out 2.8s infinite reverse; }
  @keyframes lp-bar { from { transform: scaleY(.05); opacity: .3; } }
  @keyframes lp-meter { from { transform: scaleX(0); } }
  @keyframes lp-chat { from { transform: translateY(14px) scale(.92); opacity: 0; } }
}
@media (min-width: 1600px) { .lp-hero-art:has(.lp-dash) { min-height: 680px; } .lp-dash { width: min(440px, 66%); } .lp-dash-bars { height: 140px; } }
@media (max-width: 980px) { .lp-dash { left: 20%; width: min(390px, 72%); } }
@media (max-width: 600px) {
  .lp-hero-art:has(.lp-dash) { min-height: 620px; }
  .lp-dash { left: 8%; width: 84%; top: 2%; padding: 16px 16px; }
  .lp-dash-value b { font-size: 26px; }
  .lp-dash-bars { height: 92px; gap: 7px; }
  .lp-toast-1.lp-toast-money { right: 3%; top: auto; bottom: 14%; }
  .lp-toast-2.lp-toast-chat { left: 3%; bottom: 2%; max-width: 78%; }
}
