/* ============================================================
   Frame — revisión de video
   Demo de interfaz · dark editorial UI
   ============================================================ */

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

:root {
  --bg: #09090b;
  --bg-soft: #0c0c0f;
  --panel: #101014;
  --panel-2: #141419;
  --panel-3: #191920;
  --line: #23232b;
  --line-soft: #1b1b22;
  --line-strong: #2d2d37;

  --text: #ededf2;
  --text-2: #b6b6c2;
  --text-3: #85858f;
  --text-4: #5f5f6b;

  --accent: #d6f65c;
  --accent-bright: #e2ff7a;
  --accent-ink: #0c0e04;
  --accent-soft: rgba(214, 246, 92, 0.1);
  --accent-line: rgba(214, 246, 92, 0.35);

  --danger: #ff7b6e;
  --ok: #8fe3b0;

  --radius: 16px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --topbar-h: 68px;
  --bottom-nav-h: 64px;
  --sidebar-w: 392px;
  --panel-w: 448px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

html,
body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 8% -12%, rgba(214, 246, 92, 0.055), transparent 62%),
    radial-gradient(900px 500px at 100% -5%, rgba(111, 154, 255, 0.04), transparent 58%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

::selection { background: rgba(214, 246, 92, 0.28); color: #fff; }

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

a { color: inherit; text-decoration: none; }

p, h1, h2, h3 { margin: 0; }

svg { display: block; }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  pointer-events: none;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Scrollbars ---------- */
.comments-scroll { scrollbar-width: thin; scrollbar-color: #2c2c36 transparent; }
.comments-scroll::-webkit-scrollbar { width: 9px; }
.comments-scroll::-webkit-scrollbar-track { background: transparent; }
.comments-scroll::-webkit-scrollbar-thumb {
  background: #26262f;
  border-radius: 99px;
  border: 3px solid var(--panel);
}

/* ---------- Shared bits ---------- */
.eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.16s, filter 0.16s;
}

.btn .icon { width: 15px; height: 15px; }

.btn-primary {
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--accent-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 8px 22px -12px rgba(214, 246, 92, 0.6);
}
.btn-primary:hover { background: var(--accent-bright); transform: translateY(-1px); }
.btn-primary:active { transform: none; }

.btn-secondary {
  background: #17171d;
  border-color: #2a2a33;
  color: var(--text);
}
.btn-secondary:hover { background: #1d1d24; border-color: #363640; }

.btn-ghost {
  color: var(--text-2);
  background: transparent;
  border-color: transparent;
}
.btn-ghost:hover { background: #18181e; color: var(--text); }

.btn-sm { height: 30px; padding: 0 11px; font-size: 11.5px; border-radius: 8px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.icon-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--text-3);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: #222229; color: var(--text); }
.icon-btn .icon { width: 16px; height: 16px; }

.link-btn {
  font-size: 11.5px;
  color: var(--text-3);
  transition: color 0.15s;
}
.link-btn:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 4px;
  border: 1px solid #2c2c35;
  border-bottom-width: 2px;
  background: #17171d;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1;
}

/* ---------- Avatars ---------- */
.avatar {
  --avatar-color: #d9d9e5;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: none;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--avatar-color);
  background-color: #1a1a21;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  background-color: color-mix(in srgb, var(--avatar-color) 17%, #131318);
  border: 1px solid color-mix(in srgb, var(--avatar-color) 32%, transparent);
}

.avatar-sm { width: 28px; height: 28px; font-size: 10px; }
.avatar-xs { width: 22px; height: 22px; font-size: 8.5px; }

.avatar-me {
  width: 32px;
  height: 32px;
  font-size: 10.5px;
  color: var(--text);
  background: #191920;
  border: 1px solid #32323c;
  transition: border-color 0.15s, background 0.15s;
}
.avatar-me:hover { border-color: var(--accent-line); background: #1e1e26; }

/* ============================================================
   Layout
   ============================================================ */
.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top bar ---------- */
.topbar {
  position: relative;
  height: var(--topbar-h);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 9, 11, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 30;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #e4ff86 0%, #c9f24d 48%, #7ce6a8 120%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 10px 24px -10px rgba(214, 246, 92, 0.6);
  transition: transform 0.16s var(--ease);
}
.brand-mark:hover { transform: scale(1.05); }
.brand-mark svg { width: 34px; height: 34px; }

.brand-text { min-width: 0; }
.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text);
}
.brand-badge {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, #d6f65c, #9be79a);
  color: var(--accent-ink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 340px;
  margin-top: 1px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
}
.brand-sub span { overflow: hidden; text-overflow: ellipsis; }
.brand-sub #projectName { flex: none; color: var(--text-2); font-weight: 600; }
.brand-sub-sep { flex: none; color: var(--text-4); }

/* Centro: personas + estado de guardado */
.topbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.collab {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 6px;
  border-radius: 999px;
  background: #18181d;
}
.avatar-stack { display: flex; padding-left: 8px; }
.avatar-stack .avatar {
  width: 24px;
  height: 24px;
  font-size: 8.5px;
  margin-left: -8px;
  border: 2px solid #18181d;
  box-shadow: none;
}
.avatar-stack .avatar-stack-more {
  color: var(--text-3);
  background: #222229;
  font-size: 8px;
  font-weight: 600;
}
.collab-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
}

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ok);
  white-space: nowrap;
}
.save-status-icon { display: grid; place-items: center; }
.save-status-icon .icon { width: 14px; height: 14px; }
.save-status-icon .spinner { width: 13px; height: 13px; border-width: 2px; border-top-color: var(--text-3); }
.save-status.is-saving { color: var(--text-3); }
.save-status.is-error { color: var(--danger); }

