/* Vzhled podle šablony loyeet-html (LOY-25): brand, canvas, shell ~240 px,
   hustší 13–14 px navigace, přihlášení ve dvou sloupcích. Geist beze změny.
   Bez Worker ×1,25 a bez fialového accentu z LOY-18. */
* { box-sizing: border-box; }
:root {
  --ink: #0F0F10;
  --ink2: #6F6E77;
  --ink3: #8E8D95;
  --muted: var(--ink2);
  --faint: var(--ink3);
  --faint2: #A8A7AE;
  --canvas: #F9F8F9;
  --line: #E9E8EA;
  --line2: #DCDBDD;
  --hov: #F4F3F6;
  --side: var(--canvas);
  --surface: #fff;
  /* Značka Loyeet ze šablony (primary 25 95% 53%). */
  --brand: #F97316;
  --brand-hover: #EA580C;
  --brand-soft: #FFF7ED;
  --brand-tint: var(--brand-soft);
  /* Odkazy a focus = brand (nahrazuje fialovou LOY-18). */
  --accent: var(--brand);
  --accent-hover: var(--brand-hover);
  --ok: #047857;
  --ok-bg: #ECFDF5;
  --ok-border: #A7F3D0;
  --pozor: #B45309;
  --pozor-bg: #FFFBEB;
  --pozor-border: #FDE68A;
  --chyba: #B91C1C;
  --chyba-bg: #FEF2F2;
  --chyba-border: #FECACA;
  --info: #1D4ED8;
  --info-bg: #EFF6FF;
  --info-border: #BFDBFE;
  /* Zpětná kompatibilita se staršími názvy. */
  --text: var(--ink);
  --slaby: var(--muted);
  --linka: var(--line2);
  --pozadi: var(--canvas);
  --karta: var(--surface);
  --akcent: var(--accent);
  --radius: 8px;
}
html, body { margin: 0; height: 100%; }
body {
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--brand); }
::selection { background: rgba(249, 115, 22, .18); }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.m-only, .bottom-nav, .sb-bg { display: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---- shell: postranní panel + hlavní plocha ---- */
.app { display: flex; height: 100vh; height: 100dvh; }
.sidebar {
  width: 240px; flex-shrink: 0;
  display: flex; flex-direction: column;
  padding: 12px; overflow-y: auto;
  background: var(--canvas);
  border-right: 1px solid var(--line);
}
.sb-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; height: 36px; padding: 0 6px; margin-bottom: 16px;
}
.sidebar .logo {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  color: var(--ink); font-weight: 600; font-size: 15px;
  letter-spacing: -.02em; text-decoration: none;
}
.sidebar .logo:hover { color: var(--ink); text-decoration: none; }
.sidebar .logo img {
  display: block; width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0;
}
.sidebar .logo .logo-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-eet {
  flex-shrink: 0;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px; color: var(--ink3);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 2px 6px; line-height: 1.2;
}
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title, .section-label {
  font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink3);
  padding: 0 8px; margin: 0 0 6px;
}
.nav-venues { margin-top: 24px; }
.nav-item {
  display: flex; width: 100%; align-items: center; gap: 10px;
  height: 32px; padding: 0 8px; border-radius: 6px;
  color: var(--ink2); font-size: 13px;
  text-decoration: none; transition: background-color .1s, color .1s;
}
.nav-item:hover { background: var(--hov); color: var(--ink); text-decoration: none; }
.nav-item.active {
  background: #fff; color: var(--ink); font-weight: 500;
  box-shadow: 0 0 0 1px #E9E8EA;
}
.nav-item .ic {
  width: 16px; height: 16px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: currentColor;
}
.nav-item .ic svg { display: block; width: 16px; height: 16px; }
.nav-item .lbl {
  flex: 1; text-align: left; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.nav-dot {
  width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0;
  background: var(--brand);
}
.nav-item-venue .nav-dot { background: #C4C3C8; }
.nav-item-venue.active .nav-dot,
.nav-item-venue:hover .nav-dot { background: var(--brand); }
.sb-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.sb-user {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; padding: 8px; border-top: 1px solid var(--line);
  min-width: 0;
}
.sb-user > div { min-width: 0; flex: 1; }
.user-av {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: #fff;
  font-size: 11px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name {
  font-weight: 500; font-size: 13px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-sub {
  font-size: 11px; color: var(--ink3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-user .odhlasit { margin-left: auto; flex-shrink: 0; }
.sb-user .odhlasit button {
  background: transparent; border: 1px solid var(--line2); border-radius: 6px;
  padding: 4px 8px; font-size: 12px; color: var(--ink2);
}
.sb-user .odhlasit button:hover { background: var(--hov); color: var(--ink); }

/* Hlavička pro nepřihlášené (právní, chyba bez relace). */
.hlavicka {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 24px;
  background: transparent; color: var(--ink);
}
.hlavicka .logo {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 600; font-size: 16px;
  text-decoration: none;
}
.hlavicka .logo:hover { text-decoration: none; color: var(--ink); }
.hlavicka .logo img { display: block; width: 26px; height: 26px; border-radius: 6px; }
.hlavicka .podtitul { color: var(--ink2); font-size: 13px; }

/* Hlavní plocha jako bílá karta šablony (bez oranžového pruhu). */
.main {
  flex: 1; min-width: 0; min-height: 0;
  margin: 8px 8px 8px 0;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 15, 16, .03);
}
.app.bez-sidebar { flex-direction: column; }
.app.bez-sidebar .main { margin: 8px; }
/* Auth layout (přihlášení/registrace/reset): přes celou plochu, bez karty a hlavičky. */
.app.bez-sidebar:has(.auth-layout) .hlavicka { display: none; }
.app.bez-sidebar:has(.auth-layout) {
  height: auto; min-height: 100vh; min-height: 100dvh;
}
.app.bez-sidebar:has(.auth-layout) .main {
  margin: 0; border: 0; border-radius: 0; box-shadow: none;
  min-height: 100vh; min-height: 100dvh;
  overflow: visible;
}
.app.bez-sidebar:has(.auth-layout) .scroll {
  padding: 0; max-width: none; overflow: visible; flex: none;
}

.topbar {
  height: 48px; flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  min-width: 0;
}
.topbar .crumb { color: var(--ink3); font-size: 13px; white-space: nowrap; }
.topbar .crumb a { color: var(--ink3); }
.topbar .crumb a:hover { color: var(--ink); text-decoration: none; }
.topbar .sep { color: #C4C3C8; }
.topbar h1 {
  flex: 1; min-width: 0;
  font-size: 14px; font-weight: 500; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar h1.nazev-provozovny {
  font-size: 14px; font-weight: 600; letter-spacing: -.02em;
}
.icon-btn {
  width: 32px; height: 32px; border-radius: 6px;
  color: var(--ink2); font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--hov); color: var(--ink); }
.icon-btn svg { display: block; width: 18px; height: 18px; }

.scroll {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 20px 24px 40px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Nadpisy v obsahu. */
.scroll > h1, .karta > h1, .page-title {
  font-size: 24px; font-weight: 600; letter-spacing: -.02em;
  margin: 0 0 6px; color: var(--ink);
}
.page-lead {
  margin: 0 0 24px; font-size: 14px; color: var(--ink2);
}
h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; color: var(--ink); }
h3 { font-size: 14px; font-weight: 600; margin: 16px 0 8px; color: var(--ink); }

.karta, .surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  animation: rise .4s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 8px;
}
.page-head .page-lead { margin-bottom: 0; }
.page-head .akce-radek { margin: 0; }

.karty {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}
.karty .karta { margin-bottom: 0; }

.zakaznik { margin-bottom: 24px; }
.zakaznik:last-child { margin-bottom: 0; }
.zakaznik-nadpis {
  font-size: 14px; font-weight: 600; color: var(--ink);
  margin: 0 0 12px; letter-spacing: -.01em;
}

/* Karta provozovny (přehled /) — šablona VenueCard. */
.karta-provozovna {
  --venue: var(--brand);
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px;
  text-decoration: none; color: inherit;
  box-shadow: 0 1px 2px rgba(15, 15, 16, .04), 0 8px 24px rgba(15, 15, 16, .03);
  transition: border-color .15s, transform .15s;
  min-height: 100%;
}
.karta-provozovna:hover {
  border-color: var(--line2);
  transform: translateY(-2px);
  color: inherit; text-decoration: none;
}
.karta-hlava {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.karta-titulek { display: flex; align-items: center; gap: 12px; min-width: 0; }
.karta-avatar {
  width: 36px; height: 36px; border-radius: 6px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--venue); color: #fff;
  font-size: 14px; font-weight: 600;
}
.karta-nazev-blok { min-width: 0; }
.karta-nazev {
  display: block; font-size: 14px; font-weight: 600; color: var(--ink);
  letter-spacing: -.01em; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.karta-sipka { color: var(--ink3); flex-shrink: 0; opacity: .7; }
.karta-provozovna:hover .karta-sipka { color: var(--ink2); opacity: 1; }
.karta-staty {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.karta-stat-popis { font-size: 11px; color: var(--ink3); }
.karta-stat-hodnota {
  font-size: 14px; font-weight: 500; color: var(--ink);
  font-variant-numeric: tabular-nums; margin-top: 2px;
  font-family: "Geist Mono", ui-monospace, monospace;
}
.karta-graf {
  width: 100%; height: 44px;
  display: flex; align-items: stretch;
}
.karta-graf .sparkline {
  width: 100% !important; height: 44px !important; max-width: none;
}
.karta-paticka {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink2);
}
.karta-sync { color: var(--ink3); white-space: nowrap; }

/* ---- přihlášení / registrace / reset (dvousloupcový layout) ---- */
.auth-layout {
  min-height: 100vh; min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  background: #fff;
}
.auth-levy {
  display: flex; flex-direction: column;
  padding: 40px 32px;
  min-width: 0;
}
.auth-levy .logo {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 600; font-size: 18px;
  letter-spacing: -.02em; text-decoration: none; align-self: flex-start;
}
.auth-levy .logo:hover { color: var(--ink); text-decoration: none; }
.auth-levy .logo img {
  display: block; width: 26px; height: 26px; border-radius: 6px;
}
.auth-telo {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  max-width: 360px; width: 100%; margin: 24px 0;
}
.auth-telo h1 {
  font-size: 28px; font-weight: 600; letter-spacing: -.02em;
  margin: 0; color: var(--ink);
}
.auth-telo > .auth-popis {
  margin: 8px 0 0; font-size: 14px; color: var(--ink2);
}
.auth-paticka {
  font-size: 12px; color: var(--ink3); margin: 0;
}
.auth-paticka a { color: var(--ink3); }
.auth-paticka a:hover { color: var(--ink); }

.auth-pravy {
  display: none;
  position: relative; overflow: hidden;
  background: var(--canvas);
  border-left: 1px solid var(--line);
  align-items: center; justify-content: center;
  padding: 48px;
}
.auth-pravy-vnitrni {
  position: relative; width: 100%; max-width: 560px;
  display: flex; flex-direction: column; gap: 16px;
}
.auth-preview {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 24px 60px -30px rgba(15, 15, 16, .25);
  overflow: hidden;
}
.auth-preview-hlavicka {
  height: 36px; padding: 0 16px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--ink3);
}
.auth-preview-hlavicka img {
  width: 18px; height: 18px; border-radius: 4px;
}
.auth-preview-radek {
  display: grid;
  grid-template-columns: 90px 1fr 100px;
  align-items: center; gap: 12px;
  padding: 0 16px; height: 40px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.auth-preview-radek:last-child { border-bottom: 0; }
.auth-preview-radek .mono { font-size: 12px; }
.auth-preview-karty {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px;
}
.auth-preview-kpi {
  border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px;
  background: #fff;
}
.auth-preview-kpi .section-label { padding: 0; margin: 0 0 4px; }
.auth-preview-kpi strong {
  display: block; font-size: 20px; font-weight: 600;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}

@media (min-width: 1024px) {
  .auth-layout {
    grid-template-columns: minmax(420px, 1fr) 1.2fr;
  }
  .auth-levy { padding: 40px 56px; }
  .auth-pravy { display: flex; }
}

/* Zpětná kompatibilita: .prihlaseni uvnitř auth-telo. */
.prihlaseni { text-align: left; max-width: none; margin: 0; padding: 0; border: 0; }
.prihlaseni h1 { margin-top: 0; }
.prihlaseni p { color: var(--ink2); }
.prihlaseni .logo-velke { display: none; }
.prihlaseni .pravni-odkazy { margin-top: 1rem; }
.pravni { max-width: 720px; }
.pravni p { margin: 0 0 .85rem; }

.tlacitko, .btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff;
  text-decoration: none;
  padding: 0 14px; height: 40px; border-radius: 6px;
  font-size: 14px; font-weight: 500;
  border: 0; cursor: pointer;
  transition: background-color .15s;
}
.tlacitko:hover, .btn-primary:hover {
  background: var(--brand-hover); color: #fff; text-decoration: none;
}
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; padding: 0 14px; height: 40px;
  font-size: 14px; color: var(--ink2);
  background: transparent; border: 0; cursor: pointer;
  text-decoration: none;
}
a.btn-ghost:hover { background: var(--hov); color: var(--ink); text-decoration: none; }
.btn-ghost:hover { background: var(--hov); }

.male { color: var(--ink3); font-size: 13px; }
.chyba { color: var(--chyba); font-weight: 600; }
.ok { color: var(--ok); font-weight: 500; }
.nebo {
  display: flex; align-items: center; gap: 12px;
  text-align: center; color: var(--ink3); margin: 16px 0;
  font-size: 12px;
}
.nebo::before, .nebo::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.tlacitko-sekundarni, .tlacitko-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 8px; width: 100%; height: 40px; text-align: center;
  background: #fff; color: var(--ink); border: 1px solid var(--line2);
  border-radius: 6px; font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer;
}
.tlacitko-sekundarni { background: var(--canvas); color: var(--ink3); border-color: var(--line); }
.tlacitko-sekundarni:hover, .tlacitko-google:hover {
  background: var(--hov); text-decoration: none; color: var(--ink);
}
.tlacitko-google { margin-top: 24px; }
.prihlaseni-form { margin: 0 0 8px; max-width: none; text-align: left; }
.prihlaseni .tlacitko,
.prihlaseni .tlacitko-sekundarni,
.prihlaseni .tlacitko-google,
.auth-telo .tlacitko,
.auth-telo .tlacitko-sekundarni,
.auth-telo .tlacitko-google { width: 100%; box-sizing: border-box; }
.prihlaseni .pole, .formular .pole, .auth-telo .pole {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px;
  text-align: left;
}
.prihlaseni .pole span, .formular .pole span, .auth-telo .pole span {
  font-weight: 500; font-size: 12px; color: var(--ink2);
}
.prihlaseni input[type="email"],
.prihlaseni input[type="password"],
.prihlaseni input[type="text"],
.auth-telo input[type="email"],
.auth-telo input[type="password"],
.auth-telo input[type="text"] {
  border: 1px solid var(--line2); border-radius: 6px;
  padding: 0 12px; height: 36px;
  background: #fff; width: 100%; box-sizing: border-box; font-size: 14px;
}
.prihlaseni input:focus,
.auth-telo input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .15);
}
.formular input[type="email"],
.formular input[type="password"],
.formular input[type="text"] {
  width: 100%; box-sizing: border-box;
}
.auth-odkazy { margin-top: 24px; font-size: 13px; color: var(--ink2); }
.auth-odkazy a { color: var(--ink); font-weight: 500; }
.auth-odkazy a:hover { color: var(--brand); }
.akce-radek { margin: 0 0 12px; }
.seznam-otisku { list-style: none; padding: 0; margin: 0 0 12px; }
.seznam-otisku li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.odkaz-tlacitko { color: var(--chyba); font-size: 12px; }
.inline { display: inline; }
.drobecky { color: var(--ink3); font-size: 13px; margin: 0 0 12px; }
.drobecky a { color: var(--ink3); }
.drobecky a:hover { color: var(--ink); }
.sep { color: #C4C3C8; margin: 0 4px; }

.upozorneni {
  border: 1px solid var(--pozor-border);
  border-left: 3px solid var(--pozor);
  background: var(--pozor-bg);
  padding: 10px 14px;
  border-radius: 6px;
  margin: 0 0 12px;
  color: var(--ink2);
  font-size: 13px;
}
.upozorneni.eet {
  border-color: #FED7AA;
  border-left-color: var(--brand);
  background: var(--brand-soft);
}
.upozorneni.data {
  border-color: var(--line2);
  border-left-color: var(--line2);
  background: var(--canvas);
}

/* Overview KPI karty v detailu provozovny (šablona StatCard). */
.souhrn-blok { margin: 0 0 16px; }
.overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
}
.overview-karta {
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  min-width: 0;
  transition: border-color .15s, transform .15s;
  animation: rise .4s cubic-bezier(.2, .7, .2, 1) both;
}
.overview-karta:hover {
  border-color: var(--line2);
  transform: translateY(-2px);
}
.overview-karta:nth-child(2) { animation-delay: .04s; }
.overview-karta:nth-child(3) { animation-delay: .08s; }
.overview-karta:nth-child(4) { animation-delay: .12s; }
.overview-popis {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  font-size: 12px; color: var(--ink2); font-weight: 500;
}
.overview-ikona {
  display: inline-flex; color: var(--ink3); flex-shrink: 0;
}
.overview-sub { color: var(--ink3); font-weight: 400; font-size: 11px; }
.flow-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; min-width: 0;
}
.flow-row-text { align-items: flex-start; }
.flow-total {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 22px; font-weight: 600; letter-spacing: -.02em;
  color: var(--ink); line-height: 1.2; min-width: 0;
  overflow-wrap: anywhere; font-variant-numeric: tabular-nums;
}
.flow-total-sm { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.flow-text {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.flow-text .flow-total { display: inline; }
.flow-text .stitek { align-self: flex-start; }
.flow-meta {
  display: block;
  font-size: 12px; color: var(--ink3); font-weight: 400;
  font-family: inherit; letter-spacing: 0; line-height: 1.35;
  overflow-wrap: anywhere;
}
.flow-meta-radek {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.overview-karta > .flow-meta { margin-top: 0; }
.flow-text .flow-meta { margin-top: 0; }

.souhrn {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
}
.souhrn > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  background: #fff;
  min-width: 0;
}
.souhrn dt {
  color: var(--ink3); font-size: 11px; font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: .05em; text-transform: uppercase;
}
.souhrn dd {
  margin: 0; font-weight: 600; font-size: 16px; color: var(--ink);
  font-family: "Geist Mono", ui-monospace, monospace;
  letter-spacing: -.015em; line-height: 1.35;
}
.souhrn dd .male {
  display: inline-block; margin-top: 2px;
  font-family: inherit; font-weight: 400; font-size: 12px;
  letter-spacing: 0; color: var(--ink2);
}
.souhrn dd .stitek {
  font-family: inherit; letter-spacing: 0;
  vertical-align: middle; margin-left: 4px;
}
.souhrn dd .male + .male,
.souhrn dd div.male { display: block; margin-top: 4px; }

.sparkline {
  --spark: var(--brand);
  display: block; flex-shrink: 0; max-width: 50%;
  overflow: visible;
}
.sparkline-plocha {
  fill: var(--spark);
  fill-opacity: .18;
}
.sparkline-cara {
  stroke: var(--spark); stroke-width: 1.6; stroke-linecap: round;
  stroke-linejoin: round; fill: none;
}
.ic-google { display: block; flex-shrink: 0; }

.vlastnosti {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0;
  padding: 6px 0;
}
.vlastnosti dt {
  color: var(--ink3); font-size: 13px;
  min-height: 32px; display: flex; align-items: center;
}
.vlastnosti dd {
  margin: 0; min-width: 0; overflow-wrap: anywhere;
  min-height: 32px; display: flex; align-items: center; gap: 8px;
  color: var(--ink2); font-size: 14px;
}

.pruh-nove {
  background: var(--brand-soft);
  border: 1px solid #FED7AA;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 12px;
  color: var(--ink2);
  font-size: 13px;
}
.pruh-nove a { font-weight: 500; color: var(--brand); }

.filtr {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: end;
  margin-bottom: 12px;
  padding: 12px 0;
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.filtr label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--ink2); font-weight: 500;
}
.filtr select, .filtr input {
  font: inherit; padding: 0 10px;
  border: 1px solid var(--line2); border-radius: 6px;
  background: #fff; color: var(--ink); height: 36px;
  min-width: 160px; font-size: 14px;
}
.filtr select:focus, .filtr input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .15);
}
.filtr button {
  font: inherit; padding: 0 12px; height: 36px;
  background: var(--brand); color: #fff; border: 0;
  border-radius: 6px; font-weight: 500; cursor: pointer; font-size: 14px;
}
.filtr button:hover { background: var(--brand-hover); }
.filtr a { font-size: 13px; color: var(--ink3); align-self: center; padding: 4px 0; }
.filtr a:hover { color: var(--ink); }

