/* PandaRec – administrácia. Dizajnový systém: Inter, jeden akcent (indigo), tmavý bočný panel, svetlý obsah. */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f9fafc;
  --border: #e5e7ef;
  --border-strong: #d5d8e3;
  --text: #0f1424;
  --text-2: #3f4457;
  --muted: #6b7185;
  --muted-2: #9aa0b4;
  --brand: #4f46e5;
  --brand-600: #4338ca;
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --sb-bg: #0f1222;
  --sb-bg-2: #171b31;
  --sb-text: #b6bbd4;
  --sb-muted: #7c81a0;
  --sb-active: #ffffff;
  --sb-hover: rgba(255, 255, 255, .06);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .12);
  --red: #dc2626; --red-50: #fef2f2;
  --orange: #ea580c; --orange-50: #fff7ed;
  --amber: #d97706; --amber-50: #fffbeb;
  --green: #16a34a; --green-50: #f0fdf4;
  --blue: #2563eb; --blue-50: #eff6ff;
  --teal: #0d9488; --teal-50: #f0fdfa;
  --purple: #7c3aed; --purple-50: #f5f3ff;
  --gray: #6b7280; --gray-50: #f3f4f6;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-size: .875rem;
  --bs-body-color: var(--text);
  --bs-body-bg: var(--bg);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand-600);
  --bs-border-color: var(--border);
  --bs-primary: var(--brand);
  --bs-primary-rgb: 79, 70, 229;
}

