/* =========================================================
   Content OS — Design System
   Dark-neutral tema · tek vurgu rengi · mobil öncelikli
   ========================================================= */

:root {
  color-scheme: dark;

  --bg: #0a0b0e;
  --surface: #111318;
  --surface-2: #161920;
  --surface-3: #1d2029;
  --hover: #232733;
  --border: #23262f;
  --border-2: #30343f;

  --text: #eceef2;
  --text-2: #a7abb7;
  --text-3: #737886;

  --accent: #6271ff;
  --accent-hover: #7381ff;
  --accent-text: #a3adff;
  --accent-soft: rgba(98, 113, 255, .15);
  --on-accent: #ffffff;

  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .13);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .13);
  --err: #f87171;
  --err-soft: rgba(248, 113, 113, .13);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, .13);
  --violet: #c084fc;
  --violet-soft: rgba(192, 132, 252, .14);
  --star: #fbbf24;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  --sb-w: 240px;
  --sb-rail: 72px;
  --top-h: 60px;
  --bn-h: 64px;

  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .9em; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
.hidden { display: none !important; }
body.noscroll { overflow: hidden; }

/* ---------- utilities ---------- */
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.strong { font-weight: 650; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stack.tight { gap: 6px; }
.stack.loose { gap: 20px; }
.grow { flex: 1 1 auto; min-width: 0; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.sep { height: 1px; background: var(--border); margin: 4px 0; border: 0; }
.tone-ok { color: var(--ok); }
.tone-warn { color: var(--warn); }
.tone-err { color: var(--err); }
.tone-info { color: var(--info); }
.tone-accent { color: var(--accent-text); }

/* =========================================================
   APP SHELL
   ========================================================= */
.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--sb-w) minmax(0, 1fr);
}
.shell.collapsed { grid-template-columns: var(--sb-rail) minmax(0, 1fr); }
.shell.collapsed .sidebar { width: var(--sb-rail); }
.shell > .main { grid-column: 2; }

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sb-w);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 14px 12px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 30;
}
.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 6px;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 750;
  font-size: 16px;
  letter-spacing: -.01em;
}
.sb-brand:hover { text-decoration: none; }
.logo-mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -.03em;
}
.sb-group { margin-top: 14px; }
.sb-label {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  padding: 0 10px 6px;
  white-space: nowrap;
}
.sb-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 550;
  text-align: left;
  white-space: nowrap;
}
.sb-item:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.sb-item.active { background: var(--accent-soft); color: var(--text); }
.sb-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.sb-item.active svg { color: var(--accent-text); }
.sb-item svg { flex: 0 0 auto; }
.sb-count {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 650;
  display: grid;
  place-items: center;
}
.sb-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.collapsed .sb-label,
.collapsed .sb-text,
.collapsed .sb-count,
.collapsed .sb-brand-text { display: none; }
.collapsed .sb-item { justify-content: center; padding: 8px; }
.collapsed .sb-brand { justify-content: center; padding: 0; }
.collapsed .sb-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.collapsed .sb-group:first-of-type { border-top: 0; }
.collapsed .sb-collapse svg { transform: rotate(180deg); }

/* ---------- main column ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  background: rgba(10, 11, 14, .82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .page-title { font-size: 18px; font-weight: 700; }
.topbar .crumb { color: var(--text-3); font-size: 13px; }
.topbar .mobile-logo { display: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.view {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 28px 48px;
  min-width: 0;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-head h1 { font-size: 24px; font-weight: 750; }
.page-head .lead { color: var(--text-2); margin-top: 4px; }
.section { margin-top: 28px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-head h2 { font-size: 16px; font-weight: 700; }

/* ---------- search ---------- */
.search {
  position: relative;
  width: min(360px, 34vw);
}
.search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
}
.search input:focus { border-color: var(--accent); background: var(--surface); }
.search > svg { position: absolute; left: 11px; top: 10px; color: var(--text-3); pointer-events: none; }
.search kbd {
  position: absolute;
  right: 9px;
  top: 9px;
  font: 11px var(--mono);
  color: var(--text-3);
  border: 1px solid var(--border-2);
  border-radius: 5px;
  padding: 1px 6px;
}
.search-results {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  max-height: min(70vh, 520px);
  overflow: auto;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 40;
}
.sr-group { padding: 8px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 650; }
.sr-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.sr-item:hover, .sr-item.active { background: var(--hover); text-decoration: none; }
.sr-thumb { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; background: var(--surface-3); flex: 0 0 auto; display: grid; place-items: center; color: var(--text-3); }