/* Derecha: acciones */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.tb-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: background 0.16s, color 0.16s;
}
.tb-pill .icon { width: 16px; height: 16px; }
.tb-pill-avatar {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  margin-left: -7px;
  border-radius: 8px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.tb-pill-avatar.has-client {
  background: var(--adm-color, var(--accent));
  color: #10120a;
}
.tb-pill-label {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-pill[aria-pressed="true"] .tb-pill-avatar.has-client {
  background: var(--accent-ink);
  color: var(--adm-color, var(--accent));
}
.tb-pill .tb-pill-caret {
  width: 14px;
  height: 14px;
  margin-right: -3px;
  opacity: 0.7;
  transition: transform 0.16s var(--ease);
}
.tb-pill[aria-pressed="true"] .tb-pill-caret { transform: rotate(180deg); }

/* El cliente vive en la pastilla de la topbar; en el subtítulo solo aparece en móvil, donde la pastilla se oculta. */
.brand-sub-client { display: none; }
.tb-pill:hover { background: rgba(214, 246, 92, 0.18); }
.tb-pill[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.tb-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1f1f26;
  color: var(--text-2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: background 0.16s, color 0.16s;
}
.tb-icon .icon { width: 16px; height: 16px; }
.tb-icon:hover,
.tb-icon[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.tb-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
}
.tb-user-text { min-width: 0; }
.tb-user-name,
.tb-user-email {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}
.tb-user-name { font-size: 12px; font-weight: 700; color: var(--text); }
.tb-user-email { font-size: 10px; color: var(--text-3); }
.tb-logout {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--text-3);
  transition: background 0.15s, color 0.15s;
}
.tb-logout .icon { width: 16px; height: 16px; }
.tb-logout:hover { color: #ff9a90; background: rgba(255, 123, 110, 0.12); }

/* ---------- Workspace ---------- */
.workspace {
  flex: 1;
  min-height: 0;
  display: flex;
}

/* ---------- Stage ---------- */
.stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 24px 14px;
  overflow-y: auto;
}

.stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 1px 2px 14px;
}

.stage-heading { min-width: 0; }

.stage-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.stage-title-row h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.h1-dim { color: var(--text-3); font-weight: 450; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #141419;
  font-size: 10px;
  font-weight: 550;
  color: var(--text-2);
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f0c15c;
  box-shadow: 0 0 0 3px rgba(240, 193, 92, 0.12);
}

.stage-sub {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  min-width: 0;
  font-size: 11.5px;
  color: var(--text-3);
}
.source-icon { display: grid; place-items: center; color: var(--text-4); }
.source-icon .icon { width: 14px; height: 14px; }
.stage-video-title {
  color: var(--text-2);
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meta-dot { color: #3c3c46; }
.meta-soft { color: var(--text-4); }

.stage-actions { display: flex; align-items: center; gap: 8px; flex: none; padding-top: 3px; }

/* ---------- Player ---------- */
.player-shell {
  width: min(100%, calc((100vh - 232px) * 16 / 9));
  margin: 0 auto;
  flex: none;
}

.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.085);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04),
    0 40px 90px -40px rgba(0, 0, 0, 0.95);
  isolation: isolate;
}

.video-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000;
}
.video-layer iframe,
.video-layer video,
.video-layer .yt-host {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
  background: #000;
}
.video-layer video { object-fit: contain; }

.click-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}
.player.is-embed .click-shield { display: none; }
.player.is-embed .annot-tools,
.player.is-embed .draw-canvas { display: none; }

/* Poster de entrada (oculta el chrome del embed) */
.player-poster {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  background: #07070a;
  cursor: pointer;
  transition: opacity 0.26s var(--ease);
}
.player-poster.is-leaving {
  opacity: 0;
  pointer-events: none;
}
.poster-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  transform: scale(1.015);
}
.poster-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 6, 9, 0.95) 0%, rgba(6, 6, 9, 0.82) 34%, rgba(6, 6, 9, 0.24) 68%, rgba(6, 6, 9, 0.5) 100%),
    linear-gradient(0deg, rgba(6, 6, 9, 0.96) 0%, rgba(6, 6, 9, 0.2) 52%, transparent 100%);
}
.poster-content {
  position: absolute;
  left: clamp(26px, 4.2vw, 54px);
  bottom: clamp(86px, 16%, 118px);
  z-index: 2;
  max-width: min(560px, 72%);
}
.poster-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.poster-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(214, 246, 92, 0.14);
}
.poster-title {
  margin-top: 12px;
  font-size: clamp(26px, 3.1vw, 46px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}
.poster-meta {
  margin-top: 11px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
}
.poster-play {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  height: 48px;
  margin-top: 22px;
  padding: 0 19px 0 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 16px 40px -16px rgba(214, 246, 92, 0.55);
  transition: transform 0.16s, background 0.16s;
}
.poster-play:hover { background: var(--accent-bright); transform: translateY(-1px); }
.poster-play:active { transform: none; }
.poster-play-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(12, 14, 4, 0.14);
}
.poster-play-icon .icon { width: 15px; height: 15px; margin-left: 2px; }
.poster-hint {
  margin-top: 14px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.42);
}
.player.is-poster .annot-tools {
  display: none;
}

