/* =========================================================
   Autoškola 2 – vzhľad
   ========================================================= */
:root {
  --as-accent: #f59e0b;
  --as-accent-hover: #fbbf24;
  --as-accent-ink: #111827;
  --as-navy: #0b1220;
  --as-navy-2: #111a2e;
  --as-navy-3: #1b2640;
  --as-bg: #f4f6fb;
  --as-panel: #ffffff;
  --as-panel-2: #f8fafc;
  --as-border: #e5e8f0;
  --as-text: #0f172a;
  --as-muted: #64748b;
  --as-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --as-radius: 18px;
  --as-ok: #16a34a;
  --as-ok-bg: #ecfdf3;
  --as-bad: #dc2626;
  --as-bad-bg: #fef2f2;
  --as-sidebar-w: 268px;

  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-link-color: #2563eb;
  --bs-link-color-rgb: 37, 99, 235;
  --bs-border-radius: .75rem;
  --bs-border-radius-lg: 1rem;

  /* Grafy (paleta validovaná pre farbosleposť) */
  --viz-s1: #2a78d6;
  --viz-good: #0ca30c;
  --viz-bad: #d03b3b;
  --viz-neutral: #c9ccd3;
  --viz-surface: #ffffff;
  --viz-grid: #eef0f4;
  --viz-text-2: #52514e;
  --viz-text-3: #8a8f99;
  --viz-tooltip-bg: #0f172a;
  --viz-tooltip-text: #ffffff;
  --viz-seq-150: #b7d3f6;
  --viz-seq-250: #86b6ef;
  --viz-seq-350: #5598e7;
  --viz-seq-450: #2a78d6;
  --viz-seq-550: #1c5cab;
  --viz-seq-650: #104281;
  --heat-0: #eef0f4;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-bs-theme="light"])) { color-scheme: dark; }
}
[data-bs-theme="dark"] {
  --as-bg: #0b1220;
  --as-panel: #111a2e;
  --as-panel-2: #16213a;
  --as-border: #23304d;
  --as-text: #e5e9f2;
  --as-muted: #94a3b8;
  --as-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --as-ok-bg: rgba(22, 163, 74, .14);
  --as-bad-bg: rgba(220, 38, 38, .14);
  --bs-body-bg: #0b1220;
  --bs-body-color: #e5e9f2;
  --bs-primary: #3b82f6;
  --bs-primary-rgb: 59, 130, 246;
  --bs-link-color: #60a5fa;
  --bs-link-color-rgb: 96, 165, 250;
  --bs-border-color: #23304d;
  --bs-secondary-bg: #16213a;
  --bs-tertiary-bg: #111a2e;

  --viz-s1: #3987e5;
  --viz-neutral: #3a4560;
  --viz-surface: #111a2e;
  --viz-grid: #1f2a44;
  --viz-text-2: #c3c2b7;
  --viz-text-3: #8b93a7;
  --viz-tooltip-bg: #e5e9f2;
  --viz-tooltip-text: #0b1220;
  --heat-0: #1b2640;
}