/* ---------- bottom nav (mobil) ---------- */
.bottomnav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: calc(var(--bn-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(17, 19, 24, .94);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-top: 1px solid var(--border);
}
.bottomnav a, .bottomnav button {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
}
.bottomnav .active { color: var(--accent-text); }
.bottomnav .active .bn-icon { background: var(--accent-soft); }
.bn-icon { width: 52px; height: 28px; border-radius: 14px; display: grid; place-items: center; transition: background .2s var(--ease); }

/* =========================================================
   COMPONENTS
   ========================================================= */

/* ---------- card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card.hoverable { transition: border-color .15s, transform .15s var(--ease); }
.card.hoverable:hover { border-color: var(--border-2); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { font-size: 15px; font-weight: 700; }
.card.danger { border-color: rgba(248, 113, 113, .35); background: linear-gradient(180deg, rgba(248, 113, 113, .05), transparent 60%), var(--surface); }

/* ---------- grids ---------- */
.grid { display: grid; gap: 14px; min-width: 0; }
.grid-metrics { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-dash { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.grid-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-videos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid-videos.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-media { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* ---------- metric card ---------- */
.metric {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 16px 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text);
}
a.metric:hover { border-color: var(--border-2); text-decoration: none; }
.metric-label { font-size: 13px; color: var(--text-2); font-weight: 550; display: flex; align-items: center; gap: 8px; }
.metric-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); margin-left: auto; }
.metric-value { font-size: 30px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric-sub { font-size: 12.5px; color: var(--text-3); }
.metric.tone-ok .metric-icon { background: var(--ok-soft); color: var(--ok); }
.metric.tone-warn .metric-icon { background: var(--warn-soft); color: var(--warn); }
.metric.tone-err .metric-icon { background: var(--err-soft); color: var(--err); }
.metric.tone-info .metric-icon { background: var(--info-soft); color: var(--info); }
.metric.tone-accent .metric-icon { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- badge / chip ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--text-2);
  border: 1px solid transparent;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.lg { height: 26px; padding: 0 10px; font-size: 12.5px; }
.badge.neutral { background: var(--surface-3); color: var(--text-2); }
.badge.outline { background: transparent; border: 1px dashed var(--border-2); color: var(--text-3); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }
.badge.pulse .dot { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chips { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  min-width: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--surface-3);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.outline { background: transparent; }
.btn.danger { background: #c93d3d; border-color: #c93d3d; color: #fff; }
.btn.danger:hover { background: #dc4848; }
.btn.danger-outline { background: transparent; border-color: rgba(248, 113, 113, .5); color: var(--err); }
.btn.danger-outline:hover { background: var(--err-soft); }
.btn.sm { height: 32px; min-width: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn.icon { padding: 0; width: 40px; }
.btn.icon.sm { width: 32px; }
.btn.block { width: 100%; }
.btn .spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  outline: none;
  transition: border-color .15s, background .15s;
}
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a7abb7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); background: var(--surface); }
.input.sm, .select.sm { min-height: 34px; padding: 5px 10px; font-size: 13.5px; border-radius: 8px; }
.select.sm { padding-right: 30px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: 10px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; }
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- tabs ---------- */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 18px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: 0 0 auto;
  height: 44px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tab .count { margin-left: 6px; font-size: 12px; color: var(--text-3); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.segmented button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap; }
.segmented button.active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }

/* ---------- filter bar ---------- */
.filterbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filterbar .input, .filterbar .select { width: auto; min-height: 38px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.filterbar .search-input { flex: 1 1 220px; min-width: 180px; max-width: 360px; }
.filter-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-bottom: 14px; }
.filter-chips::-webkit-scrollbar { display: none; }
.fchip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 17px;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}
.fchip:hover { color: var(--text); }
.fchip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.fchip .n { color: var(--text-3); font-weight: 600; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  position: sticky;
  top: 0;
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  background: var(--surface);
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: var(--surface-2); }
.table .cell-title { max-width: 420px; }

/* ---------- list rows / mobile cards ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.list-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  min-width: 0;
  text-align: left;
  width: 100%;
}
a.list-card:hover, button.list-card:hover { border-color: var(--border-2); text-decoration: none; }
.list-thumb { width: 48px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--surface-3); flex: 0 0 auto; display: grid; place-items: center; color: var(--text-3); }

/* ---------- video card ---------- */
.vcard { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: border-color .15s; }
.vcard:hover { border-color: var(--border-2); }
.vposter {
  position: relative;
  aspect-ratio: 9 / 16;
  background: linear-gradient(160deg, #1a1d26, #0f1116);
  border: 0;
  padding: 0;
  width: 100%;
  display: block;
  overflow: hidden;
  color: var(--text);
}
.vcard.compact .vposter { aspect-ratio: 4 / 5; }
.vposter img { width: 100%; height: 100%; object-fit: cover; }
.vposter::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, transparent 28%, transparent 60%, rgba(0, 0, 0, .7) 100%); pointer-events: none; }
.vposter .v-top { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; gap: 6px; z-index: 2; }
.vposter .v-bottom { position: absolute; bottom: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; z-index: 2; }
.vposter .v-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(10, 11, 14, .55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .18);
  z-index: 2;
  opacity: .92;
  transition: transform .15s var(--ease), background .15s;
}
.vposter:hover .v-play { transform: scale(1.06); background: var(--accent); }
.vposter .v-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 14px; color: var(--text-3); font-size: 13px; z-index: 1; }
.vposter .badge { background: rgba(10, 11, 14, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-color: rgba(255, 255, 255, .08); }
.v-variant { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 8px; display: grid; place-items: center; background: rgba(10, 11, 14, .7); backdrop-filter: blur(6px); font-weight: 800; font-size: 14px; }
.v-dur { height: 22px; padding: 0 7px; border-radius: 6px; background: rgba(10, 11, 14, .72); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; }
.vbody { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-width: 0; }
.vtitle { font-weight: 650; font-size: 14.5px; line-height: 1.35; }
.vmeta { font-size: 12.5px; color: var(--text-3); }
.vactions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: auto; }
.vactions .btn { padding: 0 6px; font-size: 13px; }