/* Capa de pausa: cubre el chrome que YouTube dibuja al pausar */
.paused-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.player.source-youtube.is-paused:not(.is-poster):not(.is-embed) .paused-cover,
.player.source-bunny.is-paused:not(.is-embed) .paused-cover {
  opacity: 1;
}
.player.source-bunny .paused-top { display: none; }
.paused-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 118px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px 26px 72px;
  background: linear-gradient(
    to bottom,
    #07070a 0%,
    #07070a 58%,
    rgba(7, 7, 10, 0.94) 74%,
    rgba(7, 7, 10, 0) 100%
  );
}
.paused-pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.paused-time {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
}
.paused-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
}
.paused-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 86px;
  height: 86px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(8, 8, 10, 0.68);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
}
.paused-center .icon { width: 27px; height: 27px; margin-left: 3px; color: rgba(255, 255, 255, 0.92); }

.draw-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.player.is-drawing .draw-canvas {
  pointer-events: auto;
  cursor: crosshair;
}

/* Annotation toolbar */
.annot-tools {
  position: absolute;
  top: 13px;
  left: 13px;
  z-index: 7;
  width: 44px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(13, 13, 16, 0.68);
  backdrop-filter: blur(16px) saturate(120%);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
  opacity: 0.58;
  transition: opacity 0.2s;
}
.player:hover .annot-tools,
.annot-tools:focus-within { opacity: 1; }

.tool-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.72);
  transition: background 0.14s, color 0.14s;
}
.tool-btn .icon { width: 17px; height: 17px; }
.tool-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tool-btn.is-active { background: var(--accent); color: var(--accent-ink); }
.tool-btn:disabled { opacity: 0.28; cursor: default; background: none; color: #fff; }

.tool-sep {
  width: 22px;
  height: 1px;
  margin: 4px 0;
  background: rgba(255, 255, 255, 0.11);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 1px 0;
}
.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--swatch);
  border: 1.5px solid rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: transform 0.12s, box-shadow 0.12s;
}
.swatch:hover { transform: scale(1.15); }
.swatch.is-active {
  box-shadow:
    0 0 0 1.5px #0b0b0e,
    0 0 0 3px rgba(255, 255, 255, 0.85);
}

/* Player badges */
.player-badges {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 6px;
}
.player-badge {
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 12, 15, 0.62);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.82);
  font-size: 9.5px;
  font-weight: 550;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.player-badge-quiet { color: rgba(255, 255, 255, 0.55); }

.embed-note {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 180px);
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 12, 15, 0.72);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.66);
  font-size: 10.5px;
}
.embed-note .icon { width: 13px; height: 13px; flex: none; color: var(--accent); }

/* Loader + notice */
.player-loader {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(5, 5, 7, 0.6);
  backdrop-filter: blur(3px);
  color: var(--text-3);
  font-size: 11.5px;
  transition: opacity 0.25s;
}
.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.player-notice {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(60% 70% at 50% 45%, rgba(20, 20, 24, 0.94), rgba(5, 5, 7, 0.96));
}
.notice-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid #2b2b34;
  background: #15151a;
  color: var(--text-3);
}
.notice-icon .icon { width: 20px; height: 20px; }
.player-notice strong { font-size: 13.5px; font-weight: 600; color: var(--text); }
.player-notice p {
  max-width: 380px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-3);
}
.player-notice .btn { margin-top: 12px; }

/* Controls */
.player-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 190px;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(to top, rgba(5, 5, 7, 0.9) 0%, rgba(5, 5, 7, 0.46) 48%, transparent 100%);
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 16px 15px 10px;
  background: linear-gradient(
    to top,
    rgba(7, 7, 9, 0.98) 0%,
    rgba(7, 7, 9, 0.95) 42%,
    rgba(7, 7, 9, 0.55) 78%,
    rgba(7, 7, 9, 0) 100%
  );
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.player.is-embed .player-controls { display: none; }
.player.is-embed .player-gradient { display: none; }

.scrubber {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  outline-offset: 4px;
}
.scrub-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.17);
  transition: height 0.14s;
}
.scrubber:hover .scrub-track { height: 5px; }
.scrub-played {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 12px -2px rgba(214, 246, 92, 0.45);
}
.scrub-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  transform: translateY(-50%) scale(0.85);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  transition: transform 0.14s;
}
.scrubber:hover .scrub-handle,
.scrubber.is-dragging .scrub-handle { transform: translateY(-50%) scale(1.12); }

.scrub-markers { position: absolute; inset: 0; }
.marker {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 18px;
  margin: -9px 0 0 -8px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  z-index: 2;
}
.marker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--marker, #fff);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55);
  transition: transform 0.12s, box-shadow 0.12s;
}
.marker:hover::before { transform: scale(1.35); }
.marker.is-resolved::before { opacity: 0.5; }
.marker.is-active::before {
  transform: scale(1.4);
  box-shadow:
    0 0 0 2px #0a0a0c,
    0 0 0 3.5px #fff;
}
.marker:focus-visible { outline: none; }
.marker:focus-visible::before {
  box-shadow: 0 0 0 2px #0a0a0c, 0 0 0 4px var(--accent);
}

.scrub-tooltip {
  position: absolute;
  bottom: 22px;
  left: 0;
  transform: translateX(-50%);
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(10, 10, 12, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--mono);
  font-size: 9.5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  white-space: nowrap;
}
.scrubber:hover .scrub-tooltip { opacity: 1; }
.scrubber.is-dragging .scrub-tooltip { opacity: 1; }

.controls-row {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 38px;
  margin-top: 1px;
}