html, body { background: var(--as-bg); color: var(--as-text); }
body { font-family: var(--bs-body-font-family); -webkit-font-smoothing: antialiased; }
.min-w-0 { min-width: 0; }
.btn { font-weight: 600; border-radius: .75rem; }
.btn-lg { border-radius: .9rem; padding: .8rem 1.4rem; }
.btn-primary { --bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary); --bs-btn-hover-bg: #1d4ed8; --bs-btn-hover-border-color: #1d4ed8; }
.btn-accent { background: var(--as-accent); color: var(--as-accent-ink); border: 0; }
.btn-accent:hover, .btn-accent:focus { background: var(--as-accent-hover); color: var(--as-accent-ink); }
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; border-radius: 10px; color: inherit; border: 0; background: transparent; }
.btn-icon:hover { background: rgba(127, 127, 127, .12); }
.btn-install { background: rgba(245, 158, 11, .14); color: #b45309; border: 1px solid rgba(245, 158, 11, .35); }
.btn-install:hover { background: var(--as-accent); color: var(--as-accent-ink); }
[data-bs-theme="dark"] .btn-install { color: #fbbf24; }
.btn-light { --bs-btn-bg: var(--as-panel-2); --bs-btn-border-color: var(--as-border); --bs-btn-hover-bg: var(--as-border); --bs-btn-color: var(--as-text); --bs-btn-hover-color: var(--as-text); }
.form-control, .form-select { border-radius: .75rem; border-color: var(--as-border); background-color: var(--as-panel); }
.form-control:focus, .form-select:focus { border-color: var(--bs-primary); box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .15); }
.form-floating > .form-control { height: 3.6rem; }

/* ---------- Kostra aplikácie ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--as-sidebar-w); z-index: 1030;
  background: var(--as-navy); color: #cbd5e1; flex-direction: column; padding: 22px 16px;
  border-right: 1px solid rgba(255, 255, 255, .05);
}
.main { flex: 1; min-width: 0; }
@media (min-width: 992px) { .main { margin-left: var(--as-sidebar-w); } }
.content { padding: 28px clamp(16px, 3vw, 40px) 110px; max-width: 1440px; margin: 0 auto; }
@media (min-width: 992px) { .content { padding-bottom: 40px; } }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; overflow: hidden; flex: none; box-shadow: 0 4px 14px rgba(245, 158, 11, .25); }
.brand-mark img { width: 100%; height: 100%; display: block; }
.brand-text { font-weight: 800; font-size: 1.15rem; line-height: 1.1; color: var(--as-text); }
.brand-text small { display: block; font-weight: 500; font-size: .72rem; color: #94a3b8; letter-spacing: .02em; }
.sidebar .brand { padding: 0 8px 22px; }
.sidebar .brand-text, .brand-light .brand-text { color: #fff; }
.brand-sm .brand-mark { width: 34px; height: 34px; border-radius: 10px; }

.side-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: #a5b0c4; text-decoration: none; font-weight: 600; font-size: .93rem; transition: background .15s, color .15s;
}
.side-link i { font-size: 1.1rem; width: 22px; text-align: center; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-link.active { background: linear-gradient(90deg, rgba(245, 158, 11, .2), rgba(245, 158, 11, .05)); color: #fff; box-shadow: inset 3px 0 0 var(--as-accent); }
.side-link.active i { color: var(--as-accent); }
.side-link .badge { background: var(--as-accent); color: var(--as-accent-ink); font-size: .7rem; }
.side-sep { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 16px 12px 6px; }
.side-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .06); }
.side-user { display: flex; align-items: center; gap: 4px; color: #e2e8f0; }
.side-user small { color: #94a3b8 !important; }
.side-user .btn-icon { color: #94a3b8; }
.avatar { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--as-accent), #f97316); color: #111; }
.offcanvas .side-link { color: var(--as-text); }
.offcanvas .side-link:hover { background: var(--as-panel-2); color: var(--as-text); }
.offcanvas { background: var(--as-panel); }

.topbar {
  position: sticky; top: 0; z-index: 1020; display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--as-bg) 85%, transparent); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--as-border);
}
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--as-panel) 92%, transparent); backdrop-filter: blur(14px);
  border-top: 1px solid var(--as-border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--as-muted); text-decoration: none; padding: 4px 0; }
.bottom-nav a i { font-size: 1.25rem; }
.bottom-nav a.bn-primary i { background: var(--as-accent); color: var(--as-accent-ink); width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; margin-top: -22px; box-shadow: 0 6px 18px rgba(245, 158, 11, .45); }
.offline-banner { background: #fef3c7; color: #92400e; border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-weight: 600; font-size: .9rem; }

/* ---------- Typografia stránok ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.page-sub { color: var(--as-muted); margin: 0; max-width: 720px; }
.section-title { font-size: 1.15rem; font-weight: 800; margin: 8px 0 14px; }
.section-title small { font-size: .8rem; font-weight: 500; color: var(--as-muted); margin-left: 8px; }

/* ---------- Panely a karty ---------- */
.panel { background: var(--as-panel); border: 1px solid var(--as-border); border-radius: var(--as-radius); padding: 20px; box-shadow: var(--as-shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-title { font-size: 1rem; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.panel-title i { color: var(--as-muted); }
.panel-link { text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
.panel-link:hover { transform: translateY(-2px); border-color: var(--bs-primary); color: inherit; }

.hero-card {
  border-radius: 24px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(1200px 400px at 110% -20%, rgba(245, 158, 11, .35), transparent 60%), linear-gradient(135deg, #0b1220 0%, #16243f 100%);
  box-shadow: 0 20px 40px rgba(11, 18, 32, .25);
}
.hero-card::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(255, 255, 255, .04); }
.hero-card-body { padding: clamp(20px, 3vw, 32px); position: relative; z-index: 1; height: 100%; }
.hero-kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--as-accent); }
.exam-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.exam-facts div { background: rgba(255, 255, 255, .07); border-radius: 14px; padding: 12px; text-align: center; }
.exam-facts b { display: block; font-size: 1.6rem; font-weight: 800; }
.exam-facts span { font-size: .75rem; opacity: .7; }

.stat-card, .stat-tile { background: var(--as-panel); border: 1px solid var(--as-border); border-radius: 16px; box-shadow: var(--as-shadow); height: 100%; }
.stat-card { display: flex; align-items: center; gap: 14px; padding: 16px; }
.stat-card span, .stat-tile span { display: block; font-size: .78rem; color: var(--as-muted); font-weight: 600; }
.stat-card b { font-size: 1.5rem; font-weight: 800; }
.stat-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.stat-tile { padding: 14px 16px; }
.stat-tile b { display: block; font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.stat-tile b small { font-size: .85rem; color: var(--as-muted); font-weight: 600; }
.stat-tile > small { color: var(--as-muted); font-size: .75rem; }

.action-card { display: flex; align-items: center; gap: 14px; background: var(--as-panel); border: 1px solid var(--as-border); border-radius: 16px; padding: 16px; box-shadow: var(--as-shadow); height: 100%; }
.action-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; flex: none; }

.cat-card { background: var(--as-panel); border: 1px solid var(--as-border); border-radius: 16px; padding: 16px; box-shadow: var(--as-shadow); height: 100%; border-top: 3px solid var(--c); }
.cat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.cat-icon.sm { width: 34px; height: 34px; font-size: 1rem; border-radius: 10px; }
.progress-thin { height: 6px; border-radius: 99px; background: var(--as-panel-2); }
.progress-thin .progress-bar { border-radius: 99px; }

.cat-progress { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-radius: 12px; text-decoration: none; color: inherit; }
.cat-progress:hover { background: var(--as-panel-2); color: inherit; }
.stack-bar { position: relative; display: block; height: 8px; border-radius: 99px; background: var(--as-panel-2); margin-top: 6px; overflow: hidden; }
.stack-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.stack-bar .seen { background: color-mix(in srgb, var(--c) 30%, transparent); }
.stack-bar .mastered { background: var(--c); }
.legend-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.legend-sw.mastered { background: var(--as-muted); }
.legend-sw.seen { background: color-mix(in srgb, var(--as-muted) 35%, transparent); }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; border: 1px solid var(--as-border); background: var(--as-panel-2); color: inherit; text-decoration: none; font-weight: 600; font-size: .9rem; text-align: left; position: relative; }
.quick i { font-size: 1.3rem; color: var(--bs-primary); }
.quick b { position: absolute; top: 12px; right: 14px; font-size: .8rem; color: var(--as-muted); }
.quick:hover { border-color: var(--bs-primary); color: inherit; }

.mini-list { list-style: none; padding: 0; margin: 0 0 8px; }
.mini-list li { border-bottom: 1px solid var(--as-border); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list a, .mini-list li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; color: inherit; text-decoration: none; }
.mini-list li:has(a) { padding: 0; }
.mini-list a { flex: 1; min-width: 0; }
.res-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.res-dot.ok { background: var(--as-ok); box-shadow: 0 0 0 4px var(--as-ok-bg); }
.res-dot.bad { background: var(--as-bad); box-shadow: 0 0 0 4px var(--as-bad-bg); }

.session-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.session-stats b { display: block; font-size: 1.45rem; font-weight: 800; }
.session-stats span { font-size: .75rem; color: var(--as-muted); }

/* Kruhový ukazovateľ */
.ring {
  --p: 0; --size: 64px; --track: var(--as-panel-2); --fill: var(--bs-primary);
  width: var(--size); height: var(--size); border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--fill) calc(var(--p) * 1%), var(--track) 0); position: relative; font-weight: 800;
  transition: background .6s;
}
.ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--as-panel); }
.ring > * { position: relative; z-index: 1; text-align: center; line-height: 1; }
.ring-lg { --size: 150px; }
.ring-lg::before { inset: 12px; }
.ring-lg b { font-size: 2.6rem; display: block; }
.ring-lg small { font-size: .9rem; opacity: .7; }
.ring-xl { --size: 128px; }
.ring-xl::before { inset: 11px; }
.ring-xl b { font-size: 2.4rem; }
.ring-light { --track: rgba(255, 255, 255, .12); --fill: var(--as-accent); }
.ring-light::before { background: #13203a; }
.readiness-parts { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.readiness-parts li { display: flex; justify-content: space-between; gap: 18px; opacity: .85; padding: 2px 0; }

/* ---------- Karta otázky ---------- */
.qcard { background: var(--as-panel); border: 1px solid var(--as-border); border-radius: 22px; padding: clamp(18px, 3vw, 30px); box-shadow: var(--as-shadow); }
.qcard.enter { animation: cardIn .3s ease-out; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.qcard.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.qcard-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 5px 11px; border-radius: 99px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.pts-chip { font-size: .75rem; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: var(--as-panel-2); color: var(--as-muted); border: 1px solid var(--as-border); }
.qnum { font-size: .8rem; color: var(--as-muted); font-weight: 600; }
.qid { font-size: .75rem; color: var(--as-muted); }
.js-bookmark.on, .js-flag.on { color: var(--as-accent); }
.qtext { font-size: clamp(1.08rem, 1.8vw, 1.3rem); font-weight: 700; line-height: 1.45; margin-bottom: 18px; letter-spacing: -.01em; }
.qimg-wrap { text-align: center; margin: 4px 0 20px; }
.qimg { max-width: 100%; max-height: 320px; border-radius: 14px; background: #fff; padding: 6px; border: 1px solid var(--as-border); }
.answers { display: flex; flex-direction: column; gap: 10px; }
.answer {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px;
  background: var(--as-panel-2); border: 2px solid var(--as-border); border-radius: 16px; color: var(--as-text);
  font-size: 1rem; line-height: 1.4; font-weight: 500; transition: border-color .15s, background .15s, transform .1s;
}
.answer:not(:disabled):hover { border-color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 6%, var(--as-panel)); }
.answer:not(:disabled):active { transform: scale(.99); }
.answer .letter { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; font-weight: 800; background: var(--as-panel); border: 1px solid var(--as-border); }
.answer .atext { flex: 1; }
.answer .aimg { display: block; max-height: 110px; margin-top: 6px; border-radius: 8px; }
.answer .amark { width: 24px; flex: none; font-size: 1.3rem; }
.answer.chosen { border-color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 9%, var(--as-panel)); }
.answer.chosen .letter { background: var(--bs-primary); color: #fff; border-color: var(--bs-primary); }
.answer.correct { border-color: var(--as-ok); background: var(--as-ok-bg); opacity: 1; }
.answer.correct .letter { background: var(--as-ok); color: #fff; border-color: var(--as-ok); }
.answer.correct .amark::before { content: "✓"; color: var(--as-ok); font-weight: 800; }
.answer.wrong { border-color: var(--as-bad); background: var(--as-bad-bg); opacity: 1; }
.answer.wrong .letter { background: var(--as-bad); color: #fff; border-color: var(--as-bad); }
.answer.wrong .amark::before { content: "✕"; color: var(--as-bad); font-weight: 800; }
.answer.dim { opacity: .55; }
.answer:disabled { cursor: default; }
.explain { margin-top: 18px; border-radius: 16px; padding: 16px 18px; border: 1px solid var(--as-border); background: var(--as-panel-2); animation: cardIn .3s; }
.explain.ok { border-color: color-mix(in srgb, var(--as-ok) 40%, transparent); background: var(--as-ok-bg); }
.explain.bad { border-color: color-mix(in srgb, var(--as-bad) 40%, transparent); background: var(--as-bad-bg); }
.explain-title { font-weight: 800; margin-bottom: 6px; }
.explain.ok .explain-title { color: var(--as-ok); }
.explain.bad .explain-title { color: var(--as-bad); }
.explain.info .explain-title { color: var(--bs-primary); }
.explain-text { line-height: 1.6; }
.explain-meta { margin-top: 10px; font-size: .85rem; color: var(--as-muted); }
.pulse-ok { animation: pulseOk .5s; }
@keyframes pulseOk { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); } 100% { box-shadow: 0 0 0 18px rgba(22, 163, 74, 0); } }

.learn-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.learn-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 8px; }
.learn-actions .js-next { margin-left: auto; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.filter-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--as-border); background: var(--as-panel-2); color: var(--as-text); font-size: .85rem; font-weight: 600; text-align: left; }
.filter-pill b { margin-left: auto; font-size: .75rem; color: var(--as-muted); font-weight: 700; }
.filter-pill:hover { border-color: var(--bs-primary); }
.filter-pill.active { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.filter-pill.active b, .filter-pill.active i { color: rgba(255, 255, 255, .85) !important; }
.skeleton-card .placeholder { border-radius: 8px; }

/* ---------- Test ---------- */
.test-bar {
  position: sticky; top: 0; z-index: 1010; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--as-bg) 88%, transparent); backdrop-filter: blur(12px);
  padding: 12px 0; margin: -12px 0 16px; border-bottom: 1px solid var(--as-border);
}
@media (max-width: 991.98px) { .test-bar { top: 58px; } }
.test-title { font-weight: 800; font-size: 1.05rem; }
.timer { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.1rem; padding: 6px 12px; border-radius: 12px; background: var(--as-panel); border: 1px solid var(--as-border); }
.timer.warn { color: #b45309; border-color: #fbbf24; background: #fffbeb; }
.timer.danger { color: #fff; background: var(--as-bad); border-color: var(--as-bad); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .75; } }
.answered-chip { font-weight: 700; font-size: .85rem; padding: 6px 10px; border-radius: 10px; background: var(--as-panel-2); border: 1px solid var(--as-border); }
.test-nav-buttons { display: flex; justify-content: space-between; margin-top: 16px; }
.qgrid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.qgrid button { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--as-border); background: var(--as-panel-2); font-weight: 700; font-size: .82rem; color: var(--as-text); position: relative; padding: 0; }
.qgrid button.answered { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.qgrid button.flagged::after { content: ''; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--as-accent); }
.qgrid button.current { outline: 3px solid var(--as-accent); outline-offset: 1px; }
.qgrid-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: .75rem; color: var(--as-muted); }
.qgrid-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--as-border); background: var(--as-panel-2); vertical-align: -2px; margin-right: 4px; }
.qgrid-legend .lg.answered { background: var(--bs-primary); border-color: var(--bs-primary); }
.qgrid-legend .lg.flagged { background: var(--as-accent); border-color: var(--as-accent); }