/* ---------- media card ---------- */
.mcard { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--surface); color: var(--text); text-align: left; }
.mcard:hover { border-color: var(--border-2); }
.mcard .m-img { aspect-ratio: 3 / 4; width: 100%; object-fit: cover; background: var(--surface-3); }
.mcard .m-top { position: absolute; top: 6px; left: 6px; right: 6px; display: flex; justify-content: space-between; gap: 4px; }
.mcard .m-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; }
.mcard .m-title { font-size: 12.5px; font-weight: 600; }
.mcard .m-sub { font-size: 11.5px; color: var(--text-3); }

/* ---------- progress ---------- */
.progress { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; display: flex; }
.progress > span { display: block; height: 100%; background: var(--accent); transition: width .4s var(--ease); }
.progress > span.ok { background: var(--ok); }
.progress > span.warn { background: var(--warn); }
.progress > span.err { background: var(--err); }
.progress.lg { height: 10px; border-radius: 5px; }

.squares { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.sq {
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 6px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 750;
  color: var(--text-3);
  padding: 0;
}
button.sq:hover { border-color: var(--text-3); }
.sq.s-completed { background: var(--ok-soft); border-color: rgba(52, 211, 153, .45); color: var(--ok); }
.sq.s-processing, .sq.s-queued { background: var(--warn-soft); border-color: rgba(251, 191, 36, .45); color: var(--warn); }
.sq.s-processing { animation: pulse 1.6s infinite; }
.sq.s-failed { background: var(--err-soft); border-color: rgba(248, 113, 113, .45); color: var(--err); }
.sq.s-rated { box-shadow: inset 0 -3px 0 var(--star); }
.sq.s-canary { border-style: dashed; border-color: var(--accent-text); }

.matrix { display: grid; grid-template-columns: minmax(96px, 150px) repeat(5, minmax(0, 1fr)); gap: 5px; align-items: center; }
.matrix .m-head { font-size: 11.5px; font-weight: 700; color: var(--text-3); text-align: center; }
.matrix .m-cat { font-size: 13px; color: var(--text-2); font-weight: 550; padding-right: 6px; }
.matrix .sq { aspect-ratio: auto; height: 30px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--border-2); background: var(--surface-2); }
.legend i.ok { background: var(--ok-soft); border-color: var(--ok); }
.legend i.warn { background: var(--warn-soft); border-color: var(--warn); }
.legend i.err { background: var(--err-soft); border-color: var(--err); }
.legend i.star { box-shadow: inset 0 -3px 0 var(--star); }
.legend i.canary { border-style: dashed; border-color: var(--accent-text); }

