/* Dílna — tokeny, reset, typografie. Barvy jen přes proměnné (světlý + tmavý režim). */
:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 20px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --sidebar-w: 252px; --topbar-h: 60px; --bottomnav-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 120ms; --t: 200ms;

  --bg: #f4f6f7;
  --surface: #ffffff;
  --surface-2: #f0f3f4;
  --surface-3: #e6ebed;
  --border: #dfe4e7;
  --border-strong: #c5ced3;
  --text: #13191c;
  --text-2: #3b464c;
  --muted: #56646b;
  --primary: #0f766e;
  --primary-hover: #0c5f58;
  --primary-soft: #e3f3f1;
  --primary-text: #ffffff;
  --accent: #f59e0b;
  --danger: #c62020; --danger-soft: #fdecec;
  --warning: #a8380a; --warning-soft: #fff1e6;
  --success: #136b32; --success-soft: #e7f6ec;
  --info: #0369a1; --info-soft: #e5f2fa;
  --focus: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent);
  --ring: #0f766e;  /* 5,5:1 na bílé, 5,1:1 na --bg */
  --shadow-sm: 0 1px 2px rgba(16, 24, 28, .06);
  --shadow: 0 4px 16px rgba(16, 24, 28, .08), 0 1px 3px rgba(16, 24, 28, .06);
  --shadow-lg: 0 24px 64px rgba(16, 24, 28, .22), 0 4px 12px rgba(16, 24, 28, .08);
  --overlay: rgba(12, 18, 21, .45);
  --skeleton: #e7ecee;
  --skeleton-hi: #f3f6f7;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d1113;
  --surface: #151b1e;
  --surface-2: #1b2327;
  --surface-3: #232d32;
  --border: #263137;
  --border-strong: #354249;
  --text: #e8eef0;
  --text-2: #c3cdd1;
  --muted: #8e9ca3;
  --primary: #2bb5a8;
  --primary-hover: #3ccabc;
  --primary-soft: #143430;
  --primary-text: #061413;
  --accent: #fbbf24;
  --danger: #f87171; --danger-soft: #3a1c1c;
  --warning: #fb923c; --warning-soft: #3a2616;
  --success: #4ade80; --success-soft: #16301f;
  --info: #38bdf8; --info-soft: #132b3a;
  --ring: #4fd1c5;  /* 8:1 na tmavém povrchu */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 6px 20px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .6);
  --overlay: rgba(0, 0, 0, .6);
  --skeleton: #1f282c;
  --skeleton-hi: #283338;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 13px; }
p { margin: 0 0 var(--sp-3); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }  /* viditelný fokus pro klávesnici: plná barva, kontrast ≥ 3:1 proti pozadí i povrchům */
::selection { background: color-mix(in srgb, var(--primary) 28%, transparent); }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-4) 0; }
mark { background: color-mix(in srgb, var(--accent) 40%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
kbd { font-family: var(--font); font-size: 11px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--muted); background: var(--surface); }

/* utility */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: var(--sp-2); }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: var(--sp-2); }
.grow { flex: 1 1 auto; min-width: 0; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.danger-text { color: var(--danger); }
.warn-text { color: var(--warning); }
.ok-text { color: var(--success); }
.strike { text-decoration: line-through; color: var(--muted); }

.boot-splash { min-height: 100vh; display: grid; place-items: center; }
.logo-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--primary); position: relative; flex: none; }
.logo-mark::before { content: ""; position: absolute; left: 11px; top: 10px; width: 13px; height: 20px; border: 3px solid #fff; border-left-width: 3px; border-radius: 0 10px 10px 0; }
.logo-mark::after { content: ""; position: absolute; right: -3px; top: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.boot-splash .logo-mark { animation: pulse 1.2s var(--ease) infinite; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
svg.ic { flex: none; } /* ikony se ve flexu nesmí smrštit */