/* ---------- Výsledok ---------- */
.result-hero { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); flex-wrap: wrap; border-radius: 24px; padding: clamp(20px, 3vw, 32px); color: #fff; margin-bottom: 20px; box-shadow: 0 20px 40px rgba(11, 18, 32, .2); }
.result-hero.pass { background: linear-gradient(135deg, #065f46, #16a34a); }
.result-hero.fail { background: linear-gradient(135deg, #7f1d1d, #dc2626); }
.result-hero .ring { --track: rgba(255, 255, 255, .2); --fill: #fff; }
.result-hero .ring::before { background: rgba(0, 0, 0, .18); }
.result-badge { display: inline-flex; gap: 6px; align-items: center; font-weight: 800; letter-spacing: .06em; font-size: .8rem; background: rgba(255, 255, 255, .18); padding: 6px 12px; border-radius: 99px; }
.result-facts { display: flex; flex-wrap: wrap; gap: 18px; }
.result-facts b { display: block; font-size: 1.35rem; font-weight: 800; }
.result-facts span { font-size: .75rem; opacity: .8; }
.result-actions { display: flex; flex-direction: column; gap: 8px; }
.result-item { position: relative; margin-bottom: 16px; }
.result-item .qcard { border-left: 5px solid var(--as-ok); }
.result-item.is-bad .qcard { border-left-color: var(--as-bad); }
.result-tag { position: absolute; top: -9px; right: 18px; z-index: 2; }
.cat-row { margin-bottom: 12px; }

/* ---------- Zoznam otázok ---------- */
.qlist { display: flex; flex-direction: column; gap: 8px; }
.qrow { display: flex; gap: 16px; align-items: flex-start; text-align: left; width: 100%; padding: 14px 16px; background: var(--as-panel); border: 1px solid var(--as-border); border-left: 4px solid var(--c); border-radius: 14px; color: inherit; box-shadow: var(--as-shadow); transition: transform .12s; }
.qrow:hover { transform: translateY(-1px); border-color: var(--c); }
.qrow-main { flex: 1; min-width: 0; }
.qrow-meta { font-size: .75rem; color: var(--as-muted); font-weight: 600; margin-bottom: 4px; }
.cat-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.qrow-text { font-weight: 600; }
.qrow-answer { margin-top: 6px; font-size: .88rem; color: var(--as-muted); }
.hide-answers .qrow-answer { display: none; }
.qrow-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.mini-stat { background: var(--as-panel-2); border-radius: 14px; padding: 12px 14px; height: 100%; }
.mini-stat span { display: block; font-size: .75rem; color: var(--as-muted); }
.mini-stat b { font-size: 1.1rem; }
.hist-dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 3px; }
.hist-dot.ok { background: var(--as-ok); }
.hist-dot.bad { background: var(--as-bad); }

/* ---------- História ---------- */
.history-table tr[data-href] { cursor: pointer; }
.history-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--as-muted); font-weight: 700; background: var(--as-panel-2); }
.table { --bs-table-bg: transparent; }
.score-bar { position: relative; height: 6px; border-radius: 99px; background: var(--as-panel-2); margin-top: 4px; }
.score-bar div { height: 100%; border-radius: 99px; }
.score-bar div.ok { background: var(--as-ok); }
.score-bar div.bad { background: var(--as-bad); }
.score-bar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--as-muted); }