.ctrl-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.84);
  transition: background 0.14s, color 0.14s;
}
.ctrl-btn .icon { width: 18px; height: 18px; }
.ctrl-btn:hover { background: rgba(255, 255, 255, 0.11); color: #fff; }
.ctrl-play .icon { width: 20px; height: 20px; }

.frame-group { display: flex; align-items: center; }
.ctrl-small { width: 28px; }
.ctrl-small .icon { width: 16px; height: 16px; }

.timecode {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 0 9px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.94);
  white-space: nowrap;
}
.tc-sep { color: rgba(255, 255, 255, 0.3); }
.tc-total { color: rgba(255, 255, 255, 0.45); }

.controls-spacer { flex: 1; }

.comment-now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  margin-right: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.085);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.86);
  font-size: 10.5px;
  font-weight: 500;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.comment-now .icon { width: 13px; height: 13px; }
.comment-now:hover {
  background: rgba(214, 246, 92, 0.16);
  border-color: var(--accent-line);
  color: #fff;
}

.volume-group { display: flex; align-items: center; }
.volume-slider {
  width: 0;
  opacity: 0;
  height: 3px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
  transition: width 0.18s var(--ease), opacity 0.18s, margin 0.18s;
}
.volume-group:hover .volume-slider,
.volume-group:focus-within .volume-slider {
  width: 58px;
  opacity: 1;
  margin: 0 6px 0 2px;
}
.volume-slider::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: #fff;
}
.volume-slider::-moz-range-track {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
}
.volume-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.speed-btn {
  width: 38px;
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.78);
}