/* ---------- category card ---------- */
.catcard { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--text); text-align: left; width: 100%; min-width: 0; }
.catcard:hover { border-color: var(--border-2); text-decoration: none; }
.catcard .cat-emoji { width: 40px; height: 40px; border-radius: 11px; background: var(--surface-3); display: grid; place-items: center; font-size: 20px; flex: 0 0 auto; }

/* ---------- status list ---------- */
.status-list { display: flex; flex-direction: column; }
.status-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); min-height: 48px; }
.status-row:last-child { border-bottom: 0; }
.sdot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); flex: 0 0 auto; box-shadow: 0 0 0 3px rgba(115, 120, 134, .15); }
.sdot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.sdot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.sdot.err { background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }

/* ---------- key/value ---------- */
.kv { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kv-cell { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.kv-cell .k { font-size: 11.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kv-cell .v { font-size: 14px; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }

/* ---------- timeline ---------- */
.timeline { display: flex; flex-direction: column; }
.tl-step { position: relative; display: flex; gap: 12px; padding-bottom: 18px; min-height: 44px; }
.tl-step:last-child { padding-bottom: 0; }
.tl-step::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border-2); }
.tl-step:last-child::before { display: none; }
.tl-step.done::before { background: rgba(52, 211, 153, .5); }
.tl-dot { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); border: 2px solid var(--border-2); color: var(--text-3); z-index: 1; }
.tl-step.done .tl-dot { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.tl-step.current .tl-dot { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); animation: pulse 1.6s infinite; }
.tl-step.failed .tl-dot { background: var(--err-soft); border-color: var(--err); color: var(--err); }
.tl-body { padding-top: 3px; min-width: 0; }
.tl-title { font-weight: 650; font-size: 14px; }
.tl-time { font-size: 12.5px; color: var(--text-3); }
.timeline.h { flex-direction: row; overflow-x: auto; gap: 0; padding-bottom: 4px; }
.timeline.h .tl-step { flex-direction: column; align-items: center; text-align: center; padding: 0 6px; min-width: 86px; flex: 1 0 86px; }
.timeline.h .tl-step::before { left: calc(50% + 16px); right: calc(-50% + 16px); top: 13px; bottom: auto; width: auto; height: 2px; }

/* ---------- rating ---------- */
.rating-list { display: flex; flex-direction: column; gap: 4px; }
.rating-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; min-height: 52px; border-bottom: 1px solid var(--border); }
.rating-row:last-child { border-bottom: 0; }
.rating-row.overall { background: var(--accent-soft); border-radius: 12px; padding: 8px 10px; border-bottom: 0; margin-top: 6px; }
.rating-label { min-width: 0; }
.rating-label .t { font-weight: 600; font-size: 14.5px; }
.rating-label .h { font-size: 12px; color: var(--text-3); }
.stars { display: inline-flex; gap: 2px; flex: 0 0 auto; }
.star {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--border-2);
  display: grid;
  place-items: center;
  padding: 0;
  transition: transform .12s var(--ease), color .12s;
}
.star svg { width: 28px; height: 28px; }
.star:hover { transform: scale(1.08); }
.star.on { color: var(--star); }
.stars.readonly .star { width: 18px; height: 18px; pointer-events: none; }
.stars.readonly .star svg { width: 15px; height: 15px; }
.score-pill { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; color: var(--star); }
.score-pill.none { color: var(--text-3); font-weight: 550; }

/* Puan formunun kaydet çubuğu: ov-body dolgusunu da kapatır, altından satır görünmez */
.sticky-save { position: sticky; bottom: -20px; margin: 0 -20px -20px; padding: 12px 20px 20px; background: var(--surface); border-top: 1px solid var(--border); z-index: 2; box-shadow: 0 -12px 24px rgba(0, 0, 0, .35); }
@media (max-width: 767px) { .sticky-save { bottom: -16px; margin: 0 -16px -16px; padding: 12px 16px calc(16px + var(--safe-b)); } }