/* ---------- Štatistiky ---------- */
.chart-box { position: relative; width: 100%; }
.empty-chart { padding: 60px 10px; text-align: center; color: var(--as-muted); }
.states-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.states-legend div { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.states-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.states-legend b { margin-left: auto; }
.states-legend small { color: var(--as-muted); width: 38px; text-align: right; }
.heatmap-wrap { overflow-x: auto; padding-bottom: 4px; }
.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 3px; width: max-content; }
.heatmap i, .heat-legend i { width: 13px; height: 13px; border-radius: 3px; background: var(--heat-0); display: block; }
.heatmap i.empty { background: transparent; }
.heatmap .h1, .heat-legend .h1 { background: var(--viz-seq-150); }
.heatmap .h2, .heat-legend .h2 { background: var(--viz-seq-350); }
.heatmap .h3, .heat-legend .h3 { background: var(--viz-seq-450); }
.heatmap .h4, .heat-legend .h4 { background: var(--viz-seq-650); }
.heat-legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 10px; font-size: .72rem; color: var(--as-muted); }
.heat-legend span { margin: 0 4px; }
.cat-table td, .cat-table th { white-space: nowrap; }
.cat-table th { font-size: .72rem; text-transform: uppercase; color: var(--as-muted); }
.q-rank { padding-left: 1.2rem; margin: 0; }
.q-rank li { margin-bottom: 6px; }
.q-rank-item { display: block; text-align: left; width: 100%; background: none; border: 0; padding: 6px 8px; border-radius: 10px; color: inherit; }
.q-rank-item:hover { background: var(--as-panel-2); }
.q-rank-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .88rem; font-weight: 600; }
.compare-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--as-border); }
.compare-row > span { flex: 1; }
.compare-row b { font-size: 1.1rem; }

