/* Bombex Tracker – operační ERP vzhled: světlé pozadí, sidebar vlevo, navy jako primární, barva = stav */
:root {
  --bg: #f4f5f8; --surface: #ffffff; --surface2: #f8f9fb; --surface3: #eef0f4; --border: #e5e8ee; --border2: #d3d8e1;
  --text: #111827; --text2: #374151; --muted: #6b7280; --muted2: #9ca3af;
  --accent: #1e3a5f; --accent-hover: #162c48; --accent-text: #1e3a5f; --accent-soft: #e9eef6; --accent-soft2: #d5dfec;
  --ok: #16a34a; --ok-soft: #dcfce7; --ok-text: #15803d; --warn: #d97706; --warn-soft: #fef3c7; --warn-text: #b45309;
  --err: #dc2626; --err-soft: #fee2e2; --err-text: #b91c1c; --info: #2563eb; --info-soft: #dbeafe; --info-text: #1d4ed8;
  --radius: 12px; --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 0 0 1px rgba(16,24,40,.04); --shadow: 0 8px 24px rgba(16,24,40,.08), 0 0 0 1px rgba(16,24,40,.04); --shadow-lg: 0 24px 60px rgba(16,24,40,.18);
  --topbar: 56px; --sidebar: 232px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0c0f17; --surface: #131722; --surface2: #181d2b; --surface3: #1f2536; --border: #232a3b; --border2: #343c52;
  --text: #f1f3f9; --text2: #d1d5e1; --muted: #9098ad; --muted2: #656d84;
  --accent: #dbe7f7; --accent-hover: #ffffff; --accent-text: #c7d7ee; --accent-soft: rgba(147,178,220,.14); --accent-soft2: rgba(147,178,220,.26);
  --ok-soft: rgba(22,163,74,.18); --ok-text: #86efac; --warn-soft: rgba(217,119,6,.18); --warn-text: #fcd34d; --err-soft: rgba(220,38,38,.18); --err-text: #fca5a5; --info-soft: rgba(37,99,235,.2); --info-text: #93c5fd;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.04); --shadow: 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 24px; letter-spacing: -.02em; } h2 { font-size: 15px; } h3 { font-size: 14px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted, .soft { color: var(--muted); } .muted2, .faint { color: var(--muted2); } .small { font-size: 12.5px; } .xs { font-size: 11.5px; }
.nowrap { white-space: nowrap; } .r { text-align: right; } .danger { color: var(--err-text); }
.sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.sub.danger { color: var(--err-text); }
.hidden, [hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }
svg.ic { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.section-label { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-label:first-child { margin-top: 0; }
.section-label a { font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 12.5px; }

/* ---------------------------------------------------------------- Shell: topbar + sidebar ---------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; padding: 0 20px; }
.topbar .brand { display: flex; align-items: center; width: calc(var(--sidebar) - 20px); }
.topbar .brand img { height: 24px; width: auto; display: block; }
html[data-theme="dark"] .topbar .brand img { filter: brightness(0) invert(1); }
.topbar .search { flex: 0 1 380px; }
.topbar .search .input { height: 36px; padding-left: 34px; background: var(--surface2); border-color: transparent; box-shadow: none; }
.topbar .search .input:focus { background: var(--surface); border-color: var(--accent); }
.topbar .spacer { flex: 1; }
.topbar .shop-sel { height: 34px; padding: 0 30px 0 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--text); appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; max-width: 190px; }
.topbar .ibtn { position: relative; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); border: 0; background: transparent; cursor: pointer; }
.topbar .ibtn:hover { background: var(--surface3); color: var(--text); text-decoration: none; }
.topbar .ibtn .badge.count { position: absolute; top: 0; right: -4px; height: 16px; min-width: 16px; padding: 0 4px; font-size: 10px; }
.topbar .user { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 6px; border-radius: 999px; border: 1px solid transparent; background: transparent; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; height: 36px; }
.topbar .user:hover { background: var(--surface3); }
.topbar .user .av { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.topbar .user .caret { color: var(--muted2); font-size: 11px; margin-right: 4px; }
.user-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 42px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 5px; z-index: 70; min-width: 220px; }
.menu .who { padding: 8px 10px 9px; border-bottom: 1px solid var(--border); margin-bottom: 5px; }
.menu .who b { display: block; font-size: 13.5px; }
.menu .who span { color: var(--muted); font-size: 12px; }
.menu a, .menu button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: transparent; border-radius: 7px; cursor: pointer; font-size: 13.5px; color: var(--text); }
.menu a svg, .menu button svg { width: 15px; height: 15px; color: var(--muted); }
.menu a:hover, .menu button:hover { background: var(--surface3); text-decoration: none; }
.menu button.danger { color: var(--err-text); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 5px 0; }
.shell { display: flex; align-items: flex-start; min-height: calc(100vh - var(--topbar)); }
.sidebar { width: var(--sidebar); flex: none; position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto; padding: 18px 12px 16px; border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.sidebar .lbl { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted2); padding: 14px 12px 6px; }
.sidebar a.it { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--text2); font-weight: 500; font-size: 13.5px; }
.sidebar a.it svg { width: 17px; height: 17px; color: var(--muted); }
.sidebar a.it:hover { background: var(--surface3); text-decoration: none; color: var(--text); }
.sidebar a.it.active { background: var(--accent-soft); color: var(--accent-text); }
.sidebar a.it.active svg { color: var(--accent-text); }
.sidebar a.it .cnt { margin-left: auto; }
.sidebar a.it .shop-chip { font-weight: 500; }
.sidebar .foot { margin-top: auto; padding: 12px 12px 0; color: var(--muted2); font-size: 11.5px; font-family: var(--mono); }
.content { flex: 1; min-width: 0; padding: 28px 32px 60px; max-width: 1560px; }
.bottomnav, .topbar .hdr-search-btn { display: none; }

/* ---------------------------------------------------------------- Page head ---------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head h1 .mono { font-size: 22px; font-weight: 600; }
.page-head .sub { color: var(--muted); margin-top: 3px; font-size: 13.5px; }
.page-head .crumbs, .crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--text); } .crumbs .cur { color: var(--text); font-weight: 500; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.back svg { width: 15px; height: 15px; }
.back:hover { color: var(--text); text-decoration: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btns.right { justify-content: flex-end; }
.btns form, .acts form, form.inline { display: contents; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.title-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page-head p, .page-head .acts { color: var(--muted); font-size: 13.5px; }
.page-head .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ftr { display: none; }

/* ---------------------------------------------------------------- Cards ---------------------------------------------------------------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.card.pad0 { padding: 0; overflow: hidden; }
.card.flat { box-shadow: none; border: 1px solid var(--border); }
.card + .card, .card + .grid, .grid + .card, .grid + .grid, .card + details.card, details.card + .card, .card + .form-card, .form-card + .card, .form-card + .form-card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
h1 svg.ic, h2 svg.ic, h3 svg.ic { width: 16px; height: 16px; color: var(--muted); }
.card-head .desc { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; font-size: 13px; }
.card.pad0 .card-head { padding: 14px 20px 12px; margin: 0; }
.card.pad0 .card-head + .table-wrap, .card.pad0 .card-head + .list, .card.pad0 .card-head + .issue, .card.pad0 .card-head + .icard, .card.pad0 .card-head + .list-row, .card.pad0 .card-head + .sysbar, .card.pad0 .card-head + .empty, .card.pad0 .card-head + .timeline, .card.pad0 .card-head + .card-body { border-top: 1px solid var(--border); }
.card.pad0 .card-body { padding: 16px 20px; }
.card.pad0 .card-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-note { padding: 11px 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.card-note.warn { background: var(--warn-soft); color: var(--warn-text); border-color: transparent; }
.card-note a { color: inherit; text-decoration: underline; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.main-side { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); align-items: start; }
.grid.side-main { grid-template-columns: minmax(280px, 1fr) minmax(0, 2.2fr); align-items: start; }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid > .card + .card { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > .card + .card { margin-top: 0; }
/* hlavní metrika */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero .big { font-size: 34px; font-weight: 650; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hero .big small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.hero .meta { color: var(--muted); font-size: 13px; margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero .facts { display: flex; gap: 28px; flex-wrap: wrap; }
.hero .facts div { min-width: 90px; }
.hero .facts b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero .facts span { color: var(--muted); font-size: 12px; }
/* KPI */
.kpi { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm); color: inherit; }
a.kpi:hover { text-decoration: none; box-shadow: var(--shadow); }
.kpi .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface3); color: var(--text2); }
.kpi .ic svg { width: 20px; height: 20px; }
.kpi .ic.ok { background: var(--ok-soft); color: var(--ok-text); } .kpi .ic.warn { background: var(--warn-soft); color: var(--warn-text); } .kpi .ic.info { background: var(--info-soft); color: var(--info-text); } .kpi .ic.err { background: var(--err-soft); color: var(--err-text); }
.kpi .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.kpi .l { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
/* seznam problémů: tečka · název · počet */
.issue { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--border); color: inherit; }
.issue:last-child { border-bottom: 0; }
.issue:hover { background: var(--surface2); text-decoration: none; color: inherit; }
.issue .n { font-family: var(--mono); font-size: 14px; font-weight: 600; min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.issue .t { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; }
.issue .t small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.issue .arr { color: var(--muted2); }
.issue.big .n { font-size: 16px; }
/* kartička jednoho hlášení */
.icard { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); align-items: start; }
.icard:last-child { border-bottom: 0; }
.icard:hover { background: var(--surface2); }
.icard .chk { margin-top: 2px; }
.icard .h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; font-size: 13.5px; }
.icard .h .dot { width: 9px; height: 9px; }
.icard .m { color: var(--text2); font-size: 13px; margin-top: 3px; line-height: 1.45; }
.icard .f { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 6px; align-items: center; }
.icard .f .mono { font-size: 12px; }
.icard .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
/* karty e-shopů */
.shopcard { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.shopcard.off { opacity: .6; }
.shopcard .h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shopcard .h .shop-chip { font-size: 15px; font-weight: 600; }
.shopcard .h .shop-chip i { width: 10px; height: 10px; }
.shopcard .nums { display: flex; gap: 22px; }
.shopcard .nums b { display: block; font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.shopcard .nums span { color: var(--muted); font-size: 12px; }
.shopcard .rows { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.shopcard .rows div { display: flex; justify-content: space-between; gap: 10px; }
.shopcard .rows div span:first-child { color: var(--muted); }
.shopcard .btns { margin-top: 4px; }
/* detail: popisek nad hodnotou */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px 24px; }
.dl .k { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.dl .v { font-size: 14px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.dl .v .sub { font-weight: 400; }
.section { margin-top: 22px; }
.empty { text-align: center; color: var(--muted); padding: 44px 20px; }
.empty .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--surface3); display: grid; place-items: center; margin: 0 auto 10px; color: var(--muted); }
.empty b { color: var(--text); display: block; margin-bottom: 4px; font-weight: 600; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--surface2); font-size: 13.5px; margin-bottom: 16px; }
.callout svg.ic { margin-top: 1px; }
.callout .tx { flex: 1; min-width: 0; }
.callout .x { background: transparent; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 0 2px; font-size: 16px; line-height: 1; }
.callout .x:hover { opacity: 1; }
.callout.warn { background: var(--warn-soft); color: var(--warn-text); }
.callout.err { background: var(--err-soft); color: var(--err-text); }
.callout.info { background: var(--accent-soft); color: var(--accent-text); }
.callout.ok { background: var(--ok-soft); color: var(--ok-text); }
.callout a { color: inherit; text-decoration: underline; }
.callout .btn { margin-left: auto; }

/* ---------------------------------------------------------------- Buttons ---------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border-radius: 8px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: .12s; line-height: 1.25; text-decoration: none !important; }
.btn:hover { background: var(--surface2); border-color: var(--muted2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary, .btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover, .btn.pri:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
html[data-theme="dark"] .btn.primary, html[data-theme="dark"] .btn.pri { color: #0c0f17; }
.btn.danger, .btn.dng { color: var(--err-text); }
.btn.danger:hover, .btn.dng:hover { background: var(--err-soft); border-color: var(--err); }
.btn.danger.solid, .btn.dng-solid { background: var(--err); border-color: var(--err); color: #fff; }
.btn.ok { color: var(--ok-text); } .btn.ok:hover { background: var(--ok-soft); border-color: var(--ok); }
.btn.ghost, .btn.link { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover, .btn.link:hover { background: var(--surface3); color: var(--text); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn.md { padding: 7px 12px; font-size: 13px; }
.btn.lg { padding: 11px 18px; font-size: 14.5px; border-radius: 10px; }
.btn.icon { padding: 7px; width: 34px; height: 34px; }
.btn.icon.sm { width: 28px; height: 28px; padding: 5px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.block { width: 100%; }
.btn .num { width: 44px; margin: -4px 2px; padding: 3px 6px; border: 1px solid var(--border2); border-radius: 6px; background: var(--surface); font-family: var(--mono); font-size: 12px; }
/* rychlé filtry (pilulky) */
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.pills a { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text2); background: var(--surface); box-shadow: var(--shadow-sm); display: inline-flex; align-items: center; gap: 6px; }
.pills a:hover { text-decoration: none; background: var(--surface3); }
.pills a.active { background: var(--accent); color: #fff; box-shadow: none; }
html[data-theme="dark"] .pills a.active { color: #0c0f17; }
.pills a .n { font-family: var(--mono); font-size: 11.5px; opacity: .75; }

/* ---------------------------------------------------------------- Forms ---------------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field label, .f label, .filters label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.field .hint, .help { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.input, select.input, textarea.input, .in, select.in, textarea.in { width: 100%; padding: 8px 11px; border-radius: 8px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); outline: none; transition: .12s; font-size: 13.5px; }
.input:focus, .in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft2); }
.input::placeholder, .in::placeholder { color: var(--muted2); }
textarea.input, textarea.in { min-height: 90px; resize: vertical; line-height: 1.5; font-family: var(--mono); font-size: 12.5px; }
select.input, select.in { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px; }
.input.mono, .in.mono { font-family: var(--mono); font-size: 12.5px; }
.input.sm, .in.sm { padding: 6px 9px; font-size: 13px; }
.in.w-text { max-width: 420px; } .in.w-long { max-width: 640px; } .in.w-secret { max-width: 420px; } .in.w-num { max-width: 140px; } .in.w-date { max-width: 190px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check, .chk-lbl { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; line-height: 1.4; }
.check input, .chk-lbl input, .table input[type=checkbox], .tbl input[type=checkbox], .icard input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); flex: none; margin: 0; }
.seg { display: inline-flex; background: var(--surface3); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button, .seg a { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; color: var(--muted); cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap; }
.seg button.active, .seg a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted2); stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.search .input { padding-left: 32px; }
/* filtry: hledání + řádek selectů bez karty */
.filters { margin-bottom: 14px; }
.filters .row { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; gap: 10px; }
.filters .row + .row { margin-top: 10px; }
.filters .f .in, .filters .f .input { width: 100%; }
.filters .f.acts { display: flex; gap: 8px; align-items: center; }
.filters .f.chk { align-self: end; padding-bottom: 9px; }
.filters details.more > summary { cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--muted); list-style: none; margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; }
.filters details.more > summary::-webkit-details-marker { display: none; }
.filters details.more > summary::before { content: '+'; font-family: var(--mono); width: 18px; height: 18px; border-radius: 6px; background: var(--surface3); display: inline-grid; place-items: center; }
.filters details.more[open] > summary::before { content: '−'; }
.filters details.more .row { margin-top: 10px; }
.filters.card { padding: 14px 18px; }
/* formulář nastavení */
.form-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.form-card .fh { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.form-card .fh b { display: block; font-size: 15px; font-weight: 600; }
.form-card .fh span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.frow { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--border); align-items: start; }
.frow label { font-weight: 500; font-size: 13.5px; color: var(--text); margin: 0; }
.frow .key { font-family: var(--mono); font-size: 11.5px; color: var(--muted2); margin-top: 2px; }
.frow .help { margin-top: 5px; }
.form-card .ff { padding: 14px 20px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--surface2); border-radius: 0 0 var(--radius) var(--radius); }
.form-card .fnote { padding: 10px 20px; color: var(--muted); font-size: 12.5px; border-bottom: 1px solid var(--border); }
.form-card .fblock { padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 13px; }
.form-card .fblock b { display: block; margin-bottom: 6px; }
.form-card .fblock ul { margin: 0; padding-left: 18px; color: var(--muted); }
.form-card .fblock li { margin: 2px 0; }
/* nastavení: sekce vlevo, obsah vpravo */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.snav { position: sticky; top: calc(var(--topbar) + 20px); display: flex; flex-direction: column; gap: 2px; }
.snav .grp { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted2); padding: 12px 10px 4px; }
.snav .grp:first-child { padding-top: 0; }
.snav a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text2); font-size: 13.5px; font-weight: 500; }
.snav a:hover { background: var(--surface3); text-decoration: none; color: var(--text); }
.snav a.active { background: var(--accent-soft); color: var(--accent-text); }