/* ---------- reactions ---------- */
.reactions { display: flex; gap: 8px; }
.react {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 22px;
  transition: transform .12s var(--ease), background .15s, border-color .15s;
}
.react:active { transform: scale(.92); }
.react.on { background: var(--accent-soft); border-color: var(--accent); }
.react.on.down { background: var(--err-soft); border-color: var(--err); }
.react.on.fav { background: var(--warn-soft); border-color: var(--warn); }

/* ---------- player ---------- */
.player { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
.player-video { position: sticky; top: 0; }
.vplayer { width: 100%; aspect-ratio: 9 / 16; max-height: min(78vh, 760px); background: #000; border-radius: var(--r-lg); object-fit: contain; margin: 0 auto; }
.player-side { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ---------- media detail ---------- */
.media-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 767px) { .media-detail { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

/* ---------- scene source cards ---------- */
.scene-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); }
.scene-thumb { width: 96px; aspect-ratio: 3 / 4; border-radius: 10px; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; color: var(--text-3); position: relative; overflow: hidden; }
.scene-thumb img { width: 100%; height: 100%; object-fit: cover; }
.scene-no { position: absolute; top: 5px; left: 5px; background: rgba(10, 11, 14, .78); border-radius: 6px; font-size: 11px; font-weight: 750; padding: 1px 6px; }
.quote { border-left: 3px solid var(--border-2); padding-left: 10px; color: var(--text-2); font-size: 13.5px; }

/* ---------- voice grid ---------- */
.vgrid { display: grid; gap: 8px; }
.vgrid-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) repeat(var(--cols, 3), minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.vgrid-head { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 0 4px; align-self: end; }
.vcell { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; min-height: 56px; }
.vcell.playing { border-color: var(--accent); background: var(--accent-soft); }
.vcell.empty { opacity: .35; justify-content: center; }
.play-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: 0 0 auto; }
.fav-btn { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); display: grid; place-items: center; margin-left: auto; flex: 0 0 auto; }
.fav-btn.on { color: var(--star); }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.cal-h { padding: 10px; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); background: var(--surface); }
.cal-d { min-height: 118px; padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-d:nth-child(7n) { border-right: 0; }
.cal-d.out { background: rgba(255, 255, 255, .012); }
.cal-d.out .cal-n { color: var(--text-3); opacity: .5; }
.cal-d.today .cal-n { background: var(--accent); color: var(--on-accent); }
.cal-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 650; color: var(--text-2); }
.ev { display: flex; align-items: center; gap: 6px; padding: 3px 7px; border-radius: 6px; font-size: 12px; font-weight: 550; background: var(--surface-3); color: var(--text); border: 0; text-align: left; width: 100%; min-width: 0; }
.ev .dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.ev.produced .dot { background: var(--ok); }
.ev.failed .dot { background: var(--err); }
.ev.scheduled .dot { background: var(--info); }
.ev.published .dot { background: var(--violet); }
.agenda-day { margin-bottom: 18px; }
.agenda-day h3 { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- log viewer ---------- */
.log { background: #07080a; border: 1px solid var(--border); border-radius: var(--r); padding: 12px; font: 12px/1.55 var(--mono); color: #c9cdd6; max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word; }

/* ---------- empty / skeleton ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 44px 20px; border: 1px dashed var(--border-2); border-radius: var(--r-lg); color: var(--text-2); }
.empty .e-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-3); }
.empty h3 { font-size: 16px; color: var(--text); }
.empty p { max-width: 420px; font-size: 14px; }

.sk { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .045), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 12px; margin: 6px 0; }
.sk-title { height: 18px; width: 40%; margin-bottom: 10px; }
.sk-card { height: 104px; border-radius: var(--r-lg); }
.sk-poster { aspect-ratio: 9 / 16; border-radius: var(--r-lg); }
.sk-row { height: 56px; border-radius: var(--r); }

/* ---------- alert / callout ---------- */
.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border-2); font-size: 14px; }
.callout.err { background: var(--err-soft); border-color: rgba(248, 113, 113, .4); }
.callout.warn { background: var(--warn-soft); border-color: rgba(251, 191, 36, .35); }
.callout.info { background: var(--info-soft); border-color: rgba(96, 165, 250, .35); }
.callout.ok { background: var(--ok-soft); border-color: rgba(52, 211, 153, .35); }
.callout pre { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; font: 12px/1.5 var(--mono); }