html { font-size: 16px; }
body { font-family: var(--bs-body-font-family); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 { font-weight: 650; letter-spacing: -.02em; color: var(--text); }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .8125em; }
.text-muted { color: var(--muted) !important; }
.small-caps { font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--muted); }
.fw-semibold { font-weight: 600 !important; }
.form-control, .form-select { border-color: var(--border-strong); border-radius: var(--radius-sm); font-size: .875rem; padding: .5rem .75rem; color: var(--text); }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.form-control-sm, .form-select-sm { padding: .3rem .6rem; font-size: .8125rem; }
.form-label { font-weight: 500; color: var(--text-2); margin-bottom: .35rem; }
.form-text { color: var(--muted); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--brand-100); border-color: var(--brand); }
.form-switch { padding-left: 3.2em; }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; margin-left: -3.2em; margin-top: .1em; }
.form-switch .form-check-label { padding-left: .1rem; }
.btn { border-radius: var(--radius-sm); font-weight: 500; font-size: .875rem; padding: .5rem .9rem; }
.btn-sm { padding: .3rem .65rem; font-size: .8125rem; }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-600); border-color: var(--brand-600); }
.btn-outline-secondary { border-color: var(--border-strong); color: var(--text-2); background: var(--surface); }
.btn-outline-secondary:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-light { background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.btn-light:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--gray-50); color: var(--text); }
.btn-icon { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.btn-danger-soft { background: var(--red-50); color: var(--red); border: 1px solid #fecaca; }
.btn-danger-soft:hover { background: #fee2e2; color: #b91c1c; }
.alert { border-radius: var(--radius); font-size: .875rem; }
.alert-success { background: var(--green-50); color: #166534; border-color: #bbf7d0; }
.alert-danger { background: var(--red-50); color: #991b1b; border-color: #fecaca; }
.alert-info { background: var(--blue-50); color: #1e40af; border-color: #bfdbfe; }
.alert-warning { background: var(--amber-50); color: #92400e; border-color: #fde68a; }
.invalid-feedback { font-size: .8rem; }

/* ---------- Bočný panel + hlavný obsah ---------- */
.app { display: flex; min-height: 100vh; }
.sb { width: 248px; flex: 0 0 248px; background: var(--sb-bg); color: var(--sb-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sb a { color: inherit; text-decoration: none; }
.sb-brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.15rem .9rem; color: #fff; font-weight: 700; font-size: 1rem; letter-spacing: -.02em; }
.sb-brand .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #6366f1, #a855f7); display: grid; place-items: center; color: #fff; font-size: .95rem; box-shadow: 0 4px 12px rgba(99, 102, 241, .35); }
.sb-project { margin: 0 .75rem .75rem; padding: .7rem .8rem; background: var(--sb-bg-2); border-radius: 10px; border: 1px solid rgba(255, 255, 255, .06); }
.sb-project .name { color: #fff; font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-project .domain { color: var(--sb-muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-nav { padding: 0 .75rem; flex: 1; }
.sb-nav .lbl { font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sb-muted); padding: .9rem .5rem .35rem; font-weight: 600; }
.sb-nav a { display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem; border-radius: 8px; font-size: .875rem; font-weight: 500; margin-bottom: 2px; transition: background .12s, color .12s; }
.sb-nav a i { font-size: 1.05rem; width: 20px; text-align: center; opacity: .85; }
.sb-nav a:hover { background: var(--sb-hover); color: #fff; }
.sb-nav a.active { background: rgba(99, 102, 241, .22); color: #fff; }
.sb-nav a.active i { opacity: 1; color: #a5b4fc; }
.sb-nav .cnt { margin-left: auto; font-size: .7rem; font-weight: 600; background: rgba(255, 255, 255, .12); color: #fff; border-radius: 999px; padding: .1rem .45rem; min-width: 1.4rem; text-align: center; }
.sb-nav .cnt.live { background: var(--red); }
.sb-user { padding: .75rem; border-top: 1px solid rgba(255, 255, 255, .07); }
.sb-user .who { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: 8px; }
.sb-user .who:hover { background: var(--sb-hover); }
.sb-user .avatar { background: #312e81; color: #c7d2fe; }
.sb-user .n { color: #fff; font-size: .82rem; font-weight: 600; line-height: 1.2; }
.sb-user .e { color: var(--sb-muted); font-size: .72rem; }
.sb-user .dropdown-menu { font-size: .85rem; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 1.05rem; margin: 0; font-weight: 650; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb { color: var(--muted); }
.topbar .crumb a { color: var(--muted); }
.topbar .crumb i { margin: 0 .35rem; font-size: .7rem; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.content { padding: 1.5rem; max-width: 1480px; width: 100%; }
.content.fluid { max-width: none; }
.content.flush { padding: 0; }
.live-pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; color: var(--red); background: var(--red-50); border: 1px solid #fecaca; border-radius: 999px; padding: .25rem .65rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(220, 38, 38, .5); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); } 70% { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); } 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); } }
.sb-toggle { display: none; }
@media (max-width: 991.98px) {
  .sb { position: fixed; left: -260px; z-index: 1045; transition: left .2s; box-shadow: none; }
  .sb.open { left: 0; box-shadow: var(--shadow-lg); }
  .sb-backdrop { position: fixed; inset: 0; background: rgba(15, 18, 34, .5); z-index: 1040; display: none; }
  .sb-backdrop.show { display: block; }
  .sb-toggle { display: inline-flex; }
  .topbar { padding: 0 1rem; }
  .content { padding: 1rem; }
}

/* ---------- Karty, KPI, tabuľky ---------- */
.card { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }
.card-header { background: transparent; border-bottom: 1px solid var(--border); padding: .85rem 1.1rem; font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: .5rem; }
.card-header .sub { color: var(--muted); font-weight: 400; font-size: .8rem; margin-left: auto; }
.card-body { padding: 1.1rem; }
.kpi { padding: 1rem 1.1rem; }
.kpi .k { font-size: .75rem; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: .4rem; }
.kpi .v { font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin-top: .25rem; }
.kpi .s { font-size: .75rem; color: var(--muted); margin-top: .25rem; }
.kpi .v .u { font-size: .9rem; color: var(--muted); font-weight: 500; margin-left: .15rem; }
.table { --bs-table-color: var(--text); font-size: .85rem; margin: 0; }
.table > :not(caption) > * > * { padding: .65rem 1.1rem; border-bottom-color: var(--border); }
.table thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.table tbody tr:last-child td { border-bottom: 0; }
.table-hover tbody tr:hover { background: var(--surface-2); }
.bar { height: 6px; background: var(--gray-50); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty i { font-size: 2.2rem; color: var(--muted-2); display: block; margin-bottom: .6rem; }
.empty h5 { color: var(--text); margin-bottom: .35rem; }

/* Graf po dňoch (čisté CSS) */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: .5rem; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; position: relative; }
.chart .col b { display: block; background: var(--brand-100); border-radius: 4px 4px 0 0; min-height: 2px; transition: background .12s; }
.chart .col:hover b { background: var(--brand); }
.chart .col .tip { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; font-size: .7rem; padding: .2rem .45rem; border-radius: 6px; white-space: nowrap; display: none; z-index: 2; }
.chart .col:hover .tip { display: block; }
.chart-x { display: flex; gap: 4px; margin-top: .35rem; }
.chart-x span { flex: 1; font-size: .65rem; color: var(--muted-2); text-align: center; overflow: hidden; white-space: nowrap; }

/* ---------- Avatar, vlajky, štítky ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .75rem; font-weight: 700; flex: 0 0 auto; letter-spacing: 0; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; }
.avatar.sm { width: 26px; height: 26px; font-size: .62rem; }
.hue-0 { background: #e0e7ff; color: #3730a3; } .hue-1 { background: #fce7f3; color: #9d174d; } .hue-2 { background: #dcfce7; color: #166534; } .hue-3 { background: #ffedd5; color: #9a3412; }
.hue-4 { background: #cffafe; color: #155e75; } .hue-5 { background: #fef3c7; color: #92400e; } .hue-6 { background: #ede9fe; color: #5b21b6; } .hue-7 { background: #f1f5f9; color: #334155; }
.avatar.anon { background: var(--gray-50); color: var(--muted); }
.flag { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; padding: .18rem .5rem; border-radius: 999px; line-height: 1.2; white-space: nowrap; }
.tag i { font-size: .8rem; }
.tag-red { background: var(--red-50); color: var(--red); } .tag-orange { background: var(--orange-50); color: var(--orange); } .tag-amber { background: var(--amber-50); color: var(--amber); }
.tag-green { background: var(--green-50); color: var(--green); } .tag-blue { background: var(--blue-50); color: var(--blue); } .tag-teal { background: var(--teal-50); color: var(--teal); }
.tag-purple { background: var(--purple-50); color: var(--purple); } .tag-gray { background: var(--gray-50); color: var(--gray); } .tag-brand { background: var(--brand-50); color: var(--brand); }
.tag-star { background: #fef9c3; color: #a16207; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.c-red { color: var(--red) !important; } .c-orange { color: var(--orange) !important; } .c-amber { color: var(--amber) !important; } .c-green { color: var(--green) !important; }
.c-blue { color: var(--blue) !important; } .c-teal { color: var(--teal) !important; } .c-purple { color: var(--purple) !important; } .c-gray { color: var(--gray) !important; } .c-brand { color: var(--brand) !important; }
.bg-red { background: var(--red) !important; } .bg-orange { background: var(--orange) !important; } .bg-amber { background: var(--amber) !important; } .bg-green { background: var(--green) !important; }
.bg-blue { background: var(--blue) !important; } .bg-teal { background: var(--teal) !important; } .bg-purple { background: var(--purple) !important; } .bg-gray { background: var(--muted-2) !important; } .bg-brand { background: var(--brand) !important; }

/* ---------- Filtre ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: .32rem .75rem; font-size: .8rem; font-weight: 500; cursor: pointer; transition: all .12s; white-space: nowrap; }
.chip i { font-size: .9rem; }
.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.chip.on { background: var(--brand-50); border-color: var(--brand); color: var(--brand); }
.chip .x { margin-left: .1rem; opacity: .7; }
.search { position: relative; }
.search i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.search input { padding-left: 2rem; min-width: 280px; }
.filter-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.segment { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.segment a, .segment button { padding: .35rem .7rem; font-size: .8rem; color: var(--text-2); border: 0; background: transparent; border-right: 1px solid var(--border); font-weight: 500; }
.segment a:last-child, .segment button:last-child { border-right: 0; }
.segment a:hover { background: var(--surface-2); text-decoration: none; }
.segment a.on, .segment button.on { background: var(--brand-50); color: var(--brand); }

/* ---------- Zoznam nahrávok ---------- */
.rec-list { display: flex; flex-direction: column; }
.rec-row { display: grid; grid-template-columns: minmax(230px, 1.2fr) minmax(200px, 1.4fr) minmax(190px, 1.3fr) 70px 130px; gap: 1rem; align-items: center; padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); color: var(--text); position: relative; transition: background .12s; }
.rec-row:last-child { border-bottom: 0; }
.rec-row:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.rec-row .who { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.rec-row .who .t { min-width: 0; }
.rec-row .who .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: .4rem; }
.rec-row .who .m { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .1rem; }
.rec-row .who .m i { margin-right: .15rem; }
.rec-row .page { min-width: 0; }
.rec-row .page .p { font-family: var(--mono); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.rec-row .page .ai { font-size: .8rem; color: var(--text); margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-row .page .ai i { color: var(--purple); margin-right: .2rem; }
.rec-row .page .s { font-size: .74rem; color: var(--muted); margin-top: .1rem; }
.rec-row .sig { display: flex; flex-wrap: wrap; gap: .3rem; }
.rec-row .dur { font-family: var(--mono); font-size: .82rem; color: var(--text-2); text-align: right; }
.rec-row .when { text-align: right; font-size: .78rem; color: var(--muted); }
.rec-row .when b { display: block; color: var(--text-2); font-weight: 500; }
.rec-row.unseen::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.rec-row.unseen .who .n { color: var(--text); }
.rec-row .score { font-size: .7rem; font-weight: 700; color: var(--purple); background: var(--purple-50); border-radius: 6px; padding: .1rem .35rem; }
/* kompaktný variant pre polovičné karty na prehľade: dva riadky – kto/trvanie/kedy a stránka/signály */
.rec-list.compact .rec-row { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "who dur when" "page sig sig"; gap: .35rem .9rem; padding: .7rem 1rem; }
.rec-list.compact .rec-row .who { grid-area: who; }
.rec-list.compact .rec-row .dur { grid-area: dur; align-self: center; }
.rec-list.compact .rec-row .when { grid-area: when; align-self: center; }
.rec-list.compact .rec-row .page { grid-area: page; }
.rec-list.compact .rec-row .sig { grid-area: sig; justify-content: flex-end; flex-wrap: nowrap; }
@media (max-width: 991.98px) {
  .rec-list.compact .rec-row, .rec-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who when" "page page" "sig dur"; gap: .5rem; }
  .rec-row .who { grid-area: who; } .rec-row .when { grid-area: when; } .rec-row .page { grid-area: page; } .rec-row .sig { grid-area: sig; } .rec-row .dur { grid-area: dur; }
}

/* ---------- Prehrávač ---------- */
.play-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; height: calc(100vh - 60px); }
.play-main { display: flex; flex-direction: column; min-width: 0; background: #0b0d17; }
.play-head { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.play-head .back { color: var(--muted); font-size: 1.1rem; display: inline-flex; }
.play-head .meta { display: flex; align-items: center; gap: .9rem; color: var(--muted); font-size: .8rem; flex-wrap: wrap; }
.play-head .meta i { margin-right: .25rem; }
.play-head .actions { margin-left: auto; display: flex; gap: .35rem; align-items: center; }
.play-url { display: flex; align-items: center; gap: .5rem; padding: .45rem .9rem; background: #141830; color: #c7cbe0; font-size: .78rem; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.play-url .u { font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e2e6ff; min-width: 0; flex: 0 1 auto; }
.play-url .t { color: #7c81a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.play-url .dev { margin-left: auto; color: #7c81a0; white-space: nowrap; }
.stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; overflow: hidden; }
.stage .rr-player { background: transparent; box-shadow: none; border-radius: 0; float: none; }
.stage .rr-player__frame { background: #fff; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); overflow: hidden; }
.stage .replayer-wrapper { background: #fff; }
.stage .loading { color: #7c81a0; text-align: center; font-size: .85rem; }
.stage .loading .spinner-border { width: 2rem; height: 2rem; border-width: .2em; color: #6366f1; margin-bottom: .75rem; }
.stage .rr-controller { display: none; }
.controls { background: #141830; color: #e2e6ff; padding: .55rem 1rem .7rem; border-top: 1px solid rgba(255, 255, 255, .06); }
.scrub { position: relative; height: 26px; cursor: pointer; margin-bottom: .35rem; }
.scrub .track { position: absolute; left: 0; right: 0; top: 11px; height: 5px; background: rgba(255, 255, 255, .14); border-radius: 999px; }
.scrub .fill { position: absolute; left: 0; top: 11px; height: 5px; background: #818cf8; border-radius: 999px; width: 0; }
.scrub .idle { position: absolute; top: 11px; height: 5px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 3px, transparent 3px 6px); }
.scrub .mk { position: absolute; top: 3px; width: 3px; height: 21px; border-radius: 2px; transform: translateX(-1px); opacity: .9; }
.scrub .mk.big { width: 4px; }
.scrub .mk:hover { opacity: 1; transform: translateX(-1px) scaleY(1.15); }
.scrub .knob { position: absolute; top: 7px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); transform: translateX(-6px); left: 0; pointer-events: none; }
.scrub .cm { position: absolute; top: -6px; transform: translateX(-6px); font-size: .7rem; color: #fbbf24; }
.ctl { display: flex; align-items: center; gap: .5rem; flex-wrap: nowrap; }
.ctl > * { flex: 0 0 auto; white-space: nowrap; }
.ctl .btn { color: #e2e6ff; background: transparent; border: 1px solid transparent; }
.ctl .btn:hover { background: rgba(255, 255, 255, .08); }
.ctl .btn.on { background: rgba(129, 140, 248, .25); color: #c7d2fe; }
.ctl .play { width: 40px; height: 40px; border-radius: 50%; background: #6366f1; color: #fff; display: inline-grid; place-items: center; font-size: 1.1rem; border: 0; }
.ctl .play:hover { background: #4f46e5; }
.ctl .time { font-family: var(--mono); font-size: .8rem; color: #c7cbe0; min-width: 96px; }
.ctl .time b { color: #fff; font-weight: 600; }
.ctl .speed { display: inline-flex; flex: 0 0 auto; border: 1px solid rgba(255, 255, 255, .15); border-radius: 8px; overflow: hidden; }
.ctl .speed button { border: 0; background: transparent; color: #c7cbe0; font-size: .75rem; padding: .3rem .5rem; font-weight: 600; }
.ctl .speed button.on { background: #6366f1; color: #fff; }
.ctl .spacer { flex: 1; }
.ctl .hint { display: none; font-size: .72rem; color: #7c81a0; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: right; }
@media (min-width: 1600px) { .ctl .hint { display: block; } }
.play-side { background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.play-side .tabs { display: flex; border-bottom: 1px solid var(--border); padding: 0 .5rem; }
.play-side .tabs button { flex: 1; border: 0; background: transparent; padding: .75rem .25rem; font-size: .82rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.play-side .tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.play-side .tabs button .cnt { font-size: .68rem; background: var(--gray-50); color: var(--muted); border-radius: 999px; padding: .05rem .35rem; margin-left: .2rem; }
.play-side .pane { flex: 1; overflow: auto; min-height: 0; }
.play-side .pane[hidden] { display: none; }
.ai-card { margin: .85rem; padding: .85rem .95rem; border-radius: 10px; background: linear-gradient(135deg, #f5f3ff, #eef2ff); border: 1px solid #ddd6fe; }
.ai-card .h { display: flex; align-items: center; gap: .4rem; font-weight: 650; font-size: .85rem; color: #4c1d95; margin-bottom: .3rem; }
.ai-card .h i { color: var(--purple); }
.ai-card p { margin: 0; font-size: .82rem; color: #3b0764; line-height: 1.5; }
.ai-card .moments { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; }
.ai-card .moments button { border: 1px solid #c4b5fd; background: #fff; color: #5b21b6; border-radius: 999px; font-size: .72rem; padding: .18rem .55rem; font-weight: 500; }
.ai-card .moments button:hover { background: #ede9fe; }
.ai-card .moments button b { font-family: var(--mono); font-weight: 600; margin-right: .25rem; }
.ai-card .none { font-size: .8rem; color: #6d28d9; }
.tl-filter { display: flex; flex-wrap: wrap; gap: .3rem; padding: .6rem .85rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.tl-filter button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; font-size: .7rem; padding: .15rem .5rem; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: .25rem; }
.tl-filter button.on { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.tl-filter button i { font-size: .75rem; }
.tl { list-style: none; margin: 0; padding: .35rem 0; }
.tl li { display: flex; gap: .65rem; padding: .5rem .9rem; cursor: pointer; border-left: 3px solid transparent; align-items: flex-start; }
.tl li:hover { background: var(--surface-2); }
.tl li.on { background: var(--brand-50); border-left-color: var(--brand); }
.tl li.past { opacity: .75; }
.tl li .t { font-family: var(--mono); font-size: .72rem; color: var(--muted); min-width: 44px; padding-top: .15rem; }
.tl li .ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: .8rem; flex: 0 0 auto; }
.tl li .b { min-width: 0; flex: 1; }
.tl li .b .l { font-size: .82rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl li .b .k { font-size: .7rem; color: var(--muted); }
.tl li .b .d { font-size: .72rem; color: var(--muted); font-family: var(--mono); white-space: pre-wrap; word-break: break-word; margin-top: .25rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: .35rem .5rem; max-height: 160px; overflow: auto; display: none; }
.tl li.open .b .d { display: block; }
.tl li.open .b .l { white-space: normal; }
.tl li.nav { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: .25rem 0; }
.tl li.nav.on { background: var(--brand-50); }
.ic-nav { background: var(--blue-50); color: var(--blue); } .ic-click { background: var(--gray-50); color: var(--gray); } .ic-rage { background: var(--orange-50); color: var(--orange); } .ic-dead { background: var(--amber-50); color: var(--amber); }
.ic-input { background: var(--teal-50); color: var(--teal); } .ic-submit { background: var(--green-50); color: var(--green); } .ic-error, .ic-console, .ic-xhr { background: var(--red-50); color: var(--red); }
.ic-identify, .ic-event { background: var(--purple-50); color: var(--purple); } .ic-comment { background: #fef9c3; color: #a16207; }
.info-list { padding: .5rem .95rem; }
.info-list .row-i { display: flex; justify-content: space-between; gap: 1rem; padding: .42rem 0; border-bottom: 1px solid var(--border); font-size: .82rem; }
.info-list .row-i:last-child { border-bottom: 0; }
.info-list .row-i .k { color: var(--muted); flex: 0 0 auto; }
.info-list .row-i .v { text-align: right; min-width: 0; overflow-wrap: anywhere; color: var(--text); }
.info-list h6 { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: .9rem 0 .35rem; font-weight: 600; }
.person-card { display: flex; align-items: center; gap: .75rem; padding: .9rem .95rem; border-bottom: 1px solid var(--border); }
.person-card .n { font-weight: 600; }
.person-card .m { font-size: .76rem; color: var(--muted); }
.mini-rec { display: flex; align-items: center; gap: .6rem; padding: .5rem .95rem; border-bottom: 1px solid var(--border); font-size: .8rem; color: var(--text); }
.mini-rec:hover { background: var(--surface-2); text-decoration: none; }
.mini-rec .d { color: var(--muted); font-size: .74rem; }
.mini-rec .dur { margin-left: auto; font-family: var(--mono); color: var(--muted); }
.comments { padding: .75rem .95rem; }
.comment { display: flex; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.comment .b { flex: 1; min-width: 0; }
.comment .h { display: flex; align-items: center; gap: .4rem; font-size: .75rem; color: var(--muted); }
.comment .h b { color: var(--text); font-weight: 600; }
.comment .h .at { font-family: var(--mono); color: var(--brand); cursor: pointer; background: var(--brand-50); padding: 0 .35rem; border-radius: 4px; }
.comment .h .del { margin-left: auto; color: var(--muted-2); cursor: pointer; }
.comment .h .del:hover { color: var(--red); }
.comment p { margin: .2rem 0 0; font-size: .84rem; white-space: pre-wrap; }
.comment-form textarea { resize: vertical; min-height: 72px; }
.comment-form .at-toggle { font-size: .78rem; }
@media (max-width: 1099.98px) {
  .play-wrap { grid-template-columns: minmax(0, 1fr); height: auto; }
  .play-main { min-height: 70vh; }
  .play-side { border-left: 0; border-top: 1px solid var(--border); max-height: 70vh; }
}
@media (max-width: 767.98px) {
  .play-main { min-height: 0; }
  .stage { flex: none; min-height: 224px; }
  .play-url .dev { display: none; }
  .play-head .meta { gap: .5rem .75rem; }
  .ctl { gap: .35rem; }
  .ctl .time { min-width: 0; }
  .ctl #btnSkip .lbl { display: none; }
  .ctl .speed button { padding: .3rem .4rem; }
  .topbar .right { min-width: 0; }
  .topbar .segment { max-width: 100%; overflow-x: auto; }
  .topbar .segment a { padding: .35rem .5rem; white-space: nowrap; }
}

/* ---------- Osoby ---------- */
.person-row { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 1fr) 110px 120px 140px; gap: 1rem; align-items: center; padding: .75rem 1.1rem; border-bottom: 1px solid var(--border); color: var(--text); }
.person-row:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.person-row:last-child { border-bottom: 0; }
.person-row .who { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.person-row .who .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-row .who .m { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-row .props { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-row .num { font-family: var(--mono); font-size: .82rem; color: var(--text-2); }
.person-row .when { font-size: .78rem; color: var(--muted); text-align: right; }
@media (max-width: 991.98px) { .person-row { grid-template-columns: 1fr 1fr; } .person-row .props { display: none; } }
.props-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .5rem; }
.props-grid .p { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .65rem; min-width: 0; }
.props-grid .p .k { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.props-grid .p .v { font-size: .84rem; overflow-wrap: anywhere; }

/* ---------- Inštalácia, dokumentácia ---------- */
.docs { max-width: 900px; }
.docs h2 { font-size: 1.25rem; margin: 2rem 0 .75rem; padding-top: .5rem; }
.docs h3 { font-size: 1rem; margin: 1.4rem 0 .5rem; }
.docs p, .docs li { color: var(--text-2); line-height: 1.6; }
.docs .lead { font-size: 1rem; color: var(--text-2); }
.docs table { font-size: .84rem; }
.codebox { position: relative; background: #0f1222; color: #e2e6ff; border-radius: 10px; padding: 1rem 1.1rem; font-family: var(--mono); font-size: .8rem; line-height: 1.55; overflow: auto; white-space: pre; margin: .75rem 0 1rem; }
.codebox .copy { position: absolute; top: .55rem; right: .55rem; font-family: var(--bs-body-font-family); font-size: .72rem; background: rgba(255, 255, 255, .1); color: #fff; border: 0; border-radius: 6px; padding: .25rem .55rem; }
.codebox .copy:hover { background: rgba(255, 255, 255, .2); }
.codebox .c1 { color: #7c81a0; } .codebox .c2 { color: #a5b4fc; } .codebox .c3 { color: #86efac; } .codebox .c4 { color: #fcd34d; }
.step { display: flex; gap: 1rem; margin-bottom: 1.25rem; }
.step .no { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: 0 0 auto; }
.step h4 { font-size: .95rem; margin: .3rem 0 .35rem; }
.status-box { display: flex; align-items: center; gap: .85rem; padding: 1rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.status-box .ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; flex: 0 0 auto; }
.status-box.wait .ic { background: var(--amber-50); color: var(--amber); }
.status-box.ok .ic { background: var(--green-50); color: var(--green); }
.docs-nav { position: sticky; top: 76px; }
.docs-nav a { display: block; padding: .3rem .6rem; color: var(--muted); font-size: .82rem; border-left: 2px solid transparent; }
.docs-nav a:hover { color: var(--brand); text-decoration: none; }
.docs-nav a.on { color: var(--brand); border-left-color: var(--brand); }
.kbd { font-family: var(--mono); font-size: .72rem; background: var(--gray-50); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: .05rem .35rem; }

/* ---------- Nastavenia ---------- */
.settings-nav a { display: block; padding: .45rem .7rem; border-radius: 8px; color: var(--text-2); font-weight: 500; font-size: .85rem; }
.settings-nav a:hover { background: var(--surface-2); text-decoration: none; }
.settings-nav a.on { background: var(--brand-50); color: var(--brand); }
.danger-zone { border-color: #fecaca; }
.danger-zone .card-header { color: var(--red); border-bottom-color: #fecaca; }
.storage-meter { height: 10px; background: var(--gray-50); border-radius: 999px; overflow: hidden; }
.storage-meter i { display: block; height: 100%; background: var(--brand); }
.storage-meter i.warn { background: var(--amber); }
.storage-meter i.full { background: var(--red); }

/* ---------- Stránkovanie ---------- */
.pagination { margin: 0; --bs-pagination-font-size: .82rem; --bs-pagination-padding-y: .35rem; --bs-pagination-padding-x: .7rem; --bs-pagination-color: var(--text-2); --bs-pagination-border-color: var(--border); --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-hover-bg: var(--surface-2); --bs-pagination-hover-color: var(--brand); --bs-pagination-focus-box-shadow: none; }
.toast-container { z-index: 2000; }
.toast { border-radius: 10px; font-size: .85rem; }
.tooltip { font-size: .75rem; }
.tooltip-inner { background: var(--text); border-radius: 6px; }

/* prehrávač – indikátor preskakovania nečinnosti */
.stage.is-skipping::after { content: 'Preskakujem nečinnosť'; position: absolute; top: 10px; right: 12px; background: rgba(15, 23, 42, .85); color: #c7d2fe; font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: .3rem .6rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12); pointer-events: none; }
