:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f6f7fb;
  background: #090b10;
  font-synthesis: none;
  --panel: #11151d;
  --panel-2: #171c26;
  --border: #282f3c;
  --muted: #929caf;
  --red: #ff4057;
  --red-dark: #c9253a;
  --green: #35d07f;
  --yellow: #ffd34e;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 75% 0%, #1a2030 0, #090b10 35rem); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .45; }
.hidden { display: none !important; }

.topbar {
  height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 48px); border-bottom: 1px solid var(--border);
  background: rgba(9, 11, 16, .86); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); margin-top: 2px; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 7px rgba(255,64,87,.12); }

main { width: min(1500px, 100%); margin: 0 auto; padding: 28px clamp(16px, 3vw, 40px) 50px; }
.login-shell { min-height: calc(100vh - 128px); display: grid; place-items: center; }
.card { background: linear-gradient(145deg, rgba(23,28,38,.98), rgba(15,19,27,.98)); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 18px 60px rgba(0,0,0,.22); }
.login-card { width: min(430px, 100%); padding: 34px; }
h1 { font-size: clamp(30px, 6vw, 46px); margin: 6px 0 10px; letter-spacing: -.04em; }
h2 { margin: 0; font-size: 20px; }
.eyebrow { color: var(--red); font-size: 11px; font-weight: 800; letter-spacing: .16em; margin: 0 0 5px; }
.muted { color: var(--muted); line-height: 1.55; }
.hint { color: var(--muted); font-size: 12px; margin: 12px 0 0; line-height: 1.4; }
.error { min-height: 20px; color: #ff8d9a; margin: 12px 0 0; }

label { display: block; color: #cbd1dd; font-size: 13px; font-weight: 650; margin: 18px 0 7px; }
input:not([type="range"]), select {
  width: 100%; color: #f7f8fb; background: #0c0f15; border: 1px solid #313949;
  border-radius: 10px; padding: 12px 13px; outline: none;
}
input:focus, select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,64,87,.13); }
input[type="range"] { width: 100%; accent-color: var(--red); }