/* ---------------------------------------------------------------- Badges ---------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface3); color: var(--text2); white-space: nowrap; line-height: 1.5; vertical-align: middle; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; flex: none; }
.badge.nodot::before { display: none; }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }
.badge.ok { background: var(--ok-soft); color: var(--ok-text); }
.badge.warn, .badge.wait { background: var(--warn-soft); color: var(--warn-text); }
.badge.err, .badge.bad { background: var(--err-soft); color: var(--err-text); }
.badge.info, .badge.go { background: var(--info-soft); color: var(--info-text); }
.badge.mute { background: var(--surface3); color: var(--muted); }
.badge.sm { padding: 1px 7px; font-size: 11px; } .badge.sm::before { width: 5px; height: 5px; }
.badge.lg { padding: 4px 11px; font-size: 12.5px; }
.badge.mono { font-family: var(--mono); font-weight: 500; }
.badge.count { background: var(--err); color: #fff; padding: 0 6px; min-width: 18px; height: 18px; justify-content: center; font-size: 11px; }
.badge.count::before { display: none; }
.badge-scan { background: var(--accent-soft); color: var(--accent-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted2); }
.dot.error, .dot.err { background: var(--err); } .dot.warning, .dot.warn { background: var(--warn); } .dot.info { background: var(--info); } .dot.ok { background: var(--ok); } .dot.req { background: var(--err); } .dot.opt { background: var(--muted2); }
.sev { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted2); }
.sev.error { background: var(--err); } .sev.warning { background: var(--warn); } .sev.info { background: var(--info); }
.cm { display: inline-grid; place-items: center; min-width: 30px; height: 20px; padding: 0 5px; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: .02em; background: var(--surface3); color: var(--text2); }
.cm.packeta { background: #fde2e7; color: #b3123a; } .cm.ppl { background: #dbeafe; color: #1d4ed8; } .cm.cpost { background: #fef3c7; color: #92400e; } .cm.gls { background: #dcfce7; color: #166534; }
html[data-theme="dark"] .cm.packeta { background: rgba(216,26,76,.25); color: #fda4af; } html[data-theme="dark"] .cm.ppl { background: rgba(37,99,235,.25); color: #93c5fd; } html[data-theme="dark"] .cm.cpost { background: rgba(217,119,6,.22); color: #fcd34d; } html[data-theme="dark"] .cm.gls { background: rgba(22,163,74,.22); color: #86efac; }
.carrier { display: inline-flex; align-items: center; gap: 7px; }
.carrier .name { font-size: 13px; }
.carrier .trk { font-family: var(--mono); font-size: 12.5px; }
.pay-type { font-size: 13px; }
.shop-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text2); white-space: nowrap; }
.shop-chip i { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.shop-chip.sm { font-size: 11.5px; } .shop-chip.lg { font-size: 13.5px; font-weight: 600; }

/* ---------------------------------------------------------------- Tables ---------------------------------------------------------------- */
.table, .tbl { width: 100%; border-collapse: collapse; }
.table th, .table td, .tbl th, .tbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 13.5px; }
.table th, .tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; white-space: nowrap; padding-top: 10px; padding-bottom: 10px; }
.table th:first-child, .table td:first-child, .tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child, .tbl th:last-child, .tbl td:last-child { padding-right: 20px; }
.table tbody tr:last-child td, .tbl tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td, .tbl tbody tr:hover td { background: var(--surface2); }
.table td.actions, .table th.actions { text-align: right; white-space: nowrap; width: 1%; }
.table .num, .table .r, .tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap, .tbl-wrap { overflow-x: auto; }
.table.compact td, .table.compact th { padding: 7px 10px; font-size: 13px; }
.table .sub, .tbl .sub { font-size: 12px; }
.table .chk, .tbl .chk { width: 1%; }
.table tr.hl td, .tbl tr.hl td { background: var(--warn-soft); }
.table tr.hl-ok td, .tbl tr.hl-ok td { background: var(--ok-soft); }
.table .msg-cell, .tbl .msg-cell { max-width: 520px; white-space: normal; line-height: 1.45; }
.cell-main { font-weight: 600; font-size: 13.5px; }
.cell-sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 3px; font-size: 12px; color: var(--muted); }
.cell-sub .mono { font-size: 12px; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 9px 20px; border-bottom: 1px solid var(--border); color: inherit; }
.list-row:hover { text-decoration: none; background: var(--surface2); color: inherit; }
.list-row:last-of-type { border-bottom: 0; }
.list-row .grow { flex: 1 1 auto; min-width: 0; font-size: 13.5px; }
.list-row .n { font-family: var(--mono); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--border); font-size: 13.5px; align-items: center; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); font-size: 13px; }
.kv .v { min-width: 0; overflow-wrap: anywhere; }
.stat-row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; gap: 10px; }
.stat-row .k { color: var(--muted); } .stat-row .v { font-family: var(--mono); font-weight: 500; }
.hr { height: 1px; background: var(--border); }
.bar { height: 6px; background: var(--surface3); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar.ok i { background: var(--ok); }
.summary-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.summary-row .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; margin-bottom: 4px; }
.setup { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.setup .it { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--surface2); }
.setup .it b { display: block; font-weight: 600; font-size: 13.5px; }
.setup .it p { color: var(--muted); font-size: 12.5px; margin: 2px 0 6px; }
.setup .it a { font-size: 12.5px; font-weight: 500; }
.sysbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.sysbar .it { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px; border-right: 1px solid var(--border); font-size: 13.5px; }
.sysbar .it:last-child { border-right: 0; }
.sysbar .it .k { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; flex-basis: 100%; }