/* ---------- Prázdne stavy ---------- */
.empty-state { text-align: center; padding: 40px 16px; }
.empty-icon { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 14px; display: grid; place-items: center; font-size: 2rem; background: var(--as-panel-2); color: var(--as-muted); }

/* ---------- Profil ---------- */
.passkey-list { display: flex; flex-direction: column; gap: 8px; }
.passkey-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--as-panel-2); border: 1px solid var(--as-border); }
.passkey-promo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-color: rgba(245, 158, 11, .4); }

/* ---------- Admin ---------- */
.code-block { background: var(--as-panel-2); border: 1px solid var(--as-border); border-radius: 10px; padding: 10px 12px; font-size: .78rem; white-space: pre-wrap; }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 520px; }
.nav-tabs .nav-link { font-weight: 600; }

/* ---------- Toasty ---------- */
.toast { border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); font-weight: 600; z-index: 2000; }
.toast-container { z-index: 2000; }
.toast-success { background: #065f46; color: #fff; }
.toast-danger { background: #991b1b; color: #fff; }
.toast-warning { background: #92400e; color: #fff; }
.toast-info { background: #1e3a8a; color: #fff; }
.toast .btn-close { filter: invert(1); }

/* ---------- Prihlásenie / registrácia ---------- */
.auth-body { background: var(--as-bg); }
.auth-wrap { display: flex; min-height: 100vh; }
.auth-hero {
  flex: 1.1; position: relative; overflow: hidden; color: #fff; align-items: center; justify-content: center; padding: 48px;
  background: radial-gradient(900px 500px at 0% 0%, rgba(245, 158, 11, .25), transparent 60%), linear-gradient(160deg, #0b1220, #16243f);
}
.auth-hero-inner { position: relative; z-index: 2; max-width: 520px; }
.hero-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.hero-list li { display: flex; gap: 10px; align-items: center; font-weight: 500; opacity: .9; }
.hero-list i { color: var(--as-accent); font-size: 1.2rem; }
.road { position: absolute; z-index: 1; bottom: -10%; left: 50%; width: 160%; height: 70%; transform: translateX(-50%) perspective(400px) rotateX(55deg); background: linear-gradient(90deg, transparent 0 46%, rgba(255, 255, 255, .02) 46% 54%, transparent 54%), #1a2742; border-top: 2px solid rgba(255, 255, 255, .05); opacity: .9; }
.road::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 10px; transform: translateX(-50%); background: repeating-linear-gradient(to bottom, var(--as-accent) 0 40px, transparent 40px 80px); animation: road 1.6s linear infinite; opacity: .8; }
@keyframes road { to { background-position: 0 80px; } }
@media (prefers-reduced-motion: reduce) { .road::after, .qcard.enter, .explain { animation: none; } }
.auth-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 18px; }
.auth-card { width: 100%; max-width: 430px; }
.btn-passkey { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; border-radius: 16px; border: 2px solid var(--as-border); background: var(--as-panel); color: var(--as-text); }
.btn-passkey i { color: var(--as-accent); }
.btn-passkey small { color: var(--as-muted); font-weight: 500; }
.btn-passkey:hover { border-color: var(--as-accent); }
.btn-passkey.is-loading i { animation: blink .8s infinite; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--as-muted); font-size: .8rem; margin: 6px 0 16px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--as-border); }
.btn-pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--as-muted); border: 0; z-index: 5; }
.pw-meter { height: 4px; background: var(--as-panel-2); border-radius: 99px; overflow: hidden; }
.pw-meter-bar { height: 100%; width: 0; transition: width .2s, background .2s; background: var(--as-bad); }
.pw-meter-bar[data-level="ok"] { background: var(--as-accent); }
.pw-meter-bar[data-level="strong"] { background: var(--as-ok); }
.success-icon { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto; display: grid; place-items: center; font-size: 2rem; background: var(--as-ok-bg); color: var(--as-ok); }