.button { border: 1px solid transparent; border-radius: 10px; color: white; background: #252c38; padding: 10px 15px; font-weight: 750; transition: transform .15s, background .15s, border .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button.primary { background: var(--red); }
.button.primary:hover { background: #ff5b6e; }
.button.secondary { background: #202632; border-color: #343d4d; }
.button.danger { background: transparent; color: #ff8390; border-color: #74303c; }
.button.ghost { background: transparent; border-color: var(--border); }
.button.talk.active { color: #111; background: var(--yellow); }
.button.wide { width: 100%; margin-top: 18px; }

.dashboard { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }

/* Kenar çubuğu kendi içinde kayar: `overscroll-behavior: contain` kaydırmanın
   sayfaya zincirlenmesini engeller, kamera ayarlarını kaydırırken tüm ekranın
   kaymasının nedeni buydu. */
.sidebar {
  display: grid; gap: 16px; align-content: start; position: sticky; top: 92px;
  max-height: calc(100vh - 116px); overflow-y: auto; overscroll-behavior: contain;
  padding-right: 6px;
}
.live-card, .recordings-card { padding: 20px; }

/* Katlanabilir kartlar: telefonda kullanılmayan bölümler kapatılabilir. */
details.panel-card { padding: 0; }
details.panel-card > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; cursor: pointer; list-style: none;
}
details.panel-card > summary::-webkit-details-marker { display: none; }
details.panel-card > summary > span:first-child { min-width: 0; }
details.panel-card > summary h2 { font-size: 17px; }
details.panel-card > summary .eyebrow { margin: 0 0 3px; }
details.panel-card > summary::after {
  content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin-left: 2px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px); transition: transform .18s ease;
}
details.panel-card[open] > summary::after { transform: rotate(225deg) translateY(-2px); }
details.panel-card > summary:hover::after { border-color: #cbd1dd; }
details.panel-card .card-body { padding: 0 18px 18px; }
details.panel-card .card-body > label:first-child { margin-top: 4px; }
.device-state { margin: 14px 0 0; font-size: 14px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #697183; box-shadow: 0 0 0 5px rgba(105,113,131,.12); }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 5px rgba(53,208,127,.12); }
#viewerCount { display: block; margin-top: 8px; }
#viewerCount.warning { color: var(--yellow); }

/* İnce, koyu temaya uygun kaydırma çubukları. */
.sidebar, .recordings-list, .diagnostics, .stats-overlay {
  scrollbar-width: thin; scrollbar-color: #3a4354 transparent;
}
.sidebar::-webkit-scrollbar, .recordings-list::-webkit-scrollbar,
.diagnostics::-webkit-scrollbar { width: 8px; height: 8px; }
.sidebar::-webkit-scrollbar-thumb, .recordings-list::-webkit-scrollbar-thumb,
.diagnostics::-webkit-scrollbar-thumb { background: #3a4354; border-radius: 999px; }
.sidebar::-webkit-scrollbar-track, .recordings-list::-webkit-scrollbar-track,
.diagnostics::-webkit-scrollbar-track { background: transparent; }
.content { display: grid; gap: 22px; min-width: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-title .eyebrow { margin-bottom: 4px; }
.pill { color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 6px 10px; font-size: 12px; }
.pill.online { color: var(--green); border-color: rgba(53,208,127,.35); }

.video-stage { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16/9; min-height: 280px; background: #030405; border: 1px solid #242a34; border-radius: 14px; }
.video-stage video { width: 100%; height: 100%; object-fit: contain; background: #030405; }
.video-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); text-align: center; }
.video-placeholder strong { color: #dce1ea; }
.camera-icon { width: 58px; height: 40px; border: 3px solid #4c5566; border-radius: 8px; position: relative; margin-bottom: 8px; }
.camera-icon::after { content: ""; position: absolute; right: -16px; top: 8px; border-style: solid; border-width: 9px 14px 9px 0; border-color: transparent #4c5566 transparent transparent; transform: rotate(180deg); }
.focus-marker { position: absolute; width: 56px; height: 56px; border: 2px solid var(--yellow); border-radius: 7px; transform: translate(-50%, -50%); pointer-events: none; animation: focus-pulse 1.1s ease-out; }
@keyframes focus-pulse { 0% { transform: translate(-50%,-50%) scale(1.35); opacity: .4; } 35% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 100% { opacity: .2; } }
.live-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.status-message { min-height: 22px; margin: 10px 0 0; font-size: 13px; }
/* Arşiv listesi kendi içinde kayar: aksi halde 100+ segmentte sayfanın sonuna
   ulaşmak için uzun uzun kaydırmak gerekiyordu. */
.recordings-list {
  display: grid; gap: 8px; margin-top: 15px; align-content: start;
  max-height: clamp(240px, 44vh, 480px); overflow-y: auto;
  overscroll-behavior: contain; padding-right: 6px;
}
.recordings-list.empty { max-height: none; border: 1px dashed #343c49; border-radius: 12px; padding: 24px; color: var(--muted); text-align: center; }
.recording-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #0d1118; border: 1px solid #272e3a; border-radius: 11px; padding: 11px 13px; }
.recording-row small { color: var(--muted); display: block; margin-top: 3px; }
.recording-row.active { border-color: var(--red); box-shadow: 0 0 0 1px rgba(255,64,87,.35) inset; }
.day-header {
  position: sticky; top: 0; z-index: 1; margin: 8px 0 0; padding: 6px 0;
  background: #131822; color: var(--muted); font-size: 12px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
}

.facts { display: grid; gap: 7px; margin: 16px 0 0; font-size: 12.5px; }
.facts div { display: flex; justify-content: space-between; gap: 10px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.pill.recording { color: var(--red); border-color: rgba(255,64,87,.45); }
.title-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.toggle input { width: auto; accent-color: var(--red); }

.stage-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.icon-button {
  min-width: 36px; height: 32px; padding: 0 9px; color: #eef1f6;
  background: rgba(9, 11, 16, .68); border: 1px solid rgba(255,255,255,.14);
  border-radius: 9px; font-size: 13px; font-weight: 700; backdrop-filter: blur(8px);
}
.icon-button:hover:not(:disabled) { background: rgba(9, 11, 16, .9); }
.icon-button[aria-pressed="true"] { color: #111; background: var(--yellow); }
.stats-overlay {  position: absolute; left: 10px; bottom: 10px; margin: 0; padding: 10px 12px;
  color: #d9e0ec; background: rgba(6, 8, 12, .82); border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; line-height: 1.5; white-space: pre; pointer-events: none;
}

.diagnostics {
  margin: 12px 0 0; padding: 11px 12px; overflow-x: auto;
  color: #d9e0ec; background: #0c0f15; border: 1px solid #272e3a; border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;
  line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}

.player-shell { display: grid; gap: 10px; margin: 16px 0 20px; }
/* Çift oynatıcı: sıradaki segment görünmeyen elemanda önceden yüklenir, segment
   bitince yalnız görünürlük takas edilir. Tek elemanla src değiştirmek her
   geçişte yeniden yükleme gecikmesi yaratıyordu. */
.player-stack { display: grid; }
.player-stack > video { grid-area: 1 / 1; }
/* Donmuş kare katmanı: videoyla aynı hücreyi paylaşır, üstte durur. */
.player-freeze {
  grid-area: 1 / 1; position: relative; display: grid; place-items: center;
  /* Yalnız donmuş kare varken siyah: tampon beklerken videonun kendi son karesi
     görünmeye devam etsin. */
  background: transparent; border-radius: 12px; overflow: hidden;
  pointer-events: none; z-index: 2;
}
.player-freeze.has-frame { background: black; }
.player-freeze canvas { max-width: 100%; max-height: 520px; display: block; }
.player-freeze:not(.has-frame) canvas { display: none; }
.player-spinner {
  position: absolute; width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: white;
  animation: player-spin .9s linear infinite;
}
.player-freeze::after {
  content: "yükleniyor"; position: absolute; bottom: 14px;
  color: rgba(255,255,255,.85); font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
@keyframes player-spin { to { transform: rotate(360deg); } }
.recording-player { width: 100%; max-height: 520px; background: black; border-radius: 12px; }
.timeline { position: relative; height: 22px; }
.timeline-track { position: absolute; inset: 8px 0; border-radius: 999px; background: #1d2431; overflow: hidden; }
.timeline-transfer, .timeline-buffered, .timeline-played { position: absolute; top: 0; bottom: 0; left: 0; width: 0; }
.timeline-transfer { background: #253045; }
.timeline-buffered { background: #37445c; }
.timeline-played { background: var(--red); }
.timeline input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 22px; margin: 0;
  background: transparent; -webkit-appearance: none; appearance: none;
}
.timeline input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: white; border: 2px solid var(--red); cursor: pointer;
}
.timeline input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: white;
  border: 2px solid var(--red); cursor: pointer;
}
.timeline input[type="range"]::-moz-range-track { background: transparent; }
.player-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.player-bar select { width: auto; padding: 7px 9px; }
.player-bar output { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.player-spacer { flex: 1 1 auto; }
.transfer-bar { height: 5px; border-radius: 999px; background: #1d2431; overflow: hidden; }
.transfer-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--yellow)); transition: width .2s linear; }

/* Tek eksenli arşiv: güvenlik kamerası uygulamalarındaki sade scrubber düzeni. */
.timeline-strip {
  position: relative;
  margin: 16px 0 6px; padding: 16px; overflow: visible;
  background: linear-gradient(180deg, #111722 0%, #0c1119 100%);
  border: 1px solid #252d3a; border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.timeline-nav {
  display: grid; grid-template-columns: 42px minmax(0,1fr) 42px;
  align-items: center; gap: 8px; margin-bottom: 14px;
}
.timeline-nav-button {
  width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px;
  background: rgba(255,255,255,.055); color: #dfe5ee; font-size: 28px;
  line-height: 1; cursor: pointer; transition: background .16s ease, transform .16s ease;
}
.timeline-nav-button:hover { background: rgba(255,255,255,.1); }
.timeline-nav-button:active { transform: scale(.94); }
.timeline-title { min-width: 0; display: grid; justify-items: center; gap: 3px; text-align: center; }
.timeline-title > span {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #f4f7fb; font-size: 14px; font-weight: 720;
}
.timeline-title output {
  color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums;
}
.strip {
  position: relative; height: 70px; overflow: hidden; isolation: isolate;
  background: #090e15; border: 1px solid #222b38; border-radius: 12px;
  cursor: ew-resize; touch-action: pan-y pinch-zoom; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.strip::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(90deg, rgba(9,14,21,.38), transparent 8%, transparent 92%, rgba(9,14,21,.38));
}
.strip * { touch-action: inherit; pointer-events: none; }
.strip:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.strip.connecting::before {
  content: "Arşiv bağlanıyor…"; position: absolute; z-index: 9; inset: 0;
  display: grid; place-items: center; padding-top: 20px;
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .01em;
  background: rgba(9,14,21,.72); backdrop-filter: blur(3px);
}
.strip.connecting::after {
  content: ""; position: absolute; z-index: 10; inset: auto; top: 15px; left: calc(50% - 8px);
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.25);
  border-top-color: #fff; border-radius: 50%; animation: player-spin .75s linear infinite;
  background: none;
}
.strip-blocks, .strip-ticks, .strip-events { position: absolute; inset: 0; }
.strip-block { position: absolute; top: 13px; bottom: 21px; background: #285d48; }
.strip-block + .strip-block { border-left: 1px solid rgba(255,255,255,.08); }
.strip-block.active { background: #397b60; box-shadow: inset 0 0 0 1px rgba(111,222,165,.28); }
.strip-event {
  position: absolute; z-index: 2; top: 7px; height: 4px; min-width: 3px;
  border-radius: 999px; background: var(--yellow); box-shadow: 0 0 7px rgba(255,211,78,.65);
}
.strip-tick {
  position: absolute; z-index: 1; top: 12px; bottom: 19px;
  border-left: 1px solid rgba(255,255,255,.045);
}
.strip-tick span {
  position: absolute; left: 4px; bottom: -17px; color: #697486;
  font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.strip-tick.major { border-left-color: rgba(255,255,255,.11); }
.strip-tick.day-boundary { border-left-color: rgba(255,85,105,.7); }
.strip-tick.day-boundary span { color: #d9808b; font-weight: 700; }
.strip-playhead {
  position: absolute; z-index: 5; top: 0; bottom: 0; width: 2px;
  background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.22), 0 0 10px rgba(255,255,255,.35);
  pointer-events: none;
}
.strip-playhead::before {
  content: ""; position: absolute; top: 6px; left: -5px; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(0,0,0,.45);
}
.timeline-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 28px; padding: 7px 2px 0;
}
.timeline-meta > small { color: #8d98a9; font-size: 11px; }

/* Hesap çubuğu ve plan göstergesi. */
.account-bar { display: flex; align-items: center; gap: 10px; }
.account-email {
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #aeb8c6; font-size: 12px;
}
.plan-badge {
  padding: 3px 9px; border-radius: 999px; background: #1b2230;
  color: #9aa5b4; font-size: 11px; font-weight: 750; letter-spacing: .02em;
}
.plan-badge.pro { background: rgba(255,211,78,.14); color: var(--yellow); }
.usage-row { display: grid; gap: 5px; margin: 2px 0 8px; }
.usage-track { height: 5px; border-radius: 999px; background: #1d2431; overflow: hidden; }
.usage-fill { height: 100%; width: 0; background: var(--red); transition: width .3s ease; }
.usage-fill.warning { background: var(--yellow); }
.hint.warning { color: var(--yellow); }
.plan-features { margin: 4px 0 12px; padding: 0; list-style: none; display: grid; gap: 5px; }
.plan-features li { font-size: 12px; }
.plan-features li.enabled { color: #b9e4cd; }
.plan-features li.locked { color: #7b8494; }
.danger-text { color: #ff9aa6; }

/* Giriş/kayıt geçişi. */
.login-switch { margin: 4px 0 0; text-align: center; }
.link-button {
  border: 0; background: none; color: var(--red);
  font-size: 12px; font-weight: 650; cursor: pointer; text-decoration: underline;
}

/* Kamera yönetimi. */
.device-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.device-actions .button { flex: 1 1 auto; padding-inline: 10px; font-size: 12px; }

/* Kamera ekleme ve hesap silme pencereleri. */
.overlay {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  padding: 18px; background: rgba(4,7,12,.78); backdrop-filter: blur(4px);
}
.overlay-card { width: min(420px, 100%); display: grid; gap: 10px; }
.overlay-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.pairing-code {
  display: block; padding: 14px 10px; border: 1px dashed #39435400; border-radius: 12px;
  background: #0b0f16; color: #f4f7fb; text-align: center;
  font-size: clamp(26px, 8vw, 38px); font-weight: 800; letter-spacing: .16em;
  font-variant-numeric: tabular-nums; border-color: #394354;
}
.pairing-steps { margin: 0; padding-left: 20px; color: #aeb8c6; font-size: 12px; display: grid; gap: 4px; }

/* Çizelgede gezinme: imleç çizgisi ve kare önizlemesi. */
.strip-hover-line {
  position: absolute; z-index: 3; top: 0; bottom: 0; width: 1px;
  background: rgba(255,255,255,.5); pointer-events: none;
}
.scrub-preview {
  position: absolute; z-index: 20; bottom: calc(100% + 10px); transform: translateX(-50%);
  display: grid; justify-items: center; gap: 3px; padding: 7px;
  background: rgba(9,13,20,.96); border: 1px solid #2c3542; border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,.45); pointer-events: none;
}
.scrub-frame {
  position: relative; display: grid; place-items: center;
  width: 192px; height: 108px; overflow: hidden;
  background: #05080d; border-radius: 7px;
}
.scrub-frame canvas { width: 100%; height: 100%; object-fit: cover; }
.scrub-spinner {
  position: absolute; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.22); border-top-color: #fff;
  animation: player-spin .8s linear infinite;
}
.scrub-preview strong {
  color: #f2f5f9; font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums;
}
.scrub-preview small { color: #8d98a9; font-size: 10px; text-align: center; }
.offscreen-media {
  position: absolute; width: 1px; height: 1px; opacity: 0;
  pointer-events: none; left: -9999px; top: -9999px;
}
.timeline-legend { display: flex; align-items: center; gap: 5px; color: #748093; font-size: 10px; }
.timeline-legend i { width: 12px; height: 4px; margin-left: 5px; border-radius: 999px; }
.legend-recording { background: #397b60; }
.legend-event { background: var(--yellow); }
.timeline-toolbar {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  margin-top: 9px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07);
}
.timeline-range {
  display: flex; align-items: center; gap: 8px; color: #778397; font-size: 11px;
}
.timeline-range select {
  width: auto; min-width: 70px; padding: 7px 26px 7px 9px;
  border-color: #2a3443; border-radius: 9px; background-color: #161d28; font-size: 12px;
}
.event-actions { justify-self: center; display: flex; gap: 5px; }
.timeline-action, .timeline-live {
  min-height: 34px; border: 1px solid #2a3443; border-radius: 9px;
  background: #161d28; color: #c5cdd8; font-size: 12px; font-weight: 650; cursor: pointer;
}
.timeline-action { padding: 6px 10px; }
.timeline-action:hover, .timeline-live:hover { background: #202938; color: #fff; }
.timeline-live { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; }
.timeline-live.active { border-color: rgba(255,85,105,.4); color: #fff; background: rgba(255,85,105,.12); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 7px rgba(255,85,105,.65); }
.timeline-help { margin: 10px 0 0; color: #667286; font-size: 11px; text-align: center; }

.archive-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-top: 14px; flex-wrap: wrap; }

.field { display: grid; gap: 6px; min-width: 190px; }
.field span { color: var(--muted); font-size: 12px; font-weight: 650; }

@media (max-width: 880px) {
  .dashboard { grid-template-columns: 1fr; }
  /* Telefonda kenar çubuğu normal akışa döner: iç kaydırma alanı küçük ekranda
     iki kat kaydırma hissi yaratıyor. */
  .sidebar {
    position: static; max-height: none; overflow: visible; padding-right: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .video-stage { min-height: 220px; }
  .recordings-list { max-height: clamp(220px, 52vh, 420px); }
}
@media (max-width: 580px) {
  .sidebar { grid-template-columns: 1fr; }
  .topbar { height: 64px; }
  main { padding-top: 16px; }
  .live-actions .button { flex: 1 1 100%; }
  .video-stage { aspect-ratio: 3/4; min-height: 320px; }
  .timeline-strip { margin-inline: -4px; padding: 12px; border-radius: 15px; }
  .timeline-nav { grid-template-columns: 44px minmax(0,1fr) 44px; margin-bottom: 11px; }
  .timeline-nav-button { width: 44px; height: 44px; }
  .timeline-title > span { font-size: 12px; }
  .strip { height: 76px; }
  .timeline-meta { align-items: flex-start; }
  .timeline-meta > small { max-width: 62%; }
  .timeline-toolbar { grid-template-columns: 64px minmax(93px,1fr) auto; gap: 6px; }
  .timeline-range > span, .event-actions .timeline-action span { display: none; }
  .timeline-range select { min-width: 64px; height: 44px; padding-inline: 8px; }
  .timeline-action { min-width: 44px; min-height: 44px; padding-inline: 10px; font-size: 19px; }
  .timeline-live { min-height: 44px; padding-inline: 10px; }
  .timeline-help { margin-top: 8px; }
  .player-bar { gap: 6px; }
  .player-bar output { order: 10; width: 100%; text-align: center; }
}