/* ---------------------------------------------------------------- Tabs ---------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 9px 12px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; font-size: 13.5px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--accent-text); border-bottom-color: var(--accent); }
.tabs a .pill { font-family: var(--mono); font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--surface3); color: var(--muted); }
.subtabs, .subnav { display: inline-flex; gap: 2px; background: var(--surface3); padding: 3px; border-radius: 9px; margin-bottom: 16px; flex-wrap: wrap; }
.subtabs a, .subnav a { padding: 6px 12px; border-radius: 7px; color: var(--muted); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.subtabs a:hover, .subnav a:hover { text-decoration: none; color: var(--text); }
.subtabs a.active, .subnav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.subtabs a .pill, .subnav a .pill { font-family: var(--mono); font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft2); color: var(--text2); }
.tabs + .subtabs { margin-top: -6px; }

/* ---------------------------------------------------------------- Misc ---------------------------------------------------------------- */
.pager { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager .info { font-family: var(--mono); font-size: 12px; }
.pager .pg { display: flex; gap: 4px; }
.pager .pg a, .pager .pg span { min-width: 30px; height: 30px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; }
.pager .pg a:hover { background: var(--surface3); text-decoration: none; }
.pager .pg .cur { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .pg .dis { opacity: .4; } .pager .pg .dots { border-color: transparent; background: transparent; }
.timeline { list-style: none; margin: 0; padding: 4px 0 8px; }
.timeline li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; padding: 9px 0; position: relative; }
.timeline .rail { position: relative; display: flex; justify-content: center; }
.timeline .rail i { position: absolute; top: 18px; bottom: -12px; width: 2px; background: var(--border); }
.timeline li:last-child .rail i { display: none; }
.timeline .rail b { width: 10px; height: 10px; border-radius: 50%; background: var(--muted2); margin-top: 5px; z-index: 1; box-shadow: 0 0 0 3px var(--surface); }
.timeline .rail b.ok { background: var(--ok); } .timeline .rail b.warn { background: var(--warn); } .timeline .rail b.err { background: var(--err); } .timeline .rail b.info { background: var(--info); } .timeline .rail b.accent { background: var(--accent); }
.timeline .when { font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.timeline .what { font-size: 13.5px; margin-top: 2px; font-weight: 500; }
.timeline .meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted2); margin-top: 2px; }
.code { font-family: var(--mono); font-size: 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; margin: 0; max-height: 420px; overflow: auto; line-height: 1.5; }
.code.err { color: var(--err-text); }
.code.short { max-height: 160px; }
details.dt > summary { cursor: pointer; list-style: none; font-weight: 500; font-size: 13.5px; display: flex; align-items: center; gap: 8px; padding: 12px 20px; }
details.dt > summary::-webkit-details-marker { display: none; }
details.dt > summary::before { content: ''; width: 6px; height: 6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: .12s; margin-right: 2px; }
details.dt[open] > summary::before { transform: rotate(45deg); }
details.dt > summary.danger { color: var(--err-text); }
details.dt .dt-b { padding: 4px 20px 16px; }
.alert-item { padding: 12px 20px; border-bottom: 1px solid var(--border); }
.alert-item:last-child { border-bottom: 0; }
.alert-item .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.alert-item .top b { font-size: 13.5px; }
.alert-item .msg { font-size: 13.5px; margin-top: 4px; line-height: 1.45; }
.alert-item .meta { color: var(--muted); font-size: 12px; margin-top: 4px; font-family: var(--mono); }
.alert-item .acts { margin-top: 8px; }
.note-item { padding: 10px 20px; border-bottom: 1px solid var(--border); font-size: 13.5px; white-space: pre-wrap; }
.note-item:last-child { border-bottom: 0; }
.note-item .meta { color: var(--muted2); font-size: 12px; font-family: var(--mono); margin-top: 3px; }
.danger-zone { box-shadow: 0 0 0 1px var(--err-soft); }
.danger-zone .card-h, .danger-zone .card-head h2 { color: var(--err-text); }
.cron-cmd .code { margin-top: 8px; }
.import-drop { border: 1.5px dashed var(--border2); border-radius: 10px; padding: 22px; text-align: center; background: var(--surface2); }
.import-drop input[type=file] { font-size: 13px; }
.cover { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; padding: 0 20px 16px; }
.cover .m { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; background: var(--surface); font-size: 12px; }
.cover .m b { display: block; font-family: var(--mono); font-size: 12px; }
.cover .m span { display: block; color: var(--muted); font-size: 11px; }
.cover .m.api { border-color: transparent; background: var(--ok-soft); color: var(--ok-text); }
.cover .m.csv { border-color: transparent; background: var(--info-soft); color: var(--info-text); }
.cover .m.mix { border-color: transparent; background: linear-gradient(135deg, var(--ok-soft) 50%, var(--info-soft) 50%); }
.qr { background: #fff; padding: 8px; border-radius: 12px; display: inline-block; border: 1px solid var(--border); }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--border2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--muted); }
.err-code { font-family: var(--mono); font-size: 12px; color: var(--muted2); }
.err-card { max-width: 640px; margin: 40px auto; }

/* ---------------------------------------------------------------- Aliasy starších komponent ---------------------------------------------------------------- */
.card:has(> .card-h), .card:has(> .card-b), .card:has(> .tbl-wrap), .card:has(> .kv), .card:has(> .list-row), .card:has(> .timeline), .card:has(> .alert-item), .card:has(> .note-item), .card:has(> details.dt), .card:has(> .card-note), .card:has(> .cover), .card:has(> .issue), .card:has(> .icard) { padding: 0; overflow: hidden; }
.card-h { padding: 14px 20px 12px; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; letter-spacing: -.01em; }
.card-h + .tbl-wrap, .card-h + .kv, .card-h + .list-row, .card-h + .alert-item, .card-h + .note-item, .card-h + .card-b, .card-h + .issue, .card-h + .icard, .card-h + .cover { border-top: 1px solid var(--border); }
.card-h .sub { margin-left: auto; font-weight: 400; font-size: 12.5px; color: var(--muted); margin-top: 0; }
.card-h .right { margin-left: auto; font-weight: 400; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 16px 20px; }
.card-b + .card-b { border-top: 1px solid var(--border); }
.card-f { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--surface2); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4, .grid-tiles { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-detail { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.grid-form { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-form .full { grid-column: 1 / -1; }
.tile { display: block; background: var(--surface); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); color: inherit; }
a.tile:hover { text-decoration: none; box-shadow: var(--shadow); }
.tile .l { color: var(--muted); font-size: 12.5px; } .tile .n { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; } .tile .go { font-size: 12.5px; color: var(--muted); margin-top: 4px; } .tile .meta { font-size: 12px; color: var(--muted2); margin-top: 4px; font-family: var(--mono); }
.tile.crit .n { color: var(--err-text); } .tile.warn .n { color: var(--warn-text); }
.flash { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--surface2); font-size: 13.5px; margin-bottom: 16px; }
.flash .ic { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: currentColor; flex: none; margin-top: 1px; position: relative; }
.flash .ic::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.flash .tx { flex: 1; min-width: 0; }
.flash .x { background: transparent; border: 0; color: inherit; opacity: .6; cursor: pointer; font-size: 14px; }
.flash.ok { background: var(--ok-soft); color: var(--ok-text); }
.flash.bad { background: var(--err-soft); color: var(--err-text); }
.flash.wait { background: var(--warn-soft); color: var(--warn-text); }
.flash.mute { background: var(--surface2); color: var(--text2); }
.flash a { color: inherit; text-decoration: underline; }
.flash .btn { margin-left: auto; }
.expl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.expl .card { padding: 14px 16px; } .expl b { display: block; margin-bottom: 4px; } .expl p { color: var(--muted); font-size: 12.5px; }
.w-full { width: 100%; }

/* ---------------------------------------------------------------- Login ---------------------------------------------------------------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); background-image: radial-gradient(70% 50% at 50% 0%, var(--surface3), transparent 70%); }
.login .card { width: min(100%, 400px); padding: 32px 28px; }
.login .brand { display: flex; justify-content: center; padding-bottom: 12px; }
.login .brand img { height: 36px; }
.login .meta { margin-top: 16px; text-align: center; color: var(--muted2); font-size: 12px; font-family: var(--mono); }
.login .card.wide { width: min(100%, 720px); }
.login-card h1 { text-align: center; font-size: 18px; margin-bottom: 2px; }
.login-card .sub { text-align: center; margin-bottom: 18px; }
.login-card label { display: block; font-size: 12.5px; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.login-card .in { margin-bottom: 12px; }
.login-card .btn { width: 100%; margin-top: 4px; }
.login-card .flash { margin-bottom: 14px; }
.login-card .recaptcha { margin: 6px 0 12px; display: flex; justify-content: center; }
.login-meta { display: none; }

/* ---------------------------------------------------------------- Responsive ---------------------------------------------------------------- */
@media (max-width: 1280px) {
  .content { padding: 22px 22px 60px; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3, .grid-3, .grid-4, .grid-tiles, .expl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.main-side, .grid.side-main, .grid-detail { grid-template-columns: minmax(0, 1fr); }
  .frow { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .kv { grid-template-columns: 140px minmax(0, 1fr); }
  .settings-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 900px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .topbar { padding: 0 12px; gap: 6px; }
  .topbar .brand { width: auto; margin-right: 6px; }
  .topbar .search { display: none; }
  .topbar .user .nm, .topbar .user .caret { display: none; }
  .topbar .shop-sel { flex: 0 1 140px; min-width: 0; max-width: 140px; font-size: 12.5px; }
  .topbar .ibtn, .topbar .user-wrap { flex: none; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); z-index: 30; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: var(--muted); font-size: 10.5px; font-weight: 500; border-radius: 10px; position: relative; }
  .bottomnav a svg { width: 21px; height: 21px; }
  .bottomnav a.active { color: var(--accent-text); }
  .bottomnav .badge.count { position: absolute; top: 2px; right: 18%; }
  .content { padding: 16px 14px 90px; max-width: none; }
  .page-head h1 { font-size: 20px; }
  .hero .big { font-size: 28px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid-2, .grid-3, .grid-form, .expl, .grid.main-side, .grid.side-main { grid-template-columns: minmax(0, 1fr); }
  .grid.cols-4, .grid-4, .grid-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 12px; gap: 10px; } .kpi .ic { width: 34px; height: 34px; } .kpi .v { font-size: 19px; } .kpi .l { font-size: 11.5px; }
  .row, .row.c3, .filters .row { grid-template-columns: minmax(0, 1fr); }
  .summary-row { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .snav { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .snav .grp { display: none; }
  .icard { grid-template-columns: 22px minmax(0, 1fr); } .icard .side { grid-column: 2; align-items: flex-start; }
  .table td.hide-m, .table th.hide-m, .hide-m { display: none; }
  .table.cards thead, .tbl.cards thead { display: none; }
  .table.cards, .table.cards tbody, .table.cards tr, .table.cards td, .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; }
  .table.cards tr, .tbl.cards tr { border-bottom: 1px solid var(--border); padding: 10px 14px; }
  .table.cards td, .tbl.cards td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; align-items: start; }
  .table.cards td::before, .tbl.cards td::before { content: attr(data-th); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding-top: 3px; }
  .table.cards td.r, .tbl.cards td.r, .table.cards td.num { text-align: left; }
  .table.cards td.chk, .table.cards td.nolbl, .tbl.cards td.chk, .tbl.cards td.nolbl { display: block; } .table.cards td.chk::before, .table.cards td.nolbl::before, .tbl.cards td.chk::before, .tbl.cards td.nolbl::before { display: none; }
  .pager .pg .numpage { display: none; }
  .sysbar .it { border-right: 0; border-bottom: 1px solid var(--border); }
}
@media print {
  .topbar, .sidebar, .bottomnav, .filters, .btns, .pager { display: none !important; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ---------------------------------------------------------------- Nastavení: sekce vlevo, obsah vpravo (bez zásahu do šablon) ---------------------------------------------------------------- */
.content.settings { display: grid; grid-template-columns: 210px minmax(0, 1fr); column-gap: 28px; align-content: start; align-items: start; }
.content.settings > .page-head, .content.settings > .callout { grid-column: 1 / -1; }
.content.settings > .snav { grid-column: 1; grid-row: span 300; }
.content.settings > :not(.snav):not(.page-head):not(.callout), .content.settings > .callout.inner { grid-column: 2; }
.sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.sec-head h2 { font-size: 16px; margin: 0; }
.sec-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
@media (max-width: 900px) {
  .content.settings { display: block; }
}
svg.ic.flip { transform: scaleX(-1); }
.callout .btns { margin-left: auto; flex: none; }
.card + .filters, .pills + .filters { margin-top: 16px; }

/* patička s autorem */
.sidebar .foot a, .page-foot a, .login .meta a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border2); }
.sidebar .foot a:hover, .page-foot a:hover, .login .meta a:hover { color: var(--accent-text); }
.sidebar .foot { line-height: 1.6; }
.page-foot { display: none; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted2); font-size: 11.5px; font-family: var(--mono); }
.content.settings > .page-foot { grid-column: 1 / -1; }
@media (max-width: 900px) { .page-foot { display: block; } }
.sidebar .foot .sys { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--text2); text-decoration: none; margin-bottom: 6px; }
.sidebar .foot .sys i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.sidebar .foot .sys.err { color: var(--err-text); } .sidebar .foot .sys.err i { background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.sidebar .foot .sys:hover { text-decoration: none; color: var(--accent-text); }
/* Dnes řešit */
.todo-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; border-left: 3px solid var(--warn); }
.todo-card.err { border-left-color: var(--err); }
.todo-card .h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.todo-card .n { font-size: 30px; font-weight: 650; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.todo-card.err .n { color: var(--err-text); }
.todo-card .meta { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.todo-card .act { color: var(--text2); font-size: 13px; line-height: 1.45; flex: 1; }
.todo-card .btn { align-self: flex-start; }
.rule-row { display: grid; grid-template-columns: minmax(0, 1.2fr) 60px minmax(0, 1.6fr); gap: 10px; padding: 9px 20px; border-bottom: 1px solid var(--border); font-size: 13px; align-items: center; }
.rule-row:last-child { border-bottom: 0; }
.rule-row .w { font-weight: 500; }
.rule-row .d { color: var(--accent-text); font-weight: 600; font-size: 12.5px; }
.rule-row .t { color: var(--muted); font-size: 12.5px; }
.grid.todo + .section-label { margin-top: 22px; }
/* hlavní hlášení v detailu */
.alert-main { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px 20px; margin-bottom: 16px; border-left: 4px solid var(--warn); }
.alert-main.err { border-left-color: var(--err); } .alert-main.info { border-left-color: var(--info); }
.alert-main .ah { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.alert-main .ab { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; margin: 12px 0 14px; }
.alert-main .ab .k { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.alert-main .ab .v { font-size: 13.5px; line-height: 1.5; color: var(--text2); }
.kpi.active { box-shadow: 0 0 0 2px var(--accent); }
.pipe + .callout { margin-top: 16px; }
.pipe + .pills, .pipe + .card { margin-top: 18px; }
/* rule builder */
.rule-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.rule-card .rh { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14.5px; }
.rule-card .rc { font-size: 13.5px; color: var(--text2); line-height: 1.6; }
.rule-card .rc .days { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); white-space: nowrap; }
.rule-card .rc .days .input { width: 72px; padding: 4px 8px; text-align: right; font-weight: 600; }
.rule-card .rt { font-size: 13px; color: var(--accent-text); font-weight: 500; border-top: 1px solid var(--border); padding-top: 10px; }
.rule-card .rt .sub { font-weight: 400; }
.prose h2 { font-size: 18px; margin: 4px 0 10px; } .prose h3 { font-size: 15px; margin: 22px 0 8px; } .prose h4 { font-size: 14px; margin: 16px 0 6px; }
.prose p { margin: 0 0 8px; font-size: 13.5px; color: var(--text2); line-height: 1.6; }
.prose p.num { padding-left: 14px; }
.prose ul { margin: 0 0 10px; padding-left: 20px; font-size: 13.5px; color: var(--text2); line-height: 1.6; }
.prose li { margin: 3px 0; }
.prose .table-wrap { margin: 8px 0 14px; border: 1px solid var(--border); border-radius: 8px; }
.prose code { background: var(--surface3); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