/* Speed menu */
.speed-menu {
  position: absolute;
  right: 47px;
  bottom: 54px;
  z-index: 8;
  min-width: 116px;
  padding: 5px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(20, 20, 25, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  animation: pop-in 0.14s var(--ease);
}
.speed-menu-label {
  display: block;
  padding: 5px 8px 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}
.speed-menu button {
  width: 100%;
  height: 27px;
  padding: 0 8px;
  border-radius: 6px;
  text-align: left;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.75);
  font-variant-numeric: tabular-nums;
}
.speed-menu button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.speed-menu button.is-active { color: var(--accent); background: rgba(214, 246, 92, 0.08); }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(4px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* Stage footer */
.stage-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 3px 0;
  min-height: 28px;
  font-size: 10.5px;
  color: var(--text-4);
}
.shortcuts { display: flex; align-items: center; gap: 15px; min-width: 0; }
.shortcut { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.shortcut kbd { margin-right: 1px; }

/* ============================================================
   Columna de Feedback (derecha)
   ============================================================ */
.sidebar {
  flex: none;
  width: var(--sidebar-w);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 40px -30px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.sidebar-head {
  flex: none;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.col-eyebrow {
  display: block;
  margin-bottom: 2px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-title-row h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.count-badge {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: 6px;
  background: #1d1d24;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.filter-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 12px;
  padding: 4px;
  border-radius: 999px;
  background: #1b1b21;
}
.filter-tab {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  transition: background 0.14s, color 0.14s;
}
.filter-tab:hover { color: var(--text-2); }
.filter-tab.is-active {
  background: #0d0d11;
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.filter-count { font-size: 10px; font-weight: 600; color: var(--text-4); font-variant-numeric: tabular-nums; }
.filter-tab.is-active .filter-count { color: rgba(214, 246, 92, 0.6); }

.comments-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px;
}

/* Empty state */
.empty-state {
  padding: 46px 24px 32px;
  text-align: center;
}
.empty-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px dashed #2e2e38;
  background: #141419;
  color: var(--text-3);
}
.empty-icon .icon { width: 20px; height: 20px; }
.empty-state h3 {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.empty-state p {
  max-width: 230px;
  margin: 5px auto 0;
  font-size: 11px;
  line-height: 1.55;
  color: var(--text-4);
}
.empty-state .btn { margin-top: 14px; }

/* Comment card */
.comment {
  position: relative;
  padding: 10px 11px 9px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  background: var(--panel-2);
  transition: border-color 0.16s, background 0.16s, opacity 0.16s;
}
.comment:hover { border-color: #2c2c36; }
.comment.is-active {
  border-color: rgba(214, 246, 92, 0.38);
  background:
    linear-gradient(180deg, rgba(214, 246, 92, 0.05), transparent 62%),
    var(--panel-2);
}
.comment.is-active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.comment.is-resolved { opacity: 0.58; }
.comment.is-resolved:hover { opacity: 0.9; }
.comment.is-new { animation: comment-new 1.4s var(--ease); }
@keyframes comment-new {
  0% { box-shadow: 0 0 0 0 rgba(214, 246, 92, 0.35); }
  40% { box-shadow: 0 0 0 3px rgba(214, 246, 92, 0.12); }
  100% { box-shadow: 0 0 0 0 rgba(214, 246, 92, 0); }
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.comment-person {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.comment-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
}
.role-badge {
  display: inline-flex;
  align-items: center;
  height: 14px;
  margin-top: 1px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: fit-content;
}
.role-client { color: #f2cb84; background: rgba(242, 203, 132, 0.1); }
.role-team { color: #c9b9ff; background: rgba(201, 185, 255, 0.1); }

.tc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid #282831;
  background: #1b1b22;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}
button.tc-chip:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.tc-chip .icon { width: 10px; height: 10px; opacity: 0.6; }
.tc-general {
  font-family: var(--font);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.comment-more {
  width: 22px;
  height: 22px;
  flex: none;
  opacity: 0;
}
.comment:hover .comment-more,
.comment.is-active .comment-more,
.comment-more:focus-visible { opacity: 1; }
.comment-more .icon { width: 14px; height: 14px; }

.comment-text {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.55;
  color: #d3d3dc;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.annotation-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  margin-top: 8px;
  padding: 0 7px;
  border-radius: 5px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 500;
}
.annotation-badge .icon { width: 10px; height: 10px; }
.annotation-badge:hover { background: rgba(214, 246, 92, 0.16); }

.comment-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 9.5px;
  color: var(--text-4);
}
.comment-foot time { white-space: nowrap; }
.comment-dot { color: #3a3a44; }
.foot-spacer { flex: 1; }

.foot-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  color: var(--text-4);
  font-size: 9.5px;
  transition: background 0.14s, color 0.14s;
}
.foot-btn .icon { width: 11px; height: 11px; }
.foot-btn:hover { background: #202027; color: var(--text-2); }
.foot-btn.is-done { color: var(--accent); }
.foot-btn.is-done:hover { background: var(--accent-soft); }
.resolve-btn { margin-left: auto; }

/* Replies */
.replies {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed #26262f;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.reply {
  display: flex;
  gap: 7px;
  min-width: 0;
}
.reply-body { min-width: 0; flex: 1; }
.reply-head {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}
.reply-name { font-size: 10.5px; font-weight: 600; color: var(--text-2); }
.reply .role-badge { margin-top: 0; height: 12px; font-size: 7px; padding: 0 4px; }
.reply time { margin-left: auto; font-size: 8.5px; color: var(--text-4); white-space: nowrap; }
.reply-text {
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #bcbcc7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Reply form */
.reply-form {
  margin-top: 9px;
  padding: 7px;
  border-radius: 9px;
  border: 1px solid #2c2c36;
  background: #101015;
}
.reply-form textarea {
  width: 100%;
  min-height: 44px;
  max-height: 110px;
  resize: none;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.5;
}
.reply-form textarea::placeholder { color: var(--text-4); }
.reply-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 5px;
}
.reply-form .btn { height: 25px; font-size: 10.5px; padding: 0 9px; }

/* Composer */
.composer {
  flex: none;
  padding: 11px 13px 12px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #101014 0%, #0d0d11 100%);
}
.composer-row { display: flex; gap: 8px; align-items: flex-start; }
.composer-row .avatar { margin-top: 1px; }

.composer textarea {
  flex: 1;
  min-height: 62px;
  max-height: 148px;
  resize: none;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid #26262f;
  background: #16161c;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.composer textarea::placeholder { color: var(--text-4); }
.composer textarea:hover { border-color: #30303a; }
.composer textarea:focus {
  border-color: rgba(214, 246, 92, 0.42);
  background: #17171e;
  box-shadow: 0 0 0 3px rgba(214, 246, 92, 0.07);
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding-left: 36px;
}
.composer-spacer { flex: 1; }

.time-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid #2a2a33;
  background: #1a1a21;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}
.time-chip .icon { width: 11px; height: 11px; opacity: 0.65; }
.time-chip:hover { border-color: var(--accent-line); color: var(--accent); }
.time-chip.is-general {
  font-family: var(--font);
  font-size: 9.5px;
  font-weight: 550;
  letter-spacing: 0.02em;
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.time-chip.is-forced { opacity: 0.5; cursor: not-allowed; }

.attach-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 4px 0 6px;
  border-radius: 6px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 500;
}
.attach-badge .icon { width: 10px; height: 10px; }
.attach-badge button {
  width: 16px;
  height: 16px;
  margin-left: 1px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--accent);
  opacity: 0.7;
}
.attach-badge button:hover { background: rgba(214, 246, 92, 0.16); opacity: 1; }
.attach-badge button .icon { width: 9px; height: 9px; }

.composer-hint {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0.7;
}
.composer-hint kbd { min-width: 15px; height: 15px; font-size: 8.5px; padding: 0 3px; }

.btn-send { height: 27px; padding: 0 9px; font-size: 10.5px; gap: 5px; }
.btn-send .icon { width: 12px; height: 12px; }
.composer.is-invalid textarea {
  border-color: rgba(255, 123, 110, 0.6);
  animation: shake 0.28s;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
.composer.is-flash { animation: composer-flash 1s var(--ease); }
@keyframes composer-flash {
  0% { box-shadow: inset 0 0 0 2px rgba(214, 246, 92, 0.55); }
  100% { box-shadow: inset 0 0 0 0 rgba(214, 246, 92, 0); }
}

/* ============================================================
   Popover / modal / toast
   ============================================================ */
.popover {
  position: fixed;
  z-index: 90;
  min-width: 178px;
  padding: 5px;
  border-radius: 10px;
  border: 1px solid #2e2e38;
  background: #16161b;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.55);
  animation: pop-in 0.14s var(--ease);
}

.popover button {
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--text-2);
  text-align: left;
}
.popover button .icon { width: 13px; height: 13px; opacity: 0.7; }
.popover button:hover { background: #212129; color: var(--text); }
.popover button.danger { color: var(--danger); }
.popover button.danger:hover { background: rgba(255, 123, 110, 0.1); color: #ff9387; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 6, 0.72);
  backdrop-filter: blur(7px);
  animation: fade-in 0.18s ease;
}
.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid #2c2c36;
  background: #111116;
  box-shadow:
    0 50px 120px -30px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: modal-in 0.24s var(--ease);
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal-head h2 {
  margin-top: 3px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.modal-sub {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-3);
}

#videoForm { margin-top: 17px; }
.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-2);
}
.input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid #2a2a33;
  background: #0c0c10;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-wrap:focus-within {
  border-color: rgba(214, 246, 92, 0.46);
  box-shadow: 0 0 0 3px rgba(214, 246, 92, 0.07);
}
.input-wrap.is-invalid { border-color: rgba(255, 123, 110, 0.62); }
.input-icon { width: 15px; height: 15px; color: var(--text-4); }
.input-wrap input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 12px;
  color: var(--text);
}
.input-wrap input::placeholder { color: var(--text-4); }

.field-error {
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--danger);
}

.detected-card {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
}
.detected-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(214, 246, 92, 0.1);
  color: var(--accent);
}
.detected-icon .icon { width: 16px; height: 16px; }
.detected-text { display: flex; flex-direction: column; min-width: 0; }
.detected-text strong { font-size: 11px; font-weight: 600; color: var(--text); }
.detected-text span {
  font-size: 10px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detected-check { width: 15px; height: 15px; margin-left: auto; color: var(--accent); }

.examples {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
  font-size: 10px;
  color: var(--text-4);
}
.examples-label { margin-right: 1px; }
.example-chip {
  height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #2b2b34;
  background: #17171d;
  color: var(--text-2);
  font-size: 9.5px;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}
.example-chip:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.examples-hint { margin-left: auto; font-size: 9px; color: var(--text-4); }

.modal-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: #0e0e12;
  color: var(--text-4);
}
.modal-note .icon { width: 13px; height: 13px; margin-top: 1px; flex: none; color: var(--text-3); }
.modal-note p { font-size: 10px; line-height: 1.55; }

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
}
.modal-foot-actions { display: flex; align-items: center; gap: 7px; }

/* Toasts */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 120;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(480px, 90vw);
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #30303a;
  background: rgba(22, 22, 27, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
  color: var(--text);
  font-size: 11.5px;
  animation: toast-in 0.22s var(--ease);
}
.toast.is-out { opacity: 0; transform: translateY(4px); transition: opacity 0.22s, transform 0.22s; }
.toast > .icon { width: 14px; height: 14px; color: var(--accent); flex: none; }
.toast button {
  margin-left: 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  padding: 2px 0;
}
.toast button:hover { text-decoration: underline; text-underline-offset: 2px; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   Fullscreen
   ============================================================ */
.player-shell:fullscreen {
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.player-shell:fullscreen .player {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}
.player-shell:fullscreen .annot-tools { top: 18px; left: 18px; }
.player-shell:fullscreen .player-badges { top: 18px; right: 18px; }
.player-shell:fullscreen .player-controls { padding: 14px 22px 14px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1360px) {
  .collab-label { display: none; }
  .collab { padding-right: 6px; }
}

@media (max-width: 1240px) {
  :root { --sidebar-w: 360px; }
  .collab { display: none; }
  .comment-now span { display: none; }
  .comment-now { width: 28px; padding: 0; justify-content: center; border-radius: 8px; }
}

@media (max-width: 1080px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100vh; }
  .topbar { position: sticky; top: 0; }
  .tb-user-text { display: none; }
  .workspace { flex-direction: column; }
  .stage { padding: 14px 16px 16px; overflow: visible; }
  .player-shell { width: 100%; }
  .sidebar {
    width: 100%;
    min-height: 420px;
    height: min(72vh, 620px);
    border-left: 0;
    border-top: 1px solid var(--line);
    box-shadow: none;
  }
  .stage-foot { padding-bottom: 2px; }
  .shortcut-optional { display: none; }
}

@media (max-width: 900px) {
  .topbar-center { display: none; }
}

@media (max-width: 860px) {
  .topbar { padding: 0 16px; gap: 12px; }
  .stage-title-row h1 { font-size: 17px; }
  .stage-sub .meta-soft { display: none; }
  .stage-video-title { max-width: 210px; }
  .stage { padding: 12px 12px 16px; }
  .annot-tools { width: 40px; padding: 5px; }
  .tool-btn { width: 28px; height: 28px; }
  .timecode { margin: 0 5px; font-size: 10px; }
  .frame-group { display: none; }
  .stage-actions .btn span { display: none; }
  .stage-actions .btn { width: 34px; padding: 0; }
  .modal-card { padding: 18px; }
  .examples-hint { display: none; }
}

@media (max-width: 620px) {
  .brand-badge { display: none; }
  .brand-sub { max-width: 190px; }
  .stage-head { gap: 10px; }
  .stage-title-row h1 { font-size: 16px; }
  .status-pill { display: none; }
  .stage-sub { font-size: 10.5px; }
  .stage-foot { display: none; }
  .annot-tools { display: none; }
  .shortcuts { gap: 9px; }
  .shortcut:nth-child(2) { display: none; }
  .volume-group, .speed-btn { display: none; }
  .comment-now { display: none; }
  .sidebar {
    height: auto;
    min-height: 0;
  }
  .comments-scroll { overflow: visible; }
  .comments-list { padding: 11px; }
  .poster-content {
    left: 18px;
    right: 18px;
    bottom: 80px;
    max-width: none;
  }
  .poster-kicker { font-size: 8.5px; letter-spacing: 0.11em; }
  .poster-title { margin-top: 9px; font-size: 23px; }
  .poster-meta { margin-top: 7px; font-size: 10px; }
  .poster-play { height: 41px; margin-top: 13px; padding: 0 15px 0 6px; font-size: 11.5px; }
  .poster-play-icon { width: 29px; height: 29px; }
  .poster-hint { display: none; }
  .paused-top {
    height: 88px;
    padding: 0 14px 20px 16px;
  }
  .paused-title { display: none; }
  .paused-center { width: 54px; height: 54px; }
  .paused-center .icon { width: 20px; height: 20px; }
  .modal-foot { flex-direction: column-reverse; align-items: stretch; }
  .modal-foot-actions { justify-content: flex-end; }
  .link-btn { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Panel lateral — carcasa común (portada de PanelLateral de
   postpanelplanner). Flota encima del workspace pegado a la
   derecha, sin fondo oscuro: no mueve el video ni la columna de
   Feedback, que siguen debajo.
   ============================================================ */
.side-panel {
  position: fixed;
  top: var(--topbar-h);
  right: 0;
  bottom: 0;
  z-index: 35;
  width: min(var(--panel-w), 100vw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 70px -30px rgba(0, 0, 0, 0.95);
  animation: sp-in 0.2s var(--ease);
}

/* Encabezado */
.sp-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(90deg, rgba(214, 246, 92, 0.07), rgba(124, 230, 168, 0.025) 60%, transparent);
}
.sp-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sp-head-btn {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--text-3);
  transition: background 0.15s, color 0.15s;
}
.sp-head-btn:hover { background: #22222a; color: var(--text); }
.sp-head-btn .icon { width: 18px; height: 18px; }
.sp-back .icon { width: 16px; height: 16px; }

.sp-icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #e4ff86 0%, #c9f24d 50%, #7ce6a8 120%);
  color: var(--accent-ink);
  box-shadow: 0 10px 22px -12px rgba(214, 246, 92, 0.7);
}
.sp-icon .icon { width: 16px; height: 16px; }

.sp-heading { min-width: 0; }
.sp-heading h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.sp-heading p {
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-3);
}
.sp-heading p:empty { display: none; }

/* Cuerpo */
.sp-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #2c2c36 transparent;
}
.sp-loading {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-view { display: flex; flex-direction: column; }

/* Buscador fijo arriba */
.sp-search-wrap {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 16px 16px 8px;
  background: var(--panel);
}
.sp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 2px solid #26262e;
  background: #16161b;
  color: var(--text-4);
  transition: border-color 0.15s;
}
.sp-search:focus-within { border-color: var(--accent); }
.sp-search .icon { width: 16px; height: 16px; flex: none; }
.sp-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}
.sp-search input::placeholder { color: var(--text-4); }

/* Listas */
.sp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 16px 16px;
}
#adminUsersView .sp-list,
#adminVideosView .sp-list { padding-top: 16px; }

.sp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 44px 24px;
  text-align: center;
  color: var(--text-4);
}
.sp-empty .icon { width: 40px; height: 40px; margin-bottom: 10px; opacity: 0.45; }
.sp-empty strong { font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.sp-empty span { font-size: 12px; line-height: 1.5; }
.sp-empty .sp-btn { margin-top: 12px; }

.sp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 19px;
  padding: 0 6px;
  border-radius: 6px;
  background: #212128;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.sp-chip.is-on { background: rgba(143, 227, 176, 0.12); color: var(--ok); }
.sp-chip .icon { width: 11px; height: 11px; }

.stage-actions .btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

.sp-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.sp-badge .icon { width: 10px; height: 10px; }

.sp-kebab,
.sp-icon-btn {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--text-4);
  transition: background 0.15s, color 0.15s;
}
.sp-kebab { align-self: flex-start; }
.sp-kebab:hover,
.sp-kebab[aria-expanded="true"] { background: #24242c; color: var(--text); }
.sp-icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.sp-kebab .icon,
.sp-icon-btn .icon { width: 15px; height: 15px; }

/* Fila de cliente */
.sp-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 8px;
  border-radius: 16px;
  border: 2px solid #22222a;
  background: #15151a;
  transition: border-color 0.15s, background 0.15s;
}
.sp-row:hover { border-color: rgba(214, 246, 92, 0.35); }
.sp-row.is-current {
  border-color: var(--accent);
  background: linear-gradient(90deg, rgba(214, 246, 92, 0.08), rgba(124, 230, 168, 0.025));
}
.sp-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  text-align: left;
}
.sp-avatar {
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--adm-color, #d6f65c);
  color: #10120a;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.sp-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sp-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sp-row-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.sp-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* Fila de correo */
.sp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 9px;
  border-radius: 12px;
  border: 1px solid #22222a;
  background: #15151a;
}
.sp-item-icon {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.sp-item-icon .icon { width: 15px; height: 15px; }
.sp-item-icon.is-danger { background: rgba(255, 123, 110, 0.12); color: #ff9a90; }
.sp-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sp-item-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.sp-item-question {
  font-size: 10.5px;
  font-weight: 700;
  color: #ffb4aa;
}
.sp-item.is-confirm {
  border-color: rgba(255, 123, 110, 0.4);
  background: rgba(255, 123, 110, 0.05);
}
.sp-item-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sp-mini-btn {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: 8px;
  background: #24242c;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}
.sp-mini-btn:hover { background: #2e2e38; color: var(--text); }
.sp-mini-btn.is-danger { background: #ff7b6e; color: #1d0b09; }
.sp-mini-btn.is-danger:hover { background: #ff958a; }
.sp-mini-btn:disabled { opacity: 0.6; cursor: default; }
.sp-mini-btn .spinner {
  width: 11px;
  height: 11px;
  border-width: 2px;
  border-color: rgba(29, 11, 9, 0.25);
  border-top-color: #1d0b09;
}
.sp-icon-btn.is-danger:hover { background: rgba(255, 123, 110, 0.12); color: #ff9a90; }

/* Fila de video: compacta, la miniatura identifica y caben varias sin scrollear */
.sp-video {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 14px;
  border: 2px solid #22222a;
  background: #15151a;
  transition: border-color 0.15s, background 0.15s;
}
.sp-video:hover { border-color: rgba(214, 246, 92, 0.35); }
.sp-video.is-current {
  border-color: var(--accent);
  background: linear-gradient(90deg, rgba(214, 246, 92, 0.08), rgba(124, 230, 168, 0.025));
}
.sp-video-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 9px;
  text-align: left;
}
.sp-thumb {
  position: relative;
  width: 112px;
  aspect-ratio: 16 / 9;
  flex: none;
  overflow: hidden;
  border-radius: 9px;
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(214, 246, 92, 0.1), transparent 60%),
    linear-gradient(135deg, #1a1a21, #0e0e12);
}
.sp-thumb img,
.sp-thumb video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sp-thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.25);
}
.sp-thumb-fallback .icon { width: 20px; height: 20px; }
.sp-thumb-provider {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(8, 8, 11, 0.78);
  color: var(--text-2);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sp-video-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sp-video-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.sp-video-info code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-4);
}
.sp-video-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

/* Formularios */
.sp-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}
.sp-field { display: flex; flex-direction: column; }
.sp-label {
  margin-bottom: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.sp-input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 2px solid #2a2a33;
  background: #16161b;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.sp-input::placeholder { color: var(--text-4); }
.sp-input:hover { border-color: #35353f; }
.sp-input:focus { border-color: var(--accent); background: #18181e; }
.sp-input.is-invalid { border-color: rgba(255, 123, 110, 0.75); }
.sp-input-mono { font-family: var(--mono); font-size: 12.5px; }
.sp-help {
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-4);
}
.sp-alert {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 123, 110, 0.35);
  background: rgba(255, 123, 110, 0.08);
  color: #ffb4aa;
  font-size: 12px;
  line-height: 1.45;
}
.sp-submit {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.sp-detected {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid var(--accent);
  background: var(--accent-soft);
}
.sp-detected-icon {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(214, 246, 92, 0.14);
  color: var(--accent);
}
.sp-detected-icon .icon { width: 17px; height: 17px; }
.sp-detected-text { display: flex; flex-direction: column; min-width: 0; }
.sp-detected-text strong { font-size: 13px; font-weight: 700; color: var(--text); }
.sp-detected-text span { font-size: 11px; color: var(--text-3); }
.sp-detected-check { width: 18px; height: 18px; margin-left: auto; color: var(--accent); }

.sp-confirm { font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.sp-confirm strong { color: var(--text); font-weight: 700; }
.sp-summary {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #2a2a33;
  background: #16161b;
}
.sp-summary strong { font-size: 14px; font-weight: 700; color: var(--text); }
.sp-summary span { font-size: 12px; color: var(--text-3); }

/* Pie: acción secundaria a la izquierda, principal a lo ancho */
.sp-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.3);
}
.sp-btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, transform 0.15s, filter 0.15s;
}
.sp-btn-ghost { color: var(--text-3); }
.sp-btn-ghost:hover { background: #1f1f26; color: var(--text); }
.sp-btn-primary {
  flex: 1;
  background: linear-gradient(90deg, #d6f65c, #a8ec8a);
  color: var(--accent-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 12px 26px -14px rgba(214, 246, 92, 0.75);
}
.sp-btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.sp-btn-primary.is-danger {
  background: linear-gradient(90deg, #ff7b6e, #ff978c);
  color: #1d0b09;
  box-shadow: 0 12px 26px -14px rgba(255, 123, 110, 0.7);
}
.sp-empty .sp-btn-primary { flex: none; height: 36px; font-size: 12.5px; }
.sp-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }
.sp-btn-icon { display: grid; place-items: center; }
.sp-btn-icon:empty { display: none; }
.sp-btn-icon .icon { width: 16px; height: 16px; }
.sp-btn-icon .spinner {
  width: 15px;
  height: 15px;
  border-width: 2px;
  border-color: rgba(12, 14, 4, 0.25);
  border-top-color: var(--accent-ink);
}

/* Menú de tres puntos */
.sp-menu {
  z-index: 120;
  min-width: 176px;
  padding: 4px 0;
  border-radius: 12px;
  border: 1px solid #2c2c35;
  background: #151519;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.sp-menu button {
  height: auto;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 0;
  font-size: 13px;
  color: var(--text-2);
}
.sp-menu button .icon { width: 15px; height: 15px; opacity: 0.8; }
.sp-menu button:hover { background: #1f1f26; }
.sp-menu-divider { height: 1px; margin: 4px 0; background: var(--line); }

/* Barra inferior (solo móvil) */
.bottom-nav { display: none; }

@keyframes sp-in {
  from { opacity: 0.6; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}

/* Móvil: el panel es una hoja completa entre la topbar y la barra inferior */
@media (max-width: 767px) {
  .app { padding-bottom: var(--bottom-nav-h); }
  .tb-pill,
  .tb-icon[data-panel] { display: none; }
  .brand-sub-client { display: inline; }
  .side-panel {
    left: 0;
    bottom: var(--bottom-nav-h);
    width: 100%;
    border-left: 0;
  }
  .sp-head { padding: 14px 16px; }
  .sp-form { padding: 16px; }
  .sp-foot { padding: 12px 16px; }
  .toasts { bottom: calc(var(--bottom-nav-h) + 14px); }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    height: var(--bottom-nav-h);
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .bottom-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-4);
    font-size: 10px;
    font-weight: 700;
    transition: color 0.15s;
  }
  .bottom-nav button .icon { width: 20px; height: 20px; }
  .bottom-nav button.is-active { color: var(--accent); }
}