/* ---------- Tlač ---------- */
@media print {
  .sidebar, .topbar, .bottom-nav, .btn, .page-head button { display: none !important; }
  .main { margin: 0 !important; }
  .panel { box-shadow: none; break-inside: avoid; }
}

@media (max-width: 575.98px) {
  .exam-facts { grid-template-columns: repeat(2, 1fr); }
  .qgrid { grid-template-columns: repeat(8, 1fr); gap: 4px; }
  .answer { padding: 12px; gap: 10px; }
  .panel { padding: 16px; }
  .result-actions { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Kartičky ---------- */
.card-placeholder { border: 2px dashed var(--as-border); border-radius: 16px; padding: 28px; text-align: center; color: var(--as-muted); font-weight: 600; }
.card-answer { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; border: 2px solid var(--as-ok); background: var(--as-ok-bg); font-size: 1.05rem; font-weight: 600; line-height: 1.5; animation: cardIn .3s; }
.card-answer .letter { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--as-ok); color: #fff; font-size: 1.2rem; }
kbd { font-size: .7rem; padding: 2px 5px; border-radius: 5px; background: rgba(0,0,0,.18); color: inherit; }

/* ---------- Odkazy ---------- */
a { text-decoration: none; }
.link-soft { color: var(--bs-primary); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s; }
.link-soft:hover { border-bottom-color: currentColor; color: var(--bs-primary); }
.link-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px;
  font-size: .82rem; font-weight: 600; color: var(--as-text); text-decoration: none;
  background: var(--as-panel-2); border: 1px solid var(--as-border); transition: all .15s; white-space: nowrap;
}
.link-pill:hover { border-color: var(--bs-primary); color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 7%, var(--as-panel)); }
.link-pill i { font-size: .9em; }
.link-pill-accent { background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .35); color: #b45309; }
[data-bs-theme="dark"] .link-pill-accent { color: #fbbf24; }
.link-pill-accent:hover { background: var(--as-accent); color: var(--as-accent-ink); border-color: var(--as-accent); }

/* ---------- Návod ---------- */
.guest-top { display: flex; justify-content: space-between; align-items: center; padding: 14px clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--as-border); background: var(--as-panel); }
.help-toc { display: flex; flex-direction: column; gap: 2px; padding: 12px; }
.help-toc a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--as-text); font-weight: 600; font-size: .88rem; }
.help-toc a i { color: var(--as-muted); width: 18px; }
.help-toc a:hover { background: var(--as-panel-2); color: var(--bs-primary); }
.help-sec { margin-bottom: 20px; scroll-margin-top: 80px; line-height: 1.65; }
.help-sec h2 { font-size: 1.3rem; font-weight: 800; display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.help-sec h2 i { color: var(--as-accent); }
.help-sec h3 { font-size: 1rem; font-weight: 700; margin: 18px 0 8px; }
.help-sec h4 { font-size: .95rem; font-weight: 700; }
.help-card { background: var(--as-panel-2); border: 1px solid var(--as-border); border-radius: 14px; padding: 16px; height: 100%; }
.help-card h3 { margin-top: 0; }
.help-card ol { padding-left: 1.2rem; margin-bottom: .5rem; }
.steps { counter-reset: st; list-style: none; padding: 0; }
.steps li { counter-increment: st; position: relative; padding: 4px 0 10px 42px; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: 2px; width: 28px; height: 28px; border-radius: 9px; background: var(--as-accent); color: var(--as-accent-ink); font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.help-callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--bs-primary) 8%, var(--as-panel)); border: 1px solid color-mix(in srgb, var(--bs-primary) 25%, transparent); }
.help-callout > i { font-size: 1.3rem; color: var(--bs-primary); }
.kbd-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 8px; background: var(--as-panel-2); border: 1px solid var(--as-border); font-size: .85em; font-weight: 600; white-space: nowrap; }
.help-keys { display: flex; flex-wrap: wrap; gap: 10px 20px; font-size: .9rem; }
.help .help-keys kbd, .help kbd { background: var(--as-panel-2); color: var(--as-text); border: 1px solid var(--as-border); border-bottom-width: 2px; font-size: .78rem; padding: 2px 7px; }
.help-table th { width: 160px; font-weight: 700; }
.boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.boxes div { text-align: center; padding: 10px; border-radius: 12px; background: var(--as-panel-2); border: 1px solid var(--as-border); }
.boxes div:nth-child(n) { border-top: 3px solid var(--viz-seq-350); }
.boxes b { display: block; }
.boxes span { font-size: .8rem; color: var(--as-muted); }
.help-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.help-facts div { text-align: center; padding: 12px; border-radius: 12px; background: var(--as-panel-2); }
.help-facts b { display: block; font-size: 1.4rem; font-weight: 800; }
.help-facts span { font-size: .78rem; color: var(--as-muted); }
.faq dt { font-weight: 700; margin-top: 12px; }
.faq dd { margin: 4px 0 0; color: var(--as-muted); }
.print-only { display: none; }