/* =========================================================
   OVERLAYS: modal (masaüstü merkez) · sheet (mobil alt) · drawer · full
   ========================================================= */
.ov { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ov-backdrop { position: absolute; inset: 0; background: rgba(4, 5, 7, .7); backdrop-filter: blur(3px); animation: fadeIn .18s ease; }
.ov-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  animation: popIn .2s var(--ease);
  min-width: 0;
}
.ov.wide .ov-panel { width: min(1080px, 100%); }
.ov.xwide .ov-panel { width: min(1240px, 100%); }
.ov-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--border); min-height: 60px; }
.ov-title { font-size: 16px; font-weight: 700; min-width: 0; }
.ov-title .sub { display: block; font-size: 12.5px; color: var(--text-3); font-weight: 550; margin-top: 1px; }
.ov-head .btn.icon { margin-left: auto; }
.ov-body { padding: 20px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; }
.ov-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--border); background: var(--surface); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.ov-foot .grow { margin-right: auto; }
.grabber { display: none; }

.ov.drawer { justify-content: flex-end; padding: 0; }
.ov.drawer .ov-panel { height: 100%; max-height: none; width: min(560px, 100%); border-radius: 0; border-width: 0 0 0 1px; animation: slideLeft .24s var(--ease); }
.ov.drawer .ov-foot { border-radius: 0; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes slideUp { from { transform: translateY(100%); } }
@keyframes slideLeft { from { transform: translateX(100%); } }

/* ---------- toast ---------- */
.toasts { position: fixed; z-index: 200; top: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: popIn .2s var(--ease);
}
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--err); }
.toast.warn svg { color: var(--warn); }
.toast.out { opacity: 0; transform: translateY(-6px); transition: .2s; }

/* =========================================================
   LOGIN
   ========================================================= */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 500px at 50% -10%, rgba(98, 113, 255, .14), transparent 70%), var(--bg); }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border-2); border-radius: 22px; padding: 30px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 16px; }
.login-card .logo-mark { width: 44px; height: 44px; font-size: 18px; border-radius: 12px; }

/* =========================================================
   REVIEW MODE (Reels benzeri)
   ========================================================= */
body.immersive .sidebar,
body.immersive .topbar,
body.immersive .bottomnav { display: none !important; }
body.immersive .shell { display: block; }
body.immersive .view { padding: 0; max-width: none; }

