/* ===== Design tokens ===== */
:root {
  color-scheme: light;
  --bg: #f5f5f3; --side: #fbfbfa; --surface: #fff; --s2: #efefec; --hover: #f3f3f0;
  --border: #e4e4df; --border2: #d3d3cd;
  --text: #16171a; --muted: #5f6168; --faint: #8f9197;
  --accent: #3a62dc; --accent-soft: #e7edff;
  --c2: #16877a; --c2-soft: #dcf3ee;
  --bad: #c33a2f; --bad-soft: #fdecea;
  --warn: #9a5c00; --warn-soft: #fdf0d8;
  --good: #23794a; --good-soft: #e0f3e6;
  --ink: #16171a; --ink-text: #fff;
  --shadow-hover: 0 6px 20px rgba(0,0,0,.06); --shadow-pop: 0 10px 28px rgba(0,0,0,.14);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, Consolas, "SF Mono", monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f11; --side: #111215; --surface: #16181b; --s2: #1e2024; --hover: #1b1d21;
  --border: #26282d; --border2: #373a40;
  --text: #ebebe8; --muted: #9c9ea4; --faint: #6d7076;
  --accent: #7f9dff; --accent-soft: #1d2645;
  --c2: #4fc2ad; --c2-soft: #0d302a;
  --bad: #f07a6f; --bad-soft: #351815;
  --warn: #e3ad5f; --warn-soft: #33240c;
  --good: #6cc489; --good-soft: #12291b;
  --ink: #ebebe8; --ink-text: #111215;
  --shadow-hover: 0 6px 20px rgba(0,0,0,.35); --shadow-pop: 0 10px 28px rgba(0,0,0,.5);
}

/* ===== Základ ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 14px/1.45 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; margin: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; }
code { font-family: var(--mono); font-size: 12px; background: var(--s2); padding: 1px 5px; border-radius: 5px; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.micro { font-size: 11px; }
.ok { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
[hidden] { display: none !important; }

/* ===== Layout ===== */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 244px; flex: 0 0 244px; position: sticky; top: 0; height: 100vh; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; background: var(--side); border-right: 1px solid var(--border); overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 10px; padding: 2px 8px 20px; font-size: 15px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo img { width: 28px; height: 28px; border-radius: 8px; display: block; }
.logo .muted { font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 7px; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-item:hover { text-decoration: none; background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--s2); color: var(--text); }
.nav-item svg { flex: 0 0 16px; }
.nav-item .cnt { margin-left: auto; font-size: 12px; color: var(--faint); }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.nav-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 20px 10px 6px; }
.nav-group { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; border-radius: 7px; font-size: 13px; color: var(--muted); }
.nav-group:hover { text-decoration: none; background: var(--hover); color: var(--text); }
.nav-group.active { background: var(--s2); color: var(--text); }
.nav-group .sq { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 8px; background: var(--border2); }
.nav-group[data-i="0"] .sq { background: var(--accent); }
.nav-group[data-i="1"] .sq { background: var(--c2); }
.nav-group[data-i="2"] .sq { background: var(--warn); }
.nav-group .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group .cnt { font-size: 12px; color: var(--faint); }
.spacer { flex: 1; }
.sync-box { display: block; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.sync-box:hover { text-decoration: none; background: var(--hover); }
.sync-box .l1 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.sync-box .l2 { font-size: 12px; color: var(--muted); margin-top: 2px; padding-left: 15px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: inline-block; flex: 0 0 7px; }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.dot.grey { background: var(--border2); }
.user { position: relative; margin-top: 6px; }
.user-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: none; border: 0; cursor: pointer; font: inherit; color: var(--text); text-align: left; }
.user-btn:hover { background: var(--hover); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: 0 0 28px; }
.user-btn .n { font-size: 13px; font-weight: 500; line-height: 1.2; }
.user-btn .s { font-size: 11px; line-height: 1.2; }
.user-btn .chev { margin-left: auto; color: var(--faint); }
.user-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 30; }
.user-menu a, .user-menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; font: inherit; font-size: 13px; color: var(--text); background: none; border: 0; cursor: pointer; text-align: left; }
.user-menu a:hover, .user-menu button:hover { background: var(--hover); text-decoration: none; }
.user-menu .sep { height: 1px; background: var(--border); margin: 6px 4px; }
.user-menu .danger { color: var(--bad); }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 58px; padding: 0 32px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); background: var(--bg); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.crumbs a { color: var(--muted); }
.crumbs .sep { color: var(--faint); }
.crumbs .cur { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search { position: relative; width: 260px; }
.search input[type=search] { width: 100%; height: 34px; padding: 0 40px 0 32px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.search input[type=search]:focus { outline: none; border-color: var(--accent); }
.search svg { position: absolute; left: 10px; top: 10px; color: var(--faint); pointer-events: none; }
.search .kbd { position: absolute; right: 8px; top: 8px; height: 18px; padding: 0 6px; border: 1px solid var(--border); border-radius: 5px; font-family: var(--mono); font-size: 11px; color: var(--faint); display: inline-flex; align-items: center; background: var(--s2); }
.iconbtn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex-shrink: 0; }
.iconbtn:hover { background: var(--hover); }
.hamburger { display: none; }
.theme { position: relative; }
.theme-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 30; }
.theme-menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 7px; font: inherit; font-size: 13px; color: var(--text); background: none; border: 0; cursor: pointer; }
.theme-menu button:hover { background: var(--hover); }
.theme-menu button.on::after, .theme-row .seg button.on { font-weight: 600; }
.theme-menu button.on::after { content: "✓"; color: var(--accent); }
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; }
.theme-row .seg a, .theme-row .seg button { height: 24px; padding: 0 8px; font-size: 12px; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; font-size: 13px; }
button.link:hover { color: var(--text); }
button.link.danger, .link.danger { color: var(--bad); }
main { max-width: 1680px; width: 100%; margin: 0 auto; padding: 28px 32px 64px; display: flex; flex-direction: column; gap: 20px; }
main.centered { max-width: none; min-height: 100vh; align-items: center; justify-content: center; }
.stale-bar { margin: 20px 32px -8px; }