/* ---------- Príručka ---------- */
.handbook { background: var(--as-panel); border: 1px solid var(--as-border); border-radius: var(--as-radius); padding: clamp(18px, 3vw, 40px); box-shadow: var(--as-shadow); }
.hb-cover { border-bottom: 3px solid var(--as-accent); padding-bottom: 18px; margin-bottom: 24px; }
.hb-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--as-muted); margin-bottom: 10px; }
.hb-brand img { width: 32px; height: 32px; border-radius: 9px; }
.hb-cover h1 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin: 0 0 6px; }
.hb-sub { font-size: 1.05rem; margin: 0 0 6px; }
.hb-meta { font-size: .82rem; color: var(--as-muted); margin: 0 0 4px; }
.hb-toc { columns: 2; column-gap: 32px; padding-left: 1.3rem; margin: 18px 0 0; font-size: .9rem; }
.hb-toc a { display: flex; justify-content: space-between; gap: 10px; color: var(--as-text); padding: 2px 0; border-bottom: 1px dotted var(--as-border); }
.hb-toc b { color: var(--as-muted); font-weight: 600; }
.hb-section { margin-bottom: 28px; }
.hb-cat { font-size: 1.15rem; font-weight: 800; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--c, var(--as-accent)) 12%, var(--as-panel)); border-left: 5px solid var(--c, var(--as-accent)); margin-bottom: 12px; }
.hb-cat small { font-size: .78rem; font-weight: 600; color: var(--as-muted); margin-left: 6px; }
.hb-list { list-style: none; padding: 0; margin: 0; }
.hb-q { display: flex; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--as-border); break-inside: avoid; page-break-inside: avoid; }
.hb-num { flex: none; width: 40px; font-weight: 800; color: var(--as-muted); text-align: right; }
.hb-body { flex: 1; min-width: 0; }
.hb-text { font-weight: 600; }
.hb-groups { display: inline-block; margin-left: 6px; font-size: .7rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--as-panel-2); border: 1px solid var(--as-border); color: var(--as-muted); vertical-align: 1px; }
.hb-mark { color: var(--as-accent); margin-left: 4px; }
.hb-answer { margin-top: 3px; color: #15803d; }
[data-bs-theme="dark"] .hb-answer { color: #4ade80; }
.hb-answer i { font-weight: 800; }
.hb-blank { margin-top: 6px; height: 34px; border-bottom: 1px dashed var(--as-border); }
.hb-note { margin-top: 3px; font-size: .85rem; color: var(--as-muted); font-style: italic; }
.hb-img { flex: none; width: 210px; max-height: 150px; object-fit: contain; background: #fff; border: 1px solid var(--as-border); border-radius: 8px; padding: 2px; }
.hb-keylist { columns: 2; column-gap: 28px; font-size: .82rem; padding-left: 0; list-style: none; }
.hb-keylist li { break-inside: avoid; padding: 2px 0; }
.hb-keylist b { display: inline-block; min-width: 48px; }

/* ---------- Tlač ---------- */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  html, body, .content, .main { background: #fff !important; color: #000 !important; }
  [data-bs-theme="dark"] { --as-text: #000; --as-muted: #555; --as-border: #ccc; --as-panel: #fff; --as-panel-2: #f3f4f6; }
  .no-print, .offcanvas, .toast-container, .offline-banner, .modal, .help-toc { display: none !important; }
  .print-only { display: block !important; }
  .content { padding: 0 !important; max-width: none; }
  .col-lg-9 { width: 100% !important; flex: 0 0 100% !important; max-width: 100% !important; }
  .panel, .handbook { border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0; }
  .help-sec { break-inside: auto; margin-bottom: 14px; border-bottom: 1px solid #ddd !important; padding-bottom: 10px !important; }
  .help-sec h2 { break-after: avoid; }
  .help-print-head { border-bottom: 3px solid #f59e0b; margin-bottom: 14px; }
  .help-print-head h1 { font-size: 20pt; margin: 0; }
  .help-card, .help-callout, .boxes div, .help-facts div { background: #fff !important; border: 1px solid #ccc !important; }
  a { color: #000 !important; }
  .handbook { font-size: 10pt; }
  .hb-cover { page-break-after: always; border-bottom: 0; padding-top: 40mm; }
  .hb-cover h1 { font-size: 26pt; }
  .hb-toc { columns: 1; font-size: 11pt; margin-top: 12mm; }
  .hb-section + .hb-section { page-break-before: always; }
  .hb-cat { background: #f3f4f6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 13pt; }
  .hb-q { padding: 5px 0; border-bottom: .5px solid #ccc; }
  .hb-answer { color: #000 !important; font-weight: 600; }
  .hb-img { width: 46mm; max-height: 34mm; border: 0; }
  .handbook.no-images .hb-img { display: none; }
  .hb-blank { height: 16pt; border-bottom: .5px dashed #999; }
  .hb-key { page-break-before: always; }
}

/* ---------- Dokumentácia ---------- */
.help-toc-part { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--as-muted); padding: 12px 10px 4px; }
.help-toc-part:first-of-type { padding-top: 4px; }
.doc-part-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 16px; padding: 18px 22px; border-radius: var(--as-radius); color: #fff; background: linear-gradient(135deg, #0b1220, #1b2a4a); }
.doc-part-head span { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--as-accent); white-space: nowrap; }
.doc-part-head h2 { margin: 0; font-size: 1.35rem; font-weight: 800; }
.doc-part + .doc-part { margin-top: 36px; }
.help-sec code, .help-table code { font-size: .85em; color: #be185d; background: var(--as-panel-2); padding: 1px 5px; border-radius: 5px; }
[data-bs-theme="dark"] .help-sec code { color: #f9a8d4; }
.help-sec pre.code-block { font-size: .8rem; line-height: 1.5; margin: 8px 0 12px; overflow-x: auto; white-space: pre; }
.schema-table { font-size: .85rem; }
.schema-table th { font-size: .72rem; text-transform: uppercase; color: var(--as-muted); }
.arch { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 14px 0 18px; }
.arch-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.arch-box { border: 2px solid var(--as-border); border-radius: 12px; padding: 10px 16px; text-align: center; background: var(--as-panel-2); min-width: 200px; }
.arch-box b { display: block; }
.arch-box small { color: var(--as-muted); }
.arch-arrow { font-size: .78rem; color: var(--as-muted); text-align: center; }
.arch-arrow::before { content: '↕'; display: block; font-size: 1.1rem; color: var(--as-accent); }
.erd { font-size: .85rem; line-height: 2; padding: 12px 16px; border-radius: 12px; background: var(--as-panel-2); border: 1px dashed var(--as-border); }
.help-table.align-top td, .help-table.align-top th { vertical-align: top; }
.doc-cover { display: none; }

@media print {
  .doc-cover { display: block !important; page-break-after: always; padding-top: 30mm; }
  .doc-cover-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14pt; color: #555; }
  .doc-cover-brand img { width: 36px; height: 36px; border-radius: 9px; }
  .doc-cover h1 { font-size: 30pt; font-weight: 800; margin: 14mm 0 4mm; }
  .doc-cover-sub { font-size: 13pt; color: #444; border-bottom: 3px solid #f59e0b; padding-bottom: 8mm; }
  .doc-cover-meta { font-size: 10pt; margin: 8mm 0 12mm; }
  .doc-cover-meta th { padding-right: 10mm; color: #555; font-weight: 600; }
  .doc-cover h2 { font-size: 14pt; font-weight: 800; }
  .doc-cover-toc { font-size: 10pt; }
  .doc-cover-toc > li { margin-top: 3mm; }
  .doc-cover-toc ol { columns: 2; column-gap: 10mm; color: #333; }
  .help-print-head { display: none !important; }
  .doc-part { page-break-before: always; }
  .doc-part:first-of-type { page-break-before: auto; }
  .doc-part-head { background: #fff !important; color: #000 !important; border: 0; border-bottom: 3px solid #f59e0b; border-radius: 0; padding: 0 0 4mm; }
  .doc-part-head span { color: #b45309 !important; }
  .help-sec { page-break-inside: auto; }
  .help-sec h2, .help-sec h3 { page-break-after: avoid; }
  .help-sec table, .help-sec pre, .help-card, .help-callout, .arch, .erd { page-break-inside: avoid; }
  .help-sec code { color: #000 !important; background: #f3f4f6 !important; }
  .help-sec pre.code-block { white-space: pre-wrap; font-size: 7.5pt; background: #f8fafc !important; border: 1px solid #ccc !important; }
  .arch-box, .erd { background: #fff !important; border-color: #999 !important; }
}

/* ---------- Štatistiky používateľov (admin) ---------- */
.as-table th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.as-table th[data-sort]:hover { color: var(--bs-primary); }
.as-table th[data-sort]::after { content: '↕'; opacity: .3; margin-left: 4px; font-size: .8em; }
.as-table th.sorted[data-dir="asc"]::after { content: '↑'; opacity: .9; }
.as-table th.sorted[data-dir="desc"]::after { content: '↓'; opacity: .9; }
.as-table td { vertical-align: middle; }
.admin-view-bar { border-radius: 14px; }
.admin-user-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.admin-user-card dt { font-weight: 500; color: var(--as-muted); }
.admin-user-card dd { margin: 0; }
@media print { .admin-view-bar .btn, .admin-view-bar select { display: none !important; } }
