/* NDR — Sistema de Gestión */

:root {
  /* superficie */
  --bg:           #f3f3f4;
  --surface:      #fff;
  --surface-2:    #f6f6f7;
  --surface-3:    #eeeef0;
  --line:         #e8e8eb;
  --line-2:       #dadade;
  /* texto */
  --ink:          #26262a;
  --ink-2:        #4b4b51;
  --muted:        #5f5f65;
  --faint:        #707076;
  --strong:       #4b4b51;
  /* estados */
  --ok:           #1b7a49;  --ok-bg:   #e7f4ec;  --ok-bar:   #34a368;
  --wait:         #956500;  --wait-bg: #fcf1d7;  --wait-bar: #e5ae36;
  --red:          #E53E19;  --red-bg:  #fce8e5;  --red-bar:  #de4b3b;
  --none-bar:     #e4e4e8;
  /* identidad */
  --brand:        #E53E19;
  /* forma */
  --r-card:       16px;
  --r-in:         10px;
  --r-ctl:        10px;
  --r-lg:         18px;
  --r-md:         10px;
  --r-sm:         6px;
  /* tipografía */
  --display:      'Space Grotesk', sans-serif;
  --sans:         'Inter', -apple-system, system-ui, sans-serif;
  /* estados de episodio */
  --c-armado:     #26262a;
  --c-rodaje:     #E53E19;
  --c-edicion:    #5B4BE0;
  --c-publicacion:#1b7a49;
  --c-reels:      #E0157A;
  /* aliases v1 — compatibilidad con páginas existentes */
  --paper:        #fff;
  --fill:         #f6f6f7;
  --mute:         #5f5f65;
  --border:       #e8e8eb;
  --text:         #26262a;
  --text-secondary: #5f5f65;
  --text-muted:   #707076;
  --accent:       #E53E19;
  --success:      #1b7a49;
  --purple:       #5B4BE0;
  --radius:       10px;
  --radius-sm:    6px;
  --shadow:       none;
  --shadow-md:    none;
  --primary:      #26262a;
  --primary-l:    #4b4b51;
  /* estructura */
  --sidebar-w:    0px;
  --topbar-h:     64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: linear-gradient(160deg, #ffffff 0%, #f2f2f3 48%, #f6e5dd 100%) fixed;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  }

/* Números siempre en Inter con ancho fijo */
.num {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

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

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

/* ══════════════════════════════════════════════════════════
   v2 LAYOUT — top bar, nav, main, mobile bot-bar
   ══════════════════════════════════════════════════════════ */

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

/* ── Top bar ────────────────────────────────────────── */
.hdr {
  height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 200;
}

.hdr-logo-link { display: flex; align-items: center; flex: none; margin-right: 4px; }
.hdr-logo { height: 36px; width: auto; display: block; }

/* Nav links */
.nav { display: flex; gap: 2px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-ctl);
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a i { font-size: 16px; color: var(--faint); flex: none; }
.nav a.on { background: var(--surface-3); color: var(--ink); }
.nav a.on i { color: var(--ink); }

/* Badge counter inside nav item */
.nav-ct {
  min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px;
  background: var(--strong); color: #fff;
  font-size: 11px; font-weight: 600;
  display: grid; place-items: center;
  margin-right: -2px;
  line-height: 1;
}
.nav-ct:empty { display: none; }

/* Right side of header */
.hdr-rt { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Search */
.hdr-search {
  display: flex; align-items: center; gap: 8px;
  width: 200px; height: 36px;
  padding: 0 10px 0 12px;
  border-radius: var(--r-ctl);
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--faint); font-size: 13px; cursor: pointer;
  transition: border-color .15s;
}
.hdr-search:hover { border-color: var(--line-2); }
.hdr-search i { font-size: 15px; color: var(--muted); flex: none; }
.hdr-search-ph { flex: 1; color: var(--faint); }
.hdr-search kbd {
  font: 500 11px var(--sans); color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px; letter-spacing: .02em;
  flex: none;
}

/* Icon buttons (bell, avatar) */
.iconbtn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: var(--r-ctl);
  display: grid; place-items: center;
  color: var(--ink-2);
  flex: none;
  transition: background .12s;
  text-decoration: none;
}
.iconbtn:hover { background: var(--surface-2); }
.iconbtn i { font-size: 18px; }

/* Notification badge on bell icon */
.iconbtn .notif-badge {
  position: absolute; top: 2px; right: 1px;
  padding: 0 4px; font-size: 10px; line-height: 16px;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.92);
}

/* User avatar in header */
.hdr-av {
  border-radius: 50% !important;
  font-size: 13px; font-weight: 600;
  color: #fff; background: var(--strong);
}

/* ── Main content area ──────────────────────────────── */
.main {
  flex: 1;
  min-height: 0;
  padding: 24px 28px 32px;
}

/* Page-level breadcrumb/actions bar (compatibility layer) */
.page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.page-topbar:has(*) { border-bottom: 1px solid var(--line); padding-bottom: 0.75rem; }
.page-breadcrumb {
  font-size: 12px; font-weight: 500;
  color: var(--faint);
  }
.page-breadcrumb a { color: var(--faint); }
.page-breadcrumb a:hover { color: var(--ink); }
.page-breadcrumb span { color: var(--ink-2); }
.page-actions { display: flex; gap: 0.5rem; align-items: center; }

/* ── Mobile bottom bar ──────────────────────────────── */
.bot-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bot-bar-inner {
  display: flex;
  height: 60px;
}
.bot-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  color: var(--faint);
  font-size: 11px; font-weight: 500;
  text-decoration: none;
  border-radius: 10px;
  transition: color .12s;
  padding: 4px 0;
  position: relative;
}
.bot-item i { font-size: 22px; }
.bot-item.on { color: var(--ink); }
.bot-item:hover { color: var(--ink-2); }
.bot-item .bot-badge {
  position: absolute; top: 6px; right: calc(50% - 14px);
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700; line-height: 16px;
  box-shadow: 0 0 0 2px var(--surface);
  display: none;
}
.bot-item .bot-badge:not(:empty) { display: grid; place-items: center; }

/* Mobile: hide top nav, show bottom bar */
@media (max-width: 768px) {
  .nav { display: none; }
  .hdr-search { display: none; }
  .hdr { padding: 0 16px; gap: 12px; height: 56px; }
  .hdr-logo { height: 30px; }
  .bot-bar { display: block; }
  .main { padding: 16px 16px 80px; }
}

/* Keep sidebar overlay as no-op for template compat */
.sidebar-overlay { display: none; }
.sidebar { display: none; }

/* ── Old app-layout stub (no-op) ────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--ink);
  display: flex;
  flex-direction: column;
  padding: 26px 22px 22px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.25s;
}

.sidebar-logo {
  width: 162px;
  margin: 2px auto 28px;
  flex-shrink: 0;
}
.sidebar-logo svg,
.sidebar-logo img { width: 100%; height: auto; display: block; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,.2);
  flex: 1;
  padding: 0;
}

/* Section headers ocultos en desktop */
.nav-section { display: none; }

/* Iconos ocultos en desktop, visibles en mobile */
.nav-item i,
.nav-item .ti { display: none; }

.nav-item {
  font-family: var(--display);
  display: block;
  text-align: center;
  text-decoration: none;
  color: rgba(255,255,255,.82);
  font-size: 14px;
  font-weight: 700;
  padding: 16px 8px;
  border-bottom: 1px solid rgba(255,255,255,.2);
  border-left: none; border-right: none; border-top: none;
  border-radius: var(--r-sm);
  width: 100%;
  background: none;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { background: var(--surface); color: var(--ink); border-bottom-color: transparent; }
.nav-chat-badge-wrap { position: absolute; top: 8px; right: 10px; }
.nav-chat-badge-wrap .notif-badge { position: static; font-size: 0.6rem; padding: 1px 5px; }

.nav-group, .nav-sub, .nav-sub-item,
.nav-item-sub { display: none; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-top: none;
  padding-bottom: 0;
}

.sidebar-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0;
  padding: 0;
  border-radius: 0;
}
.sidebar-user:hover { background: none; }

.user-avatar,
.user-avatar-placeholder {
  width: 50px; height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-bottom: 4px;
}
.user-avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 1.1rem;
}

.user-info { min-width: 0; text-align: center; }
.user-name {
  font-family: var(--display);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  text-align: center;
}
.user-role {
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  text-align: center;
}

.btn-logout {
  color: rgba(255,255,255,.5);
  background: none; border: none;
  cursor: pointer; padding: 8px;
  margin-top: 2px;
  border-radius: 0;
  font-size: 1.1rem;
  display: flex; align-items: center;
  transition: color 0.12s;
  flex-shrink: 0;
}
.btn-logout:hover { color: #fff; background: none; }

/* ── Main wrapper ────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ── Topbar ──────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1.5px solid var(--ink);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.sidebar-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 1.2rem; color: var(--mute);
}
.topbar-title {
  flex: 1;
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--faint);
}
.topbar-title a { color: var(--faint); }
.topbar-title a:hover { color: var(--ink); }
.topbar-right { display: flex; align-items: center; gap: 0.5rem; }
.topbar-actions { display: flex; gap: 0.5rem; }
.topbar-comunicar {
  display: flex; align-items: center; gap: 0.4rem;
  background: none;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-sm);
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.topbar-comunicar:hover { background: var(--ink); color: var(--paper); }
.comunicar-hint-toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300;
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--r-sm); padding: 0.65rem 0.9rem;
  font-size: 0.83rem; max-width: 340px;
  animation: hint-slide-in 0.2s ease;
}
@keyframes hint-slide-in {
  from { opacity:0; transform: translateY(8px); }
  to   { opacity:1; transform: translateY(0); }
}
.comunicar-hint-check { color: var(--c-publicacion); font-size: 1rem; flex-shrink: 0; }
.comunicar-hint-texto { flex: 1; color: var(--mute); }
.comunicar-hint-btn {
  display: flex; align-items: center; gap: 0.25rem;
  background: var(--ink); color: var(--paper); border: none;
  border-radius: var(--r-sm); padding: 0.3rem 0.65rem;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: opacity 0.15s;
}
.comunicar-hint-btn:hover { opacity: 0.8; }
.comunicar-hint-close { color: var(--faint); flex-shrink: 0; }
@media (max-width: 640px) {
  .topbar-comunicar-txt { display: none; }
  .topbar-comunicar { padding: 0.3rem 0.5rem; }
}

/* ── Messages ────────────────────────────────────────── */
.messages-container { padding: 0.75rem 1.5rem 0; }
.alert {
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}
.alert-success { background: #F0FDF4; border: 1px solid #86EFAC; color: #166534; }
.alert-error, .alert-danger { background: #FFF5F5; border: 1px solid #FCA5A5; color: #991B1B; }
.alert-warning { background: #FFFBEB; border: 1px solid #FCD34D; color: #92400E; }
.alert-info { background: #EFF6FF; border: 1px solid #93C5FD; color: #1E40AF; }
.alert-close { background: none; border: none; cursor: pointer; color: inherit; opacity: 0.6; }
.alert-close:hover { opacity: 1; }

/* ── Main content (alias — legacy, no padding en v2) ─── */
.main-content { flex: 1; }
.page-container { max-width: 1100px; }
.page-container.narrow { max-width: 600px; }
.page-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 1.25rem; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius); border: none; cursor: pointer;
  font-size: 0.875rem; font-family: inherit; font-weight: 500;
  transition: filter 0.15s, background 0.15s;
}
.btn-primary { background: var(--ink); color: white; }
.btn-primary:hover { background: #333; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: var(--accent); color: white; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }
.text-danger { color: var(--accent); }
.btn-icon {
  padding: 0.3rem; background: none; border: none; cursor: pointer;
  color: var(--text-muted); border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; font-size: 1rem;
  transition: background 0.12s, color 0.12s;
}
.btn-icon:hover { color: var(--text); background: var(--bg); }
.btn-icon.danger:hover { color: var(--accent); }

/* ── Card ────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.875rem;
}
.card-title { font-size: 0.9rem; font-weight: 600; }
.card-link { font-size: 0.8rem; color: var(--accent); }
.card-link:hover { text-decoration: underline; }
.card.danger-zone { border-color: #FCA5A5; }
.card.danger-zone h3 { color: var(--accent); margin-bottom: 0.5rem; }
.card.danger-zone p { color: var(--text-muted); margin-bottom: 1rem; }

/* ── Progress ────────────────────────────────────────── */
.progress-wrap { background: var(--border); border-radius: 2px; height: 4px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--success); border-radius: 2px; transition: width 0.3s ease; }
.progress-header { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.progress-overall { margin-bottom: 1rem; }
.progress-pct { font-size: 0.8rem; color: var(--text-muted); }
.progress-cell { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; }

/* ── Badges ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.18rem 0.55rem; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600;
  }
.badge-preproduccion { background: var(--fill); color: var(--ink); }
.badge-rodaje        { background: #FEF2EF; color: var(--c-rodaje); }
.badge-edicion       { background: #F0EFFE; color: var(--c-edicion); }
.badge-listo         { background: #EDF7F2; color: var(--c-publicacion); }
.badge-publicado     { background: #EDF7F2; color: var(--c-publicacion); }
.badge-prospecto     { background: var(--fill); color: var(--mute); }
.badge-contactado    { background: var(--fill); color: var(--mute); }
.badge-confirmado    { background: #EDF7F2; color: var(--c-publicacion); }
.badge-realizado     { background: var(--fill); color: var(--mute); }
.badge-inactivo      { background: var(--fill); color: var(--faint); }
.badge-lg { font-size: 0.85rem; padding: 0.3rem 0.8rem; }
.badge-tipo-documento { background: var(--fill); color: var(--ink); }
.badge-tipo-imagen    { background: #F0EFFE; color: var(--c-edicion); }
.badge-tipo-audio     { background: var(--fill); color: var(--mute); }
.badge-tipo-video_link{ background: #FEF2EF; color: var(--c-rodaje); }

/* ── Forms ───────────────────────────────────────────── */
.form-group { margin-bottom: 0.85rem; }
.form-group label {
  display: block; font-size: 0.75rem; font-weight: 500;
  color: var(--text-muted); margin-bottom: 0.25rem;
  }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 0.5rem 0.65rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.875rem; font-family: inherit; color: var(--text); background: var(--surface);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 70px; }
.field-error { color: var(--accent); font-size: 0.78rem; margin-top: 0.2rem; }
.field-help { color: var(--text-muted); font-size: 0.75rem; margin-top: 0.2rem; }
.form-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 0.75rem; }

/* Sexo selector */
.sexo-options { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.sexo-option { cursor: pointer; }
.sexo-option input[type="radio"] { display: none; }
.sexo-option span {
  display: block; padding: 0.3rem 0.85rem;
  border: 1px solid var(--border); border-radius: 20px;
  font-size: 0.82rem; color: var(--text-muted);
  transition: all 0.15s;
}
.sexo-option input:checked + span {
  background: var(--accent); border-color: var(--accent);
  color: white; font-weight: 600;
}
.sexo-option span:hover { border-color: var(--accent); color: var(--accent); }

/* Mesa sugerida */
.mesas-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.mesa-card {
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); overflow: hidden;
}
.mesa-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.mesa-card-tema { font-weight: 600; font-size: 0.875rem; color: var(--text); flex: 1; }
.mesa-card-actions { display: flex; gap: 0.25rem; align-items: center; }
.mesa-card-notas {
  padding: 0.35rem 0.65rem; font-size: 0.8rem; color: var(--text-muted);
  border-bottom: 1px solid var(--border); white-space: pre-wrap;
}
.mesa-comp-list {
  display: flex; flex-wrap: wrap; gap: 0.3rem;
  padding: 0.45rem 0.65rem;
}
.mesa-comp-chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: var(--fill); color: var(--ink);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 0.15rem 0.5rem; font-size: 0.78rem; font-weight: 500;
}
.mesa-comp-x {
  background: none; border: none; cursor: pointer;
  color: var(--mute); padding: 0; line-height: 1;
  display: flex; align-items: center; opacity: 0.6;
  transition: opacity .15s;
}
.mesa-comp-x:hover { opacity: 1; }
.mesa-comp-x .ti { font-size: 0.65rem; }
.mesa-comp-empty { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }
.mesa-add-comp-form {
  display: flex; gap: 0.4rem; align-items: center;
  padding: 0.35rem 0.65rem; border-top: 1px dashed var(--border);
}
.mesa-select-sm {
  flex: 1; min-width: 140px; padding: 0.25rem 0.45rem;
  border: 1px solid var(--border); border-radius: 5px;
  font-size: 0.78rem; background: var(--bg); color: var(--text);
}
.mesa-select-sm:focus { outline: none; border-color: var(--accent); }
.mesa-new-form {
  display: flex; flex-direction: column; gap: 0.4rem;
  margin-top: 0.35rem;
}
.mesa-new-form button { align-self: flex-start; }
.mesa-empty { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 0.5rem; }
.mesa-input {
  width: 100%; padding: 0.35rem 0.6rem; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.83rem; background: var(--bg); color: var(--text);
}
.mesa-input:focus { outline: none; border-color: var(--accent); }
.mesa-textarea {
  width: 100%; padding: 0.35rem 0.6rem; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.8rem; background: var(--bg); color: var(--text);
  resize: vertical; font-family: inherit;
}
.mesa-textarea:focus { outline: none; border-color: var(--accent); }

/* ── Utilidades ────────────────────────────────────────── */
.lbl { font-size: 11px; font-weight: 600; color: var(--mute); }

/* ── Dashboard ───────────────────────────────────────── */
.dashboard { display: flex; flex-direction: column; gap: 16px; }

/* Grillas de columnas */
.dash-row { display: grid; gap: 16px; }
.r-62 { grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); }
.r-38 { grid-template-columns: minmax(0,1fr) minmax(0,.55fr); }