/* ===== Karty, hlavičky ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.card-body { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.card-head .t { font-size: 14px; font-weight: 600; }
.card-head .d { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--side); border-radius: 0 0 14px 14px; }
.card-foot.between { justify-content: space-between; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 6px; font-size: 13px; }
.page-head .tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack.tight { gap: 12px; }
.empty { border: 1px dashed var(--border2); border-radius: 12px; padding: 28px; text-align: center; color: var(--muted); }
.notice { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.notice .dot { margin-top: 6px; }
.notice.bad { background: var(--bad-soft); border-color: transparent; }
.notice.warn { background: var(--warn-soft); border-color: transparent; }
.notice .body { flex: 1; font-size: 13px; }
.notice .body strong { font-weight: 600; }
.notice .link { white-space: nowrap; font-size: 13px; flex-shrink: 0; }

/* ===== Segment, tlačítka, pilly ===== */
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--s2); gap: 2px; }
.seg a, .seg button { height: 28px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; border: 0; background: transparent; cursor: pointer; font-family: inherit; white-space: nowrap; }
.seg a:hover, .seg button:hover { text-decoration: none; color: var(--text); }
.seg a.on, .seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 500; font-size: 13px; cursor: pointer; white-space: nowrap; flex-shrink: 0; background: var(--ink); color: var(--ink-text); }
.btn:hover { text-decoration: none; opacity: .9; }
.btn.secondary { background: var(--surface); border-color: var(--border2); color: var(--text); }
.btn.secondary:hover { background: var(--hover); opacity: 1; }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger-text { background: transparent; color: var(--bad); }
.btn.dashed { background: transparent; border: 1px dashed var(--border2); color: var(--muted); position: relative; }
.btn.dashed input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.btn.lg { height: 38px; }
.btn.block { width: 100%; height: 42px; font-weight: 600; font-size: 14px; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn[disabled], .btn.disabled { opacity: .4; cursor: default; pointer-events: none; }
.btn.busy { opacity: .6; pointer-events: none; }
.pill { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 5px; font-size: 11px; font-weight: 600; white-space: nowrap; vertical-align: middle; line-height: 1.4; }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.grey { background: var(--s2); color: var(--muted); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.c2 { background: var(--c2-soft); color: var(--c2); }
.delta { font-size: 12px; font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.delta.flat, .delta.new { color: var(--muted); }
.tag { display: inline-block; padding: 1px 6px; border-radius: 5px; font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.tag.ga { background: var(--accent-soft); color: var(--accent); }
.tag.gsc { background: var(--c2-soft); color: var(--c2); }
.tag.top { background: var(--warn-soft); color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 9px; border-radius: 6px; background: var(--s2); font-family: var(--mono); font-size: 12px; }
.chip button { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.chip button:hover { color: var(--bad); }
.chips input { width: 150px; height: 28px; padding: 0 8px; font-size: 12px; }

/* ===== Formuláře ===== */
label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 14px; }
label > input, label > select, label > textarea { margin-top: 6px; }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], input[type=date], input[type=search], select, textarea {
  display: block; width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px;
}
textarea { height: auto; padding: 8px 12px; font-family: var(--mono); font-size: 12px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input.mono { font-family: var(--mono); font-size: 13px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 6px; }
label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; }
label.check input { width: auto; height: auto; margin: 3px 0 0; accent-color: var(--accent); }
label.check .d { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.box { background: var(--s2); border-radius: 10px; padding: 12px 14px; }
.box label { margin-bottom: 8px; }
.box label:last-child { margin-bottom: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0 18px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-error { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.thr-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.thr-row:last-child { border-bottom: 0; }
.thr-row .l { font-size: 13px; font-weight: 500; }
.thr-row .d { font-size: 12px; color: var(--muted); }
.thr-row .in { display: inline-flex; flex-shrink: 0; }
.thr-row .in input { width: 130px; border-radius: 8px 0 0 8px; }
.thr-row .in .unit { display: inline-flex; align-items: center; padding: 0 10px; background: var(--s2); border: 1px solid var(--border2); border-left: 0; border-radius: 0 8px 8px 0; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pw-checks { list-style: none; padding: 0; margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.pw-checks li.ok { color: var(--good); }
.g-recaptcha { margin: 4px 0 16px; }
.danger-zone { border: 1px solid var(--bad-soft); border-radius: 12px; padding: 16px; }
.danger-zone .t { color: var(--bad); font-weight: 600; margin-bottom: 4px; }
.test-box { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.test-box .res { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 13px; }
.test-box .res div { display: flex; gap: 8px; align-items: flex-start; }
.test-box .res .dot { margin-top: 6px; }
.codebox { font-family: var(--mono); font-size: 12px; background: var(--s2); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; word-break: break-all; margin: 0; }
.copy-row { display: flex; gap: 8px; align-items: flex-start; }
.copy-row .codebox { flex: 1; }
.kv { display: flex; flex-direction: column; gap: 8px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.kv .k { color: var(--muted); }

/* ===== Tabulky ===== */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl th { font-size: 12px; font-weight: 500; color: var(--muted); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--hover); }
.tbl tr.grp td { background: var(--side); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 16px; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl .item { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scroll { overflow-x: auto; }
.bar { height: 6px; width: 110px; background: var(--s2); border-radius: 3px; overflow: visible; position: relative; display: inline-block; vertical-align: middle; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bar.bad span { background: var(--bad); }
.bar.warn span { background: var(--warn); }
.bar .mark { position: absolute; top: -3px; bottom: -3px; width: 1.5px; background: var(--text); opacity: .5; }
.cc { font-family: var(--mono); font-size: 11px; color: var(--faint); }

/* ===== Přehled ===== */
.group-block { display: flex; flex-direction: column; gap: 10px; }
.group-row { display: flex; align-items: baseline; gap: 8px; }
.group-row .n { font-size: 15px; font-weight: 600; }
.group-row .c { font-size: 12px; color: var(--faint); }
.group-row .tot { margin-left: auto; font-size: 12px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; }
.tiles .spark { height: 72px; }
.tile { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 12px; color: var(--text); transition: box-shadow .15s, border-color .15s; }
.tile:hover { text-decoration: none; border-color: var(--border2); box-shadow: var(--shadow-hover); }
.tile.inactive { opacity: .55; }
.tile .th { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tile .th .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .th .d { font-size: 12px; color: var(--faint); }
.tile .th .pills { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; flex-shrink: 0; }
.tile .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.tile .cols > div { min-width: 0; }
.tile .v { font-size: 19px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 6px; }
.tile .l { font-size: 11px; color: var(--faint); margin: 1px 0 6px; }
.spark { height: 34px; position: relative; }
.spark.sm { height: 28px; width: 100px; }
.spark canvas { max-width: 100%; }
.chart-rows { display: flex; flex-direction: column; gap: 10px; }
.chart-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: center; padding: 14px 18px; border-radius: 12px; color: var(--text); transition: box-shadow .15s, border-color .15s; }
.chart-row:hover { text-decoration: none; border-color: var(--border2); box-shadow: var(--shadow-hover); }
.chart-row.inactive { opacity: .55; }
.chart-row .info { min-width: 0; }
.chart-row .info .n { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-row .info .d { font-size: 12px; color: var(--faint); margin-bottom: 6px; }
.chart-row .info .pills { display: flex; flex-wrap: wrap; gap: 4px; }
.chart-row .metric { min-width: 0; }
.chart-row .metric .v { font-size: 19px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 6px; }
.chart-row .metric .l { font-size: 11px; color: var(--faint); margin: 1px 0 6px; }
.spark.lg { height: 110px; }
@media (max-width: 900px) { .chart-row { grid-template-columns: 1fr; } }
.spark-tip { position: fixed; z-index: 50; background: var(--ink); color: var(--ink-text); font-size: 11px; padding: 4px 8px; border-radius: 7px; pointer-events: none; white-space: nowrap; transform: translate(-50%, -100%); }

/* ===== Detail webu ===== */
.site-sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 6px; }
.site-sub .mono { white-space: nowrap; }
.period-bar { position: sticky; top: 58px; z-index: 10; background: var(--bg); padding: 8px 0; margin: -8px 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.period-bar .range { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.period-bar .cmp { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface); font-size: 13px; font-weight: 500; cursor: pointer; margin-bottom: 0; }
.period-bar .cmp input { margin: 0; width: auto; height: auto; accent-color: var(--accent); }
.period-bar .dates { display: none; gap: 6px; align-items: center; }
.period-bar .dates.open { display: flex; }
.period-bar .dates input { height: 34px; width: 140px; font-size: 13px; }
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.kpi-strip > div { background: var(--surface); padding: 14px 16px; }
.kpi-strip .lbl { font-size: 12px; color: var(--muted); }
.kpi-strip .val { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin: 4px 0 2px; display: flex; align-items: baseline; gap: 8px; }
.kpi-strip .src { font-size: 11px; font-weight: 500; color: var(--muted); }
.kpi-strip .src.ga { color: var(--accent); }
.kpi-strip .src.gsc { color: var(--c2); }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; }
.chart-card { padding: 18px 20px; }
.chart-card .ch { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.chart-card .ch .t { font-size: 14px; font-weight: 600; }
.chart-legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; justify-content: flex-end; }
.chart-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.chart-legend i.dash { height: 0; border-top: 2px dashed var(--faint); }
.chart-legend .lg-item { display: inline-flex; align-items: center; background: none; border: 0; padding: 2px 4px; margin: -2px -4px; border-radius: 5px; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.chart-legend .lg-item:hover { background: var(--hover); color: var(--text); }
.chart-legend .lg-item.off { opacity: .45; text-decoration: line-through; }
.chart-legend .lg-item i.dash { background: none; }
.chart { position: relative; height: 200px; }
.chart canvas { cursor: crosshair; }
.chart-tip { position: fixed; z-index: 50; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 10px 12px; min-width: 190px; pointer-events: none; font-size: 13px; }
.chart-tip .d { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.chart-tip .r { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; }
.chart-tip .r .l { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chart-tip .r .l i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.chart-tip .r b { font-weight: 600; }
.chart-tip .f { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; font-size: 12px; color: var(--muted); }
.stack-bar { display: flex; height: 10px; gap: 2px; border-radius: 5px; overflow: hidden; margin-bottom: 12px; }
.stack-bar span { display: block; height: 100%; }
.ch-rows { display: flex; flex-direction: column; gap: 6px; }
.ch-rows > div { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; font-size: 13px; align-items: center; }
.ch-rows i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.ch-rows .p { color: var(--muted); min-width: 44px; text-align: right; }
.dev-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.dev-tiles > div { background: var(--s2); border-radius: 8px; padding: 10px 12px; }
.dev-tiles .l { font-size: 11px; color: var(--muted); }
.dev-tiles .v { font-size: 17px; font-weight: 600; }
.country-row { display: grid; grid-template-columns: 32px 1fr auto 120px auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.country-row:last-child { border-bottom: 0; }
.country-row .n { display: flex; gap: 8px; align-items: center; }
.country-row .u { text-align: right; min-width: 60px; }
.country-row .a { min-width: 80px; text-align: right; font-size: 12px; }
.top-table .tbl td, .top-table .tbl th { padding: 8px 12px; }
.share-panel { display: none; }
.share-panel.open { display: block; }

/* drawer */
.overlay { position: fixed; inset: 0; background: rgba(10,11,13,.35); z-index: 40; display: none; }
.overlay.open { display: block; }
.drawer { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(600px, calc(100% - 32px)); max-height: calc(100vh - 48px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-pop); z-index: 41; display: none; flex-direction: column; overflow: hidden; }
.drawer.open { display: flex; }
.drawer .dh { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer .dh h2 { font-size: 16px; }
.drawer .db { flex: 1; overflow-y: auto; padding: 20px; }
.drawer .df { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--side); }

/* ===== Weby ===== */
.group-card .group-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--side); border-bottom: 1px solid var(--border); border-radius: 14px 14px 0 0; cursor: grab; }
.group.ungrouped .group-head { cursor: default; }
.handle { color: var(--faint); font-size: 16px; user-select: none; line-height: 1; }
.group-head .rename input { border: 1px solid transparent; background: transparent; height: 30px; padding: 0 8px; font-weight: 600; font-size: 14px; width: 240px; border-radius: 7px; }
.group-head .rename input:hover { border-color: var(--border); }
.group-head .rename input:focus { border-color: var(--border2); background: var(--surface); }
.group-head .t { font-size: 14px; font-weight: 600; }
.group-head .cnt { font-size: 12px; color: var(--muted); flex: 1; }
.site-list { list-style: none; margin: 0; padding: 0; min-width: 820px; }
.site-row { display: grid; grid-template-columns: 18px 1.3fr 1fr 1.2fr 1fr auto; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--border); cursor: grab; }
.site-row:last-of-type { border-bottom: 0; }
.site-row:hover { background: var(--hover); }
.site-row.dragging, .group.dragging { opacity: .4; }
.site-row.inactive { opacity: .55; }
.site-row .name a { color: var(--text); font-weight: 600; }
.site-row .name .d { font-size: 12px; color: var(--faint); }
.site-row .mono { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-row .st { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.site-row .st span { display: flex; align-items: center; gap: 6px; }
.site-list.over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.site-list .placeholder { padding: 14px 16px; color: var(--faint); font-size: 13px; cursor: default; }
.save-status { font-size: 12px; color: var(--muted); margin-left: 10px; }
.save-status.ok { color: var(--good); }
.inline-add { display: inline-flex; gap: 6px; }
.inline-add input { width: 220px; height: 34px; }

/* ===== Nastavení ===== */
.settings { display: grid; grid-template-columns: 210px 1fr; gap: 24px; align-items: start; }
.subnav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; }
.subnav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.subnav a:hover { background: var(--hover); text-decoration: none; }
.subnav a.on { background: var(--s2); }
.subnav a .n { font-size: 13px; font-weight: 500; }
.subnav a .d { font-size: 11px; color: var(--faint); }
.subnav a .dot { margin-left: auto; }
.tab-panel { display: none; }
.tab-panel.on { display: flex; flex-direction: column; gap: 16px; }
.status-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.status-strip > div { background: var(--surface); padding: 14px 16px; }
.status-strip .l { font-size: 12px; color: var(--muted); }
.status-strip .v { font-size: 15px; font-weight: 600; margin-top: 3px; }
.status-strip .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.log-run { border-bottom: 1px solid var(--border); }
.log-run:last-child { border-bottom: 0; }
.log-run .rh { display: grid; grid-template-columns: 20px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 16px; cursor: pointer; font-size: 13px; }
.log-run .rh:hover { background: var(--hover); }
.log-run .rh .arrow { color: var(--faint); font-size: 11px; }
.log-run .rh .time { font-weight: 600; }
.log-run .rh .meta { color: var(--muted); margin-left: 8px; font-weight: 400; }
.log-run .rh .dur { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.log-run .tasks { display: none; padding: 0 0 6px; }
.log-run.open .tasks { display: block; }
.log-task { display: grid; grid-template-columns: 60px 1.2fr 50px 3fr; gap: 12px; align-items: center; padding: 6px 16px 6px 48px; font-size: 13px; }
.log-task .t { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.log-task .w { font-weight: 500; }
.log-task .m { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-task .m.err { color: var(--bad); }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0 14px; padding: 0; list-style: none; }
.codes li { font-family: var(--mono); background: var(--s2); padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.qr { display: inline-block; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.qr img { display: block; width: 132px; height: 132px; }
.wizard { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.wizard ol { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.wizard ol li { margin-bottom: 6px; }
.secret { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; word-break: break-all; color: var(--text); }

/* ===== Login ===== */
.auth-wrap { width: 380px; max-width: 100%; display: flex; flex-direction: column; gap: 24px; }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.auth-logo img { width: 32px; height: 32px; border-radius: 9px; }
.card.auth { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.card.auth h1 { font-size: 20px; }
.card.auth .sub { color: var(--muted); font-size: 13px; margin-top: -10px; }
.card.auth label { margin-bottom: 0; }
.card.auth input[type=text], .card.auth input[type=password] { height: 40px; }
.card.auth form { display: flex; flex-direction: column; gap: 16px; }
.code-input { height: 56px !important; text-align: center; font-family: var(--mono); font-size: 24px; letter-spacing: .3em; }
.auth-note { text-align: center; font-size: 12px; color: var(--faint); }
.auth-links { display: flex; justify-content: space-between; font-size: 13px; }
.steps { margin: 0 0 16px 20px; padding: 0; font-size: 13px; }

/* ===== Toast ===== */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--ink-text); font-size: 13px; font-weight: 500; border-radius: 10px; padding: 10px 16px; z-index: 60; box-shadow: var(--shadow-pop); transition: opacity .3s; pointer-events: none; }
.toast.hide { opacity: 0; }

/* ===== Doplňky (login, menu vzhledu, rozsah dat) ===== */
.auth-logo { color: var(--text); }
.auth-logo:hover { text-decoration: none; }
.check-box { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface); font-size: 13px; font-weight: 500; cursor: pointer; margin: 0; }
.check-box input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.check-box .d { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.theme-row { flex-direction: column; align-items: stretch; gap: 6px; }
.theme-row .seg { display: flex; }
.theme-row .seg button { flex: 1; justify-content: center; }
.user-menu { min-width: 100%; }
.range-wrap { margin-left: auto; position: relative; }
.period-bar .range { height: 34px; padding: 0 12px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface); color: var(--muted); font-family: var(--mono); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.period-bar .range:hover { background: var(--hover); color: var(--text); }
.period-bar .range svg { color: var(--faint); }
.period-bar .dates { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 12px; display: none; flex-direction: column; gap: 10px; min-width: 300px; }
.period-bar .dates.open { display: flex; }
.period-bar .dates .row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.period-bar .dates .row span { color: var(--faint); text-align: center; }
.period-bar .dates input { height: 34px; width: 100%; font-size: 13px; font-family: var(--mono); }
.period-bar .dates .actions { justify-content: flex-end; }
.errlog { font-family: var(--mono); font-size: 11px; white-space: pre-wrap; word-break: break-all; background: var(--s2); border-radius: 8px; padding: 10px 12px; max-height: 240px; overflow: auto; margin: 0; color: var(--bad); }

/* ===== Header v2 (horní menu + lišta filtrů) ===== */
.top-wrap { position: sticky; top: 0; z-index: 30; }
.header { height: 56px; background: var(--side); border-bottom: 1px solid var(--border); }
.header-in { max-width: 1680px; margin: 0 auto; padding: 0 32px; height: 100%; display: flex; align-items: center; gap: 4px; }
.header .logo { padding: 0; margin-right: 20px; }
.nav { display: flex; gap: 2px; flex-shrink: 0; }
.nav .nav-item { height: 34px; padding: 0 12px; border-radius: 8px; gap: 8px; }
.nav .nav-item .cnt { margin-left: 2px; }
.nav .nav-item .badge { margin-left: 2px; }
.header .search { flex: 0 1 240px; min-width: 34px; width: auto; margin-left: 8px; }
.search-btn { display: none; }
.sync-btn { font-size: 12px; font-weight: 500; color: var(--muted); gap: 8px; margin-left: 8px; }
.sync-btn:hover { color: var(--text); }
.header .theme { margin-left: 8px; }
.avatar-btn { background: none; border: 0; padding: 0; cursor: pointer; margin-left: 8px; display: inline-flex; }
.avatar-btn .avatar { width: 34px; height: 34px; flex: 0 0 34px; aspect-ratio: 1; font-size: 13px; }
.header .user { position: relative; margin: 0; }
.header .user-menu { bottom: auto; top: 44px; right: 0; left: auto; width: 230px; }
.user-menu .who { padding: 8px 10px 6px; }
.user-menu .who .n { font-size: 13px; font-weight: 600; }
.user-menu .who .s { font-size: 11px; }
.subbar { background: var(--bg); border-bottom: 1px solid var(--border); }
.subbar-in { max-width: 1680px; margin: 0 auto; padding: 10px 32px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.subbar .seg.groups { overflow-x: auto; max-width: 100%; flex-wrap: nowrap; scrollbar-width: none; }
.subbar .seg.groups::-webkit-scrollbar { display: none; }
.subbar .seg.groups a { gap: 7px; }
.subbar .seg.groups .sq { width: 7px; height: 7px; border-radius: 2px; background: var(--text); flex-shrink: 0; }
.subbar .seg.groups a[data-i="0"] .sq { background: var(--accent); }
.subbar .seg.groups a[data-i="1"] .sq { background: var(--c2); }
.subbar .seg.groups a[data-i="2"] .sq { background: var(--warn); }
.subbar .seg.groups a[data-i="3"] .sq { background: var(--bad); }
.subbar .seg.groups .cnt { font-size: 11px; color: var(--faint); }
.subbar .right { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.subbar-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
.subbar .crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.subbar .crumb a { color: var(--muted); }
.subbar .crumb a:hover { color: var(--text); text-decoration: none; }
.subbar .crumb .sep { color: var(--faint); }
.subbar .crumb .cur { font-weight: 600; }
.subbar .cmp { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface); font-size: 13px; font-weight: 500; cursor: pointer; margin: 0; white-space: nowrap; }
.subbar .cmp input { margin: 0; width: auto; height: auto; accent-color: var(--accent); }
.subbar .range-wrap { margin-left: auto; position: relative; }
.subbar .range { height: 34px; padding: 0 12px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface); color: var(--muted); font-family: var(--mono); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.subbar .range:hover { background: var(--hover); color: var(--text); }
.subbar .dates { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 12px; display: none; flex-direction: column; gap: 10px; min-width: 300px; }
.subbar .dates.open { display: flex; }
.subbar .dates .row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.subbar .dates .row span { color: var(--faint); text-align: center; }
.subbar .dates input { height: 34px; width: 100%; font-size: 13px; font-family: var(--mono); }
.subbar .dates .actions { justify-content: flex-end; }
.subnav { top: 76px; }
.chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid2 { align-items: stretch; }
.grid2 > .card { display: flex; flex-direction: column; }
.grid2 > .card > .card-body { flex: 1; display: flex; flex-direction: column; }
.grid2 > .card > .card-body .dev-tiles { margin-top: auto; padding-top: 14px; }

/* ===== Spodní řada detailu: Zdroje | Země (2 sloupce) | Stav webu ===== */
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 20px; align-items: stretch; }
.detail-grid > .card { display: flex; flex-direction: column; }
.detail-grid > .card > .card-body { flex: 1; display: flex; flex-direction: column; }
.detail-grid > .card > .card-body .dev-tiles { margin-top: auto; padding-top: 14px; }
.detail-grid > #countries { grid-column: span 2; }
@media (max-width: 1400px) { .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .detail-grid { grid-template-columns: 1fr; } .detail-grid > #countries { grid-column: auto; } }

/* ===== Hlídání, poznámky, realtime ===== */
.rt { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--good); white-space: nowrap; }
.rt i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); animation: rtpulse 2s infinite; }
.rt.zero { color: var(--faint); }
.rt.zero i { background: var(--border2); box-shadow: none; animation: none; }
@keyframes rtpulse { 50% { box-shadow: 0 0 0 5px transparent; } }
.alert-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; }
.country-row { grid-template-columns: 32px 1fr auto 96px 100px auto; }
.country-row .eng { text-align: right; white-space: nowrap; }
.marks-legend { display: none; gap: 16px; margin-top: -8px; }
.marks-legend.on { display: flex; }
.marks-legend i { display: inline-block; vertical-align: middle; margin-right: 6px; }
.marks-legend i.band { width: 14px; height: 10px; background: color-mix(in srgb, var(--warn) 18%, transparent); border-radius: 2px; }
.marks-legend i.note { width: 0; height: 12px; border-left: 1.5px dashed var(--accent); }
.chart-tip .f.mk { color: var(--text); display: flex; gap: 6px; align-items: flex-start; }
.chart-tip .f.mk::before { content: ""; width: 8px; height: 8px; border-radius: 2px; margin-top: 4px; flex-shrink: 0; }
.chart-tip .f.note::before { background: var(--accent); border-radius: 50%; }
.chart-tip .f.upd::before { background: var(--warn); }
.cwv-head { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.cwv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cwv > div { background: var(--s2); border-radius: 8px; padding: 10px 12px; border-left: 3px solid var(--border2); }
.cwv > div.good { border-left-color: var(--good); }
.cwv > div.warn { border-left-color: var(--warn); }
.cwv > div.bad { border-left-color: var(--bad); }
.cwv .l { font-size: 11px; color: var(--muted); }
.cwv .v { font-size: 17px; font-weight: 600; margin-top: 2px; }
.note-form { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; align-items: center; margin-bottom: 14px; }
.note-form input { height: 34px; font-size: 13px; }
.note-form .check { grid-column: 1 / -1; }
.notes { display: flex; flex-direction: column; }
.notes .note { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.notes .note .link { font-size: 16px; line-height: 1; }

/* ===== Responzivita ===== */
@media (max-width: 1100px) { .sync-btn .lbl { display: none; } .sync-btn { padding: 0 10px; } }
@media (max-width: 760px) {
  .header-in { padding: 0 12px; gap: 2px; }
  .header .logo { margin-right: 8px; }
  .header .logo span { display: none; }
  .nav .nav-item { padding: 0 9px; }
  .nav .nav-item .lbl { display: none; }
  .header .search { display: none; position: absolute; left: 0; right: 0; top: 56px; padding: 8px 12px; background: var(--side); border-bottom: 1px solid var(--border); flex: none; width: 100%; margin: 0; z-index: 31; }
  .header .search.open { display: block; }
  .header .search svg { left: 22px; top: 18px; }
  .header .search .kbd { display: none; }
  .search-btn { display: inline-flex; margin-left: auto; }
  .sync-btn { display: none; }
  .header .theme, .avatar-btn { margin-left: 4px; }
  .avatar-btn .avatar, .header .iconbtn { width: 32px; height: 32px; }
  .avatar-btn .avatar { flex-basis: 32px; }
  .seg a.hide-m, .seg button.hide-m { display: none; }
  .subbar-in { padding: 8px 12px; }
  .subbar .right { margin-left: 0; width: 100%; }
  .subbar .range-wrap { margin-left: 0; }
  .subbar .dates { right: auto; left: 0; min-width: 280px; }
  main { padding: 16px 12px 48px; }
  h1 { font-size: 22px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .tools { justify-content: flex-start; }
  .tiles { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .chart { height: 180px; }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-strip .val { font-size: 19px; }
  .form-row { grid-template-columns: 1fr; }
  .wizard { grid-template-columns: 1fr; }
  .settings { grid-template-columns: 1fr; }
  .subnav { position: static; flex-direction: row; flex-wrap: wrap; }
  .subnav a .d { display: none; }
  .dev-tiles { grid-template-columns: 1fr 1fr 1fr; }
  .country-row { grid-template-columns: 28px 1fr auto auto auto; }
  .country-row .bar { display: none; }
  .alert-row { grid-template-columns: 1fr; gap: 8px; }
  .alert-row .btn { justify-self: start; }
  .cwv { grid-template-columns: 1fr; }
  .note-form { grid-template-columns: 1fr; }
  .notes .note { grid-template-columns: 80px 1fr auto; }
  .chart-row { grid-template-columns: 1fr; }
  .status-strip { grid-template-columns: 1fr 1fr; }
  .log-task { grid-template-columns: 50px 1fr 44px; }
  .log-task .m { grid-column: 1 / -1; white-space: normal; }
  .drawer { width: calc(100% - 24px); max-height: calc(100vh - 24px); }
  .card-head { flex-wrap: wrap; }
  .thr-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 1000px) { .settings { grid-template-columns: 1fr; } .subnav { position: static; flex-direction: row; flex-wrap: wrap; } }

/* ===== Responzivita (starší pravidla) ===== */
@media (max-width: 1000px) { .settings { grid-template-columns: 1fr; } .subnav { position: static; flex-direction: row; flex-wrap: wrap; } }
@media (max-width: 900px) {
  .form-row { grid-template-columns: 1fr; }
  .wizard { grid-template-columns: 1fr; }
}