.tabulka-obal { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.porovnani-mssql { margin-top: 0.5rem; max-width: 36rem; }
.porovnani-mssql .tabulka-obal { margin: 0.35rem 0 0; padding: 0; }
.porovnani-mssql table { width: auto; min-width: 100%; }
.porovnani-mssql th, .porovnani-mssql td { padding: 6px 10px; font-size: 13px; }
table {
  width: 100%; border-collapse: collapse;
  background: transparent;
}
th, td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid #F1F0F2;
  vertical-align: middle; font-size: 13px;
}
th {
  font-size: 12px; color: var(--ink3); font-weight: 500;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}
td.cislo, th.cislo {
  text-align: right; white-space: nowrap;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px; font-variant-numeric: tabular-nums;
}
table.uctenky tbody tr { transition: background-color .08s; }
table.uctenky tbody tr:hover { background: var(--hov); }
table.uctenky td a { color: var(--ink); font-weight: 500; }
table.uctenky td a:hover { color: var(--brand); }

.strankovani {
  display: flex; gap: 16px; align-items: center; justify-content: center;
  margin: 16px 0 8px; font-size: 13px; color: var(--ink2);
}
.strankovani a {
  border: 1px solid var(--line2); border-radius: 6px;
  padding: 4px 12px; color: var(--ink2); background: #fff;
}
.strankovani a:hover { background: var(--hov); text-decoration: none; color: var(--ink); }