/* Hero — próximo rodaje */
.hero {
  background: var(--ink); color: #fff;
  border-radius: var(--r-lg); padding: 22px 24px 20px;
  display: flex; flex-direction: column; gap: 14px;
  max-height: 280px; align-self: start;
}
.hero-critica { border-top: 4px solid var(--red); }
.hero-lbl { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.5); }
.hero-countdown { display: flex; align-items: baseline; gap: 8px; }
.hero-n { font-size: 56px; font-weight: 700; line-height: 1; font-family: var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.hero-unit { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.7); }
.urgencia-normal .hero-n  { color: #fff; }
.urgencia-alerta .hero-n  { color: var(--red); }
.urgencia-critica .hero-n { color: var(--red); }
.urgencia-none .hero-n    { color: rgba(255,255,255,.4); }
.hero-title-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.hero-tema { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.1; letter-spacing: .03em; }
.hero-code { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.55); flex: none; }
.hero-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(90px,1fr)); gap: 10px; }
.hero-fact-lbl { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.45); margin-bottom: 3px; }
.hero-fact-val { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: #fff; line-height: 1.3; }
.hero-fact-invitados .hero-fact-val { font-size: 13px; font-weight: 400; }
.hero-footer { display: flex; justify-content: flex-end; margin-top: 2px; }
.hero-empty { text-align: center; opacity: .5; font-size: 13px; padding: 20px 0; }
.hero-empty .hero-n { font-size: 40px; opacity: .4; margin-bottom: 8px; }
.hero-empty-lbl { font-size: 13px; }

/* Botón borde blanco para hero */
.btn-ghost-white {
  background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5);
  border-radius: var(--r-sm); padding: 6px 14px;
  font-family: var(--display); font-size: 11px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block;
  transition: border-color .12s, background .12s;
}
.btn-ghost-white:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* Panel — Requiere Acción */
.dash-panel {
  border: 1.5px solid var(--ink); border-radius: var(--r-lg);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface);
}
.dash-panel .dp-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; border-bottom: 1.5px solid var(--ink);
  flex-wrap: wrap;
}
.dash-panel h3 { font-size: 12px; flex: 1; white-space: nowrap; }
.dp-tag {
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--red); color: #fff; border-radius: 20px; padding: 2px 8px; line-height: 1.6;
}
.dp-filtros { display: flex; gap: 4px; }
.dp-filtro {
  background: none; border: 1px solid var(--line); border-radius: 20px;
  padding: 3px 10px; font-size: 11px; font-weight: 600; cursor: pointer; color: var(--mute); font-family: var(--display);
  transition: border-color .12s, color .12s, background .12s;
}
.dp-filtro.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.dp-list { flex: 1; overflow-y: auto; }
.dp-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-bottom: 1px solid var(--line);
  transition: background .1s;
}
.dp-item:last-child { border-bottom: none; }
.dp-item:hover { background: var(--fill); }
.dp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dp-dot.hot { background: var(--red); }
.dp-body { flex: 1; min-width: 0; }
.dp-desc { font-size: 13.5px; font-weight: 500; line-height: 1.35; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-meta { font-size: 11.5px; color: var(--mute); margin-top: 2px; font-variant-numeric: tabular-nums; }
.dp-aside { display: flex; align-items: center; gap: 6px; flex: none; }
.dp-avatar {
  width: 22px; height: 22px; border-radius: 50%; font-size: 10px; font-weight: 700;
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.dp-asignar {
  font-size: 10px; font-weight: 700; font-family: var(--display); color: var(--mute); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 2px 7px; white-space: nowrap;
}
.dp-ir {
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  color: var(--mute); border-radius: var(--r-sm); text-decoration: none;
  transition: color .12s, background .12s;
}
.dp-ir:hover { color: var(--ink); background: var(--fill); }
.dp-empty-ok {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--faint); font-size: 13px; padding: 32px 20px;
}
.dp-empty-ok i { font-size: 22px; }
.dp-empty { padding: 28px 20px; color: var(--faint); font-size: 13px; text-align: center; }

/* Pipeline — En proceso */
.pipe-block { background: var(--fill); border-radius: var(--r-lg); padding: 22px 24px; }
.pipe-block .pb-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.pipe-block h3 { font-size: 13px; }
.pb-tot { font-size: 12px; font-weight: 500; color: var(--mute); font-variant-numeric: tabular-nums; }
.pb-stages { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.pb-stage { border-top: 1.5px solid var(--ink); padding-top: 12px; }
.pb-stage.empty { border-top-color: var(--line); }
.pb-stage .n { font-size: 30px; font-weight: 700; line-height: 1; font-family: var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.pb-stage.empty .n { color: var(--faint); }
.pb-stage .lbl { font-size: 11px; margin: 7px 0 11px; color: var(--mute); }
.pb-stage-alerta { border-top: 2px solid var(--red) !important; background: var(--ink); border-radius: var(--r-md); padding: 12px; margin-top: -12px; }
.pb-stage-alerta .n { color: #fff; }
.pb-stage-alerta .lbl { color: rgba(255,255,255,.6); }
.pb-alerta-txt { font-size: 12px; color: var(--red); font-weight: 600; margin-top: 4px; line-height: 1.4; }
.pb-chips { display: flex; flex-direction: column; gap: 4px; }
.pb-chip { background: var(--surface); border-radius: var(--r-sm); padding: 5px 9px; text-decoration: none; color: var(--ink); display: flex; align-items: baseline; gap: 6px; transition: background .1s; }
.pb-chip:hover { background: var(--line); }
.pb-chip-titulo { font-size: 12.5px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-chip-code { font-size: 10.5px; font-weight: 600; color: var(--mute); font-variant-numeric: tabular-nums; flex: none; }
.pb-chips em { font-size: 12px; font-weight: 400; font-style: normal; color: var(--faint); padding: 4px 0; }

/* Publicaciones */
.pubs-block { background: var(--fill); border-radius: var(--r-lg); padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.pubs-block h3 { font-size: 13px; }
.pubs-pub { border-top: 1px solid var(--line); padding-top: 12px; }
.pubs-pub:first-of-type { border-top: none; padding-top: 0; }
.pubs-pub .lbl { font-size: 11px; margin-bottom: 6px; color: var(--mute); }
.pubs-fecha { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pubs-fecha a { color: var(--ink); text-decoration: none; }
.pubs-faltan { font-size: 12px; font-weight: 400; color: var(--mute); }
.pubs-faltan b { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.pubs-titulo { font-size: 13px; font-weight: 400; color: var(--ink); margin-top: 4px; line-height: 1.4; }
.pubs-tentativa { display: inline-block; font-size: 10.5px; font-weight: 600; color: var(--mute); border: 1px solid var(--line); border-radius: 20px; padding: 1px 8px; margin-top: 5px; }
.pubs-yt-stats { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.pubs-yt-stat { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--mute); }
.pubs-yt-stat i { font-size: 14px; }
.pubs-yt-stat b { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.muted { color: var(--mute); }

/* Novedades */
.novedades-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; }
.novedades-card .nc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.novedades-card h3 { font-size: 13px; }

.empty-state-sm.success { color: var(--success); }

/* Activity */
.activity-list { display: flex; flex-direction: column; gap: 0.75rem; }
.activity-item { display: flex; gap: 0.65rem; }
.activity-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 0.75rem; flex-shrink: 0;
}
.activity-body { flex: 1; min-width: 0; }
.activity-meta { font-size: 0.8rem; }
.activity-text { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.1rem; }
.activity-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.1rem; }

/* Archivo mini list */
.archivo-mini-list { display: flex; flex-direction: column; }
.archivo-mini-row { display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.25rem; border-bottom: 1px solid var(--bg); transition: background 0.1s; border-radius: var(--radius-sm); }
.archivo-mini-row:hover { background: var(--bg); }
.archivo-mini-icon { font-size: 1.2rem; color: var(--text-muted); flex-shrink: 0; }
.archivo-mini-nombre { font-size: 0.875rem; font-weight: 500; }
.archivo-mini-meta { font-size: 0.72rem; color: var(--text-muted); }

/* ── Formato ──────────────────────────────────────────── */
.bloque-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 0.75rem; }
.bloque-header { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 1rem; cursor: pointer; user-select: none; transition: background 0.12s; }
.bloque-header:hover { background: var(--bg); }
.bloque-title { font-weight: 600; font-size: 0.9375rem; }
.bloque-meta { display: flex; align-items: center; gap: 0.75rem; }
.bloque-count { font-size: 0.75rem; color: var(--text-muted); }
.bloque-pct { font-size: 0.75rem; color: var(--text-muted); min-width: 30px; text-align: right; }
.bloque-chevron { font-size: 1rem; color: var(--text-muted); transition: transform 0.2s; }
.bloque-body { padding: 0.5rem 1rem 1rem; border-top: 1px solid var(--border); }
.add-item-form { display: flex; gap: 0.5rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.add-item-form input { flex: 1; padding: 0.35rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.875rem; font-family: inherit; }
.add-item-form input:focus { outline: none; border-color: var(--accent); }

/* Checklist */
.checklist { list-style: none; }
.checklist-item { padding: 0.45rem 0; border-bottom: 1px solid var(--bg); }
.checklist-item:last-child { border-bottom: none; }
.checklist-item.done .item-label { text-decoration: line-through; color: var(--text-muted); }
.checklist-row { display: flex; align-items: flex-start; gap: 0.55rem; }
.check-btn {
  background: none; border: none; cursor: pointer;
  color: var(--border); font-size: 1.2rem; flex-shrink: 0;
  display: flex; align-items: center; transition: color 0.15s;
  margin-top: 1px;
}
.check-btn:hover { color: var(--success); }
.check-btn.checked { color: var(--success); }
.check-btn.static { cursor: default; }
.item-content { flex: 1; min-width: 0; }
.item-label { font-size: 0.875rem; }
.item-meta { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem; }
.item-notas { font-size: 0.78rem; color: var(--text-muted); font-style: italic; margin-top: 0.2rem; background: var(--bg); padding: 0.25rem 0.5rem; border-radius: var(--radius-sm); }
.item-meta-badge { font-size: 0.7rem; background: var(--success); color: white; padding: 0.1rem 0.4rem; border-radius: 20px; flex-shrink: 0; }
.item-actions { display: flex; gap: 0.1rem; opacity: 0; transition: opacity 0.15s; flex-shrink: 0; }
.checklist-item:hover .item-actions { opacity: 1; }
.notas-inline { width: 100%; font-size: 0.8rem; padding: 0.3rem 0.5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; resize: none; }
.notas-inline:focus { outline: none; border-color: var(--accent); }

/* ── Episodios ────────────────────────────────────────── */
.filter-bar { margin-bottom: 1rem; }
.filter-form { display: flex; gap: 0.65rem; flex-wrap: wrap; align-items: center; }
.filter-form select, .filter-form input { padding: 0.4rem 0.65rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.875rem; font-family: inherit; background: var(--surface); }
.filter-form select:focus, .filter-form input:focus { outline: none; border-color: var(--accent); }

.kanban-filters {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
.kanban-filter-group {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.3rem 0.65rem;
}
.kanban-filter-label {
  font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
  white-space: nowrap; user-select: none;
}
.kanban-filter-select {
  border: none; background: transparent; font-size: 0.875rem;
  font-family: inherit; color: var(--text); cursor: pointer;
  outline: none; padding: 0.1rem 0.2rem;
}
.kanban-filter-nombre {
  display: flex; align-items: center; gap: 0.2rem;
}
.kanban-filter-input {
  border: none; background: transparent; font-size: 0.875rem;
  font-family: inherit; color: var(--text); outline: none;
  width: 130px; padding: 0.1rem 0.2rem;
}
.kanban-filter-input::placeholder { color: var(--text-muted); }
.kanban-filter-clear {
  font-size: 0.8rem; color: var(--text-muted); text-decoration: none;
  display: flex; align-items: center; gap: 0.25rem;
  padding: 0.3rem 0.6rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: color .15s, border-color .15s;
}
.kanban-filter-clear:hover { color: var(--accent); border-color: var(--accent); }

.episodes-table-wrap { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.episodes-table { width: 100%; border-collapse: collapse; }
.episodes-table th { background: var(--primary); color: rgba(255,255,255,0.8); font-weight: 500; font-size: 0.75rem; padding: 0.7rem 1rem; text-align: left; white-space: nowrap; }
.episodes-table th.sortable:hover { color: #fff; }
.episodes-table th.sort-asc, .episodes-table th.sort-desc { color: #fff; }
.episodes-table th .sort-icon { opacity: 0.7; font-style: normal; }
.episodes-table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--bg); vertical-align: middle; }
.episodes-table tr:last-child td { border-bottom: none; }
.ep-row { cursor: pointer; transition: background 0.1s; }
.ep-row:hover td { background: var(--surface-2); }
.ep-pub-prevista { font-size: 0.65rem; font-weight: 600; color: var(--mute); background: var(--fill); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.05rem 0.35rem; margin-left: 0.25rem; vertical-align: middle; }

/* Episode detail */
.episode-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; max-width: 1200px; }
.episode-hero { }
.episode-hero-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.episode-num { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }
.episode-tema { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin-top: 0.2rem; }
.episode-fecha { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.4rem; }
.episode-status-info { text-align: right; flex-shrink: 0; }
.episode-notas { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.75rem; padding: 0.5rem; background: var(--bg); border-radius: var(--radius-sm); }
.episode-hero-fechas { margin: 0.75rem 0; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.episode-hero-fechas .prepro-fecha-item { margin-bottom: 0.5rem; }
.episode-hero-fechas .prepro-fecha-item:last-child { margin-bottom: 0; }
.episode-progress-bar { margin-top: 0.5rem; }
.episode-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1rem; }
.ep-tab { padding: 0.45rem 1rem; background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; font-family: inherit; font-size: 0.875rem; color: var(--text-muted); margin-bottom: -2px; transition: color 0.15s, border-color 0.15s; }
.ep-tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tab-badge { font-size: 0.7rem; background: var(--bg); padding: 0.1rem 0.35rem; border-radius: 20px; margin-left: 0.3rem; }
.ep-tab-panel { display: none; }
.ep-tab-panel.active { display: block; }

/* ── Episode detail v2 ──────────────────────────────── */

/* Hero */
.ep-hero { margin-bottom: 1rem; }
.ep-hero-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.ep-hero-left { flex: 1; min-width: 0; }
.ep-hero-title { font-size: 1.75rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); margin: 0 0 .5rem; }
.ep-hero-guests { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .25rem; }
.ep-guest-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem .2rem .25rem; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.ep-guest-av { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0; }
.ep-hero-right { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; flex-shrink: 0; }
.ep-pub-info { display: flex; align-items: center; gap: .375rem; font-size: 13px; font-weight: 500; color: var(--muted); }
.ep-pub-info--done { color: #059669; }
.ep-pub-info--est { color: var(--muted); }
.ep-hero-notas { margin-top: .75rem; font-size: .875rem; color: var(--muted); padding: .5rem .75rem; background: var(--surface-2); border-radius: var(--r-ctl); border: 1px solid var(--line); }

/* Stage bar */
.stages-bar { display: flex; overflow-x: auto; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); margin-bottom: 1rem; scrollbar-width: none; }
.stages-bar::-webkit-scrollbar { display: none; }
.stage-item { flex: 1; min-width: 110px; padding: .75rem .65rem; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; border-right: 1px solid var(--line); transition: background .15s; cursor: pointer; }
.stage-item:last-child { border-right: none; }
.stage-item:hover { background: var(--surface-2); }
.stage-item.stage-done { }
.stage-item.stage-active { background: rgba(234, 88, 12, .07); }
.stage-item.stage-pending { opacity: .7; }
.stage-icon { font-size: 15px; margin-bottom: 2px; }
.stage-item.stage-done .stage-icon { color: #059669; }
.stage-item.stage-active .stage-icon { color: #ea580c; }
.stage-item.stage-pending .stage-icon { color: var(--muted); }
.stage-name { font-size: 11px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.stage-detail { font-size: 11px; color: var(--muted); line-height: 1.3; }
.stage-resp { font-size: 10px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Stage status badges on sections */
.stage-badge-done { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.stage-badge-active { background: #fff7ed; color: #9a3412; border-color: #fdba74; }
.stage-badge-pending { background: var(--surface-2); color: var(--muted); border-color: var(--line); }

/* "Ahora" block */
.ahora-block { display: flex; flex-direction: column; gap: 4px; background: #fff7ed; border: 1px solid #fdba74; border-radius: var(--r-card); padding: .875rem 1rem; margin-bottom: 1rem; }
.ahora-header { display: flex; align-items: center; gap: .5rem; }
.ahora-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 .5rem; border-radius: 10px; background: #ea580c; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .03em; flex-shrink: 0; }
.ahora-stage-name { font-size: 12px; font-weight: 600; color: #9a3412; }
.ahora-accion { font-size: .9rem; font-weight: 500; color: #431407; }
.ahora-resp { font-size: 12px; color: #9a3412; display: flex; align-items: center; gap: .25rem; }

/* Episode sections (replacing tabs) */
.ep-section { margin-bottom: .75rem; overflow: hidden; }
.ep-section-hdr { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; cursor: default; }
.ep-section-title { font-size: .875rem; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: .4rem; flex: 1; }
.ep-section-badge { font-size: 11px; font-weight: 500; padding: .15rem .45rem; border-radius: 20px; border: 1px solid; white-space: nowrap; }
.ep-section-toggle { background: none; border: none; padding: .2rem; cursor: pointer; color: var(--muted); border-radius: 4px; line-height: 1; transition: transform .2s, color .15s; flex-shrink: 0; }
.ep-section-toggle:hover { color: var(--ink); }
.ep-section-toggle.ep-section-collapsed { transform: rotate(180deg); }
.ep-section-body { padding: 0 1rem 1rem; }

/* ── Entregables ────────────────────────────────────── */

/* Grid */
.entregables-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.entregables-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 2rem; color: var(--muted); font-size: 13px; width: 100%; }

/* Tarjeta de entregable */
.entregable-card { display: flex; flex-direction: column; width: 152px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); cursor: pointer; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.entregable-card:hover { border-color: var(--ink-2); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.entregable-card--new { align-items: center; justify-content: center; min-height: 140px; background: none; border-style: dashed; }
.entregable-card--new:hover { border-color: var(--muted); background: var(--surface-2); }
.entregable-thumb { position: relative; width: 100%; aspect-ratio: 16/10; background: #f0f0f0; overflow: hidden; }
.entregable-thumb img { width: 100%; height: 100%; object-fit: cover; }
.entregable-thumb-icon { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: 24px; }
.entregable-duracion { position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; padding: 1px 4px; border-radius: 3px; font-family: 'Space Mono', monospace; }
.entregable-card-body { padding: 8px; flex: 1; }
.entregable-label { font-size: 10px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.entregable-titulo { font-size: 12px; font-weight: 500; color: var(--ink); line-height: 1.35; margin-bottom: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entregable-badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 9px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.entregable-badge-pedido     { background: var(--surface-2); color: var(--muted); }
.entregable-badge-edicion    { background: #eff6ff; color: #1d4ed8; }
.entregable-badge-revisar    { background: #fff7ed; color: #c2410c; }
.entregable-badge-aprobado   { background: #f0fdf4; color: #166534; }
.entregable-badge-programado { background: #f0fdf4; color: #166534; }
.entregable-badge-publicado  { background: #f0fdf4; color: #14532d; }
.entregable-card-actions { display: flex; gap: 4px; padding: 0 8px 8px; }
.entregable-btn-aprobar { background: #16a34a; color: #fff; border: none; }
.entregable-btn-aprobar:hover { background: #15803d; }

/* Panel overlay + slide-in */
.entregable-panel-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.15); backdrop-filter: blur(2px); z-index: 300; }
.entregable-panel-overlay.show { display: block; }
.entregable-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 100vw; background: var(--surface); border-left: 1px solid var(--line); z-index: 301; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; }
.entregable-panel.open { transform: translateX(0); }

/* Panel interior */
.ent-panel-hdr { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.ent-panel-hdr-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ent-panel-breadcrumb { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.ent-panel-titulo { font-size: 1.2rem; font-weight: 700; padding: 12px 20px 0; line-height: 1.25; }
.ent-panel-body { padding: 12px 20px 0; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.ent-panel-preview { border-radius: var(--r-card); overflow: hidden; background: #f3f4f6; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }
.ent-panel-preview img { width: 100%; height: 100%; object-fit: cover; }
.ent-panel-no-thumb { font-size: 40px; color: var(--muted); }
.ent-panel-link-file { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); }
.ent-meta-row { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin-bottom: 4px; }
.ent-meta-label { min-width: 60px; font-size: 11px; font-weight: 600; color: var(--muted); padding-top: 1px; }
.ent-meta-val { color: var(--ink); }
.ent-meta-val code { font-family: 'Space Mono', monospace; font-size: 12px; background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }

/* Estados en el panel */
.ent-estados { display: flex; flex-direction: column; gap: 4px; }
.ent-estado-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 2px 0; }
.ent-estado-icon { font-size: 16px; width: 20px; flex-shrink: 0; }
.ent-estado-done .ent-estado-icon { color: #16a34a; }
.ent-estado-active .ent-estado-icon { color: #ea580c; }
.ent-estado-pending .ent-estado-icon { color: var(--muted); }
.ent-estado-done .ent-estado-label { color: var(--ink); }
.ent-estado-active .ent-estado-label { font-weight: 600; color: var(--ink); }
.ent-estado-pending .ent-estado-label { color: var(--muted); }
.ent-estado-resp { margin-left: auto; font-size: 11px; color: var(--muted); }

/* Archivo en el panel */
.ent-archivo-section { display: flex; flex-direction: column; gap: 6px; }
.ent-archivo-row { display: flex; align-items: center; gap: 8px; padding: 8px; background: var(--surface-2); border-radius: var(--r-ctl); font-size: 12px; }
.ent-archivo-name { flex: 1; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ent-link-form { display: flex; gap: 6px; }

/* Comentarios en panel */
.ent-section-title { font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.ent-comentarios { display: flex; flex-direction: column; gap: 8px; }
.ent-comentario { display: flex; gap: 8px; font-size: 13px; }
.ent-comentario-body { flex: 1; }
.ent-comentario-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.ent-comentario-texto { color: var(--ink); line-height: 1.4; }
.ent-comentar-form { display: flex; gap: 6px; }

/* Historial en panel */
.ent-historial { display: flex; flex-direction: column; gap: 4px; padding-bottom: 8px; }
.ent-log-row { display: flex; justify-content: space-between; align-items: flex-start; font-size: 12px; gap: 8px; }
.ent-log-texto { color: var(--muted); }
.ent-log-fecha { color: var(--faint); white-space: nowrap; }

/* Footer de acciones del panel */
.ent-panel-footer { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 20px; display: flex; flex-direction: column; gap: 8px; }
.ent-btn-aprobar { background: #16a34a; color: #fff; border: none; border-radius: var(--r-ctl); padding: 0 20px; height: 40px; font-weight: 600; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ent-btn-aprobar:hover { background: #15803d; }
.ent-pedir-cambios-wrap { }

/* Mobile: panel full width */
@media (max-width: 600px) {
  .entregable-panel { width: 100vw; }
  .entregable-card { width: calc(50% - 6px); }
}

/* Sección entregables en detail */
.ep-entregables-section { margin-bottom: .75rem; }
.ep-sec-count { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 0 7px; height: 20px; line-height: 20px; }

/* ── Quick actions — YouTube ────────────────────────────────── */
.pub-yt-actions { display:flex;justify-content:flex-end;padding:.5rem 0 1rem;gap:.5rem; }
.yt-copy-btn,.yt-generar-btn { font-size:12px; }
.yt-copy-btn:hover { background:var(--red,#E53E19)!important;color:#fff!important;border-color:var(--red,#E53E19)!important; }

/* Toast de confirmación de copiado */
.copy-toast { position:fixed;bottom:1.5rem;left:50%;transform:translateX(-50%);background:#111;color:#fff;font-size:13px;padding:.5rem 1.25rem;border-radius:99px;z-index:3000;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .2s; }
.copy-toast.show { opacity:1; }

/* Modal de shortcuts */
.shortcuts-overlay { position:fixed;inset:0;background:rgba(0,0,0,.4);backdrop-filter:blur(2px);z-index:1000; }
.shortcuts-modal { position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:1001;width:min(500px,92vw);background:var(--paper);border:1px solid var(--line);border-radius:var(--r-card);box-shadow:0 24px 64px rgba(0,0,0,.2);overflow:hidden; }
.shortcuts-hdr { display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem;border-bottom:1px solid var(--line); }
.shortcuts-title { font-size:15px;font-weight:600; }
.shortcuts-body { padding:1.25rem;display:flex;flex-direction:column;gap:.25rem; }
.shortcuts-group { font-size:10px;font-weight:700;color:var(--muted);margin:.75rem 0 .25rem; }
.shortcut-row { display:flex;align-items:center;justify-content:space-between;padding:.3rem 0;font-size:13px; }
.shortcut-desc { color:var(--ink); }
.shortcut-keys { display:flex;gap:.25rem; }
.shortcut-key { font-size:11px;background:var(--surface-2);border:1px solid var(--line);border-bottom:2px solid var(--line);border-radius:4px;padding:1px 7px;font-family:monospace;color:var(--muted); }

/* ── Menciones @usuario ─────────────────────────────────────── */
.mencion { color:var(--brand,#ea580c);font-weight:600;cursor:default; }
.mention-dropdown { position:fixed;z-index:2000;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-card);box-shadow:0 8px 24px rgba(0,0,0,.12);min-width:200px;overflow:hidden; }
.mention-item { display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;cursor:pointer;font-size:13px; }
.mention-item:hover,.mention-item.activo { background:var(--surface-2); }
.mention-av { width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#fff;flex-shrink:0; }
.mention-username { font-weight:600;color:var(--ink); }
.mention-nombre { color:var(--muted);font-size:12px; }

/* ── Buscador global ⌘K ─────────────────────────────────────── */
.buscar-overlay { position:fixed;inset:0;background:rgba(0,0,0,.35);backdrop-filter:blur(2px);z-index:1000; }
.buscar-modal { position:fixed;top:15vh;left:50%;transform:translateX(-50%);z-index:1001;width:min(600px,92vw);display:flex;flex-direction:column; }
.buscar-modal-inner { background:var(--paper);border:1px solid var(--line);border-radius:var(--r-card);box-shadow:0 24px 64px rgba(0,0,0,.18);overflow:hidden; }
.buscar-input-row { display:flex;align-items:center;gap:.625rem;padding:.75rem 1rem;border-bottom:1px solid var(--line); }
.buscar-icon { font-size:18px;color:var(--muted);flex-shrink:0; }
.buscar-input { flex:1;border:none;background:transparent;font-size:16px;color:var(--ink);outline:none; }
.buscar-input::placeholder { color:var(--muted); }
.buscar-esc { font-size:11px;color:var(--muted);background:var(--surface-2);border:1px solid var(--line);border-radius:4px;padding:2px 6px;cursor:pointer;flex-shrink:0; }
.buscar-drop { max-height:380px;overflow-y:auto; }
.buscar-hint,.buscar-vacio { padding:1rem;font-size:13px;color:var(--muted);text-align:center; }
.buscar-resultados { display:flex;flex-direction:column; }
.buscar-resultado { display:flex;align-items:center;gap:.75rem;padding:.625rem 1rem;text-decoration:none;color:var(--ink);border-bottom:1px solid var(--faint);transition:background .1s; }
.buscar-resultado:hover,.buscar-resultado:focus { background:var(--surface-2);outline:none; }
.buscar-resultado:last-child { border-bottom:none; }
.buscar-resultado-icon { width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--surface-2);border-radius:8px;font-size:16px;color:var(--muted);flex-shrink:0; }
.buscar-resultado--episodio .buscar-resultado-icon { color:var(--brand,#ea580c); }
.buscar-resultado--invitado .buscar-resultado-icon { color:var(--red,#e53e19); }
.buscar-resultado-body { flex:1;min-width:0; }
.buscar-resultado-titulo { display:block;font-size:14px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.buscar-resultado-sub { display:block;font-size:12px;color:var(--muted); }
.buscar-resultado-tipo { font-size:10px;font-weight:600;color:var(--muted);flex-shrink:0; }

/* ── "Te toca a vos" + "Para revisar" en dashboard ─────────── */
.dash-te-toca { margin-bottom:1rem; }
.dash-te-toca-lista { display:flex;flex-direction:column;gap:.375rem; }
.tte-item { display:flex;align-items:center;gap:.625rem;padding:.5rem .75rem;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-card);text-decoration:none;color:var(--ink); }
.tte-item:hover { background:var(--surface-3); }
.tte-badge { font-size:10px;font-weight:700;padding:2px 7px;border-radius:10px; }
.tte-badge-pedido { background:#f1f5f9;color:#475569; }
.tte-badge-en_edicion { background:#fef3c7;color:#92400e; }
.tte-badge-para_revisar { background:#dbeafe;color:#1e40af; }
.tte-titulo { flex:1;min-width:0;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.tte-ep { font-size:11px;color:var(--muted);flex-shrink:0; }
.dash-para-revisar-grid { display:flex;flex-wrap:wrap;gap:.5rem; }
.pr-card { display:flex;flex-direction:column;width:calc(50% - .25rem);background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-card);overflow:hidden;cursor:pointer; }
.pr-card:hover { border-color:var(--brand,#ea580c); }
.pr-thumb { aspect-ratio:16/9;background:var(--surface-3);display:flex;align-items:center;justify-content:center;font-size:24px;color:var(--muted); }
.pr-thumb img { width:100%;height:100%;object-fit:cover; }
.pr-body { padding:.375rem .5rem; }
.pr-label { font-size:11px;font-weight:600;color:var(--muted); }
.pr-titulo { font-size:12px;font-weight:500; }
.pr-acciones { display:flex;gap:.25rem;padding:.375rem .5rem;border-top:1px solid var(--faint); }
.pr-btn-aprobar { flex:1;font-size:11px;background:#d1fae5;color:#065f46;border:none;border-radius:var(--r-ctl);padding:.25rem;cursor:pointer;font-weight:600; }
.pr-btn-aprobar:hover { background:#a7f3d0; }
.pr-btn-cambios { flex:1;font-size:11px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-ctl);padding:.25rem;cursor:pointer; }

/* ── Perfil de usuario ──────────────────────────────────────── */
.perfil-layout { display:grid;grid-template-columns:1fr 360px;gap:1.5rem;align-items:start; }
@media (max-width:900px) { .perfil-layout { grid-template-columns:1fr; } }
.perfil-card { padding:1.5rem; }
.perfil-avatar-wrap { display:flex;align-items:center;gap:1.25rem;margin-bottom:1.5rem; }
.perfil-avatar { width:72px;height:72px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:700;color:#fff;flex-shrink:0;overflow:hidden; }
.perfil-avatar-img { width:100%;height:100%;object-fit:cover; }
.perfil-nombre { font-size:18px;font-weight:600;margin-bottom:2px; }
.perfil-username { font-size:13px;color:var(--muted);margin-bottom:6px; }
.perfil-rol-badge { display:inline-block;font-size:11px;font-weight:600;padding:2px 8px;border-radius:10px;}
.perfil-stats-row { display:flex;gap:1.5rem;padding:.75rem 0 1.25rem;border-top:1px solid var(--faint);border-bottom:1px solid var(--faint);margin-bottom:1.25rem; }
.perfil-stat { text-align:center; }
.perfil-stat-n { display:block;font-size:24px;font-weight:700; }
.perfil-stat-lbl { display:block;font-size:11px;color:var(--muted);}
.perfil-form { margin-top:.5rem; }
.perfil-actividad-list { display:flex;flex-direction:column;gap:.75rem; }
.perfil-act-row { display:flex;align-items:flex-start;gap:.625rem; }
.perfil-act-badge { flex-shrink:0;margin-top:1px; }
.perfil-act-body { flex:1;min-width:0; }
.perfil-act-desc { font-size:13px;color:var(--ink); }
.perfil-act-ep { font-size:11px;color:var(--brand,#ea580c);text-decoration:none; }
.perfil-act-ep:hover { text-decoration:underline; }
.perfil-act-time { font-size:11px;color:var(--muted); }

/* Drive + Calendar block */
.drive-cal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.drive-cal-col { display: flex; flex-direction: column; gap: .5rem; }
.drive-cal-subtitle { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: .25rem; }
.drive-carpeta-link { display: flex; align-items: center; gap: .5rem; padding: .625rem .75rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctl); text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 500; }
.drive-carpeta-link:hover { background: var(--surface-3); }
.drive-subcarpetas { display: flex; gap: .375rem; flex-wrap: wrap; margin-top: .375rem; }
.drive-sub-link { display: inline-flex; align-items: center; gap: .25rem; font-size: 11px; font-weight: 600; padding: .25rem .5rem; background: var(--faint); border: 1px solid var(--line); border-radius: var(--r-ctl); text-decoration: none; color: var(--muted); }
.drive-sub-link:hover { color: var(--ink); background: var(--surface-2); }
.drive-empty { display: flex; align-items: center; gap: .75rem; }
.drive-archivos-lista { display: flex; flex-direction: column; gap: .25rem; }
.drive-archivo-row { display: flex; align-items: center; gap: .5rem; font-size: 12px; }
.drive-archivo-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; }
.drive-archivo-name:hover { text-decoration: underline; }
.drive-archivo-fecha { font-size: 11px; white-space: nowrap; }
.cal-evento { display: flex; align-items: center; gap: .5rem; font-size: 13px; padding: .375rem 0; border-bottom: 1px solid var(--faint); }
.cal-evento:last-child { border-bottom: none; }
.cal-add-btn { margin-left: auto; }
@media (max-width: 600px) {
  .drive-cal-grid { grid-template-columns: 1fr; }
}

/* Archivos grid */
.archivos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.75rem; }
.archivos-grid-full { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.archivo-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: border-color 0.15s;
  background: var(--surface); display: block;
}
.archivo-card:hover { border-color: var(--ink); }
.archivo-card-icon {
  height: 90px; display: flex; align-items: center; justify-content: center;
  background: var(--bg); font-size: 2rem; color: var(--text-muted);
}
.archivo-card-icon.imagen { background: var(--fill); }
.archivo-thumbnail { width: 100%; height: 100%; object-fit: cover; }
.archivo-card-info { padding: 0.5rem 0.6rem; }
.archivo-card-nombre { font-size: 0.78rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archivo-card-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }
.archivo-card-fecha { font-size: 0.68rem; color: var(--text-muted); }
.archivo-comments { position: absolute; top: 0.4rem; right: 0.4rem; font-size: 0.7rem; color: var(--text-muted); }

/* Wrapper con botón de eliminar sobre la card */
.archivo-card-wrap { position: relative; }
.archivo-card-delete {
  position: absolute;
  top: 0.4rem; right: 0.4rem;
  background: rgba(230, 57, 70, 0.85);
  color: white; border: none; border-radius: var(--radius-sm);
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.8rem;
  opacity: 0; transition: opacity 0.15s;
  z-index: 2;
}
.archivo-card-wrap:hover .archivo-card-delete { opacity: 1; }
.archivo-card-delete:hover { background: var(--accent); }

/* Archivo detail */
.archivo-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; align-items: start; }
.preview-imagen { max-width: 100%; border-radius: var(--radius); }

.preview-placeholder { text-align: center; padding: 3rem 1rem; }
.preview-placeholder i { font-size: 3rem; color: var(--text-muted); display: block; margin-bottom: 0.75rem; }
.preview-filename { font-size: 1rem; font-weight: 500; margin-bottom: 1rem; }

/* Toolbar sobre el preview */
.preview-toolbar {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.75rem; flex-wrap: wrap;
}
.preview-type-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 0.2rem 0.65rem;
  font-size: 0.78rem; font-weight: 500; color: var(--text-muted);
}

/* Render de Word (mammoth) */
.doc-render-area {
  min-height: 200px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  background: var(--surface);
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #111;
  max-height: 70vh;
  overflow-y: auto;
}
/* Estilos para el HTML generado por mammoth */
.doc-render-area h1 { font-size: 1.5rem; font-weight: 700; margin: 0.75rem 0 0.35rem; }
.doc-render-area h2 { font-size: 1.25rem; font-weight: 600; margin: 0.65rem 0 0.3rem; }
.doc-render-area h3 { font-size: 1.1rem; font-weight: 600; margin: 0.5rem 0 0.25rem; }
.doc-render-area p  { margin-bottom: 0.65rem; }
.doc-render-area table { border-collapse: collapse; width: 100%; margin: 0.75rem 0; }
.doc-render-area td, .doc-render-area th {
  border: 1px solid #ccc; padding: 0.35rem 0.6rem; font-size: 0.9rem;
}
.doc-render-area th { background: #f5f5f5; font-weight: 600; }
.doc-render-area ul, .doc-render-area ol { margin: 0.4rem 0 0.65rem 1.5rem; }
.doc-render-area li { margin-bottom: 0.2rem; }
.doc-render-area strong, .doc-render-area b { font-weight: 700; }
.doc-render-area em, .doc-render-area i { font-style: italic; }
.doc-render-area img { max-width: 100%; height: auto; }

/* Render de TXT */
.txt-render-area {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  background: #1e1e2e;
  color: #CDD6F4;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 60vh;
  overflow-y: auto;
}

/* Audio preview */
.preview-audio {
  text-align: center;
  padding: 2.5rem 1rem;
}
.preview-audio audio {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.archivo-nombre { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; }
.archivo-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.75rem; font-size: 0.825rem; }
.meta-label { color: var(--text-muted); display: block; font-size: 0.7rem; }
.archivo-descripcion { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }

/* Upload */
.upload-context-banner { background: var(--fill); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 1rem; margin-bottom: 1rem; font-size: 0.875rem; color: var(--mute); display: flex; align-items: center; gap: 0.4rem; }
.upload-tip { background: var(--bg); border-radius: var(--radius-sm); padding: 0.6rem 0.75rem; font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: flex-start; gap: 0.4rem; margin-top: 0.5rem; }

/* ── Kanban ───────────────────────────────────────────── */
.kanban-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; align-items: start; }
.kanban-col { background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border); }
.kanban-col-header { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 0.9rem; background: var(--surface); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.kanban-col-title { font-size: 0.875rem; font-weight: 600; }
.kanban-col-count { background: var(--border); color: var(--text-muted); border-radius: 20px; padding: 0.1rem 0.5rem; font-size: 0.72rem; font-weight: 600; }
.kanban-col-desc { font-size: 0.72rem; color: var(--text-muted); padding: 0.35rem 0.9rem 0; }
.kanban-col-body { padding: 0.5rem; display: flex; flex-direction: column; gap: 0.5rem; min-height: 150px; }
.kanban-empty { text-align: center; padding: 1.5rem 0.5rem; font-size: 0.8rem; color: var(--text-muted); }
.kanban-card { background: var(--surface); border-radius: 6px; border: 1px solid var(--border); padding: 0.65rem 0.75rem; box-shadow: var(--shadow); }
.kanban-card-name { font-weight: 600; font-size: 0.875rem; margin-bottom: 0.2rem; color: inherit; text-decoration: none; display: block; }
.kanban-card-name:hover { color: var(--ink); text-decoration: underline; }
.kanban-card-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.3rem; }
.tag-chip-sm {
  background: var(--fill); color: var(--ink);
  border-radius: 20px; padding: 0.1rem 0.45rem;
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.2px;
}
.kanban-card-perfil { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.kanban-card-ep { font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.25rem; margin-bottom: 0.2rem; }
.kanban-card-contacto { font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.25rem; }
.kanban-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; padding-top: 0.4rem; border-top: 1px solid var(--border); }
.kanban-card-actions { display: flex; gap: 0.1rem; }
.estado-select-mini { font-size: 0.72rem; border: 1px solid var(--border); border-radius: 4px; padding: 0.15rem 0.3rem; background: var(--bg); cursor: pointer; }

/* Invitados chips */
.invitados-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.invitado-chip { display: flex; align-items: center; gap: 0.4rem; background: var(--bg); border-radius: var(--radius); padding: 0.3rem 0.6rem; font-size: 0.8rem; }

/* ── Comentarios ─────────────────────────────────────── */
.episode-comments, .archivo-comments { position: sticky; top: calc(var(--topbar-h) + 1rem); }
.comments-panel { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.comments-header { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; font-weight: 600; display: flex; align-items: center; gap: 0.4rem; background: var(--surface-2); }
#comments-list, #file-comments-list { padding: 0.75rem 1rem; max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 0; }
.comentario { padding: 0.6rem 0; border-bottom: 1px solid var(--bg); }
.comentario:last-child { border-bottom: none; }
.comentario-reply { margin-left: 1rem; padding-left: 0.75rem; border-left: 2px solid var(--border); }
.comentario-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.mini-avatar { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 0.65rem; flex-shrink: 0; }
.comentario-meta { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; font-size: 0.78rem; }
.comentario-rol { font-size: 0.7rem; }
.comentario-time { font-size: 0.7rem; color: var(--text-muted); }
.comentario-texto { font-size: 0.85rem; line-height: 1.5; margin-left: 1.6rem; }
.comentario-replies { margin-top: 0.5rem; }
.comentario-actions { margin-left: auto; }
.btn-reply { background: none; border: none; cursor: pointer; font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.25rem; margin-left: 1.6rem; margin-top: 0.35rem; transition: color 0.1s; }
.btn-reply:hover { color: var(--accent); }
.reply-textarea { width: 100%; padding: 0.35rem 0.5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.8rem; resize: none; }
.comment-form-wrap { border-top: 1px solid var(--border); padding: 0.75rem; }
.comment-form-wrap textarea { width: 100%; padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.875rem; resize: none; }
.comment-form-wrap textarea:focus { outline: none; border-color: var(--accent); }
.comment-form-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; }
.comment-form-user { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--text-muted); }

/* ── Users ───────────────────────────────────────────── */
.users-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.user-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); padding: 1rem; box-shadow: var(--shadow); }
.user-card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.user-avatar-lg { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-avatar-lg.placeholder { display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 1.1rem; }
.user-card-name { font-weight: 600; }
.user-card-username { font-size: 0.78rem; color: var(--text-muted); }
.user-card-meta { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.user-card-bio { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.user-card-actions { display: flex; gap: 0.4rem; }

/* ── Tags widget ─────────────────────────────────────── */
.tags-widget {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.tags-widget:focus-within { border-color: var(--accent); }

/* Área de chips seleccionados */
.tags-selected-area {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  min-height: 28px; align-items: center;
}
.tags-empty-hint { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }

.tag-chip-active {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #1A1A2E; color: white;
  border-radius: 20px; padding: 0.2rem 0.35rem 0.2rem 0.65rem;
  font-size: 0.8rem; font-weight: 500;
}
.tag-chip-remove {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.6); display: flex; align-items: center;
  padding: 0.1rem; border-radius: 50%;
  transition: color 0.1s, background 0.1s;
  font-size: 0.75rem;
}
.tag-chip-remove:hover { color: white; background: rgba(255,255,255,0.15); }
.tag-chip-remove i { font-size: 0.75rem; }

/* Botones predefinidos */
.tags-predefined-row {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}
.tag-predefined-btn {
  background: var(--bg); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 0.25rem 0.75rem; font-size: 0.8rem;
  cursor: pointer; font-family: inherit; font-weight: 500;
  transition: all 0.15s;
}
.tag-predefined-btn:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--surface);
}
.tag-predefined-btn.active {
  background: var(--primary); color: white;
  border-color: var(--primary);
}

/* Input para tag personalizado */
.tags-custom-row {
  display: flex; gap: 0.4rem; align-items: center;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}
.tags-custom-input {
  flex: 1; padding: 0.35rem 0.6rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.875rem; font-family: inherit;
  background: var(--bg);
}
.tags-custom-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }

/* ── Login ───────────────────────────────────────────── */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--primary);
}
.login-card {
  background: var(--surface); border-radius: var(--radius); padding: 2rem 2.5rem;
  width: 100%; max-width: 380px; box-shadow: var(--shadow-md);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo .logo-plus { font-size: 2rem; }
.login-logo .logo-name { font-size: 1.5rem; color: var(--primary); }
.login-subtitle { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }
.login-card .form-group input { padding: 0.65rem 0.75rem; font-size: 0.9rem; }

/* ── Empty states ────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; opacity: 0.35; }
.empty-state p { margin-bottom: 1rem; }
.empty-state-sm { text-align: center; padding: 1.25rem 0.5rem; color: var(--text-muted); font-size: 0.85rem; }
.empty-state-sm i { font-size: 1.5rem; display: block; margin-bottom: 0.35rem; opacity: 0.35; }

/* ── Misc ────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ── Dashboard nuevo ────────────────────────────────── */

/* 4 métricas superiores */
.metrics-grid-3 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

/* 4 secciones de episodios */
.ep-sections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ep-section { padding: 0; overflow: hidden; }

.ep-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--border);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.ep-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.ep-section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ep-section-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

.ep-section-count {
  background: var(--border);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 0.1rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
}

.ep-section-ver-todos {
  font-size: 0.78rem;
  color: var(--accent);
  flex-shrink: 0;
}

.ep-section-list {
  display: flex;
  flex-direction: column;
}

.ep-section-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--bg);
  transition: background 0.1s;
  color: var(--text);
}
.ep-section-row:last-child { border-bottom: none; }
.ep-section-row:hover { background: var(--surface-2); }
.ep-section-row.muted { opacity: 0.75; }
.ep-section-row.muted:hover { opacity: 1; }

.ep-row-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 44px;
  flex-shrink: 0;
  }
.ep-row-info { flex: 1; min-width: 0; }
.ep-row-tema { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-row-meta { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.1rem; font-size: 0.72rem; color: var(--text-muted); flex-wrap: wrap; }
.ep-row-progress { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.ep-row-pct { font-size: 0.7rem; color: var(--text-muted); width: 28px; text-align: right; }
.ep-row-rocket { font-size: 1.1rem; color: #10B981; flex-shrink: 0; }
.ep-row-check { font-size: 1.1rem; color: #9CA3AF; flex-shrink: 0; }

.ep-section-empty {
  padding: 1.25rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ep-section-empty i { font-size: 1rem; opacity: 0.6; }

.ep-section-add {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  background: var(--surface-2);
  transition: color 0.1s, background 0.1s;
}
.ep-section-add:hover { color: var(--accent); background: #FFF5F5; }

/* Grid de actividad */
.activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.activity-role {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--bg);
}

.archivo-activity-row { color: var(--text); }
.archivo-activity-row:hover { background: var(--surface-2); }
.archivo-activity-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Producción ─────────────────────────────────────── */
.prod-page { max-width: 960px; }
.prod-progress-bar { margin-bottom: 1rem; }

/* Bloque header con dot de color */
.bloque-header-left { display: flex; align-items: center; gap: 0.5rem; }
.bloque-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.bloque-dot-num-1 { background: #3B82F6; }
.bloque-dot-num-2 { background: #F59E0B; }
.bloque-dot-num-3 { background: #8B5CF6; }
.bloque-dot-num-4 { background: #10B981; }
.bloque-dot-num-5 { background: #E63946; }
.bloque-dot-num-6 { background: #6B7280; }
.bloque-num { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.bloque-subtitle { font-size: 0.72rem; color: var(--text-muted); font-weight: 400; }
.bloque-count-badge {
  background: var(--border); color: var(--text-muted);
  border-radius: 20px; padding: 0.1rem 0.55rem;
  font-size: 0.75rem; font-weight: 600;
}

/* Sub-bloques dentro de un bloque */
.sub-bloque-header {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted);
  padding: 0.6rem 0 0.3rem;
  display: flex; align-items: center; gap: 0.35rem;
  border-top: 1px solid var(--bg);
  margin-top: 0.5rem;
}
.sub-bloque-header:first-child { border-top: none; margin-top: 0; }
.sub-bloque-divider { height: 1px; background: var(--border); margin: 0.75rem 0; }

/* Item label row con badge */
.item-label-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* Badge de count de archivos (siempre visible) */
.item-file-count {
  display: inline-flex; align-items: center; gap: 0.2rem;
  background: #EDF7F2; color: var(--c-publicacion);
  border: 1px solid var(--c-publicacion);
  border-radius: 20px; padding: 0.1rem 0.45rem;
  font-size: 0.7rem; font-weight: 600;
  white-space: nowrap;
}
.item-file-count i { font-size: 0.7rem; }

/* Item con archivos adjuntos — borde izquierdo */
.checklist-item.has-files {
  border-left: 3px solid var(--c-publicacion);
  padding-left: 0.5rem;
}

/* Item template hint */
.item-template-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.15rem;
  display: flex; align-items: center; gap: 0.25rem;
}
.item-template-hint i { font-size: 0.75rem; }

/* Botón de upload cuando ya tiene archivos */
.has-file-btn { color: var(--c-publicacion) !important; }
.has-file-btn:hover { background: #EDF7F2 !important; }

/* Fila de archivos adjuntos — debajo del label */
.item-archivos-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.45rem 0 0.2rem 2rem;
  padding: 0.5rem 0.65rem;
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}
.item-archivos-label {
  font-size: 0.72rem; font-weight: 600;
  color: var(--c-publicacion); white-space: nowrap;
  display: flex; align-items: center; gap: 0.2rem;
  padding-top: 0.1rem;
}
.item-archivos-list {
  display: flex; flex-wrap: wrap; gap: 0.4rem; flex: 1;
}
.item-archivo-pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px; padding: 0.2rem 0.6rem;
  font-size: 0.78rem; font-weight: 500;
  text-decoration: none;
  transition: border-color 0.12s;
}
.item-archivo-pill:hover { border-color: var(--ink); }
.item-archivo-pill i { font-size: 0.9rem; }
.pill-size { font-size: 0.68rem; color: var(--faint); margin-left: 0.1rem; }

/* Wrapper pill con botón de eliminar */
.pill-wrapper { display: inline-flex; align-items: center; gap: 0.2rem; }
.pill-delete {
  background: none; border: none; cursor: pointer;
  color: var(--faint); padding: 0.1rem 0.2rem;
  border-radius: 4px; font-size: 0.8rem;
  display: flex; align-items: center;
  transition: color 0.12s, background 0.12s;
}
.pill-delete:hover { color: var(--accent); background: #FFF5F5; }

/* Upload inline form */
.upload-inline-form {
  display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
  padding: 0.5rem; background: var(--bg); border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}

/* Roster de invitados */
.roster-header { background: var(--fill) !important; }
.roster-header:hover { background: var(--line) !important; }

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.roster-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
}

.roster-card-header {
  display: flex; align-items: flex-start; gap: 0.5rem;
  margin-bottom: 0.35rem; flex-wrap: wrap;
}
.roster-card-name { font-weight: 600; font-size: 0.9rem; color: inherit; text-decoration: none; }
.roster-card-name:hover { color: var(--ink); text-decoration: underline; }

.roster-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.tag-chip {
  background: var(--fill); color: var(--ink);
  border-radius: 20px; padding: 0.1rem 0.45rem;
  font-size: 0.7rem; font-weight: 500;
}

.roster-card-perfil { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.roster-card-contacto { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.25rem; margin-bottom: 0.2rem; }
.roster-card-notas { font-size: 0.75rem; color: var(--text-muted); font-style: italic; background: var(--bg); padding: 0.25rem 0.4rem; border-radius: 4px; margin-bottom: 0.35rem; }

.roster-assign-form {
  display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
  margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border);
}
.roster-ep-select {
  flex: 1; min-width: 140px;
  padding: 0.3rem 0.5rem; border: 1px solid var(--border);
  border-radius: 4px; font-size: 0.78rem; font-family: inherit;
  background: var(--surface);
}
.roster-ep-select:focus { outline: none; border-color: var(--accent); }

/* prod-checklist más compacta */
.prod-item .item-actions { gap: 0.2rem; }

/* ── Print ───────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .bloque-header .btn-icon, .add-item-form { display: none !important; }
  .main-wrapper { margin-left: 0 !important; }
  .bloque-body { display: block !important; }
}

/* ── Panel de traslado expandible ───────────────────── */
.seg-row-wrap { display: flex; flex-direction: column; }

.traslado-detail-btn { color: #CBD5E1; }
.traslado-detail-btn.has-data { color: var(--info); }
.traslado-detail-btn:hover { color: var(--info) !important; }

.traslado-panel-wrap {
  margin: 0 0.25rem 0.5rem;
  border-left: 3px solid var(--info);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.traslado-panel {
  background: var(--fill); border: 1px solid var(--line);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
}

.traslado-panel-header {
  font-size: 0.8rem; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 0.4rem;
  margin-bottom: 0.625rem;
}

.traslado-panel-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
}

.traslado-field { display: flex; flex-direction: column; gap: 0.2rem; }
.traslado-field-full { grid-column: 1 / -1; }

.traslado-label {
  font-size: 0.72rem; font-weight: 600;
  color: var(--mute); }

.traslado-input {
  font-size: 0.85rem; font-family: inherit;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink); width: 100%;
  transition: border-color .15s;
}
.traslado-input:focus { outline: none; border-color: var(--ink); }
.traslado-input::placeholder { color: var(--faint); }

.traslado-textarea { resize: vertical; min-height: 3rem; }

.traslado-ro {
  font-size: 0.85rem; color: var(--text);
  padding: 0.2rem 0;
}

/* ── Secciones de Preproducción ──────────────────────── */
.prepro-section {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.prepro-section:last-child { border-bottom: none; }

.prepro-bloque-header {
  font-size: 0.95rem; font-weight: 700;
  color: var(--text);
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.prepro-section-title {
  font-size: 0.72rem; font-weight: 700;
  color: var(--text-muted); margin-bottom: 0.625rem;
}

.prepro-auto-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0; color: var(--text-muted);
}
.prepro-auto-item.done { color: var(--text); }
.prepro-auto-icon { font-size: 1.1rem; flex-shrink: 0; }
.prepro-auto-item.done .prepro-auto-icon { color: var(--success); }
.prepro-auto-label { font-size: 0.875rem; font-weight: 500; }
.prepro-auto-badge {
  margin-left: auto; font-size: 0.75rem; font-weight: 600;
  background: #EDF7F2; color: var(--c-publicacion);
  border: 1px solid var(--c-publicacion); border-radius: 20px; padding: 0.1rem 0.5rem;
}
.prepro-auto-hint { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }

/* Fechas de rodaje inline */
#fecha-rodaje-{ padding: 0; }

.prepro-fecha-item {
  margin: 0.5rem 0;
  padding: 0.5rem 0;
  border-top: 1px solid var(--bg);
}
.prepro-fecha-item:first-child { border-top: none; }

/* Fechas tentativas */
.fecha-tent-list {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.fecha-tent-chip {
  display: flex; align-items: center; gap: 0.3rem;
  background: var(--fill); border: 1px solid var(--line);
  border-radius: 6px; padding: 0.2rem 0.5rem;
  font-size: 0.8rem; font-weight: 500; color: var(--mute);
}
.fecha-tent-remove {
  background: none; border: none; cursor: pointer;
  color: var(--c-rodaje); padding: 0; line-height: 1;
  display: flex; align-items: center;
  opacity: 0.6; transition: opacity .15s;
}
.fecha-tent-remove:hover { opacity: 1; }
.fecha-tent-remove .ti { font-size: 0.75rem; }
.fecha-tent-confirm {
  background: none; border: none; cursor: pointer;
  color: var(--c-publicacion); padding: 0; line-height: 1;
  opacity: 0.6; transition: opacity .15s;
}
.fecha-tent-confirm:hover { opacity: 1; }
.fecha-tent-confirm .ti { font-size: 0.75rem; }
.fecha-tent-form {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  margin-top: 0.35rem;
}

.prepro-fecha-label {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.875rem; font-weight: 500; margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.prepro-fecha-input {
  width: 100%; font-size: 0.85rem; font-family: inherit;
  padding: 0.35rem 0.5rem; resize: none; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
  transition: border-color .15s, background .15s;
}
.prepro-fecha-input:hover { border-color: #94a3b8; background: var(--surface); }
.prepro-fecha-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.prepro-fecha-input::placeholder { color: #CBD5E1; font-style: italic; }

.prepro-fecha-ro {
  font-size: 0.85rem; color: var(--text);
  background: var(--surface-2); padding: 0.35rem 0.5rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.prepro-fecha-empty { font-size: 0.82rem; color: #CBD5E1; font-style: italic; }

.prepro-fecha-confirmed-fields {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.prepro-fecha-input-sm {
  font-size: 0.83rem; padding: 0.25rem 0.45rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); width: 130px;
}
.prepro-fecha-input-sm:focus { outline: none; border-color: var(--accent); }
.prepro-fecha-link {
  font-size: 0.8rem; color: var(--accent); text-decoration: none;
  display: flex; align-items: center; gap: 0.2rem;
}
.prepro-fecha-link:hover { text-decoration: underline; }

.prepro-empty-guests {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; color: var(--text-muted);
  padding: 0.5rem 0;
}
.prepro-empty-guests a { color: var(--accent); text-decoration: none; }

/* Filas compactas de seguimiento por invitado */
.seg-rows-list { display: flex; flex-direction: column; gap: 0; margin: 0.375rem 0; }

.seg-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background .1s;
}
.seg-row:hover { background: var(--surface-2); }

.seg-row-name {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 500; min-width: 0;
}
.badge-sm { font-size: 0.68rem !important; padding: 0.05rem 0.35rem !important; }

.seg-row-checks { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.seg-card-checks {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: unset;
}

.seg-row-check {
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
}
.seg-row-check-label {
  font-size: 0.63rem; color: var(--text-muted);
  white-space: nowrap;
}

.seg-icon-btn {
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #CBD5E1; font-size: 1.05rem;
  transition: color .15s, background .15s;
}
.seg-icon-btn.active { color: var(--success); }
.seg-icon-btn:not(.static):hover { color: var(--text); background: var(--bg); }
.seg-icon-btn.static { cursor: default; }

/* ── Producción: index con boxes ─────────────────────── */
.prod-index-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 1rem;
}
.prod-index-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.2rem; }
.prod-index-sub   { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

.prod-box-roster {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.875rem 1rem;
  margin-bottom: 1rem;
}
.prod-box-roster-left { display: flex; align-items: center; gap: 0.75rem; }
.prod-box-roster-title { font-weight: 600; font-size: 0.95rem; }
.prod-box-roster-sub   { font-size: 0.78rem; color: var(--text-muted); }

.prod-boxes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.prod-box {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none; color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .1s;
  cursor: pointer;
}
.prod-box:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.prod-box-top {
  display: flex; align-items: center; gap: 0.625rem;
  margin-bottom: 0.75rem;
}
.prod-box-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: white; flex-shrink: 0;
}
.prod-box-num.bloque-dot-num-1 { background: #3B82F6; }
.prod-box-num.bloque-dot-num-2 { background: #F59E0B; }
.prod-box-num.bloque-dot-num-3 { background: #8B5CF6; }
.prod-box-num.bloque-dot-num-4 { background: #10B981; }
.prod-box-num.bloque-dot-num-5 { background: #E63946; }
.prod-box-num.bloque-dot-num-6 { background: #6B7280; }

.prod-box-title {
  font-size: 1rem; font-weight: 700; margin: 0; flex: 1;
  letter-spacing: -0.01em;
}
.prod-box-count {
  font-size: 0.75rem; font-weight: 600;
  background: var(--bg); color: var(--text-muted);
  border-radius: 20px; padding: 0.15rem 0.55rem;
  flex-shrink: 0;
}

.prod-box-subs {
  display: flex; flex-direction: column; gap: 0.25rem;
  margin-bottom: 0.875rem; flex: 1;
}
.prod-sub-chip {
  font-size: 0.78rem; font-weight: 400;
  color: var(--text-muted);
  background: none; border: none;
  padding: 0;
  display: flex; align-items: center; gap: 0.35rem;
}
.prod-sub-chip::before {
  content: '·';
  color: var(--border);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.prod-box-footer {
  font-size: 0.8rem; color: var(--text-muted);
  display: flex; align-items: center; justify-content: flex-end;
  margin-top: auto; padding-top: 0.5rem;
  border-top: 1px solid var(--bg);
  transition: color .15s;
}
.prod-box:hover .prod-box-footer { color: var(--accent); }

/* Bloque detail */
.bloque-detail-header {
  display: flex; align-items: center; justify-content: flex-end;
  margin-bottom: 1.25rem;
}
.bloque-detail-meta { display: flex; align-items: center; gap: 0.75rem; }
.bloque-detail-count {
  font-size: 0.82rem; color: var(--text-muted);
  background: var(--bg); padding: 0.2rem 0.6rem;
  border-radius: 20px;
}
.bloque-detail-section-title {
  font-size: 0.78rem; font-weight: 700;
  color: var(--text-muted); display: flex; align-items: center; gap: 0.35rem;
  margin: 1.25rem 0 0.625rem;
}
.bloque-detail-section-title:first-child { margin-top: 0; }
.bloque-detail-add {
  margin-top: 1.5rem; padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.bloque-detail-add form {
  display: flex; gap: 0.5rem;
}
.bloque-detail-add input {
  flex: 1; padding: 0.4rem 0.6rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.875rem; font-family: inherit;
}
.bloque-detail-add input:focus { outline: none; border-color: var(--accent); }

@media (max-width: 900px) {
  .prod-boxes-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .prod-boxes-grid { grid-template-columns: 1fr; }
}

/* ── Recursos de Producción (sin checkbox) ───────────── */
.recursos-list {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 0.25rem 0;
}

.recurso-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.875rem;
  background: var(--surface);
  transition: border-color .15s;
}
.recurso-item:focus-within { border-color: #94a3b8; }

.recurso-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0.5rem; margin-bottom: 0.3rem;
}
.recurso-label-wrap { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.recurso-label {
  font-weight: 600; font-size: 0.9rem; color: var(--text);
}
.recurso-actions { display: flex; gap: 0.15rem; flex-shrink: 0; }

.recurso-desc {
  font-size: 0.78rem; color: var(--text-muted);
  font-style: italic; margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.3rem;
}
.recurso-desc::before { content: ""; display: inline-block; width: 3px; height: 3px; background: var(--text-muted); border-radius: 50%; flex-shrink: 0; }

.recurso-cuerpo-wrap { margin: 0.35rem 0; }
.recurso-cuerpo-input {
  width: 100%; min-height: 80px;
  font-size: 0.875rem; font-family: inherit; line-height: 1.55;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
  resize: none; overflow: hidden;
  transition: border-color .15s, background .15s;
}
.recurso-cuerpo-input:hover { border-color: #94a3b8; background: var(--surface); }
.recurso-cuerpo-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.recurso-cuerpo-input::placeholder { color: #CBD5E1; font-style: italic; }

.recurso-cuerpo-ro {
  font-size: 0.875rem; line-height: 1.6; color: var(--text);
  background: var(--surface-2); padding: 0.5rem 0.625rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  white-space: pre-wrap; word-break: break-word;
}
.recurso-cuerpo-empty {
  font-size: 0.82rem; color: #CBD5E1; font-style: italic;
  padding: 0.35rem 0.25rem;
}

.recurso-link-wrap { margin: 0.35rem 0; }
.recurso-link-row {
  display: flex; align-items: center; gap: 0.5rem;
}
.recurso-link-input {
  flex: 1; padding: 0.4rem 0.625rem;
  font-size: 0.875rem; font-family: inherit;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
  transition: border-color .15s, background .15s;
}
.recurso-link-input:hover { border-color: #94a3b8; background: var(--surface); }
.recurso-link-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.recurso-link-ext {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.82rem; color: var(--accent);
  padding: 0.3rem 0.25rem; word-break: break-all;
}

/* ── Publicación tab ─────────────────────────────────── */
.pub-textarea {
  width: 100%; min-height: 72px;
  font-size: 0.875rem; font-family: inherit; line-height: 1.6;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
  resize: none; overflow: hidden;
  transition: border-color .15s, background .15s;
}
.pub-textarea:hover { border-color: #94a3b8; background: var(--surface); }
.pub-textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.pub-textarea::placeholder { color: #CBD5E1; font-style: italic; }
.pub-textarea-lg { min-height: 140px; }

.pub-archivos-panel { margin-top: 0.35rem; }
.pub-archivos-list { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.5rem; }
.pub-archivo-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.pub-archivo-link {
  display: flex; align-items: center; gap: 0.4rem;
  flex: 1; font-size: 0.82rem; color: var(--accent);
  text-decoration: none; word-break: break-all;
}
.pub-archivo-link:hover { text-decoration: underline; }
.pub-archivo-size { color: var(--text-muted); font-size: 0.75rem; margin-left: 0.25rem; }
.pub-upload-form {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 0.25rem; flex-wrap: wrap;
}
.pub-upload-input { font-size: 0.8rem; flex: 1; min-width: 0; }

/* ── Seguimiento de Invitados por Episodio ───────────── */
.seg-list { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.25rem 0; }

.seg-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.seg-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 0.875rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}
.seg-card-name {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  font-weight: 600; font-size: 0.925rem;
}
.seg-inv-link { color: var(--text); text-decoration: none; }
.seg-inv-link:hover { color: var(--accent); }

.seg-card-right {
  display: flex; align-items: center; gap: 0.625rem; flex-shrink: 0;
}
.seg-progreso-wrap {
  width: 56px; height: 5px; background: var(--border);
  border-radius: 3px; overflow: hidden;
}
.seg-progreso-bar { height: 100%; background: var(--success); border-radius: 3px; transition: width .3s; }

.seg-toggle-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 0.15rem; display: flex; align-items: center;
}
.seg-toggle-btn i { transition: transform .2s; }

.seg-body { padding: 0.75rem 0.875rem; display: flex; flex-direction: column; gap: 0; }

.seg-section {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--bg);
}
.seg-section:last-child { border-bottom: none; }

.seg-section-title {
  font-size: 0.72rem; font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.seg-check-row {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.375rem;
}
.seg-check-row:last-child { margin-bottom: 0; }

.seg-bool-btn {
  flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 0; display: flex; align-items: center;
  font-size: 1.15rem; transition: color .15s;
}
.seg-bool-btn.active { color: var(--success); }
.seg-bool-btn.static { cursor: default; }
.seg-bool-btn:not(.static):hover { color: var(--accent); }

.seg-check-label { font-size: 0.875rem; color: var(--text); }

.seg-sub-fields {
  margin: 0.4rem 0 0.4rem 1.65rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.seg-field-row { display: flex; align-items: center; gap: 0.5rem; }
.seg-label { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; min-width: 100px; }

.seg-input {
  font-size: 0.85rem; padding: 0.3rem 0.5rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  width: 100%; max-width: 320px;
}
.seg-input:focus { outline: none; border-color: var(--accent); }

.seg-textarea {
  width: 100%; font-size: 0.875rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  resize: vertical; min-height: 2.5rem;
  font-family: inherit;
}
.seg-textarea:focus { outline: none; border-color: var(--accent); }
.seg-notas-inline { margin-top: 0.5rem; min-height: 2rem; font-size: 0.82rem; }

.seg-text-ro {
  font-size: 0.875rem; color: var(--text);
  background: var(--surface-2); padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}

/* Notas inline en checklist items */
.check-main { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; min-width: 0; }

.check-label-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.check-responsable-wrap { margin-left: auto; flex-shrink: 0; }
.check-responsable-select {
  font-size: 0.75rem; font-family: inherit;
  padding: 0.15rem 0.4rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted);
  cursor: pointer; max-width: 130px;
  transition: border-color .15s, background .15s;
}
.check-responsable-select:hover { border-color: var(--border); background: var(--surface-2); }
.check-responsable-select:focus { outline: none; border-color: var(--accent); background: var(--surface); color: var(--text); }
.check-responsable-badge {
  font-size: 0.7rem; background: var(--surface-2); color: var(--text-muted);
  padding: 0.1rem 0.45rem; border-radius: 20px;
  border: 1px solid var(--border); flex-shrink: 0; margin-left: auto;
}

.check-notas-wrap { margin-top: 0.2rem; }
.check-notas-input {
  width: 100%; font-size: 0.8rem; font-family: inherit;
  padding: 0.25rem 0.4rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted);
  resize: none; overflow: hidden; min-height: 1.6rem;
  transition: border-color .15s, background .15s;
}
.check-notas-input:hover { border-color: var(--border); background: var(--surface-2); }
.check-notas-input:focus { outline: none; border-color: var(--accent); background: var(--surface); color: var(--text); }
.check-notas-input::placeholder { color: #CBD5E1; }
.check-notas-ro {
  font-size: 0.8rem; color: var(--text-muted); font-style: italic;
  padding: 0.1rem 0.25rem;
}

/* Plantillas de mensajes */
.plantilla-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; padding: 0.75rem 0;
  border-bottom: 1px solid var(--bg);
}
.plantilla-row:last-child { border-bottom: none; }
.plantilla-row-main { flex: 1; min-width: 0; }
.plantilla-nombre { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.plantilla-preview {
  font-size: 0.8rem; color: var(--text-muted);
  margin-top: 0.2rem; white-space: pre-wrap; word-break: break-word;
}
.plantilla-row-actions { display: flex; gap: 0.25rem; flex-shrink: 0; }
.plantilla-inactiva { opacity: 0.55; }

/* Hint en form de plantilla */
.form-hint {
  font-size: 0.78rem; color: var(--text-muted);
  margin-left: 0.5rem; font-weight: 400;
}
.form-hint code {
  background: var(--bg); padding: 0.05rem 0.3rem;
  border-radius: 3px; font-size: 0.75rem; color: var(--accent);
}
.form-check-group { display: flex; align-items: center; gap: 0.5rem; }

/* ── Sección Contenidos (episodio) ───────────────────── */
.contenidos-section { padding-top: 0.5rem; }

.contenidos-block-title {
  font-size: 0.72rem; font-weight: 700;
  color: var(--text-muted); margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.consignas-count { color: var(--accent); font-weight: 700; }
.contenidos-block-title::before {
  content: '';
  display: inline-block;
  width: 3px; height: 12px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Inventario: lista de consignas */
.consignas-list {
  display: flex; flex-direction: column; gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.consigna-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  transition: border-color .15s;
}
.consigna-row:focus-within { border-color: #94a3b8; }
.consigna-evaluacion { border-left: 3px solid #CBD5E1; }
.consigna-posible    { border-left: 3px solid #F59E0B; }
.consigna-descartada { border-left: 3px solid #CBD5E1; opacity: 0.5; }

/* Deep link highlight — resalta la sección destino al navegar desde notificaciones */
@keyframes deeplink-glow {
  0%   { box-shadow: 0 0 0 3px rgba(99,179,237,0.5); background-color: rgba(99,179,237,0.12); }
  100% { box-shadow: none; background-color: transparent; }
}
.deeplink-highlight {
  animation: deeplink-glow 2.5s ease-out;
  border-radius: 6px;
}
.consigna-descartada .consigna-textarea { text-decoration: line-through; color: var(--text-secondary); }

.consigna-textarea {
  width: 100%; font-size: 0.875rem; font-family: inherit; line-height: 1.5;
  padding: 0.3rem 0.25rem;
  border: none; background: transparent; color: var(--text);
  resize: none; overflow: hidden;
}
.consigna-textarea:focus { outline: none; }

.consigna-actions {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 0.4rem; flex-wrap: wrap;
}

.consigna-autor-chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.72rem; color: var(--text-muted);
  background: var(--bg); border-radius: 20px;
  padding: 0.15rem 0.5rem; border: 1px solid var(--border);
  white-space: nowrap;
}

.consigna-estado-select {
  font-size: 0.78rem; font-family: inherit;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  cursor: pointer;
}
.consigna-estado-select:focus { outline: none; border-color: var(--accent); }
.estado-evaluacion { color: #6B7280; }
.estado-posible    { color: #D97706; font-weight: 500; }
.estado-seleccionada { color: #059669; font-weight: 600; }
.estado-descartada { color: var(--accent); }

.consigna-save-btn { margin-left: auto; color: var(--success) !important; }

/* ── Reacciones a consignas ──────────────────────────── */
.consigna-reacciones {
  padding: 0.4rem 0.75rem 0.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.reaccion-btns {
  display: flex; gap: 0.35rem; align-items: center;
}
.reaccion-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.55rem; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); font-size: 0.78rem; cursor: pointer;
  transition: all .15s;
}
.reaccion-btn:hover { border-color: #94a3b8; color: var(--text); }
.reaccion-btn.activa.reaccion-suma    { background:#dcfce7; border-color:#86efac; color:#15803d; }
.reaccion-btn.activa.reaccion-reformula { background:#fef9c3; border-color:#fde047; color:#854d0e; }
.reaccion-btn.activa.reaccion-no      { background:#fee2e2; border-color:#fca5a5; color:#b91c1c; }
.reaccion-count { font-weight: 600; }
.consigna-reformulacion-input {
  width: 100%; margin-top: 0.4rem; font-size: 0.83rem; font-family: inherit;
  padding: 0.35rem 0.55rem; border: 1px solid #fde047; border-radius: var(--radius-sm);
  background: #fefce8; color: var(--text); resize: none; overflow: hidden;
}
.consigna-reformulacion-input:focus { outline: none; border-color: #d97706; }
.reformulaciones-list {
  margin-top: 0.45rem; display: flex; flex-direction: column; gap: 0.25rem;
}
.reformulacion-item {
  font-size: 0.78rem; color: var(--text-muted);
  display: flex; gap: 0.35rem; align-items: baseline;
}
.reformulacion-autor { font-weight: 600; color: var(--text); white-space: nowrap; }
.reformulacion-texto { font-style: italic; }
.btn-aceptar-reformulacion {
  display: inline-flex; align-items: center; gap: 0.2rem;
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
  padding: 0.15rem 0.45rem; border-radius: 99px;
  border: 1px solid #86efac; background: #dcfce7; color: #15803d;
  cursor: pointer; flex-shrink: 0;
  transition: background .15s;
}
.btn-aceptar-reformulacion:hover { background: #bbf7d0; }
.btn-rechazar-reformulacion {
  display: inline-flex; align-items: center; gap: 0.2rem;
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
  padding: 0.15rem 0.45rem; border-radius: 99px;
  border: 1px solid #fca5a5; background: #fee2e2; color: #b91c1c;
  cursor: pointer; flex-shrink: 0;
  transition: background .15s;
}
.btn-rechazar-reformulacion:hover { background: #fecaca; }

.consigna-add-form { margin-top: 0.25rem; }
.consigna-add-textarea {
  width: 100%; font-size: 0.875rem; font-family: inherit; line-height: 1.5;
  padding: 0.4rem 0.6rem;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
  resize: none; overflow: hidden;
  transition: border-color .15s, background .15s;
}
.consigna-add-textarea:focus {
  outline: none; border-color: var(--accent);
  border-style: solid; background: var(--surface);
}
.consigna-add-textarea::placeholder { color: #CBD5E1; font-style: italic; }

.consigna-add-meta {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 0.4rem; flex-wrap: wrap;
}

.consignas-empty {
  font-size: 0.82rem; color: var(--text-muted);
  font-style: italic; padding: 0.35rem 0; margin-bottom: 0.5rem;
}

/* Cuestionario Final */
.cuestionario-list {
  display: flex; flex-direction: column; gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.cuestionario-row {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: #ECFDF5; border: 1px solid #A7F3D0;
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.cuestionario-texto {
  flex: 1; font-size: 0.875rem; line-height: 1.55;
  color: var(--text); min-width: 200px;
  font-style: italic;
}

.cuestionario-meta {
  display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0;
}

.cuestionario-votos {
  display: flex; align-items: center; gap: 0.35rem; flex-shrink: 0;
}
.voto-btn {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.5rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-size: 0.8rem;
  cursor: pointer; background: transparent;
  color: var(--text-secondary); transition: all 0.15s;
}
.voto-btn:hover { background: var(--surface-2); }
.voto-count { font-size: 0.75rem; font-weight: 600; }
.voto-si.activo  { background: #DCFCE7; border-color: #86EFAC; color: #15803D; }
.voto-no.activo  { background: #FEE2E2; border-color: #FCA5A5; color: #DC2626; }
.voto-si:not(.activo):hover { color: #15803D; }
.voto-no:not(.activo):hover { color: #DC2626; }

.consigna-ronda-select {
  font-size: 0.78rem; font-family: inherit;
  padding: 0.2rem 0.45rem;
  border: 1px solid #6EE7B7; border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  cursor: pointer;
}
.consigna-ronda-select:focus { outline: none; border-color: #059669; }

/* Tarjetas */
.tarjetas-section { padding: 0.25rem 0 0.5rem; }

.tarjetas-preview-list {
  display: flex; flex-direction: column; gap: 0.3rem;
  margin-bottom: 0.25rem;
}

.tarjeta-preview-chip {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0.65rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.82rem;
}
.tarjeta-preview-chip.tarjeta-sin-ronda { border-color: #FCA5A5; background: #FFF5F5; }

.tarjeta-ronda-badge {
  font-size: 0.7rem; font-weight: 700; color: #1A1A2E; white-space: nowrap;
  background: var(--surface); border: 1px solid #CBD5E1;
  border-radius: 4px; padding: 0.1rem 0.4rem;
  flex-shrink: 0;
}
.tarjeta-preview-chip.tarjeta-sin-ronda .tarjeta-ronda-badge {
  color: #DC2626; border-color: #FCA5A5; background: #FFF5F5;
}

.tarjeta-texto-preview {
  flex: 1; color: var(--text-muted); font-style: italic;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Instructivos y Protocolos */
.instructivos-list {
  display: flex; flex-direction: column; gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.instructivo-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}

.instructivo-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.instructivo-icono { color: var(--text-muted); font-size: 1.05rem; flex-shrink: 0; }
.instructivo-nombre { font-size: 0.875rem; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.instructivo-header-actions { display: flex; gap: 0.15rem; flex-shrink: 0; margin-left: auto; }

.instructivo-preview { padding: 0.5rem 0.75rem 0.75rem; }
.instructivo-preview-img img {
  max-width: 100%; max-height: 280px;
  border-radius: var(--radius-sm); display: block;
}
.instructivo-iframe {
  width: 100%; height: 320px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  display: block;
}
.instructivo-doc-placeholder {
  display: flex; flex-direction: column; align-items: center;
  padding: 1.5rem; text-align: center; gap: 0.4rem;
  color: var(--text-muted); font-size: 0.82rem;
}

.instructivo-upload-form {
  display: flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap; margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface-2); border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}
.instructivo-nombre-input {
  flex: 1; min-width: 150px;
}
.instructivo-file-label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  cursor: pointer; font-size: 0.82rem; color: var(--text-muted);
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color .15s;
  flex: 1.5; min-width: 160px; overflow: hidden;
}
.instructivo-file-label:hover { border-color: #94a3b8; }
.instructivo-file-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.instructivo-file-input { display: none; }

/* ── Tab Edición ─────────────────────────────────────── */
.edicion-seccion {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.85rem 1rem; margin-bottom: 1rem;
  background: var(--surface);
}

.edicion-sec-header {
  font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.edicion-sec-header > span { flex: 1; }

.sec-responsable-select {
  font-size: 0.75rem; font-family: inherit;
  padding: 0.15rem 0.4rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted);
  cursor: pointer; max-width: 140px; text-transform: none; letter-spacing: 0;
  transition: border-color .15s, background .15s;
}
.sec-responsable-select:hover { border-color: var(--border); background: var(--surface-2); }
.sec-responsable-select:focus { outline: none; border-color: var(--accent); background: var(--surface); color: var(--text); }
.sec-responsable-badge {
  font-size: 0.7rem; background: var(--surface-2); color: var(--text-muted);
  padding: 0.1rem 0.45rem; border-radius: 20px;
  border: 1px solid var(--border); flex-shrink: 0;
  text-transform: none; letter-spacing: 0;
}
.seg-coordinador-select { max-width: 120px; }
.prepro-sec-responsable { display: flex; justify-content: flex-end; margin-bottom: 0.5rem; }

.edicion-campo { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.65rem; }
.edicion-campo:last-child { margin-bottom: 0; }

.edicion-label { font-size: 0.8rem; color: var(--text-muted); }

.edicion-input {
  font-size: 0.85rem; padding: 0.35rem 0.6rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); outline: none;
  transition: border-color .15s;
}
.edicion-input:focus { border-color: var(--accent); }

.edicion-link { width: 100%; }

.edicion-textarea {
  font-size: 0.85rem; padding: 0.4rem 0.6rem; min-height: 60px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); resize: none; outline: none;
  width: 100%; transition: border-color .15s; line-height: 1.4;
}
.edicion-textarea:focus { border-color: var(--accent); }

.edicion-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.65rem; }
.edicion-campo-fecha { flex: 1; min-width: 160px; }

.edicion-link-row { display: flex; align-items: center; gap: 0.5rem; }
.edicion-link-row .edicion-link { flex: 1; }

.edicion-link-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.78rem; color: var(--accent); text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
}
.edicion-link-btn:hover { text-decoration: underline; }

/* Notas de edición */
.edicion-notas-panel { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.25rem; }

.edicion-notas-list { display: flex; flex-direction: column; gap: 0.4rem; }

.edicion-nota-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.6rem 0.75rem;
}
.edicion-nota-editing { border-color: var(--accent); }

.edicion-nota-meta {
  display: flex; align-items: center; gap: 0.45rem;
  margin-bottom: 0.35rem; flex-wrap: wrap;
}
.edicion-nota-autor-nombre { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.edicion-nota-fecha { font-size: 0.75rem; color: var(--text-muted); }
.edicion-nota-editado { font-size: 0.72rem; color: var(--text-muted); font-style: italic; }

.edicion-nota-btns {
  display: flex; gap: 0.2rem; margin-left: auto;
}

.edicion-nota-texto { font-size: 0.85rem; color: var(--text); line-height: 1.5; white-space: pre-wrap; }

.edicion-nota-input {
  width: 100%; font-size: 0.85rem; padding: 0.4rem 0.6rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); resize: none; outline: none;
  min-height: 52px; line-height: 1.4; transition: border-color .15s;
}
.edicion-nota-input:focus { border-color: var(--accent); }
.edicion-nota-edit-input { min-height: 70px; }

.edicion-nota-submit { margin-top: 0.3rem; }

.edicion-nota-edit-actions { display: flex; gap: 0.5rem; margin-top: 0.4rem; }

/* ── Calendario Dashboard ────────────────────────────── */
.cal-card { margin-bottom: 1.5rem; }

.cal-header { padding: 1rem 1.25rem 0.75rem; border-bottom: 1px solid var(--border); }

.cal-title-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.75rem;
}

.cal-filtros { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.cal-filtro {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 500;
  cursor: pointer; user-select: none;
}
.cal-filtro input { display: none; }
.cal-filtro-dot {
  width: 9px; height: 9px; border-radius: 2px;
  flex: none; opacity: 1; transition: opacity 0.15s;
}
.cal-filtro-txt { color: #6E6E6E; }
.cal-filtro input:not(:checked) ~ .cal-filtro-dot { opacity: 0.25; }
.cal-filtro input:not(:checked) ~ .cal-filtro-txt { opacity: 0.45; }

.cal-nav {
  display: flex; align-items: center; gap: 0.5rem;
}
.cal-nav-btn {
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.2rem 0.45rem; cursor: pointer; color: var(--text-muted);
  font-size: 0.9rem; transition: background 0.15s, color 0.15s;
}
.cal-nav-btn:hover { background: var(--surface); color: var(--text); }
.cal-nav-titulo {
  font-size: 0.95rem; font-weight: 600; color: var(--text);
  min-width: 160px; text-align: center;
}

.cal-grid-wrap { padding: 0.75rem 1rem; }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.cal-dow {
  text-align: center; font-size: 0.65rem; font-weight: 700;
  color: var(--text-muted); padding: 0.25rem 0 0.4rem;
}

.cal-day {
  min-height: 54px; border-radius: 6px; padding: 0.3rem 0.35rem 0.25rem;
  overflow: hidden; min-width: 0;
  cursor: pointer; transition: background 0.1s;
  border: 1px solid transparent; position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
}
.cal-day:hover { background: var(--surface); }
.cal-day-empty { cursor: default; }
.cal-day-hoy { border-color: var(--accent); }
.cal-day-hoy .cal-day-num { color: var(--accent); font-weight: 700; }
.cal-day-selec { background: var(--surface); border-color: var(--primary); }
.cal-day-con-eventos { background: var(--bg); }

.cal-day-num {
  font-size: 0.78rem; font-weight: 500; color: var(--text);
  font-family: var(--sans); font-variant-numeric: tabular-nums;
  line-height: 1; margin-bottom: 0.3rem;
}

.cal-chip {
  display: block; width: 100%; min-width: 0;
  font-size: 0.62rem; font-weight: 600; line-height: 1.3;
  padding: 0.15rem 0.3rem; border-radius: 4px;
  border: 1px solid; margin-bottom: 2px;
  overflow: hidden;
}
.cal-chip-ep {
  display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 700;
}
.cal-chip-tipo {
  display: block;
  font-size: 0.58rem; font-weight: 500; opacity: 0.82;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.cal-detail { border-top: 1px solid var(--border); }

.cal-detail-inner { padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; }

.cal-detail-fecha {
  font-size: 0.7rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.2rem;
}

.cal-ev-group { margin-bottom: 0.35rem; }
.cal-ev-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.7rem; border-radius: var(--radius) var(--radius) 0 0;
  text-decoration: none; transition: opacity 0.15s;
  border-left-width: 3px; border-left-style: solid;
}
.cal-ev-group:not(:has(.cal-ev-extras)) .cal-ev-row { border-radius: var(--radius); }
.cal-ev-row:hover { opacity: 0.85; }
.cal-ev-tipo {
  font-size: 0.7rem; font-weight: 700; white-space: nowrap; min-width: 70px;
}
.cal-ev-label { font-size: 0.82rem; color: var(--text); flex: 1; }
.cal-ev-hora  { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.cal-ev-arrow { font-size: 0.8rem; color: var(--text-muted); margin-left: auto; }

.cal-ev-extras {
  padding: 0.4rem 0.7rem 0.5rem;
  border-left-width: 3px; border-left-style: solid;
  border-radius: 0 0 var(--radius) var(--radius);
}
.cal-ev-extra-item {
  display: flex; gap: 0.4rem; align-items: flex-start;
  font-size: 0.78rem; padding: 0.15rem 0;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.cal-ev-extra-lbl {
  font-weight: 600; color: var(--text-muted); white-space: nowrap; min-width: 60px;
}
.cal-ev-extra-link {
  color: var(--info); text-decoration: none; word-break: break-all;
}
.cal-ev-extra-link:hover { text-decoration: underline; }
.cal-ev-extra-txt {
  color: var(--text); white-space: pre-line; word-break: break-word;
}

/* ── Auspiciantes ────────────────────────────────────── */
.ausp-section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem;
}
.ausp-section-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.15rem; }
.ausp-section-sub { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

.material-list { display: flex; flex-direction: column; gap: 0; }
.material-item {
  display: flex; align-items: flex-start; gap: 0.9rem;
  padding: 0.9rem 1rem; border: 1px solid var(--border);
  border-bottom: none; background: var(--card-bg);
}
.material-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.material-item:last-child { border-bottom: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); }
.material-item:only-child { border-radius: var(--radius); border-bottom: 1px solid var(--border); }
.material-item-icon {
  font-size: 1.3rem; color: var(--text-muted);
  padding-top: 0.1rem; flex-shrink: 0;
}
.material-item-body { flex: 1; min-width: 0; }
.material-item-titulo { font-weight: 600; font-size: 0.95rem; }
.material-item-ref { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }
.material-item-notas { font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.25rem; line-height: 1.4; }
.material-item-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.35rem; }
.material-item-actions {
  display: flex; align-items: center; gap: 0.2rem; flex-shrink: 0;
}
.material-archivo-actual {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--surface-2); border-radius: 6px;
  padding: 0.4rem 0.75rem; font-size: 0.82rem; margin-bottom: 0.35rem;
}

.ausp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.ausp-card {
  display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
  text-decoration: none; color: var(--text);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.ausp-card:hover {
  border-color: var(--ink);
}

.ausp-card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.ausp-card-nombre {
  font-size: 1rem; font-weight: 700; color: var(--text);
}
.ausp-card-rubros { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ausp-card-desc { font-size: 0.82rem; color: var(--text-muted); margin: 0; line-height: 1.4; }
.ausp-card-footer {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  font-size: 0.78rem; color: var(--text-muted);
  border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: auto;
}
.ausp-card-footer span { display: flex; align-items: center; gap: 0.25rem; }

.ausp-detail-header { padding: 1.25rem 1.5rem; }
.ausp-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 700px) { .ausp-detail-grid { grid-template-columns: 1fr; } }

.ausp-section .ausp-section-body { padding: 0 1.25rem 1.25rem; }
.ausp-field-row {
  display: flex; gap: 0.75rem; padding: 0.55rem 0;
  border-bottom: 1px solid var(--border); font-size: 0.88rem;
}
.ausp-field-row:last-child { border-bottom: none; }
.ausp-field-lbl {
  flex: 0 0 130px; font-weight: 600; color: var(--text-muted); font-size: 0.8rem;
}
.ausp-field-val { flex: 1; color: var(--text); line-height: 1.5; }

.ausp-form .form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.ausp-form .form-label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.ausp-form .form-input,
.ausp-form .form-textarea {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.5rem 0.75rem; font-size: 0.9rem; font-family: inherit;
  background: var(--bg); color: var(--text); width: 100%;
  transition: border-color 0.15s;
}
.ausp-form .form-input:focus,
.ausp-form .form-textarea:focus { outline: none; border-color: var(--primary); }
.ausp-form .form-textarea { resize: vertical; min-height: 80px; }

.tag-sug-btn {
  font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text-muted);
  cursor: pointer; transition: all 0.15s;
}
.tag-sug-btn:hover { border-color: var(--primary); color: var(--primary); }
.tag-sug-btn.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

.premio-row {
  display: flex; align-items: center; gap: 0.5rem;
}

.ausp-premios-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.ausp-premios-table th {
  text-align: left; font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted); padding: 0.25rem 0.6rem;
  border-bottom: 1px solid var(--border);
}
.ausp-premios-table td {
  padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--border);
  color: var(--text);
}
.ausp-premios-table tr:last-child td { border-bottom: none; }

/* ── Premios/Regalos Invitados ───────────────────────── */
.premios-header {
  display: flex; align-items: center; gap: 0.55rem;
}
.premios-header .check-btn.static { cursor: default; }
.premio-empresa-tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 4px;
  padding: 0.08rem 0.45rem;
  margin-right: 0.25rem;
  white-space: nowrap;
}

/* ── Prensa y Difusión ───────────────────────────────── */
.prensa-plantilla-ta {
  width: 100%; min-height: 180px; resize: vertical;
  font-family: inherit; font-size: 0.88rem; line-height: 1.6;
}
.prensa-plantilla-ro {
  font-size: 0.88rem; line-height: 1.7; color: var(--text);
  white-space: pre-wrap;
}
.mailing-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.mailing-table th {
  text-align: left; font-size: 0.73rem; font-weight: 700;
  color: var(--text-muted); padding: 0.5rem 0.8rem;
  border-bottom: 2px solid var(--border); white-space: nowrap;
}
.mailing-table td {
  padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--border);
  color: var(--text);
}
.mailing-table tr:last-child td { border-bottom: none; }
.mailing-table tr.mailing-inactivo td { opacity: 0.45; }
.mailing-table tr:hover td { background: var(--bg-alt); }

/* ── Rodaje Tab ──────────────────────────────────────── */
.rodaje-tab { display: flex; flex-direction: column; gap: 1.25rem; }

.rodaje-sec-header {
  font-size: 0.7rem; font-weight: 700; color: var(--text-muted);
  padding: 0 0 0.4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.rodaje-seccion { }

.rodaje-productora-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 1rem;
}

.rodaje-productora-form { display: flex; flex-direction: column; gap: 0.6rem; }

.rodaje-productora-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

.rodaje-prod-label {
  font-size: 0.82rem; color: var(--text-muted); min-width: 160px; flex-shrink: 0;
}

.rodaje-prod-inputs { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.rodaje-prod-input {
  font-size: 0.82rem; padding: 0.3rem 0.5rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text);
}
.rodaje-prod-input:focus { outline: none; border-color: var(--accent); }

.time-clear-btn {
  background: none; border: none; padding: 0.1rem 0.25rem;
  color: var(--text-muted); cursor: pointer; border-radius: 3px;
  font-size: 0.75rem; line-height: 1; flex-shrink: 0;
  transition: color 0.15s;
}
.time-clear-btn:hover { color: var(--accent); }

.rodaje-prod-fecha-display {
  font-size: 0.82rem; color: var(--text); padding: 0.3rem 0.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.rodaje-prod-fecha-display.muted { color: var(--text-muted); }

.rodaje-check-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.1rem;
}

.rodaje-check-item {
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.rodaje-check-item:hover { background: var(--surface); }
.rodaje-check-item.done .item-label { text-decoration: line-through; color: var(--text-muted); }

.rodaje-check-row { display: flex; align-items: flex-start; gap: 0.5rem; }

.rodaje-check-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }

.rodaje-proto-wrap { position: relative; margin: 0.3rem 0 0.1rem; }

.rodaje-proto-input {
  width: 100%; box-sizing: border-box;
  font-size: 0.82rem; line-height: 1.45;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  resize: none; transition: border-color 0.15s;
  font-family: inherit;
}
.rodaje-proto-input:focus { outline: none; border-color: var(--accent); }
.rodaje-proto-input::placeholder { color: var(--text-muted); font-style: italic; }
.rodaje-proto-input.customizado { border-color: #3b82f6; }

.rodaje-proto-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 600;
  color: #3b82f6; margin-top: 0.2rem;
}
.rodaje-proto-badge.muted { color: var(--text-muted); }

.rodaje-proto-ro {
  font-size: 0.82rem; line-height: 1.45; color: var(--text);
  padding: 0.35rem 0.5rem;
  border-left: 2px solid var(--border); margin: 0.2rem 0;
}
.rodaje-proto-ro.muted { color: var(--text-muted); font-style: italic; }

.rodaje-ref-archivos { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.25rem; }

.rodaje-archivo-wrap { display: flex; flex-direction: column; gap: 0; }

.rodaje-archivo-panel {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-top: 0.25rem;
  background: var(--bg);
}

.rodaje-archivo-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.4rem 0.6rem;
  background: var(--surface); border-bottom: 1px solid var(--border);
}

.rodaje-archivo-panel-nombre {
  font-size: 0.78rem; font-weight: 500; color: var(--text);
  display: flex; align-items: center; gap: 0.35rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.rodaje-archivo-panel-actions { display: flex; gap: 0.2rem; flex-shrink: 0; margin-left: 0.5rem; }

.rodaje-archivo-content { padding: 0.5rem; }

.rodaje-archivo-img { max-width: 100%; max-height: 300px; border-radius: 4px; display: block; }

.rodaje-archivo-iframe { width: 100%; height: 360px; border: none; display: block; }

.rodaje-archivo-nodisponible {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 1.5rem; color: var(--text-muted); font-size: 0.82rem; text-align: center;
}
.rodaje-archivo-nodisponible i { font-size: 2rem; }

.rodaje-docx-loading { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--text-muted); padding: 0.5rem; }

.rodaje-docx-rendered {
  font-size: 0.85rem; line-height: 1.55; color: var(--text);
  max-height: 360px; overflow-y: auto; padding: 0.25rem 0.25rem;
}
.rodaje-docx-rendered p { margin: 0.3em 0; }
.rodaje-docx-rendered h1, .rodaje-docx-rendered h2, .rodaje-docx-rendered h3 { margin: 0.5em 0 0.2em; font-size: 1em; font-weight: 700; }
.rodaje-docx-rendered ul, .rodaje-docx-rendered ol { padding-left: 1.2em; margin: 0.3em 0; }
.rodaje-docx-rendered table { border-collapse: collapse; width: 100%; font-size: 0.8rem; }
.rodaje-docx-rendered td, .rodaje-docx-rendered th { border: 1px solid var(--border); padding: 0.2rem 0.4rem; }

.rodaje-ref-archivo {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.75rem; color: var(--text-muted);
  text-decoration: none; border: 1px solid var(--border);
  border-radius: 4px; padding: 0.1rem 0.4rem;
  background: var(--bg);
  transition: border-color 0.15s, color 0.15s;
}
.rodaje-ref-archivo:hover { border-color: var(--accent); color: var(--accent); }

/* ── Promoción/Recortes ──────────────────────────────── */
.promo-reel-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.promo-reel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.promo-reel-titulo {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* ── Promo YouTube ───────────────────────────────────── */
.promo-yt-titulo {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.3rem 0;
}

/* ── Sidebar overlay (mobile) ───────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 199;
  cursor: pointer;
}
.sidebar-overlay.active { display: block; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1100px) {
  .episode-layout { grid-template-columns: 1fr; }
  .episode-comments { position: static; }
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
  .ep-sections-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid-3 { grid-template-columns: 1fr 1fr; } /* 2 cols en tablet */
  .dashboard-grid { grid-template-columns: 1fr; }
  .ep-sections-grid { grid-template-columns: 1fr; }
  .activity-grid { grid-template-columns: 1fr; }
  .archivo-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .kanban-board { grid-template-columns: 1fr 1fr; }
  .episodes-table th:nth-child(5), .episodes-table td:nth-child(5),
  .episodes-table th:nth-child(6), .episodes-table td:nth-child(6) { display: none; }
}
@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric-value { font-size: 1.3rem; }
  .kanban-board { grid-template-columns: 1fr; }
  .main-content { padding: 1rem; }
}

/* ── Responsive extras ───────────────────────────────── */
@media (max-width: 768px) {
  .topbar { padding: 0 0.75rem; gap: 0.5rem; }
  .episode-tabs {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; flex-wrap: nowrap;
  }
  .episode-tabs::-webkit-scrollbar { display: none; }
  .ep-tab { white-space: nowrap; flex-shrink: 0; }
  .episodes-table-wrap { overflow-x: auto; }
  .mailing-table { display: block; overflow-x: auto; }
  .cal-day { min-height: 42px; padding: 0.2rem 0.15rem; }
  .cal-chip { font-size: 0.55rem; padding: 0.1rem 0.2rem; }
  .cal-chip-tipo { display: none; }
  .cal-grid-wrap { padding: 0.5rem 0.4rem; }
  .cal-nav-titulo { min-width: 120px; font-size: 0.85rem; }
  .rodaje-prod-label { min-width: auto; }
  .seg-row { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .topbar { padding: 0 0.5rem; }
  .episodes-table th:nth-child(3), .episodes-table td:nth-child(3) { display: none; }
  .cal-day { min-height: 34px; }
  .episode-tema { font-size: 1.2rem; }
  .seg-row-check-label { display: none; }
  .taller-row { flex-direction: column; }
}

/* ── Taller ──────────────────────────────────────────── */
.taller-list {
  display: flex; flex-direction: column; gap: 0.6rem;
}

.tarea-card {
  display: block; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.875rem 1rem; text-decoration: none; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  box-shadow: var(--shadow);
}
.tarea-card:hover { border-color: var(--ink); }

.tarea-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 0.3rem;
}
.tarea-card-titulo {
  font-weight: 600; font-size: 0.95rem; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tarea-card-ref {
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.4rem;
  display: flex; align-items: center; gap: 0.25rem;
}
.tarea-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 0.5rem; padding-top: 0.4rem; border-top: 1px solid var(--bg);
  font-size: 0.78rem; color: var(--text-muted);
}
.tarea-card-author { display: flex; align-items: center; gap: 0.4rem; }
.tarea-card-meta { display: flex; align-items: center; gap: 0.6rem; }
.tarea-card-meta span { display: flex; align-items: center; gap: 0.2rem; }

/* Estado badges */
.tarea-estado-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  padding: 0.15rem 0.55rem; border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}
.tarea-estado-abierta     { background: var(--fill); color: var(--ink); }
.tarea-estado-en_progreso { background: #FEF2EF; color: var(--c-rodaje); }
.tarea-estado-lista       { background: #EDF7F2; color: var(--c-publicacion); }
.tarea-estado-archivada   { background: var(--fill); color: var(--faint); }

/* Estado select en topbar */
.taller-estado-select {
  font-size: 0.8rem; font-family: inherit; font-weight: 600;
  padding: 0.3rem 0.6rem; border-radius: 20px; cursor: pointer;
  border: 1px solid; outline: none; transition: opacity .15s;
}
.taller-estado-abierta     { background: var(--fill); color: var(--ink); border-color: var(--line); }
.taller-estado-en_progreso { background: #FEF2EF; color: var(--c-rodaje); border-color: var(--c-rodaje); }
.taller-estado-lista       { background: #EDF7F2; color: var(--c-publicacion); border-color: var(--c-publicacion); }
.taller-estado-archivada   { background: var(--fill); color: var(--faint); border-color: var(--line); }

/* Detail page */
.taller-tarea-meta {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: var(--text-muted); flex-wrap: wrap;
}
.taller-meta-sep { color: var(--border); }

.taller-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.875rem 1rem;
  margin-bottom: 0.75rem;
}
.taller-row {
  display: flex; gap: 0.75rem; margin-bottom: 0.75rem;
}
.taller-section-half { flex: 1; min-width: 0; margin-bottom: 0; }

.taller-field-label {
  font-size: 0.7rem; font-weight: 700; color: var(--text-muted);
  margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.3rem;
}

.taller-titulo-input {
  width: 100%; font-size: 1.1rem; font-weight: 600; font-family: inherit;
  border: none; outline: none; background: transparent; color: var(--text);
  resize: none; overflow: hidden; line-height: 1.35; padding: 0;
}
.taller-titulo-input:focus { color: var(--primary); }

.taller-input {
  width: 100%; font-size: 0.875rem; font-family: inherit;
  padding: 0.4rem 0.6rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg); color: var(--text);
  transition: border-color .15s;
}
.taller-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }

.taller-notas-input {
  width: 100%; font-size: 0.875rem; font-family: inherit; line-height: 1.6;
  padding: 0.4rem 0.6rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg); color: var(--text);
  resize: vertical; min-height: 80px; transition: border-color .15s;
}
.taller-notas-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.taller-notas-input::placeholder { color: #CBD5E1; font-style: italic; }

/* WhatsApp section */
.taller-wapp-section { border-color: #BBF7D0; }
.btn-wapp {
  background: #25D366; color: white; border: none;
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-weight: 500;
}
.btn-wapp:hover { filter: brightness(1.08); }
.taller-wapp-hint {
  font-size: 0.75rem; color: var(--text-muted); font-style: italic;
}

/* Archivos */
.taller-archivos-list { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.6rem; }
.taller-archivo-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.5rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-2);
  font-size: 0.85rem;
}
.taller-archivo-icon { color: var(--text-muted); flex-shrink: 0; }
.taller-archivo-link { flex: 1; color: var(--accent); word-break: break-all; }
.taller-archivo-link:hover { text-decoration: underline; }
.taller-archivo-meta { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.taller-upload-row {
  display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
  padding: 0.4rem 0.5rem; background: var(--bg);
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
}
.taller-file-input { font-size: 0.8rem; flex: 1; min-width: 0; }
.taller-upload-nombre {
  font-size: 0.82rem; font-family: inherit; padding: 0.3rem 0.5rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); width: 150px;
}
.taller-upload-nombre:focus { outline: none; border-color: var(--accent); }

/* Comentarios */
.taller-comentarios-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 0.75rem; }
.taller-comentario {
  padding: 0.6rem 0; border-bottom: 1px solid var(--bg);
}
.taller-comentario:last-child { border-bottom: none; }
.taller-comentario-header {
  display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.3rem;
}
.taller-comentario-autor { font-weight: 600; font-size: 0.82rem; }
.taller-comentario-time { font-size: 0.72rem; color: var(--text-muted); flex: 1; }
.taller-comentario-del { margin-left: auto; opacity: 0; transition: opacity .15s; }
.taller-comentario:hover .taller-comentario-del { opacity: 1; }
.taller-comentario-texto { font-size: 0.875rem; line-height: 1.55; margin-left: 1.65rem; }
.taller-comentario-input {
  width: 100%; font-size: 0.875rem; font-family: inherit;
  padding: 0.45rem 0.6rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); resize: none; background: var(--surface);
  transition: border-color .15s;
}
.taller-comentario-input:focus { outline: none; border-color: var(--accent); }
.taller-empty-hint { font-size: 0.82rem; color: var(--text-muted); font-style: italic; margin-bottom: 0.6rem; }

/* ── Home de Invitados ───────────────────────────────── */
.inv-home-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.25rem; max-width: 860px;
}
@media (max-width: 640px) { .inv-home-grid { grid-template-columns: 1fr; } }

.inv-home-box {
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 1.25rem;
  text-decoration: none; color: var(--text);
  transition: box-shadow .15s, border-color .15s, transform .12s;
  box-shadow: var(--shadow);
}
.inv-home-box:hover {
  border-color: var(--accent); box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.inv-home-icon {
  font-size: 2rem; color: var(--accent); flex-shrink: 0;
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: var(--radius);
}
.inv-home-body { flex: 1; min-width: 0; }
.inv-home-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.2rem; }
.inv-home-desc { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.inv-home-stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.inv-home-stat { display: flex; flex-direction: column; align-items: flex-start; }
.inv-home-stat-num { font-size: 1.25rem; font-weight: 700; color: var(--text); line-height: 1; }
.inv-home-stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: capitalize; margin-top: 0.1rem; }
.inv-home-arrow { color: var(--text-muted); font-size: 1.1rem; flex-shrink: 0; }
.inv-home-box:hover .inv-home-arrow { color: var(--accent); }

/* ── Ficha de Invitado (detail) ──────────────────────── */
.inv-ficha-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.inv-ficha-nombre { font-size: 1.5rem; font-weight: 700; margin: 0; }
.inv-ficha-apodo { font-size: 1rem; color: var(--text-muted); margin-top: 0.2rem; font-style: italic; }
.inv-ficha-badges { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; flex-shrink: 0; padding-top: 0.25rem; }
.inv-ficha-sexo {
  font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.6rem;
  border-radius: 20px; background: var(--bg); border: 1px solid var(--border);
  color: var(--text-muted);
}
.inv-ficha-section { margin-bottom: 1.25rem; }
.inv-ficha-label {
  font-size: 0.72rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.4rem;
  display: flex; align-items: center; gap: 0.35rem;
}
.inv-ficha-text { font-size: 0.925rem; line-height: 1.6; color: var(--text); }
.inv-ficha-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem 1.25rem; margin-bottom: 1.25rem;
}

/* ── Página Mesas Sugeridas (index) ─────────────────── */
.nueva-mesa-panel {
  display: none; padding: 1.25rem 1.5rem; margin-bottom: 1rem;
}
.nueva-mesa-panel.open { display: block; }
.nueva-mesa-titulo {
  font-size: 1rem; font-weight: 600; margin: 0 0 1rem;
  display: flex; align-items: center; gap: 0.4rem; color: var(--text);
}
.nueva-mesa-form { display: flex; flex-direction: column; gap: 0.75rem; }

.mesas-inv-select-wrap {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.mesas-inv-filter {
  width: 100%; padding: 0.45rem 0.75rem;
  border: none; border-bottom: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 0.875rem;
  outline: none;
}
.mesas-inv-filter:focus { background: var(--bg); }
.mesas-inv-list {
  max-height: 200px; overflow-y: auto;
  display: flex; flex-direction: column;
}
.mesas-inv-option {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.4rem 0.75rem; cursor: pointer;
  transition: background .12s;
  font-size: 0.875rem; color: var(--text);
}
.mesas-inv-option:hover { background: var(--surface); }
.mesas-inv-option input[type=checkbox] { flex-shrink: 0; accent-color: var(--accent); }
.mesas-inv-option span:first-of-type { flex: 1; }
.mesas-inv-tag { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }

.mesas-table {
  width: 100%; border-collapse: collapse; font-size: 0.875rem;
}
.mesas-table th {
  text-align: left; font-size: 0.73rem; font-weight: 700;
  color: var(--text-muted); padding: 0.6rem 1rem;
  border-bottom: 2px solid var(--border); white-space: nowrap;
}
.mesas-table td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.mesas-table tr:last-child td { border-bottom: none; }
.mesas-table-row:hover td { background: var(--bg-alt); }
.mesas-table-tema { font-weight: 600; color: var(--text); min-width: 180px; }
.mesas-table-comps { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.mesa-part-chip {
  display: inline-block; padding: 0.15rem 0.55rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; font-size: 0.78rem; color: var(--text);
  text-decoration: none; transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.mesa-part-chip:hover { border-color: var(--accent); color: var(--accent); }

/* ── Mesas de otros invitados (companion) ────────────── */
.mesa-card-companion {
  background: var(--bg); border-color: var(--border);
  opacity: 0.85;
}
.mesa-comp-origin {
  font-size: 0.72rem; color: var(--text-muted); font-style: italic;
  margin-left: auto; white-space: nowrap;
}
.mesas-companion-section {
  margin-top: 0.75rem; padding-top: 0.6rem;
  border-top: 1px dashed var(--border);
}
.mesas-companion-label {
  font-size: 0.68rem; font-weight: 700; color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.kanban-mesa-row-companion { opacity: 0.75; }
/* ── Mesa detail ─────────────────────────────────────── */
.mesa-detail-rename-form {
  display: flex; align-items: center; gap: 0.6rem;
}
.mesa-detail-tema-input {
  flex: 1; font-size: 1.2rem; font-weight: 700;
  border: 1px solid transparent; border-radius: var(--radius);
  background: transparent; color: var(--text); padding: 0.25rem 0.4rem;
  font-family: inherit; transition: border-color .15s, background .15s;
}
.mesa-detail-tema-input:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
}
.mesa-detail-tema-ro { font-size: 1.2rem; font-weight: 700; margin: 0; }
.mesa-detail-parts { display: flex; flex-direction: column; gap: 0; margin-bottom: 0.75rem; }
.mesa-detail-part-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--bg);
}
.mesa-detail-part-row:last-child { border-bottom: none; }
.mesa-detail-part-name {
  flex: 1; font-size: 0.925rem; font-weight: 500; color: var(--text);
  text-decoration: none; transition: color .15s;
}
.mesa-detail-part-name:hover { color: var(--accent); }
.mesa-detail-part-badge {
  font-size: 0.68rem; font-weight: 600; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 0.1rem 0.45rem;
}
.mesa-detail-add-form {
  display: flex; align-items: center; gap: 0.5rem;
  padding-top: 0.6rem; border-top: 1px dashed var(--border); margin-top: 0.25rem;
}
/* ── Mesas index: sort & link ────────────────────────── */
.mesas-th-sortable { white-space: nowrap; }
.mesas-sort-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--text-muted); text-decoration: none; font-size: 0.73rem;
  font-weight: 700; transition: color .15s;
}
.mesas-sort-link:hover { color: var(--text); }
.mesas-table-tema-link {
  color: var(--text); text-decoration: none; font-weight: 600;
  transition: color .15s;
}
.mesas-table-tema-link:hover { color: var(--accent); text-decoration: underline; }

.mesa-join-form {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.mesa-select-wide { flex: 1; min-width: 0; max-width: 100%; }

/* ── Mesas sugeridas en kanban cards ─────────────────── */
.kanban-card-mesas {
  margin: 0.3rem 0 0.1rem;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.kanban-mesa-row {
  display: flex; align-items: baseline; gap: 0.35rem;
  font-size: 0.72rem; color: var(--text-muted); line-height: 1.35;
}
.kanban-mesa-row > i {
  font-size: 0.7rem; flex-shrink: 0; margin-top: 0.05rem; opacity: 0.6;
}
.kanban-mesa-tema {
  font-weight: 600; color: var(--text); margin-right: 0.1rem;
}
.kanban-mesa-comps {
  color: var(--text-muted); font-size: 0.68rem;
}

/* ── Dashboard: Novedades del equipo ─────────────────── */
.novedades-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  margin-bottom: 1rem;
}
.novedades-aside {
  display: flex; flex-direction: column; gap: 1rem;
}
.novedades-feed-card .activity-list {
  max-height: 420px;
  overflow-y: auto;
}

/* Feed badges por tipo de actividad */
.feed-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.68rem; padding: 1px 6px; border-radius: 10px;
  font-weight: 500; margin-left: 4px; vertical-align: middle;
}
.feed-badge-check_completado { background: #EDF7F2; color: var(--c-publicacion); }
.feed-badge-check_revertido  { background: #FEF2EF; color: var(--c-rodaje); }
.feed-badge-asignacion       { background: #F0EFFE; color: var(--c-edicion); }
.feed-badge-comentario       { background: var(--fill); color: var(--ink); }
.feed-badge-archivo          { background: var(--fill); color: var(--mute); }
.feed-badge-invitado         { background: #FDE9F4; color: var(--c-reels); }
.feed-badge-estado           { background: var(--fill); color: var(--mute); }

/* Vencimientos */
.venc-list { padding: 0 0.25rem; }
.venc-item-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 0.5px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: background .1s;
}
.venc-item-row:last-child { border-bottom: none; }
.venc-item-row:hover { background: var(--surface); }
.venc-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.venc-hoy     { background: var(--c-rodaje); }
.venc-manana  { background: var(--ink); }
.venc-pronto  { background: var(--mute); }
.venc-body    { flex: 1; min-width: 0; }
.venc-label   { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.venc-fecha   { font-size: 0.72rem; font-weight: 600; padding: 1px 7px; border-radius: 20px; flex-shrink: 0; }
.badge-venc-hoy   { background: #FEF2EF; color: var(--c-rodaje); }
.badge-venc-pronto { background: var(--fill); color: var(--mute); }

/* Para vos */
.para-vos-list { padding: 0 0.25rem; }
.para-vos-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 0.5px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: background .1s;
}
.para-vos-row:last-child { border-bottom: none; }
.para-vos-row:hover { background: var(--surface); }
.para-vos-ep {
  font-size: 0.72rem; color: var(--text-muted);
  min-width: 44px; flex-shrink: 0;
}
.para-vos-label { font-size: 0.8rem; flex: 1; min-width: 0; }

@media (max-width: 900px) {
  .novedades-grid { grid-template-columns: 1fr; }
}

/* ── Feed: botón config y panel ──────────────────────── */
.feed-config-btn {
  color: var(--text-muted);
  padding: 0.2rem 0.4rem;
}
.feed-config-btn:hover { color: var(--text); }

.feed-config-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--surface);
  margin: 0 0 0.75rem;
  overflow: hidden;
}
.feed-config-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 0.875rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.feed-config-title {
  font-size: 0.8rem; font-weight: 600;
  display: flex; align-items: center; gap: 0.4rem;
  color: var(--text);
}
.feed-config-close { color: var(--text-muted); }

.feed-config-grupo { padding: 0.5rem 0; }
.feed-config-nivel-label {
  font-size: 0.68rem; font-weight: 700; padding: 0.2rem 0.875rem 0.35rem;
  color: var(--text-muted);
}
.nivel-alto  .feed-config-nivel-label, .feed-config-grupo:has(.nivel-alto) .feed-config-nivel-label  { color: #27500A; }
.nivel-medio .feed-config-nivel-label, .feed-config-grupo:has(.nivel-medio) .feed-config-nivel-label { color: #0C447C; }

.feed-config-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.45rem 0.875rem;
  transition: background .1s;
}
.feed-config-row:hover { background: var(--bg); }
.feed-config-info { flex: 1; min-width: 0; }
.feed-config-label {
  font-size: 0.82rem; font-weight: 500; color: var(--text);
}
.feed-config-desc {
  font-size: 0.74rem; color: var(--text-muted); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feed-config-row.activo .feed-config-label { color: var(--text); }
.feed-config-row:not(.activo) .feed-config-label { color: var(--text-muted); }

/* Toggle switch */
.feed-config-toggle {
  background: none; border: none; cursor: pointer; padding: 2px; flex-shrink: 0;
}
.toggle-track {
  display: block; width: 34px; height: 18px; border-radius: 9px;
  background: var(--border); position: relative; transition: background .2s;
}
.toggle-thumb {
  display: block; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); position: absolute; top: 2px; left: 2px;
  transition: left .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.feed-config-toggle.on .toggle-track { background: #534AB7; }
.feed-config-toggle.on .toggle-thumb { left: 18px; }

.nivel-badge {
  display: inline-block; font-size: 0.67rem; font-weight: 700;
  padding: 1px 7px; border-radius: 10px; margin-bottom: 2px;
}
.nivel-alto  { background: #EAF3DE; color: #27500A; }
.nivel-medio { background: #E6F1FB; color: #0C447C; }
.nivel-bajo  { background: #F1F5F9; color: #334155; }

/* ── Feed: botón eliminar ítem ───────────────────────── */
.activity-item { position: relative; }
.feed-item-delete {
  display: none;
  position: absolute; top: 0.5rem; right: 0;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 2px 4px; border-radius: 4px;
  line-height: 1; font-size: 0.8rem;
  transition: color .15s, background .15s;
}
.activity-item:hover .feed-item-delete { display: block; }
.feed-item-delete:hover { color: #E24B4A; background: #FCEBEB; }

/* ── Notificaciones ─────────────────────────────────── */
.nav-spacer {
  height: 0;
  border-top: 1px solid rgba(255,255,255,.1);
  margin: 6px 0;
}
.notif-badge {
  background: var(--red); color: white;
  font-size: 0.65rem; font-weight: 700;
  padding: 1px 6px; border-radius: 10px; line-height: 1.6;
}
.topbar-notif {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  color: var(--mute); text-decoration: none;
  border-radius: var(--r-sm);
  font-size: 1.1rem;
  transition: color .12s, background .12s;
}
.topbar-notif:hover { color: var(--ink); background: var(--fill); }
.topbar-notif .notif-badge {
  position: absolute; top: 2px; right: 2px;
  padding: 1px 4px; font-size: 0.55rem;
}

/* Modal overlay */
.notif-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 500;
}
.notif-modal-box {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 501; background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); width: 420px; max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 4rem); overflow-y: auto;
  padding: 1.25rem; box-shadow: var(--shadow-md);
}
.notif-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; font-weight: 600; font-size: 0.95rem;
}
.notif-modal-label {
  font-size: 0.75rem; color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.notif-accion-preview {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
}
.notif-accion-tiempo { margin-left: auto; font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; }
.notif-dest-list { display: flex; flex-direction: column; gap: 2px; }
.notif-dest-sep { height: 1px; background: var(--border); margin: 0.4rem 0; }
.notif-dest-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0.5rem; border-radius: var(--radius-sm);
  font-size: 0.82rem; cursor: pointer;
}
.notif-dest-item:hover { background: var(--surface-2); }
.notif-dest-todos { font-weight: 500; }

/* Toast */
.notif-toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 600;
  background: #1A1A2E; color: white; border-radius: var(--radius);
  padding: 0.65rem 1rem; font-size: 0.85rem;
  display: flex; align-items: center; gap: 0.5rem;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* Página de notificaciones */
.notif-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--border);
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item-nueva { background: #F0F4FF; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-texto { font-size: 0.875rem; line-height: 1.45; word-break: break-word; }
.notif-item-mensaje {
  font-size: 0.82rem; color: var(--text-secondary);
  margin-top: 0.25rem; font-style: italic; word-break: break-word;
}
.notif-item-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; }
.notif-punto {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0; margin-top: 0.4rem;
}
.notif-item-link {
  display: block; text-decoration: none; color: inherit;
  border-radius: 6px; padding: 0.35rem 0.5rem; margin: -0.35rem -0.5rem 0;
  transition: background 0.12s;
}
.notif-item-link:hover { background: var(--surface-2); }
.notif-ir {
  display: inline-flex; align-items: center; gap: 0.2rem;
  font-size: 0.72rem; color: var(--accent); margin-left: 0.5rem; font-weight: 500;
}
.notif-item-actions {
  display: flex; gap: 0.25rem; margin-top: 0.5rem;
}
.notif-action-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 0.2rem 0.5rem;
  border-radius: 4px; font-size: 0.75rem;
  display: flex; align-items: center; gap: 0.25rem;
  transition: color 0.15s, background 0.15s;
}
.notif-action-btn:hover { background: var(--surface-2); color: var(--text-primary); }
.notif-action-delete:hover { color: #dc2626; }
.notif-reply-quote {
  background: var(--surface-2); border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0; padding: 0.55rem 0.8rem; margin-bottom: 1rem;
  font-size: 0.82rem;
}
.taller-comunicar-banner {
  display: flex; align-items: center; gap: 0.6rem;
  background: #EEF6FF; border: 1px solid #BFDBFE;
  border-radius: 6px; padding: 0.5rem 0.75rem;
  font-size: 0.82rem; color: #1D4ED8;
  margin-bottom: 0.75rem;
}
.taller-comunicar-banner span { flex: 1; }
.taller-comunicar-btn {
  background: #2563EB; color: white; border: none; cursor: pointer;
  border-radius: 5px; padding: 0.3rem 0.7rem; font-size: 0.78rem;
  display: flex; align-items: center; gap: 0.3rem;
  white-space: nowrap; transition: background 0.15s;
}
.taller-comunicar-btn:hover { background: #1D4ED8; }
.notif-accion-vacia { color: var(--text-muted); font-style: italic; }
.notif-historial-toggle {
  display: flex; align-items: center; gap: 0.4rem;
  background: none; border: none; cursor: pointer;
  font-size: 0.8rem; color: var(--text-secondary);
  padding: 0.25rem 0; margin-bottom: 0.25rem;
  transition: color 0.15s;
}
.notif-historial-toggle:hover { color: var(--accent); }
.notif-historial-item {
  display: flex; align-items: baseline; justify-content: space-between;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 0.45rem 0.75rem; border-radius: 6px; text-align: left;
  font-size: 0.82rem; gap: 0.5rem; transition: background 0.1s;
}
.notif-historial-item:hover { background: var(--surface-2); }
.notif-historial-item.activa { background: var(--surface-2); color: var(--accent); font-weight: 500; }
.notif-historial-desc { flex: 1; }
.notif-historial-tiempo { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.notif-reply-de { font-weight: 600; color: var(--text-primary); margin-bottom: 0.15rem; }
.notif-reply-accion { color: var(--text-secondary); }
.notif-reply-msg { color: var(--text-muted); font-style: italic; margin-top: 0.1rem; }
.notif-hilo {
  display: flex; align-items: baseline; gap: 0.4rem;
  font-size: 0.75rem; color: var(--text-muted);
  border-left: 2px solid var(--border); padding-left: 0.6rem;
  margin-bottom: 0.4rem; line-height: 1.35;
}
.notif-hilo-de { font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.notif-hilo-texto { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-enviada-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem; }
.notif-enviada-arrow { color: var(--text-muted); font-size: 0.8rem; }

/* ═══════════════════════════════════════════════════════
   MOBILE — optimización integral para celular
   (375–768px)
═══════════════════════════════════════════════════════ */

/* ── Push notification banner ─────────────────────────── */
#push-banner {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  border-radius: 10px; padding: 0.65rem 1rem;
  font-size: 0.82rem; color: var(--text-primary);
  max-width: calc(100vw - 2rem); z-index: 1000;
  white-space: nowrap;
}
#push-banner span { white-space: normal; }
#push-banner button:first-of-type {
  background: var(--accent); color: #fff; border: none;
  border-radius: 6px; padding: 0.3rem 0.75rem;
  font-size: 0.8rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
#push-banner button:first-of-type:hover { opacity: 0.88; }
.push-banner-close {
  background: none !important; border: none !important; color: var(--text-muted) !important;
  cursor: pointer; font-size: 0.9rem; padding: 0 0.1rem !important;
  line-height: 1; flex-shrink: 0;
}

@media (max-width: 768px) {
  /* ── Main content ── */
  .main-content { padding: 0.75rem; }

  /* ── Topbar ── */
  .topbar-comunicar-txt { display: none; }
  .topbar-comunicar { padding: 0.35rem 0.5rem; border-radius: 6px; }
  .topbar-title {
    overflow: hidden; white-space: nowrap;
    text-overflow: ellipsis; min-width: 0;
    font-size: 0.8rem;
  }
  .topbar-right { flex-shrink: 0; }

  /* ── Formularios → columna única ── */
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }

  /* ── Episode hero ── */
  .episode-hero-header { flex-direction: column; gap: 0.5rem; }
  .episode-status-info { flex-wrap: wrap; }
  .ep-hero-body { flex-direction: column; }
  .ep-hero-right { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .ep-hero-title { font-size: 1.3rem; }
  .stages-bar { border-radius: var(--r-ctl); }
  .stage-item { min-width: 90px; padding: .6rem .5rem; }
  .stage-resp { display: none; }

  /* ── Secciones edición/postpro ── */
  .edicion-row { flex-direction: column; gap: 0; }
  .edicion-campo-fecha { min-width: 0; width: 100%; }

  /* ── Preproducción fechas confirmadas ── */
  .prepro-fecha-confirmed-fields { flex-direction: column; gap: 0.5rem; }
  .prepro-fecha-input-sm { width: 100%; }

  /* ── Checklists ── */
  .check-item-row { flex-wrap: wrap; gap: 0.4rem; }

  /* ── Dashboard cards ── */
  .ep-row-num { min-width: 38px; font-size: 0.68rem; }
  .ep-row-meta { flex-wrap: wrap; gap: 0.2rem; }

  /* ── Cards ── */
  .card { border-radius: 8px; }

  /* ── Notificaciones ── */
  .notif-item-avatar { display: none; }
  .notif-item { padding: 0.75rem; }
}

@media (max-width: 480px) {
  /* ── Main content ── */
  .main-content { padding: 0.5rem; }

  /* ── Topbar: action buttons → icon only ── */
  .topbar-actions .btn { font-size: 0; padding: 0.45rem 0.55rem; min-height: 36px; }
  .topbar-actions .btn i { font-size: 1rem; }
  /* Comunicar accesible desde sidebar en celular */
  .topbar-comunicar { display: none; }

  /* ── Episode detail ── */
  .episode-hero { padding: 0.875rem; }
  .episode-num { font-size: 0.65rem; }
  .episode-tema { font-size: 1.1rem; }
  .episode-tabs-wrap { margin: 0 -0.5rem; padding: 0 0.5rem; }

  /* ── Métricas dashboard ── */
  .metric-card { padding: 0.65rem 0.75rem; }
  .metric-label { font-size: 0.65rem; }
  .metric-value { font-size: 1.25rem; }

  /* ── Feed actividad ── */
  .activity-item { padding: 0.6rem 0.75rem; gap: 0.5rem; }
  .activity-avatar { width: 28px; height: 28px; font-size: 0.75rem; flex-shrink: 0; }

  /* ── Botones táctiles ── */
  .btn { min-height: 36px; }
  .btn-sm { min-height: 32px; }

  /* ── Episodio lista ── */
  .episodes-table td, .episodes-table th { padding: 0.4rem 0.5rem; font-size: 0.8rem; }

  /* ── Notificaciones ── */
  .notif-item-actions { margin-top: 0.35rem; }

  /* ── Kanban ── */
  .kanban-col { padding: 0.75rem; }

  /* ── Invitados ── */
  .seg-row { gap: 0.5rem; }

  /* ── Fecha/hora selects (no desborde horizontal) ── */
  select, input[type="date"], input[type="time"], input[type="text"], textarea {
    max-width: 100%;
  }
}

/* ── Dashboard mobile ──────────────────────────────── */
@media (max-width: 768px) {
  /* Apilar las dos grillas del dashboard */
  .r-62, .r-38 { grid-template-columns: 1fr; }

  /* Hero sin altura máxima (stacked tiene espacio) */
  .hero { max-height: none; }

  /* Filtros del calendario: wrap en pantallas angostas */
  .cal-filtros { flex-wrap: wrap; gap: 0.35rem; }

  /* Pipeline: mantener 3 columnas pero más compacto */
  .pb-stages { gap: 12px; }
  .pipe-block, .pubs-block { padding: 18px 20px; }
  .novedades-card { padding: 18px 20px; }
}

@media (max-width: 480px) {
  /* Hero más compacto en celulares pequeños */
  .hero { padding: 18px 18px 16px; gap: 12px; }
  .hero-n { font-size: 44px; }
  .hero-tema { font-size: 19px; }

  /* Pipeline: colapsar a lista vertical si el contenido desborda */
  .pb-stages { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .pb-stage .n { font-size: 24px; }

  /* Publicaciones: más compacto */
  .pubs-fecha { font-size: 16px; }
  .pubs-yt-stats { gap: 10px; }

  /* Requiere Acción: descripción puede truncar menos agresivo */
  .dp-desc { font-size: 13px; }
  .dp-item { padding: 10px 14px; }
  .dash-panel .dp-head { padding: 12px 14px; }
}