.review { position: fixed; inset: 0; background: #000; display: flex; flex-direction: column; z-index: 50; touch-action: pan-x; }
.review-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 12px 30px; background: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent); }
.review-top .btn { background: rgba(20, 22, 28, .7); border-color: rgba(255, 255, 255, .12); backdrop-filter: blur(8px); }
.review-stage { position: relative; flex: 1 1 auto; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.review-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.review-info { position: absolute; left: 12px; right: 84px; bottom: calc(96px + var(--safe-b)); z-index: 3; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.review-info .t { font-size: 17px; font-weight: 700; line-height: 1.3; }
.review-rail { position: absolute; right: 10px; bottom: calc(104px + var(--safe-b)); z-index: 3; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.review-rail .react { background: rgba(20, 22, 28, .62); border-color: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); }
.review-rail .lbl { font-size: 11px; font-weight: 650; color: #fff; margin-top: -8px; text-shadow: 0 1px 2px #000; }
.review-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; gap: 10px; padding: 12px 12px calc(12px + var(--safe-b)); background: linear-gradient(0deg, rgba(0, 0, 0, .85), transparent); }
.review-bar .btn { height: 52px; flex: 1 1 0; font-size: 15px; }
.review-progress { position: absolute; top: calc(4px + var(--safe-t)); left: 12px; right: 12px; display: flex; gap: 3px; z-index: 4; }
.review-progress span { flex: 1 1 0; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .22); }
.review-progress span.done { background: rgba(255, 255, 255, .6); }
.review-progress span.cur { background: #fff; }
.tap-hint { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; pointer-events: none; }
.tap-hint > div { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1399px) {
  .grid-videos.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1199px) {
  .shell { grid-template-columns: var(--sb-rail) minmax(0, 1fr); }
  .shell .sidebar { width: var(--sb-rail); }
  .shell .sb-label, .shell .sb-text, .shell .sb-count, .shell .sb-brand-text { display: none; }
  .shell .sb-item { justify-content: center; padding: 8px; }
  .shell .sb-brand { justify-content: center; padding: 0; }
  .shell .sb-collapse { display: none; }
  .shell .sb-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
  .grid-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-dash { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
  .search { width: min(300px, 32vw); }
}

@media (max-width: 767px) {
  body { font-size: 16px; }
  .shell, .shell.collapsed { display: block; }
  .sidebar { display: none; }
  .bottomnav { display: flex; }
  .topbar { height: 56px; padding: 0 12px; gap: 8px; padding-top: var(--safe-t); height: calc(56px + var(--safe-t)); }
  .topbar .mobile-logo { display: grid; }
  .topbar .page-title { font-size: 17px; }
  .topbar .crumb { display: none; }
  .search.desktop { display: none; }
  .view { padding: 16px 16px calc(var(--bn-h) + var(--safe-b) + 28px); }
  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 22px; }
  .section { margin-top: 22px; }
  .card { padding: 14px; border-radius: 14px; }

  .grid-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid-metrics > :first-child { grid-column: 1 / -1; }
  .metric { padding: 14px; }
  .metric-value { font-size: 26px; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-cards { grid-template-columns: minmax(0, 1fr); }
  .grid-videos, .grid-videos.five { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid-media { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hscroll-mobile { display: grid; grid-auto-flow: column; grid-auto-columns: 58%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .hscroll-mobile::-webkit-scrollbar { display: none; }
  .hscroll-mobile > * { scroll-snap-align: start; }

  .btn { height: 44px; min-width: 44px; font-size: 15px; }
  .btn.sm { height: 36px; min-width: 36px; }
  .btn.icon { width: 44px; }
  .btn.icon.sm { width: 36px; }
  .input, .select, .textarea { min-height: 46px; font-size: 16px; }
  .tab { height: 46px; font-size: 15px; }
  .fchip { height: 44px; padding: 0 14px; border-radius: 22px; font-size: 14px; }

  .vbody { padding: 10px; gap: 6px; }
  .vtitle { font-size: 14px; }
  .vactions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vactions .btn { height: 44px; font-size: 13px; padding: 0 4px; }
  .vactions .btn svg { display: none; }
  .page-head h1.page-h1 { display: none; }
  .page-head .lead { margin-top: 0; }

  .matrix { grid-template-columns: minmax(78px, 104px) repeat(5, minmax(0, 1fr)); gap: 4px; }
  .matrix .m-cat { font-size: 12.5px; }
  .matrix .sq { height: 34px; }

  .player { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .player-video { position: static; margin: -16px -16px 0; }
  .vplayer { border-radius: 0; max-height: 62vh; max-height: 62dvh; }

  .scene-card { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
  .scene-thumb { width: 76px; }

  .vgrid-row { grid-template-columns: minmax(0, 1fr); }
  .vgrid-row.head { display: none; }
  .vgrid-row .vname { padding-top: 8px; }

  .cal { display: none; }

  /* overlay → bottom sheet / fullscreen */
  .ov { padding: 0; align-items: flex-end; }
  .ov-panel { width: 100% !important; max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; border-width: 1px 0 0; animation: slideUp .26s var(--ease); }
  .ov-foot { border-radius: 0; }
  .ov .grabber { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--border-2); margin: 8px auto 0; flex: 0 0 auto; }
  .ov-head { min-height: 52px; padding: 6px 8px 10px 16px; }
  .ov-body { padding: 16px; }
  .ov.full .ov-panel { height: 100%; max-height: none; border-radius: 0; border: 0; }
  .ov.full .grabber { display: none; }
  .ov.full .ov-head { padding-top: calc(6px + var(--safe-t)); }
  .ov.drawer { align-items: flex-end; }
  .ov.drawer .ov-panel { height: auto; max-height: 92vh; border-radius: 20px 20px 0 0; animation: slideUp .26s var(--ease); }

  .toasts { top: auto; bottom: calc(var(--bn-h) + var(--safe-b) + 12px); left: 12px; right: 12px; align-items: stretch; }
  .toast { min-width: 0; max-width: none; }

  .kv { grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); font-size: 14.5px; }
  .hide-mobile { display: none !important; }
}

@media (min-width: 768px) {
  .hide-desktop { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