/* Stavové pilulky: SVG ikony LOY-22 + tečkový badge šablony. */
.stitek {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: var(--canvas); color: var(--ink2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.stitek-stav { padding-left: 6px; }
.stav-ikona {
  display: inline-flex; align-items: center; justify-content: center;
  width: 12px; height: 12px; flex-shrink: 0;
  color: currentColor; line-height: 0;
}
.stav-ikona svg { display: block; width: 12px; height: 12px; }
.stav-text { line-height: 1.2; }
.stav-tecka {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: currentColor;
}
.pokladna-nacteno { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.pokladna-storno { background: var(--chyba-bg); color: var(--chyba); border-color: var(--chyba-border); }
.pokladna-vratka { background: var(--brand-soft); color: #C2410C; border-color: #FED7AA; }
.zpracovani-nova { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.zpracovani-zpracovana, .zpracovani-odeslana {
  background: var(--brand-soft); color: #C2410C; border-color: #FED7AA;
}
.zpracovani-zaevidovana { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.zpracovani-chyba, .zpracovani-odmitnuta {
  background: var(--chyba-bg); color: var(--chyba); border-color: var(--chyba-border);
}
.zpracovani-neznamy { background: var(--canvas); color: var(--ink3); border-color: var(--line); }
.sync-uspech { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.sync-uspech .stav-tecka { background: #10B981; }
.sync-chyba { background: var(--pozor-bg); color: var(--pozor); border-color: var(--pozor-border); }
.sync-chyba .stav-tecka { background: #F59E0B; }

pre {
  white-space: pre-wrap; word-break: break-word;
  font-size: 13px; max-height: 600px; overflow: auto;
  font-family: "Geist Mono", ui-monospace, monospace;
  background: var(--canvas); border: 1px solid var(--line);
  border-radius: 6px; padding: 12px;
  color: var(--ink2);
}
details.karta > summary {
  cursor: pointer; font-weight: 600; list-style: none;
}
details.karta > summary::-webkit-details-marker { display: none; }
details.karta > summary::before {
  content: "▸"; display: inline-block; margin-right: 6px;
  color: var(--ink3); transition: transform .15s;
}
details.karta[open] > summary::before { transform: rotate(90deg); }

.formular { display: grid; gap: 14px; max-width: 640px; margin: 0 0 12px; }
.formular label { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.formular .male { overflow-wrap: anywhere; }
.formular .popisek { font-weight: 500; font-size: 13px; color: var(--ink2); }
.formular input {
  font: inherit; padding: 0 12px; height: 36px;
  border: 1px solid var(--line2); border-radius: 6px;
  background: #fff; transition: border-color .15s, box-shadow .15s; font-size: 14px;
}
.formular input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .15);
}
.formular input[aria-invalid="true"] { border-color: var(--chyba); }
.formular button { border: 0; cursor: pointer; font: inherit; }

.zprava-ok {
  border: 1px solid var(--ok-border);
  border-left: 3px solid var(--ok);
  background: var(--ok-bg);
  padding: 10px 14px;
  border-radius: 6px;
  margin: 0 0 12px;
  color: var(--ok);
  font-size: 13px;
}

.empty { text-align: center; padding: 64px 24px; color: var(--ink3); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #DEDEE3; border-radius: 10px;
  border: 3px solid transparent; background-clip: content-box;
}

@media (max-width: 1100px) {
  .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .karty { grid-template-columns: 1fr; }
}

/* Mobil: drawer sidebar, topbar s hamburgerem, spodní navigace. */
@media (max-width: 768px) {
  body { background: #fff; }
  .app { height: 100vh; height: 100dvh; }
  .m-only { display: inline-flex; }
  .m-hide { display: none !important; }

  .sidebar {
    position: fixed; inset: 0 auto 0 0;
    width: 280px; max-width: 85vw;
    height: 100vh; height: 100dvh;
    z-index: 80;
    background: var(--canvas);
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.2, .7, .2, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.nav-open .sidebar {
    transform: none;
    box-shadow: 12px 0 40px rgba(0, 0, 0, .12);
  }
  .sb-bg {
    display: block; position: fixed; inset: 0; z-index: 75;
    background: rgba(15, 15, 16, .3);
    opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  .sb-bg[hidden] { display: none !important; }
  body.nav-open .sb-bg { opacity: 1; pointer-events: auto; }
  .nav-item { height: 36px; }
  .nav-title, .section-label { display: block; }

  .main {
    margin: 0; border: 0; border-radius: 0;
    box-shadow: none;
  }
  .topbar { padding: 0 12px; gap: 6px; height: 48px; }
  .topbar .crumb, .topbar .sep { font-size: 13px; }
  .topbar h1 { font-size: 15px; font-weight: 600; }
  .topbar h1.nazev-provozovny { font-size: 15px; }
  .icon-btn {
    width: 40px; height: 40px; font-size: 18px; line-height: 1;
  }

  .scroll {
    padding: 16px 14px 96px;
  }
  .souhrn { grid-template-columns: 1fr 1fr; }
  .scroll > .overview,
  .scroll > .souhrn-blok.overview {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 8px; padding-bottom: 4px; align-items: stretch;
  }
  .scroll > .overview > .overview-karta,
  .scroll > .souhrn-blok.overview > .overview-karta {
    min-width: 78%; scroll-snap-align: start;
    display: flex; flex-direction: column; justify-content: space-between;
  }
  .scroll > .overview > .overview-karta:last-child,
  .scroll > .souhrn-blok.overview > .overview-karta:last-child {
    min-width: 88%;
  }
  .karta-provozovna { padding: 16px 14px; gap: 12px; }
  .vlastnosti { grid-template-columns: 1fr; gap: 2px 0; }
  .vlastnosti dt { min-height: 0; padding-top: 8px; }
  .vlastnosti dd { min-height: 0; padding-bottom: 4px; border-bottom: 1px solid #F1F0F2; }
  .filtr { position: static; backdrop-filter: none; }
  .filtr select, .filtr input { height: 40px; font-size: 16px; }
  .filtr button { height: 40px; padding: 0 14px; font-size: 15px; }
  .tlacitko, .btn-primary { height: 40px; padding: 0 14px; font-size: 15px; }

  .bottom-nav {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 50;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a {
    position: relative; flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 4px; font-size: 11px; color: var(--ink3);
    text-decoration: none; min-width: 0;
  }
  .bottom-nav a:hover { text-decoration: none; color: var(--ink); }
  .bottom-nav a.on { color: var(--brand); }
  .bn-ic {
    width: 20px; height: 20px; display: inline-flex;
    align-items: center; justify-content: center; line-height: 1;
  }
  .bn-ic svg { display: block; width: 20px; height: 20px; }

  .app.bez-sidebar { height: auto; min-height: 100vh; min-height: 100dvh; }
  .app.bez-sidebar .main {
    margin: 0; border: 0; border-radius: 0; box-shadow: none;
  }
  .app.bez-sidebar:not(:has(.auth-layout)) .main {
    margin: 8px; border: 1px solid var(--line); border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 15, 16, .03);
  }
  .auth-levy { padding: 28px 20px; }
}

@media (max-width: 600px) {
  .souhrn { grid-template-columns: 1fr; }
  .scroll > .overview > .overview-karta,
  .scroll > .souhrn-blok.overview > .overview-karta {
    min-width: 85%; padding: 12px 14px;
  }
  .flow-total { font-size: 18px; }
  .auth-telo h1 { font-size: 24px; }
  .topbar .crumb { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
  .karta-staty { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
