/**
 * LiveYouTools - YouTube Studio Dark Theme
 * Estilo exacto de YouTube Studio (tema oscuro)
 */

/* Carga local de Material Symbols Outlined para evitar FOUC (pestañazos de texto) */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  src: url('../fonts/material-symbols-outlined.woff2') format('woff2');
  font-display: block; /* Forzar a que el navegador espere a la fuente antes de mostrar texto */
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

:root {
  /* YouTube Studio Colors */
  --yt-spec-base-background: #0F0F0F;
  --yt-spec-raised-background: #212121;
  --yt-spec-menu-background: #282828;
  --yt-spec-10-percent-layer: rgba(255, 255, 255, 0.1);
  --yt-spec-text-primary: #FFFFFF;
  --yt-spec-text-secondary: #AAAAAA;
  --yt-spec-text-disabled: #717171;
  --yt-spec-icon-inactive: #909090;
  --yt-spec-icon-active: #FFFFFF;
  --yt-spec-static-brand-red: #FF0000;
  --yt-spec-static-brand-blue: #3EA6FF;
  --yt-spec-static-overlay-background-heavy: rgba(0, 0, 0, 0.8);
  --yt-spec-static-overlay-background-light: rgba(0, 0, 0, 0.6);
  --yt-spec-general-background-a: #181818;
  --yt-spec-general-background-b: #0F0F0F;
  --yt-spec-general-background-c: #272727;
  --yt-spec-error-background: #3E0D0D;
  --yt-spec-additive-background: rgba(255, 255, 255, 0.05);
  --yt-spec-outline: #303030;
  --yt-spec-call-to-action: #CC0000;
  --yt-spec-brand-background-solid: #CC0000;
  --yt-spec-brand-background-primary: #CC0000;
  --yt-spec-wordmark-text: #FFFFFF;
  --yt-spec-filled-button-text: #0F0F0F;
  
  /* Layout */
  --yt-sidebar-width: 210px;
  
  /* Typography */
  /* --yt-font-family-primary: Roboto, Arial, sans-serif; */
  --yt-font-family-primary: ui-sans-serif, -apple-system, system-ui, BlinkMacSystemFont;
  --yt-font-family-secondary: "Roboto Mono", monospace;
  --yt-font-size-base: 0.875rem;
  --yt-font-size-filters: 0.75rem;
  --yt-font-size-logs: 0.68rem;
  --yt-font-size-label: 0.625rem;
  
  /* Spacing */
  --yt-spacing-xs: 4px;
  --yt-spacing-s: 8px;
  --yt-spacing-m: 12px;
  --yt-spacing-l: 16px;
  --yt-spacing-xl: 24px;
  
  /* Scrollbars */
  --yt-scrollbar-width: 6px;
  --yt-scrollbar-thumb: rgba(255, 255, 255, 0.12);
  --yt-scrollbar-thumb-hover: rgba(255, 255, 255, 0.24);
  --yt-scrollbar-track: transparent;

  /* Border radius */
  --yt-border-radius-small: 2px;
  --yt-border-radius-medium: 4px;
  --yt-border-radius-large: 8px;
  --yt-border-radius-xlarge: 12px;
  
  /* Shadows */
  --yt-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --yt-shadow-2: 0 2px 4px rgba(0, 0, 0, 0.3);
  --yt-shadow-3: 0 4px 8px rgba(0, 0, 0, 0.3);

  /* Superficies compartidas (select flotante / theme selector) */
  --ly-floating-surface-bg: rgba(0, 0, 0, 0.2);
  --ly-floating-surface-bg-hover: rgba(0, 0, 0, 0.28);
  --ly-floating-surface-border: rgba(255, 255, 255, 0.15);
  --ly-floating-surface-border-hover: rgba(255, 255, 255, 0.25);
  --ly-surface-panel: var(--yt-spec-raised-background);
  --ly-surface-panel-border: rgba(255, 255, 255, 0.12);
  --ly-surface-panel-shadow: var(--yt-shadow-2);

  /* Live Badge Colors */
  --live-red: #ff0000;
  --live-gray: #717171;
  --live-bg-active: #ff0000;
  --live-text-active: #ffffff;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

*[hidden] {
  display: none !important;
}

body {
  font-family: var(--yt-font-family-primary);
  background: var(--yt-spec-base-background);
  color: var(--yt-spec-text-primary);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--yt-scrollbar-thumb) var(--yt-scrollbar-track);
}

*::-webkit-scrollbar {
  width: var(--yt-scrollbar-width);
  height: var(--yt-scrollbar-width);
}

*::-webkit-scrollbar-track {
  background: var(--yt-scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  background: var(--yt-scrollbar-thumb);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--yt-scrollbar-thumb-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
}

a {
  color: var(--yt-spec-call-to-action);
  text-decoration-color: var(--yt-spec-text-primary);
  text-decoration: none;
  font-weight: 400;
  font-size: 14px;
  font-family: var(--yt-font-family-primary);
  font-style: normal;
  font-variant: normal;
  font-stretch: normal;
  font-size-adjust: none;
  font-stretch: normal;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  border-radius: var(--yt-border-radius-large);
  background: none;
  cursor: pointer;
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.ghost-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.ghost-btn.danger {
  border-color: rgba(255, 99, 99, 0.4);
  color: #ff6b6b;
}

.pill-btn {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================
   LAYOUT
   ============================================ */

.lyt-shell {
  display: flex;
  min-height: 100vh;
  background: var(--yt-spec-base-background);
}

.lyt-sidebar {
  width: var(--yt-sidebar-width);
  background: var(--yt-spec-raised-background);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--yt-spec-outline);
  overflow-y: auto;
  overflow-x: hidden;
  height: 100vh;
  max-height: 100vh;
  flex-shrink: 0;
  transition: width 0.2s ease;
}

.lyt-sidebar.collapsed {
  width: 72px;
}

.lyt-sidebar.collapsed .logo span {
  opacity: 0;
  width: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.lyt-sidebar.collapsed .logo {
  justify-content: center;
  padding: 0;
  min-width: auto;
  margin-left: 10px;
}

.lyt-sidebar.collapsed .logo-header {
  padding: var(--yt-spacing-m) 0;
  flex-direction: column;
  gap: var(--yt-spacing-s);
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  height: 80px;
  
}

.lyt-sidebar.collapsed .sidebar-toggle {
  width: 32px;
  height: 32px;
}

.lyt-sidebar.collapsed .sidebar-toggle .material-symbols-outlined {
  font-size: 18px;
}

.lyt-sidebar.collapsed .sidebar-nav-container span:not(.nav-icon) {
  display: none;
}

.lyt-sidebar.collapsed .collapsible-toggle span:not(.nav-icon):not(.collapse-arrow) {
  display: none;
}

.lyt-sidebar.collapsed .collapsible-toggle {
  justify-content: center;
  padding: 12px 0;
  margin: 4px 0;
}

.lyt-sidebar.collapsed .collapsible-toggle .collapse-arrow {
  display: none;
}

.lyt-sidebar.collapsed .collapsible-subitems {
  display: none;
}

.lyt-sidebar.collapsed .nav-icon {
  margin: 0 auto;
}

.lyt-sidebar.collapsed .nav-icon svg {
  width: 24px;
  height: 24px;
}

.lyt-sidebar.collapsed .lyt-sidebar-nav a {
  justify-content: center;
  padding: 12px 0;
  margin: 4px 0;
  border-radius: 0;
}


.lyt-sidebar.collapsed .lyt-sidebar-nav {
  padding: 0;
  margin-bottom: var(--yt-spacing-s);
}

.lyt-sidebar.collapsed .sidebar-nav-container {
  padding: var(--yt-spacing-s) 0;
}

.lyt-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.lyt-header {
  padding: var(--yt-spacing-m) var(--yt-spacing-xl);
  border-bottom: 1px solid var(--yt-spec-outline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--yt-spacing-l);
  background: var(--yt-spec-base-background);
  min-height: 64px;
  flex-wrap: nowrap;
}

.lyt-header h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--yt-spec-text-primary);
  margin: 0;
  white-space: nowrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--yt-spacing-l);
  flex: 1;
  min-width: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--yt-spacing-m);
  flex-wrap: nowrap;
}

.header-actions:empty {
  display: none;
}

.lyt-content {
  padding: var(--yt-spacing-s);
  flex: 1;
  overflow-y: auto;
}

.spa-view {
  display: none;
}

.spa-view.is-active {
  display: block;
}

/* ============================================
   SIDEBAR
   ============================================ */

.lyt-sidebar .logo-header {
  padding: var(--yt-spacing-m) var(--yt-spacing-m);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--yt-spec-outline);
  transition: all 0.2s ease;
  height: 64px;
}

.lyt-sidebar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--yt-spec-wordmark-text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.2px;
  flex: 1;
  min-width: 0;
  transition: all 0.2s ease;
}

.lyt-sidebar .logo span {
  transition: opacity 0.2s ease, width 0.2s ease;
  white-space: nowrap;
}

.lyt-sidebar .logo-icon {
  width: 28px;
  height: 28px;
  background: #FF3B30;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(255, 59, 48, 0.3);
}

.lyt-sidebar .logo-icon svg {
  width: 18px;
  height: 18px;
  fill: white;
}

.sidebar-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--yt-spec-text-secondary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: var(--yt-spec-10-percent-layer);
  color: var(--yt-spec-text-primary);
}

.sidebar-toggle .material-symbols-outlined {
  font-size: 20px;
}

.sidebar-nav-container {
  flex: 1;
  padding: var(--yt-spacing-s) 0;
}

.lyt-sidebar-nav {
  margin-bottom: var(--yt-spacing-m);
}


.lyt-sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lyt-sidebar-nav li {
  margin: 0;
}

.lyt-sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 10px var(--yt-spacing-m);
  color: var(--yt-spec-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: all 0.15s ease;
  gap: 12px;
}

.lyt-sidebar-nav a .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.7;
}

.lyt-sidebar-nav a .nav-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.lyt-sidebar-nav a:hover {
  background: var(--yt-spec-10-percent-layer);
  text-decoration: none;
  color: var(--yt-spec-text-primary);
}

.lyt-sidebar-nav a:hover .nav-icon {
  opacity: 1;
}

.lyt-sidebar-nav a.active {
  background: var(--yt-spec-additive-background);
  font-weight: 400;
  color: var(--yt-spec-text-primary);
}

.lyt-sidebar-nav a.active .nav-icon {
  opacity: 1;
}

/* Collapsible Item (Administración) */
.collapsible-item {
  margin: 0;
}

.collapsible-toggle {
  display: flex;
  align-items: center;
  padding: 10px var(--yt-spacing-m);
  color: var(--yt-spec-text-secondary);
  font-size: 14px;
  font-weight: 400;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.collapsible-toggle:hover {
  background: var(--yt-spec-10-percent-layer);
  color: var(--yt-spec-text-primary);
}

.collapsible-toggle .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.7;
}

.collapsible-toggle .nav-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.collapsible-toggle:hover .nav-icon {
  opacity: 1;
}

.collapsible-toggle .collapse-arrow {
  margin-left: auto;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--yt-spec-icon-inactive);
  transition: transform 0.3s ease;
}

.collapsible-toggle .collapse-arrow svg {
  width: 18px;
  height: 18px;
}

.collapsible-subitems {
  list-style: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.15);
}

.collapsible-subitems li {
  margin: 0;
}

.collapsible-subitems a {
  padding: 8px var(--yt-spacing-m) 8px calc(var(--yt-spacing-m) + 32px);
  font-size: 13px;
}

/* User Section */
.header-status-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 12px;
}

.header-system-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-stat-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #717171;
  font-size: var(--yt-font-size-filters);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  cursor: pointer;
}

.system-stat-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #a0a0a0;
}

.cpu-stat {
  min-width: 70px;
  font-variant-numeric: tabular-nums;
}

.ram-stat {
  min-width: 145px;
  font-variant-numeric: tabular-nums;
}

.system-stat-separator {
  opacity: 0.2;
  font-weight: 300;
}

.header-streams-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #717171;
  font-size: var(--yt-font-size-filters);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  cursor: pointer;
}

.header-streams-badge.is-active {
  background: #CC0000;
  border-color: #CC0000;
  color: #FFFFFF;
  animation: live-pulse-yt 2s infinite ease-in-out;
  box-shadow: 0 0 20px rgba(204, 0, 0, 0.5);
}

.streams-badge-count {
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 3px;
  min-width: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.header-streams-badge.is-active .streams-badge-count {
  background: rgba(255, 255, 255, 0.25);
}

@keyframes live-pulse-yt {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0px rgba(204, 0, 0, 0);
  }
  50% {
    transform: scale(1.0);
    box-shadow: 0 0 15px rgba(204, 0, 0, 0.99);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0px rgba(204, 0, 0, 0);
  }
}

.header-user-section {
  display: flex;
  align-items: center;
  gap: var(--yt-spacing-m);
  margin-left: auto;
  flex-shrink: 0;
}

.header-user-section .user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
  min-width: 0;
}

.header-user-section .user-name {
  font-size: 14px;
  font-weight: 400;
  color: var(--yt-spec-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-user-section .user-email {
  font-size: 12px;
  color: var(--yt-spec-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-user-section .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--yt-spec-call-to-action);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yt-spec-base-background);
  font-weight: 500;
  font-size: 16px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.header-user-section .btn-logout {
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--yt-spec-outline);
  color: var(--yt-spec-text-primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-user-section .btn-logout .material-symbols-outlined {
  font-size: 20px;
}

.header-user-section .btn-logout:hover {
  background: var(--yt-spec-10-percent-layer);
  border-color: var(--yt-spec-text-secondary);
}

/* ============================================
   BUTTONS
   ============================================ */

.primary,
.channel-sidebar .primary,
.channel-sidebar .btn.primary,
.channel-sidebar .primary.add-channel{
  background: var(--yt-spec-call-to-action);
  color: var(--yt-spec-text-primary);
  padding: var(--yt-spacing-xs) var(--yt-spacing-m);
  border-radius: var(--yt-border-radius-xlarge);
  font-size: 14px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: var(--yt-spacing-m);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.primary:hover,
.channel-sidebar .primary:hover,
.channel-sidebar .btn.primary:hover,
.channel-sidebar .primary.add-channel:hover {
  background:var(--yt-spec-static-brand-red);
  text-decoration: none;
}

.secondary {
  background: transparent;
  color: var(--yt-spec-text-primary);
  padding: 10px 16px;
  border: 1px solid var(--yt-spec-outline);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: var(--yt-spacing-s);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.secondary:hover {
  background: var(--yt-spec-10-percent-layer);
  border-color: var(--yt-spec-text-secondary);
  text-decoration: none;
}

/* ============================================
   CARDS & PANELS
   ============================================ */

.card {
  background: var(--yt-spec-raised-background);
  border: 1px solid var(--yt-spec-outline);
  border-radius: var(--yt-border-radius-xlarge);
  padding: var(--yt-spacing-l);
}

.card h3 {
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yt-spec-text-secondary);
  margin-bottom: var(--yt-spacing-s);
}

.card strong {
  font-size: 32px;
  font-weight: 400;
  color: var(--yt-spec-text-primary);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--yt-spacing-l);
  margin-bottom: var(--yt-spacing-xl);
}

/* ============================================
   TABLES
   ============================================ */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--yt-spec-raised-background);
  border: 1px solid var(--yt-spec-outline);
  border-radius: var(--yt-border-radius-small);
  overflow: hidden;
}

table thead {
  background: var(--yt-spec-menu-background);
}

table th {
  text-align: left;
  padding: 12px var(--yt-spacing-l);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yt-spec-text-secondary);
  border-bottom: 1px solid var(--yt-spec-outline);
}

table td {
  padding: 12px var(--yt-spacing-l);
  font-size: 14px;
  color: var(--yt-spec-text-primary);
  border-bottom: 1px solid var(--yt-spec-outline);
}

table tr:last-child td {
  border-bottom: none;
}

table tr:hover {
  background: var(--yt-spec-10-percent-layer);
}

/* ============================================
   FORMS & INPUTS
   ============================================ */

.field {
  margin-bottom: var(--yt-spacing-l);
}

label {
  display: block;
  margin-bottom: var(--yt-spacing-s);
  font-size: 13px;
  font-weight: 400;
  color: var(--yt-spec-text-secondary);
}

.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  background: var(--yt-spec-raised-background);
  border: 1px solid var(--yt-spec-outline);
  border-radius: var(--yt-border-radius-large);
  color: var(--yt-spec-text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.input:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--yt-spec-call-to-action);
}

.input:hover,
input:hover,
textarea:hover,
select:hover {
  border-color: var(--yt-spec-text-secondary);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* ============================================
   STATUS PILLS
   ============================================ */

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-live {
  background: rgba(0, 255, 0, 0.15);
  color: #00FF00;
}

.status-error {
  background: rgba(255, 0, 0, 0.15);
  color: #FF6B6B;
}

.status-pending {
  background: rgba(255, 184, 0, 0.15);
  color: #FFB800;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */

.lyt-notifications {
  position: fixed;
  top: var(--yt-spacing-l);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--yt-spacing-s);
  /* Debe estar por encima de cualquier overlay/modal (ej: confirm-modal z-index: 10000). */
  z-index: 100001;
  pointer-events: none;
}

.notification {
  min-width: 320px;
  max-width: 500px;
  background: var(--yt-spec-menu-background);
  border: 1px solid var(--yt-spec-outline);
  border-radius: var(--yt-border-radius-large);
  padding: var(--yt-spacing-xs);
  box-shadow: var(--yt-shadow-3);
  display: flex;
  align-items: center;
  gap: var(--yt-spacing-xs);
  pointer-events: auto;
  animation: fadeIn 0.3s ease;
  /* margin-top: 0; */
}

.notification.leaving {
  animation: fadeOut 0.3s ease forwards;
}

.notification-info {
  border-top: 1px solid var(--yt-spec-call-to-action);
  border-bottom: 1px solid var(--yt-spec-call-to-action);
  border-left: 3px solid var(--yt-spec-call-to-action);
  border-right: 3px solid var(--yt-spec-call-to-action);
}

.notification-success {
  border-top: 1px solid #00FF00;
  border-bottom: 1px solid #00FF00;
  border-left: 3px solid #00FF00;
  border-right: 3px solid #00FF00;
}

.notification-error {
  /* border-top: 1px solid #FF0000;
  border-bottom: 1px solid #FF0000; */
  border-left: 3px solid #FF0000;
  border-right: 3px solid #FF0000;
}

.notification-actions {
  display: flex;
  gap: var(--yt-spacing-s);
  margin-left: auto;
}

.notification-actions button {
  padding: 4px 8px;
  background: transparent;
  border: 1px solid var(--yt-spec-outline);
  color: var(--yt-spec-text-primary);
  border-radius: var(--yt-border-radius-large);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notification-actions button:hover {
  background: var(--yt-spec-10-percent-layer);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Connection Status Overlay */
.connection-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  backdrop-filter: blur(8px);
  color: white;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.connection-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.connection-card {
  background: #1e1e1e;
  padding: 40px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  max-width: 400px;
  text-align: center;
}

.connection-icon {
  font-size: 64px !important;
  color: #ff4e4e;
  animation: pulse-connection 2s infinite;
}

@keyframes pulse-connection {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

.connection-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.connection-msg {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  margin: 0;
}

/* ============================================
   AUTH / LOGIN PAGE
   ============================================ */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yt-spec-base-background);
  padding: var(--yt-spacing-xl);
}

.auth-card {
  background: var(--yt-spec-raised-background);
  border: 1px solid var(--yt-spec-outline);
  border-radius: var(--yt-border-radius-small);
  max-width: 400px;
  width: 100%;
  padding: var(--yt-spacing-xl);
  box-shadow: var(--yt-shadow-2);
}

.auth-card header {
  margin-bottom: var(--yt-spacing-xl);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.auth-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: #FF3B30;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(255, 59, 48, 0.4);
}

.auth-logo .logo-icon svg {
  width: 22px;
  height: 22px;
  fill: white;
}

.auth-card h1 {
  font-size: 28px;
  font-weight: 400;
  color: var(--yt-spec-text-primary);
  margin: 0;
}

.auth-card h1 strong {
  font-weight: 600;
}

.auth-card header p {
  font-size: 14px;
  color: var(--yt-spec-text-secondary);
}

.auth-feedback {
  padding: var(--yt-spacing-m);
  border: 1px solid var(--yt-spec-outline);
  border-radius: var(--yt-border-radius-small);
  margin-bottom: var(--yt-spacing-l);
  font-size: 13px;
}

.auth-feedback[data-type="error"] {
  border-color: var(--yt-spec-static-brand-red);
  color: #FF6B6B;
  background: rgba(255, 0, 0, 0.1);
}

.auth-feedback[data-type="success"] {
  border-color: #00FF00;
  color: #00FF00;
  background: rgba(0, 255, 0, 0.1);
}

.auth-feedback[data-type="info"] {
  border-color: var(--yt-spec-call-to-action);
  color: var(--yt-spec-call-to-action);
  background: rgba(62, 166, 255, 0.1);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: var(--yt-spacing-m);
  margin: var(--yt-spacing-l) 0;
}

.auth-separator {
  text-align: center;
  color: var(--yt-spec-text-disabled);
  font-size: 14px;
  font-weight: 400;
  margin: var(--yt-spacing-xs) 0;
  position: relative;
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 20px);
  height: 1px;
  background: var(--yt-spec-outline);
}

.auth-separator::before {
  left: 0;
}

.auth-separator::after {
  right: 0;
}

.auth-actions button {
  width: 100%;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--yt-spacing-m);
  border-radius: var(--yt-border-radius-xlarge);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.login-google-btn {
  background: var(--yt-spec-call-to-action);
  color: var(--yt-spec-text-primary);
  border: none;
}

.login-google-btn:hover {
  background:var(--yt-spec-static-brand-red);
}

.signup-google-btn {
  background: transparent;
  color: var(--yt-spec-text-primary);
  border: 1px solid var(--yt-spec-outline);
}

.signup-google-btn:hover {
  background: var(--yt-spec-10-percent-layer);
}

.google-icon {
  width: 18px;
  height: 18px;
  background: conic-gradient(
    #ea4335 0deg 90deg,
    #fbbc05 90deg 180deg,
    #34a853 180deg 270deg,
    #4285f4 270deg 360deg
  );
  border-radius: 50%;
  flex-shrink: 0;
}

.auth-helper {
  margin-top: var(--yt-spacing-l);
  font-size: 12px;
  color: var(--yt-spec-text-disabled);
  text-align: center;
  line-height: 1.5;
}

/* ============================================
   CHANNEL LIST
   ============================================ */

.channel-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.channel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--yt-spacing-m) 0;
  border-bottom: 1px solid var(--yt-spec-outline);
}

.channel-row:last-child {
  border-bottom: none;
}

.channel-row:hover {
  background: var(--yt-spec-10-percent-layer);
}

.channel-meta {
  font-size: 13px;
  color: var(--yt-spec-text-secondary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 960px) {
  .lyt-shell {
    flex-direction: column;
  }

  .lyt-sidebar {
    width: 100%;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--yt-spec-outline);
    position: relative;
  }

  .lyt-header {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: var(--yt-spacing-m);
    gap: var(--yt-spacing-m);
  }

  .header-left {
    justify-content: center;
    width: 100%;
  }

  .header-user-section {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--yt-spacing-m);
    width: 100%;
  }

  .header-status-badges {
    flex-direction: column;
    width: 100%;
    margin-right: 0;
    gap: var(--yt-spacing-s);
    order: -1; /* Asegura que los badges siempre estén arriba */
  }

  .header-system-stats, 
  .header-streams-badge,
  .system-stat-badge {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-user-section .user-info {
    flex: 1;
    min-width: 0;
    text-align: right;
    align-items: flex-end;
    display: flex;
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .lyt-content {
    padding: var(--yt-spacing-m);
  }

  .lyt-header {
    padding: var(--yt-spacing-m);
  }

  .auth-card {
    padding: var(--yt-spacing-l);
  }

  .header-user-section {
    gap: 12px;
    padding: 0;
    justify-content: flex-end;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-primary {
  color: var(--yt-spec-text-primary);
}

.text-secondary {
  color: var(--yt-spec-text-secondary);
}

.text-disabled {
  color: var(--yt-spec-text-disabled);
}

.bg-raised {
  background: var(--yt-spec-raised-background);
}

.bg-menu {
  background: var(--yt-spec-menu-background);
}

.border-outline {
  border: 1px solid var(--yt-spec-outline);
}

.hidden {
  display: none !important;
}

/* ============================================
   CHANNEL SIDEBAR 2.0
   ============================================ */
.page-subtitle {
  color: #a1a1a1;
  margin-top: 4px;
  font-size: 0.95rem;
}

.channel-sidebar-wrapper {
  width: 100%;
}

.channel-sidebar {
  background: #0d0d0f;
  /* border-radius: 20px; */
  padding: 0px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0px;
  min-height: calc(95vh);
}

.channel-sidebar-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  margin-top: 8px;
}

.channel-sidebar-toolbar h2 {
  margin: 0;
  font-size: 1.3rem;
}

.channel-sidebar-toolbar p {
  margin: 4px 0 0;
  color: #9c9c9c;
}

.channel-sidebar .btn,
.channel-sidebar .primary,
.channel-sidebar .ghost-btn,
.channel-sidebar .pill-btn,
.channel-sidebar .danger-btn {
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

/* .channel-sidebar .btn.primary,
.channel-sidebar .primary.add-channel {
  background: linear-gradient(135deg, #ff6b6b, #f06595);
  color: #fff;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 999px;
} */

.channel-sidebar .btn.primary.loading {
  opacity: 0.6;
  pointer-events: none;
}

.channel-sidebar .channel-empty {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  color: #c2c2c2;
  line-height: 1.6;
}

.channel-sidebar .channel-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: none;
  height: auto;
  overflow-y: visible;
  padding-right: 6px;
  padding-bottom: var(--yt-spacing-xl);
}

.channel-selector {
  display: flex;
  align-items: center;
  gap: var(--yt-spacing-s);
  width: 320px;
  max-width: 100%;
}

.channel-selector-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--yt-spacing-m);
  align-items: stretch;
  margin-bottom: var(--yt-spacing-l);
}

.channel-selector-slot {
  flex: 1 1 320px;
  min-width: 320px;
  min-height: 40px;
}

.media-usage-indicator {
  flex: 0 0 360px;
  min-width: 360px;
  height: 50px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 768px) {
.media-usage-indicator {
    flex: 1 1 100%;
  }

  /* Ajuste de cards de medios para móvil */
  .media-card {
    grid-template-columns: 44px 120px 1fr;
    gap: 6px;
    padding: 4px;
    min-height: 80px;
  }

  .media-card-thumb {
    width: 160px;
    height: 90px;
  }

  .media-card-body {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .media-card-body.has-assoc {
    grid-template-columns: 1fr !important;
  }

  .media-card-channel-panel {
    max-width: 100%;
    min-height: auto;
    height: auto;
    max-height: none;
  }

  .media-card-linked-panel {
    max-width: 100%;
  }

  .media-card-channel-chips {
    flex-wrap: wrap;
  }
}

.media-usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  /* margin-bottom: 8px; */
}

.media-usage-label {
  color: rgba(255, 255, 255, 0.7);
}

.media-usage-details {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  text-transform: none;
  letter-spacing: normal;
}

.media-usage-head strong {
  font-size: 1.05rem;
  color: #fff;
}

.media-usage-bar {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 4px;
}

.new-stream-shell {
  width: 100%;
  padding: 0 0px 8px 0px;
}

.new-stream-columns {
  display: grid;
  grid-template-columns: minmax(200px, 13fr) minmax(120px, 7fr);
  gap: 8px;
  align-items: flex-start;
}

.new-stream-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.new-stream-column--primary {
  flex: 1;
}

.new-stream-column--aside {
  width: 100%;
}

.new-stream-tabs,
.themes-tabs {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.25);
  padding: 0;
  overflow: visible;
}

.new-stream-tab-bar,
.themes-tab-bar {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 0px 0px 0;
}

.new-stream-tab,
.themes-tab {
  flex: 1;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  padding: 10px 16px;
  border-radius: 12px 12px 0 0;
  font-size: var(--yt-font-size-filters);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.new-stream-tab.is-active,
.themes-tab.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.themes-tab.is-active .media-tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.new-stream-tab-panels,
.themes-tab-panels {
  padding: 0;
}

.new-stream-tabs .new-stream-tab-panels {
  display: flex;
  flex-direction: column;
  /* gap: 20px; */
  /* padding: 8px; */
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: none;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  min-height: 360px;
}

.themes-tabs .themes-tab-panels {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: none;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  min-height: calc(95vh - 160px);
}

.new-stream-tab-panel {
  display: none;
  flex-direction: column;
  /* gap: 20px; */
  padding: 0;
  overflow: visible;
}

.themes-tab-panel {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  overflow: visible;
}

.new-stream-tab-panel.is-active,
.themes-tab-panel.is-active {
  display: flex;
}

.new-stream-channel-selector {
  padding: 16px;
}

.new-stream-panel-card {
  padding: 0px;
  overflow: visible;
}

.new-stream-panel-card.is-muted {
  background: rgba(255, 255, 255, 0.05);
}

.themes-channel-bar {
  margin-bottom: 16px;
}

.themes-panel-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.themes-config-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* margin-bottom: 12px; */
}

.themes-config-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.themes-config-row--theme {
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 8px;
}

.themes-config-field {
  flex: 1 1 260px;
}

.themes-config-field--compact {
  flex: 0 1 220px;
}

.themes-config-field--cta {
  flex: 0 0 96px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.themes-config-field--full {
  flex: 0 1 520px;
}

[data-config-field] .theme-select-field {
  width: 100%;
}

[data-config-field] .theme-select-label {
  top: 8px;
  left: 18px;
}

[data-config-field] .theme-select-trigger {
  width: 100%;
  min-height: 52px;
  padding: 16px 40px 6px 16px;
}

[data-config-field] .theme-select-trigger.is-input {
  border: 1px solid var(--ly-floating-surface-border);
  background: var(--ly-floating-surface-bg);
  color: #fff;
  font-size: var(--yt-font-size-base);
  border-radius: 10px;
}

[data-config-field] .theme-select-trigger.is-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.config-select-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #1b1b1b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  /* padding: 4px; */
  display: flex;
  flex-direction: column;
  /* gap: 4px; */
  z-index: 30;
}

.config-select-menu[data-theme-menu] {
  max-height: 400px;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

/* Mostrar todos los modelos IA sin scroll en su menú */
.config-select-menu[data-prompt-model-menu] {
  /* max-height: none; */
  max-height: 400px !important;
  overflow: visible;
  padding: 8px 0;
}

.config-select-menu[hidden] {
  display: none !important;
}

.config-select-menu button {
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  text-align: left;
  padding: 8px 12px;
  font-size: 0.92rem;
  transition: background 0.15s ease;
}

.config-select-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.config-select-menu[data-theme-menu] .config-select-options {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.config-select-search,
.theme-select-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: #1b1b1b;
  z-index: 1;
}

.config-select-search .material-symbols-outlined,
.theme-select-search .material-symbols-outlined {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.6);
}

.config-select-search input,
.theme-select-search input {
  flex: 1 1 auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0.92rem;
  padding: 6px 10px;
  outline: none;
}

.config-select-search input:disabled,
.theme-select-search input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.config-select-search input:focus,
.theme-select-search input:focus {
  border-color: rgba(255, 255, 255, 0.35);
}

.themes-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, border 0.15s ease;
}

.themes-icon-btn:hover {
  /* transform: translateY(-1px); */
  border-color: rgba(255, 255, 255, 0.45);
  
}

.themes-icon-btn--accent {
  background: #c51162;
  border-color: #ff7a9c;
  box-shadow: 0 8px 18px rgba(197, 17, 98, 0.35);
}

.themes-config-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

.themes-config-metadata {
  display: grid;
  grid-template-columns: minmax(100px, 20%) minmax(100px, 60%) minmax(100px, 20%);
  gap: 10px;
  grid-auto-rows: 1fr;
  height: 100%;
}

@media (max-width: 980px) {
  .themes-config-metadata {
    grid-template-columns: 1fr;
  }

  .themes-config-row--theme {
    flex-wrap: wrap;
  }

  .themes-config-actions {
    justify-content: flex-start;
  }
}

.themes-meta-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.themes-meta-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.themes-meta-card h5 {
  margin: 0;
  font-size: 1rem;
}

.themes-meta-toggle {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.themes-meta-chip {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  padding: 4px 10px;
  font-size: 0.78rem;
}

.themes-meta-chip.is-active {
  background: #1e8e3e;
  color: #fff;
}

.themes-meta-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

.themes-meta-label {
  font-size: var(--yt-font-size-label);
  /* text-transform: uppercase; */
  /* letter-spacing: 0.08em; */
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

.themes-meta-counter {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: var(--yt-font-size-base);
}

.themes-meta-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.themes-meta-textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: var(--yt-font-size-base);
  padding: 10px;
  resize: vertical;
  transition: border 0.2s ease, background 0.2s ease;
}

.themes-meta-textarea:focus {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: none;
  /* background: rgba(0, 0, 0, 0.4); */
}

.themes-meta-textarea:hover {
  border-color: rgba(255, 255, 255, 0.35);
  /* background: rgba(255, 255, 255, 0.05); */
}

.themes-meta-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.themes-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.themes-meta-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  position: relative;
}

.themes-meta-grid--compact .config-select-menu {
  bottom: 100%;
  top: auto;
}

.themes-meta-select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  padding: 24px 8px 8px 8px;
  font-size: var(--yt-font-size-base);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.themes-meta-field {
  position: relative;
  flex: 1 1 auto;
}

.themes-meta-field.is-static .themes-meta-counter {
  padding: 24px 14px 10px 14px;
  height: 50px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
}

.themes-meta-field .themes-meta-select {
  padding: 24px 8px 8px 8px;
  min-height: 50px;
  height: 50px;
}

.themes-meta-field--counter .themes-meta-counter {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  height: 50px;
  padding: 18px 8px 4px 8px;
}

.prompts-parameters .themes-meta-field--counter .themes-meta-counter:hover,
.prompts-parameters .themes-meta-field--counter .themes-meta-counter:focus-within {
  border-color: rgba(180, 180, 180, 0.8);
}

.themes-meta-custom-select {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.themes-meta-custom-select .themes-meta-counter-toggle {
  margin-left: auto;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.themes-meta-counter--stepper {
  gap: 10px;
  padding: 8px 12px;
  justify-content: flex-start;
}

.themes-meta-counter--stepper .themes-meta-counter-input {
  padding: 0 !important;
  text-align: center;
  font-weight: 600;
  flex: 1 1 auto;
}

.themes-meta-stepper-controls {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-direction: row-reverse;
}

.themes-meta-step-btn {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s ease, border 0.2s ease;
}

.themes-meta-step-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.themes-meta-step-btn .material-symbols-outlined {
  font-size: 20px;
}

.themes-meta-counter-input {
  width: 100%;
  background: transparent !important;
  border: none !important;
  padding: 12px 8px 0px 0px !important;
  color: #fff;
  font-size: var(--yt-font-size-base);
  cursor: default;
  appearance: none;
  -moz-appearance: textfield;
}

.themes-meta-counter-input:focus {
  outline: none;
}

.themes-meta-counter-input::-webkit-outer-spin-button,
.themes-meta-counter-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.themes-meta-counter-toggle {
  border: none;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 4px;
  cursor: pointer;
}

.themes-meta-field--counter .config-select-menu {
  min-width: 120px;
  max-height: 220px;
  overflow-y: auto;
}

.themes-meta-field--scroll .config-select-menu {
  max-height: 200px;
  overflow-y: auto;
}

.themes-meta-field .themes-meta-label {
  position: absolute;
  top: 6px;
  left: 14px;
  font-size: var(--yt-font-size-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.themes-textarea-shell {
  position: relative;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  transition: border 0.2s ease, background 0.2s ease;
  height: 100%;
}

.themes-textarea-shell:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.38);
}

.themes-textarea-shell .themes-meta-textarea {
  border: none;
  background: transparent;
  color: #fff;
  font-size: var(--yt-font-size-base);
  padding: 0 14px 14px;
  margin-top: 24px;
  margin-bottom: 4px;
  min-height: 0;
  flex: 1 1 auto;
  width: 100%;
  resize: vertical;
  font-family: inherit;
  line-height: 1.45;
}

.themes-textarea-shell .themes-meta-textarea:focus {
  outline: none;
}

.themes-meta-field--prompt .prompts-textarea-shell {
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  transition: border 0.2s ease, background 0.2s ease;
  height: 100%;
}

.themes-meta-field--prompt .prompts-textarea-shell:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.38);
}

.themes-meta-field--prompt .prompts-textarea-shell .themes-meta-textarea {
  border: none;
  background: transparent;
  color: #fff;
  font-size: var(--yt-font-size-base);
  padding: 0 14px 14px;
  margin-top: 24px;
  margin-bottom: 4px;
  min-height: 120px;
  height: 100%;
  width: 100%;
  resize: vertical;
  font-family: inherit;
  line-height: 1.45;
}

.themes-meta-field--prompt .prompts-textarea-shell .themes-meta-textarea:focus {
  outline: none;
}

/* Token highlighting overlay system */
.prompts-textarea-shell--highlighted {
  position: relative;
}

.prompts-test-inline-btn {
  padding: 3px 12px;
  font-size: 12px;
  line-height: 16px;
  height: 20px;
  border-top-right-radius: 0;
  border-top-left-radius: 0;
}

.prompts-test-inline--hint {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.prompts-textarea-highlight {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 14px 14px;
  margin-top: 24px;
  margin-bottom: 4px;
  font-size: var(--yt-font-size-base);
  font-family: inherit;
  line-height: 1.45;
  color: #fff;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  border-radius: 12px;
}

.prompts-textarea-with-highlight {
  position: relative;
  z-index: 2;
  background: transparent !important;
  color: transparent !important;
  caret-color: #fff;
}

.prompts-highlighted-token {
  color: #64b5ff;
  font-weight: 600;
}

.themes-meta-field--compact .themes-textarea-shell {
  min-height: 60px;
}

.themes-meta-field .themes-meta-textarea {
  padding: 0px 24px 10px 14px;
  min-height: 120px;
  height: 100%;
  border-radius: 10px;
}

.themes-meta-field--short .themes-meta-textarea {
  min-height: 60px;
}

.themes-meta-field--compact {
  flex: 0 0 auto;
}

.themes-meta-field--compact .themes-meta-textarea {
  min-height: 60px;
}

.themes-meta-card--titles,
.themes-meta-card--description,
.themes-meta-card--hashtags {
  display: flex;
  flex-direction: column;
  min-height: calc(95vh - 280px);
}

.themes-meta-card--titles .themes-meta-body,
.themes-meta-card--description .themes-meta-body,
.themes-meta-card--hashtags .themes-meta-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  
}

.themes-meta-field--fixed-title {
  flex: 0 0 92px;
}

.themes-meta-field--variant-title {
  flex: 1 1 70%;
}

.themes-meta-field--description-intro {
  flex: 0 0 92px;
}

.themes-meta-field--description-general {
  flex: 1 1 auto;
}

.themes-meta-field--description-final {
  flex: 0 0 92px;
}

.themes-meta-field--hashtags-fixed {
  flex: 0 0 92px;
}

.themes-meta-field--hashtags-variants {
  flex: 1 1 70%;
}

.themes-meta-field--variant-title .themes-meta-textarea,
.themes-meta-field--description-general .themes-meta-textarea,
.themes-meta-field--hashtags-variants .themes-meta-textarea {
  min-height: 0;
  height: 100%;
}

.themes-meta-mini-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-radius: 10px;
  padding: 3px 6px;
  font-size: 0.72rem;
}

.prompts-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}

.prompts-shell-inner {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 280px;
  gap: 12px;
  align-items: stretch;
  flex: 1 1 calc(95vh - 240px);
  min-height: 0;
  height: 100%;
}

.prompts-sidebar {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prompts-nav-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.85);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
}

.prompts-nav-btn.is-active {
  background: rgba(62, 166, 255, 0.18);
  border-color: rgba(62, 166, 255, 0.5);
  color: #fff;
}

.prompts-config {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.35);
  min-height: 0;
  height: 100%;
}

.prompts-config-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.prompts-config-header h4 {
  margin: 0;
  font-size: 0.95rem;
}

.prompts-config-actions {
  display: flex;
  gap: 4px;
}

.prompts-config-actions .ghost-btn {
  padding: 3px 6px;
  font-size: 13px;
  line-height: 16px;
}

.prompts-test-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.prompts-test-btn .material-symbols-outlined {
  font-size: 18px;
}

.prompts-config-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
}

.prompts-model-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 8px;
}

.prompts-model-field {
  margin-bottom: 0;
  flex: 1 1 auto;
}

.prompts-model-actions {
  display: flex;
  gap: 8px;
  align-self: flex-end;
}

.prompts-model-action {
  height: 50px;
  padding: 0 16px;
  white-space: nowrap;
}

.prompts-main-body {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.prompts-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
}

.prompts-editor .themes-meta-field--prompt {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
}

.prompts-editor .themes-meta-field--prompt .prompts-textarea-shell {
  flex: 1 1 auto;
}

.prompts-token-hint {
  margin: -4px 0 0;
  font-size: var(--yt-font-size-label);
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.prompts-token-hint__token {
  color: #64b5ff;
  font-weight: 600;
}


.prompts-parameters {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
}

.prompts-parameters-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.35);
  min-height: 0;
  height: auto;
}

.prompts-parameters-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prompts-parameters-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.prompts-parameters-header h5 {
  margin: 0;
  font-size: 1rem;
}

.prompts-parameters-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.prompts-parameters-restore {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.prompts-parameters-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
}

.prompts-parameter-empty {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.prompts-model-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  gap: 2px;
  color: inherit;
  transition: border 0.2s ease, background 0.2s ease;
}

.prompts-model-option:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.prompts-model-option.is-active {
  border-color: rgba(62, 166, 255, 0.6);
  background: rgba(62, 166, 255, 0.12);
}

.prompts-model-option__title {
  font-size: 0.9rem;
  font-weight: 600;
}

.prompts-model-option__desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
}

/* Modal de Test de Prompts */
.prompts-test-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.prompts-test-modal[hidden] {
  display: none;
}

.prompts-test-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.prompts-test-modal__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  max-height: 95vh;
  background: #151515;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.prompts-test-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.prompts-test-modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  color: #fff;
}

.prompts-test-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.prompts-test-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.prompts-test-modal__close .material-symbols-outlined {
  font-size: 24px;
}

.prompts-test-modal__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prompts-test-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prompts-test-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.prompts-test-section__header--center {
  justify-content: center;
}

.prompts-test-section__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.prompts-test-run-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
}

.prompts-test-run-btn .material-symbols-outlined {
  font-size: 18px;
}

.prompts-test-preview,
.prompts-test-response {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px;
  min-height: 160px;
}

.prompts-test-preview__section {
  margin-bottom: 0;
}

.prompts-test-preview__section:last-child {
  margin-bottom: 0;
}

.prompts-test-preview__text,
.prompts-test-response__text {
  margin: 0;
  padding: 8px;
  /* background: #1f1f1f;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08); */
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
}

.prompts-test-highlight {
  color: #5aa7ff;
  font-weight: 600;
}

.prompts-test-floating {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prompts-test-floating__label {
  position: absolute;
  top: 0px;
  left: 16px;
  padding: 2px 8px;
  /* border-radius: 10px; */
  /* background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.12); */
  color: rgba(255, 255, 255, 0.55);
  font-size: var(--yt-font-size-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.prompts-test-floating__counter {
  position: absolute;
  top: 2px;
  right: 16px;
  padding: 2px 8px;
  /* border-radius: 10px;
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.12); */
  color: rgba(255, 255, 255, 0.55);
  font-size: var(--yt-font-size-label);
  letter-spacing: 0.08em;
  pointer-events: none;
}

.prompts-test-floating__body {
  padding-top: 18px;
}

.ns-title-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.ns-title-row .ns-field--title {
  flex: 1 1 auto;
  min-width: 0;
}

.ns-generate-all {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  flex: 0 0 auto;
  margin-left: auto;
}

.ns-tab-btn--compact {
  padding: 4px 10px;
  font-size: 12px;
  line-height: 16px;
  height: 52px;
  width: 52px;
  display: inline-flex;
  align-items: center;
  /* gap: 6px; */
  border:1px solid rgba(65, 212, 173, 0.8) !important;
  color: #d8fff4 !important;
  background: rgba(32, 114, 96, 0.4) !important;
  /* border: 1px solid rgba(255, 255, 255, 0.18); */
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
  font-weight: 600;


}

.ns-tab-btn--compact:hover {
  border-color: rgba(65, 212, 173, 0.9) !important;
  background: rgba(32, 178, 169, 0.3) !important;
  color: #e7fffa;
}

.prompts-test-preview__loading,
.prompts-test-response__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.prompts-test-response__placeholder {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
}

.prompts-test-response__success {
  color: #fff;
}

.prompts-test-response__error {
  color: #ff6b6b;
}

.prompts-test-response__error strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.prompts-test-response__error p {
  margin: 0;
  padding: 12px;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 107, 107, 0.3);
  font-size: 0.9rem;
  line-height: 1.5;
}

.prompts-test-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #64b5ff;
  border-radius: 50%;
  animation: prompts-test-spin 0.8s linear infinite;
}

@keyframes prompts-test-spin {
  to { transform: rotate(360deg); }
}

.prompts-model-row .themes-meta-counter.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}


@media (max-width: 1200px) {
  .prompts-shell-inner {
    grid-template-columns: 200px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .prompts-config {
    grid-column: 2 / 3;
  }

  .prompts-parameters {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  .prompts-shell-inner {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    align-items: flex-start;
  }

  .prompts-sidebar {
    width: 100%;
  }

  .prompts-nav-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .prompts-shell-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 10px;
    flex: 1 1 auto;
    height: auto;
  }

  .prompts-sidebar {
    width: 100%;
  }

  .prompts-config,
  .prompts-parameters {
    grid-column: 1 / -1;
  }

  .prompts-config-header {
    justify-content: flex-start;
    gap: 8px;
  }

  .prompts-config-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .prompts-config-actions .ghost-btn {
    flex: 0 0 auto;
  }

  .prompts-model-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .prompts-model-actions {
    align-self: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  .prompts-model-actions .ghost-btn {
    width: auto;
  }
}

.themes-panel-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (min-width: 640px) {
  .themes-panel-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.themes-panel-header h4 {
  margin: 0;
  font-size: 1rem;
}

.themes-panel-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}

.themes-panel-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.themes-panel-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.themes-panel-grid .input {
  text-transform: none;
}

.themes-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.themes-panel-actions .checkbox-box {
  margin-right: auto;
}

.themes-table-wrapper {
  overflow-x: auto;
}

.themes-tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(62, 166, 255, 0.12);
  color: #8ab4ff;
  font-size: 0.78rem;
  margin-right: 6px;
  margin-bottom: 4px;
}

.themes-prompts-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.themes-prompts-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.themes-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 0.95rem;
  padding: 12px;
  resize: vertical;
  min-height: 120px;
  transition: border 0.2s ease, background 0.2s ease;
}

.themes-textarea:focus {
  outline: none;
  border-color: rgba(62, 166, 255, 0.7);
}

.new-stream-panel-card--flush {
  border-top-right-radius: 0;
  border-top-left-radius: 0;
}

.new-stream-selector-card {
  border: none;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding: 8px 0 0 0;
  margin-bottom: 0;
}

.new-stream-form-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding: 8px;
  border: none;
  margin-top: 0;
  overflow: visible;
}

.ns-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ns-field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.ns-field--floating {
  position: relative;
  padding-top: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.ns-field--floating .ns-input {
  padding-top: 8px;
  padding-bottom: 8px;
  border: none;
  background: transparent;
  width: 100%;
  min-height: 35px;
}

.ns-field--floating .ns-textarea {
  padding: 10px 12px 6px;
  border: none;
  background: transparent;
  min-height: 105px;
  overflow: hidden;
  transition: height 0.2s ease;
  resize: none;
}

.ns-field--floating .ns-tags-wrapper {
  padding-top: 8px;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.ns-field--tags.is-editing .ns-tags-wrapper {
  overflow: visible;
}

.ns-field--floating .ns-tags-wrapper .ns-input {
  border: none;
  background: transparent;
}

.cast-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cast-panel {
  padding: 4px 4px;
  border-radius: 14px;
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cast-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.cast-panel__header h4 {
  margin: 0;
  font-size: 0.9rem;
}

.cast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.cast-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #777;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.cast-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  color: #999;
}

.cast-btn .material-symbols-outlined {
  font-size: 16px;
}

.cast-list {
  --cast-playlist-rows: 4;
  --cast-playlist-row-height: 45px;
  --cast-playlist-row-gap: 4px;
  --cast-playlist-row-padding: 4px;

  display: flex;
  flex-direction: column;
  gap: var(--cast-playlist-row-gap);
  min-height: calc(var(--cast-playlist-row-height)  + 
  var(--cast-playlist-row-gap)  + 
  var(--cast-playlist-row-padding)*2);

  max-height: calc(var(--cast-playlist-row-height) * var(--cast-playlist-rows) + 
                   var(--cast-playlist-row-gap) * var(--cast-playlist-rows) + 
                   var(--cast-playlist-row-padding) * 2 - 2px);

  overflow-y: auto;
  margin-bottom: 0;
  padding: var(--cast-playlist-row-padding);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  scrollbar-width: 3px;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.cast-list.is-dragging {
  cursor: grabbing;
}

.cast-list::-webkit-scrollbar {
  width: 3px;
}

.cast-list::-webkit-scrollbar-track {
  background: transparent;
}

.cast-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}

.cast-summary {
  margin-top: 2px;
  margin-bottom: 2px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(5, 15, 18, 0.85);
  border: 1px solid rgba(0, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: rgba(173, 216, 230, 0.9);
  min-height: 18px;
}

.cast-summary span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cast-empty {
  /* margin: 8px; */
  height: var(--cast-playlist-row-height, 45px);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;

  display: flex;              /* activa flexbox */
  align-items: center;        /* centra verticalmente */
  justify-content: center;    /* opcional: centra horizontalmente */
}

.cast-item {
  display: flex;
  gap: 8px;
  padding: 0px;
  border-radius: 10px;
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  min-height: var(--cast-playlist-row-height, 45px);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.cast-list,
.cast-list * {
  user-select: none;
}

.cast-item.is-dragging {
  opacity: 0.85;
  cursor: grabbing;
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.5);
  transform: translateZ(0);
}

.cast-drop-placeholder {
  border: 1px dashed rgba(0, 255, 255, 0.4);
  border-radius: 10px;
  margin: 0;
  background: rgba(0, 255, 255, 0.05);
  pointer-events: none;
}

.cast-thumb {
  width: 80px;
  height: 45px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background: rgba(255, 255, 255, 0.08);
}

.cast-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cast-thumb__placeholder {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.4);
}

.cast-thumb--audio {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #00c853, #009688);
  color: #fff;
}

.cast-thumb--audio .material-symbols-outlined {
  font-size: 24px;
}

.cast-duration {
  position: absolute;
  bottom: 0px;
  right: 0px;
  font-size: 0.65rem;
  padding: 1px 3px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
}

.cast-meta {
  flex: 1;
  min-width: 0;
  padding-right: 26px;
}

.cast-meta strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0;

  white-space: nowrap;        /* no permite salto de línea */
  overflow: hidden;           /* oculta lo que sobra */
  text-overflow: ellipsis;    /* añade los "..." */
}

.cast-meta p {
  margin: 0;
  font-size: 0.63rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.2;

  white-space: nowrap;        /* no permite salto de línea */
  overflow: hidden;           /* oculta lo que sobra */
  text-overflow: ellipsis;    /* añade los "..." */
}

.media-card-flags--compact {
  /* gap: 1px; */
  margin-top: 1 !important;
  height: 10px !important;
  min-height: 10px !important;
  max-height: 10px !important;
}

.media-card-flags--compact .media-card-flag {
  font-size: 0.45rem;
  padding: 0 8px !important;
  display: inline-flex;
  align-items: center;
  border-width: 1px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* .media-card-flags--compact .media-card-flags {
  gap: 4px;
  min-height: 12px !important;
  margin-top: 0px !important;
} */
/* 
.media-card-flags--compact .media-card-flag span {
  height: 10px !important;
  min-height: 10px !important;
  max-height: 10px !important;
} */

.cast-remove {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 25px;
  height: 25px;
  border-radius: 999px;
  /* border: 1px solid rgba(255, 255, 255, 0.15); */
  /* background: rgba(0, 0, 0, 0.5); */
  color: #a7a7a7;
  font-size: 18px;
  cursor: pointer;
  /* border: 1px solid transparent; */
  transition: border 0.2s ease, background 0.2s ease;
}

.cast-remove::before {
  content: '×';
  font-size: 20px;
  line-height: 1;
}

.cast-item:hover {
  border-color: rgba(0, 204, 58, 0.6);
}

.cast-remove:hover {
  /* border-color: rgba(255, 255, 255, 0.3); */
  background: rgba(131, 0, 0, 0.85);
  color: #ffffff;
}

.media-controls,
.cast-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 2px 4px;
  margin-top: 0px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cast-mode-toggle {
  display: inline-flex;
  align-items: stretch;
  /* padding: 2px; */
  min-height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.cast-mode-pill {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  padding: 0px 10px;
  border-radius: 999px;
  min-height: 20px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.cast-mode-pill:first-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.cast-mode-pill:last-child {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.cast-mode-pill.is-active {
  border-color: rgba(65, 212, 173, 0.8);
  background: rgba(32, 114, 96, 0.4);
  color: #d8fff4;
}

.cast-loop-toggle {
  display: flex;           /* activa flexbox */
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  padding: 0px 10px 1px 10px;
  min-height: 20px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.cast-loop-toggle.is-active {
  border-color: rgba(65, 212, 173, 0.8);
  background: rgba(32, 114, 96, 0.4);
  color: #d8fff4;
}

.cast-effect-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.media-select {
  position: relative;
  display: inline-flex;
  min-width: 105px;
  border-radius: inherit;
}

.media-select.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.media-select.is-disabled .media-select__trigger {
  opacity: 0.6;
  cursor: not-allowed;
}

.media-select__trigger {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  position: relative;
}

.media-select__trigger--rounded {
  border-radius: 14px;
}

.media-select__trigger--floating {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 50px;
  padding: 10px 28px 10px 14px;
  gap: 6px;
  border-radius: inherit;
}

.media-select__chevron {
  font-size: 16px;
  line-height: 1;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.media-select__trigger--floating .media-select__chevron {
  right: 16px;
}

.media-select--open .media-select__chevron {
  transform: translateY(-50%) rotate(180deg);
}

.media-select__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

.media-select__floating-label {
  margin-top: 0px;
  margin-right: 2px;
  font-size: var(--yt-font-size-label);
  letter-spacing: 0.08em;
  /* text-transform: uppercase; */
  color: rgba(255, 255, 255, 0.55);
}

.media-select__trigger--floating .media-select__label {
  font-size: var(--yt-font-size-base);
}

.media-select--floating {
  width: 100%;
  min-width: 0;
  border-radius: 14px;
}

.media-select--floating .media-select__trigger {
  width: 100%;
  border-radius: 14px;
  min-height: 50px;
  height: 50px;
  padding: 16px 42px 8px 16px;
  border: 1px solid var(--ly-floating-surface-border);
  background: var(--ly-floating-surface-bg);
  color: #fff;
  transition: border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.media-select--floating .media-select__trigger:focus-visible {
  outline: none;
  border-color: rgba(65, 212, 173, 0.8);
  box-shadow: 0 0 0 1px rgba(65, 212, 173, 0.35);
}

.media-select--floating .media-select__trigger:hover,
.media-select--floating.media-select--open .media-select__trigger {
  border-color: var(--ly-floating-surface-border-hover);
  background: var(--ly-floating-surface-bg-hover);
}

.media-select--floating .media-select__floating-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: var(--yt-font-size-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.media-select--floating .media-select__label {
  font-size: var(--yt-font-size-base);
  color: #fff;
}

.media-select__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1b1b1b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 4px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 60;
  min-width: 120px;
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.media-select--open .media-select__dropdown {
  display: flex;
}

.media-select--drop-up .media-select__dropdown {
  top: auto;
  bottom: 100%;
}

.media-select__option {
  border: none;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.media-select__option:hover,
.media-select__option.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.media-select__native {
  display: none !important;
}

.cast-effect-select {
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(32, 32, 32, 0.8);
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--yt-font-size-filters);
  padding: 0px 26px 0px 10px !important;
  height: 20px;
  min-width: 100px;
}

.cast-effect-select.is-active,
.channel-modal select.cast-effect-select.is-active {
  border-color: rgba(65, 212, 173, 0.8);
  background: rgba(32, 114, 96, 0.4);
  color: #d8fff4;
}

.cast-effect-select:focus,
.cast-effect-select:focus-visible {
  outline: none;
  /* background: rgba(32, 114, 96, 0.4); */
  border-color: rgba(65, 212, 173, 0.8);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.settings-card--floating-select .media-select__trigger.cast-effect-select {
  border-radius: 14px !important;
}

.cast-effect-select--duration,
.media-select.cast-effect-select--duration,
.media-select__trigger.cast-effect-select--duration {
  min-width: 40px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.cast-effect-select--duration.is-visible,
.media-select.cast-effect-select--duration.is-visible,
.media-select__trigger.cast-effect-select--duration.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.cast-effect-select option,
.cast-effect-select--duration option,
.channel-modal select.cast-effect-select option,
.channel-modal select.cast-effect-select--duration option,
.settings-card select.cast-effect-select option,
.settings-card select.cast-effect-select--duration option {
  background: rgba(32, 32, 32, 0.95);
  color: rgba(255, 255, 255, 0.9);
}

.cast-effect-select option:checked,
.cast-effect-select--duration option:checked,
.channel-modal select.cast-effect-select option:checked,
.channel-modal select.cast-effect-select--duration option:checked,
.settings-card select.cast-effect-select option:checked,
.settings-card select.cast-effect-select--duration option:checked {
  background: rgba(32, 114, 96, 0.6);
  color: #fff;
}

.cast-thumbnail img {
  width: 320px;
  height: 180px;
  aspect-ratio: 16/9;
  margin-left: auto;
  margin-right: auto;

  border-radius: 12px;
  object-fit: contain;
  display: block;
  background: rgba(0, 0, 0, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cast-thumbnail__empty {
  width: 320px;
  height: 180px;
  aspect-ratio: 16/9;
  margin-left: auto;
  margin-right: auto;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.65);
  /* text-transform: uppercase; */
  font-size: 0.8rem;
  /* letter-spacing: 0.08em; */
}

.cast-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.cast-modal__dialog {
  width: min(1080px, 92vw);
  max-height: 90vh;
  background: #181818;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cast-modal[hidden] {
  display: none;
}

.cast-modal__header,
.cast-modal__footer {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.cast-modal__header h3 {
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.cast-modal__close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.cast-modal__body {
  padding: 0 16px 16px;
  overflow: auto;
  max-height: 70vh;
}

.cast-modal__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}

.cast-modal__filters {
  width: auto;
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 4px 0 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-left: auto;
}

.cast-modal__filters .media-filter-pills {
  flex-wrap: nowrap;
  gap: 6px;
  justify-self: flex-start;
}

.cast-modal__filters .media-sort {
  justify-self: flex-start;
}

.cast-modal__filters .media-search {
  width: 320px;
}

.cast-modal__close {
  margin-left: 8px;
}

.cast-modal .media-assoc-thumb {
  width: 160px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
}

.cast-modal .media-assoc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cast-modal-item {
  display: flex;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
}

.cast-modal-item input {
  margin: 0;
  flex-shrink: 0;
}

.cast-modal-item__thumb {
  width: 80px;
  height: 45px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cast-modal-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cast-modal-item__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cast-modal-item__meta strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.82rem;
}

.cast-modal-item__meta p {
  margin: 0;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.65);
}

.cast-modal-item__meta .media-card-flags {
  margin-top: 0;
}

.ns-floating-row {
  position: absolute;
  top: 2px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

.ns-floating-row.with-tabs {
  gap: 8px;
  justify-content: center;
}

.ns-floating-row.with-tabs .ns-floating-row__heading,
.ns-floating-row.with-tabs .ns-counter {
  pointer-events: none;
}

.ns-floating-row.with-tabs .ns-generator-tabs {
  pointer-events: auto;
  margin: 0;
}

.ns-floating-row .ns-counter {
  margin-left: auto;
  text-align: right;
}

.ns-floating-row--with-tabs {
  gap: 8px;
}

.ns-floating-row--with-tabs label {
  flex: 0 0 auto;
}

.ns-floating-row--with-tabs .ns-generator-tabs {
  flex: 1 1 auto;
  justify-content: center;
  margin: 0;
}

.ns-floating-row--with-tabs .ns-counter {
  flex: 0 0 auto;
}

.ns-field--floating label {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(0);
  text-transform: none;
  letter-spacing: 0.01em;
}

.ns-input,
.ns-textarea,
.ns-select select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: var(--yt-font-size-base);
  padding: 10px 12px;
  transition: border 0.2s ease, background 0.2s ease;
}

.ns-textarea {
  resize: vertical;
  /* min-height: 60px; */
}

.ns-textarea.is-editing {
  overflow-y: auto;
}


.ns-input:focus,
.ns-textarea:focus,
.ns-select select:focus {
  outline: none;
  border-color: rgba(62, 166, 255, 0.7);
  /* background: rgba(255, 255, 255, 0.04); */
}

.ns-counter {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

.ns-tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ns-tag-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 3px;
}

.ns-tag {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  /* margin: 2px; */
}

.ns-tags-wrapper .ns-tags-input {
  flex: 1 1 160px;
  min-width: 180px;
  border: none;
  background: transparent;
  color: #fff;
  padding: 4px 0;
}

.ns-tags-wrapper .ns-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ns-tags-wrapper .ns-tag button {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.ns-tags-wrapper .ns-tag button:hover {
  color: #fff;
}

.ns-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ns-row .ns-field {
  flex: 1 1 200px;
}

.ns-generator-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 30;
  pointer-events: auto;
}

.ns-generator-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  margin-right: 6px;
}

/* Variantes específicas */
.ns-generator-tabs--title,
.ns-generator-tabs--description,
.ns-generator-tabs--tags {
  position: relative;
}

.ns-generator-tabs--title,
.ns-generator-tabs--description,
.ns-generator-tabs--tags {
  justify-content: center;
  margin-top: 0;
  margin-bottom: 0;
}

.ns-generator-tabs--top {
  top: -16px;
}

.ns-generator-tabs--title.ns-generator-tabs--top,
.ns-generator-tabs--description.ns-generator-tabs--top,
.ns-generator-tabs--tags.ns-generator-tabs--top {
  top: -2px;
}

/* .ns-generator-tabs--tags.ns-generator-tabs--top {
  top: 0;
} */

.ns-generator-tabs--bottom {
  bottom: 0;
  margin-bottom: 0;
  padding-top: 0px;
}

.ns-tab-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  /* background: rgba(20, 20, 20, 0.9); */
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
  padding: 2px 10px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-transform: none;
}

.ns-generator-tabs--top .ns-tab-btn {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.ns-generator-tabs--bottom .ns-tab-btn {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.ns-tab-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.ns-visibility-options {
  display: inline-flex;
  gap: 6px;
}

.ns-pill {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.82rem;
  padding: 6px 12px;
  transition: background 0.2s ease, border 0.2s ease;
}

.ns-pill.is-active {
  background: rgba(62, 166, 255, 0.2);
  border-color: rgba(62, 166, 255, 0.7);
}

.ns-checkbox-field {
  flex: 0 0 auto;
  min-width: 180px;
}

.ns-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.ns-checkbox input {
  width: 16px;
  height: 16px;
}

.ns-settings-card--public-schedule {
  display: none;
  min-width:32px !important;
}

.ns-settings-card--public-schedule.is-visible {
  display: block;
}

.ns-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* Preview HLS */
.preview-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.preview-subtitle {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
}
.preview-status {
  padding: 6px 12px;
  border-radius: 10px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #bff6ee;
  font-size: 0.85rem;
  text-align: center;
  min-width: 120px;
}
.preview-status.is-loading {
  color: #ffd166;
}
.preview-player {
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f0f0f;
  overflow: hidden;
  min-height: 240px;
}
.preview-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #0a0a0a;
  aspect-ratio: 16 / 9;
}
.preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #bff6ee;
  font-weight: 600;
  font-size: 0.95rem;
  z-index: 10;
}

.preview-overlay[hidden] {
  display: none;
}
.preview-actions {
  margin-top: 2px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.preview-actions .ns-primary {
  min-width: 200px;
  max-width: 280px;
}

/* Transmisiones */
.transmission-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.transmission-accordion {
  padding: 0;
  overflow: hidden;
}
.transmission-accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
}
.transmission-accordion__title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.transmission-accordion__body {
  padding: 0 8px 8px;
}
.transmission-accordion.is-collapsed .transmission-accordion__body {
  display: none;
}
.transmission-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}
.transmission-overview__column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.transmission-card {
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  height: max-content;
  min-height: 24px;
}

.transmission-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  /* margin-bottom: 8px; */
}
.transmission-card__title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.transmission-card__header h5 {
  margin: 0;
}
.transmission-card__header--toggle {
  cursor: pointer;
}
.transmission-card.is-collapsed .transmission-logs-wrapper {
  display: none;
  max-height: 0;
  padding: 0;
  margin: 0;
}
.transmission-card.is-collapsed {
  padding-bottom: 8px;
}
.transmission-card.is-collapsed .transmission-tabpanels {
  display: none;
}
.transmission-card__header--toggle .material-symbols-outlined {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.8);
}
.ghost-icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e6e9ed;
  border-radius: 10px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.ghost-icon-btn.is-loading {
  opacity: 0.6;
  pointer-events: none;
}
.ghost-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}
.transmission-logs-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.transmission-tabs {
  display: inline-flex;
  gap: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.transmission-tabs--header {
  margin-left: 0;
  order: 0;
}
.transmission-tab {
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--yt-font-size-filters);
  padding: 3px 12px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border 0.2s ease;
}
.transmission-tab:first-child {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}
.transmission-tab:last-child {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}
.transmission-tab + .transmission-tab {
  margin-left: -1px;
}
.transmission-tab.is-active {
  border-color: rgba(65, 212, 173, 0.8);
  background: rgba(32, 114, 96, 0.4);
  color: #d8fff4;
  z-index: 1;
}
.transmission-tab:hover:not(.is-active) {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.transmission-tabpanels {
  margin-top: 8px;
}
.transmission-tabpanel {
  display: none;
}
.transmission-tabpanel.is-active {
  display: block;
}
.transmission-subtitle {
  color: rgba(255, 255, 255, 0.7);
  margin: 4px 0 0;
  font-size: 0.92rem;
}
.transmission-pill {
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1a1a1a;
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
}
.transmission-pill--live {
  color: white;
  border-color: rgba(255, 123, 123, 0.4);
  background: var(--yt-spec-static-brand-red);
}
.transmission-pill--warning {
  color: #ffd166;
  border-color: rgba(255, 209, 102, 0.4);
  background: rgba(255, 209, 102, 0.08);
}
.transmission-pill--scheduled {
  color: #64b5f6;
  border-color: rgba(100, 181, 246, 0.4);
  background: rgba(100, 181, 246, 0.08);
}
.transmission-pill--success {
  border-color: #00FF00;
  background: rgba(0, 255, 0, 0.15);
  color: #00FF00;
}
.transmission-pill--error {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.1);
}
.transmission-pill--neutral {
  color: #bfc7d1;
}
.transmission-countdown {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #64b5f6;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.transmission-countdown--live {
  color: #afafaf;
}
.transmission-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.metric {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #111;
}
.metric__label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}
.metric__value {
  display: block;
  font-weight: 700;
  margin-top: 4px;
}
.transmission-command {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
  background: #0f0f0f;
  margin-bottom: 0;
  max-height: 260px;
  min-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
}
.transmission-command__label {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}
.transmission-command__text {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  color: #bff6ee;
  font-family: var(--yt-font-family-primary);
  font-size: var(--yt-font-size-filters);
}
.transmission-logs {
  max-height: 260px;
  min-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #0c0c0c;
  padding: 10px;
}
.transmission-log {
  display: grid;
  grid-template-columns: 70px 50px 1fr;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--yt-font-family-primary);
  font-size: var(--yt-font-size-label);
  align-items: center;
}
.transmission-log__placeholder {
  color: rgba(255, 255, 255, 0.6);
  padding: 12px 6px;
  text-align: center;
}
.transmission-log__time {
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}
.transmission-log__level {
  font-weight: 600;
  color: #ffd166;
  text-transform: uppercase;
}
.transmission-log__level[data-level="error"] {
  color: #ff5252;
}
.transmission-log__level[data-level="healthy"] {
  color: #4caf50;
}
.transmission-log__message {
  color: #e6e9ed;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.transmission-list-card {
  --transmission-separator: 1%;
  --transmission-grid-columns: 50% var(--transmission-separator) 
                                8% var(--transmission-separator) 
                                8% var(--transmission-separator) 
                                14% var(--transmission-separator) 
                                16% ;
  padding: 0;
}
.transmission-table-header {
  display: grid;
  grid-template-columns: var(--transmission-grid-columns);
  gap: 0;
  padding: 6px 10px 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  /* background: rgba(255, 255, 255, 0.03); */
}
.transmission-table-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 80px; /* Ancho mínimo fijo para reservar espacio */
  padding-left: 10px;
}
.transmission-table-header-left .media-checkbox {
  width: 20px;
  height: 20px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0; /* No se encoge */
}
.transmission-table-header-left .media-bulk-actions {
  flex-shrink: 0; /* No se encoge */
}
.transmission-table-header-left .media-checkbox span {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: #666;
  transition: border 0.2s ease, background 0.2s ease;
}
.transmission-table-header-left .media-checkbox span::before {
  color: #666;
}
.transmission-table-header-left .media-checkbox:hover span {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #999;
}
.transmission-table-header-left .media-checkbox input:checked + span {
  background: rgba(62, 166, 255, 0.28);
  border-color: #3ea6ff;
  color: #0f0f0f;
}
.transmission-head {
  /* font-weight: 700; */
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
  font-size: 0.625rem !important;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
}
.transmission-head--general {
  gap: 0; /* Sin gap para controlar mejor el espaciado */
}
.transmission-head--general > span {
  margin-left: 16px; /* Margen fijo desde el contenedor izquierdo */
}
.transmission-head--visibility,
.transmission-head--status,
.transmission-head--datetime {
  text-align: center;
  justify-content: center;
}
.transmission-filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
  padding-right: 20px;
  margin-left: 40px;
}
.transmission-filter-btn.cast-loop-toggle {
  padding: 0 12px;
  min-height: 20px;
}
.transmission-filter-switch.cast-mode-toggle {
  min-height: 20px;
}
.transmission-filter-switch .cast-mode-pill {
  min-height: 20px;
  padding: 0 14px;
  /* border-radius: 0; */
}
.transmission-filter-switch .cast-mode-pill:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.transmission-filter-switch .cast-mode-pill:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.transmission-filter-menu {
  position: absolute;
  min-width: 200px;
  max-width: 260px;
  background: rgba(22, 24, 28, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  padding: 6px;
  z-index: 5;
}
.transmission-filter-option {
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.transmission-filter-option:hover {
  background: rgba(255, 255, 255, 0.06);
}
.transmission-filter-option.is-active {
  background: rgba(32, 114, 96, 0.4);
  color: #d8fff4;
  border: 1px solid rgba(65, 212, 173, 0.6);
}
.transmission-head--live {
  justify-content: center;
}
.transmission-separator {
  width: 100%;
  height: 100%;
 
  background: linear-gradient(
  to right,
  transparent calc(50% - 1px),
  rgba(255, 255, 255, 0.08) calc(50% - 1px),
  rgba(255, 255, 255, 0.08) calc(50% + 1px),
  transparent calc(50% + 1px)
);

  /* background: linear-gradient(to bottom, transparent 5%, rgba(255, 255, 255, 0.16) 5%, rgba(255, 255, 255, 0.16) 95%, transparent 95%); */
}
.transmission-list {
  padding: 8px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 69vh;
  overflow-y: auto;
  /* padding-right: 12px; */
}
.transmission-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0;
  background: #0e0e0e;
  cursor: pointer;
  /* transition: border-color 0.2s ease, background 0.2s ease; */
  min-height: 92px;
}
.transmission-item:hover {
  border-color: rgba(0, 204, 58, 0.866);
}
.transmission-item.is-active {
  border-color: rgba(0, 204, 58, 0.866);
  /* box-shadow: 0 0 0 1px rgba(32, 178, 169, 0.15); */
}
.transmission-row {
  display: grid;
  grid-template-columns: var(--transmission-grid-columns);
  column-gap: 0;
  padding: 0;
  align-items: center;
}
.transmission-col {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0 6px;
  justify-content: center;
}
.transmission-col--visibility,
.transmission-col--status {
  align-items: center;
  text-align: center;
}
.transmission-col--status .transmission-destination {
  width: 100%;
  text-align: center;
}
.transmission-col-value {
  font-weight: 600;
  color: #e6e9ed;
}
.transmission-info {
  display: grid;
  grid-template-columns: auto 160px 1fr;
  gap: 8px;
  align-items: center;
}
.transmission-mini-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 4px;
  align-items: center;
}
.transmission-mini-actions .media-checkbox {
  width: 20px;
  height: 20px;
  margin-bottom: 0;
}
.transmission-mini-actions .media-checkbox span {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.62rem;
  color: #666;
}
.transmission-mini-actions .media-checkbox:hover span {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #999;
}
.transmission-mini-actions .media-checkbox input:checked + span {
  background: rgba(62, 166, 255, 0.28);
  border-color: #3ea6ff;
  color: #0f0f0f;
}
.mini-btn {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: #666;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.mini-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  /* transform: translateY(-1px); */
}
.mini-btn--danger {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #666;
}
.mini-btn .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
}

/* Variante large para botones de control (YouTube, Logs, etc.) */
.mini-btn--lg {
  width: 24px;
  height: 24px;
}
.mini-btn--lg .material-symbols-outlined {
  font-size: 18px;
}

.transmission-thumb {
  width: 160px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.transmission-thumb img {
  width: 160px;
  height: 90px;
  object-fit: cover;
  display: block;
}
.transmission-thumb__placeholder {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.transmission-info__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.transmission-title {
  margin: 0;
  font-size: --yt-font-size-base !important;
}
.transmission-description {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  line-height: 1.3;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.transmission-channel {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em; 
  font-size: var(--yt-font-size-label) !important;
}
.transmission-destination {
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 2px;
  font-size: var(--yt-font-size-label) !important;
  width: 100%;
}
.transmission-datetimes {
  display: grid;
  gap: 1px;
}
.transmission-datetime-block {
  display: grid;
  gap: 1px;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
}
.transmission-datetime-block > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1px;
  align-items: center;
}
.transmission-datetime-label {
  /* font-weight: 600; */
  font-size: 0.60rem;
  color: rgba(255, 255, 255, 0.30);
}
.transmission-datetime-value {
  font-weight: 600;
  font-size: 0.60rem;
  color: #e6e9ed;
}
.transmission-datetime-sep {
  height: 1px;
  margin: 1px 0 1px;
  background: rgba(255, 255, 255, 0.16);
}
.transmission-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.transmission-stats.is-live {
  border-color: rgba(76, 175, 80, 0.4);
  background: rgba(76, 175, 80, 0.08);
}
.transmission-stats.is-idle {
  color: rgba(255, 255, 255, 0.65);
}
.transmission-stat-label {
  display: block;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.transmission-stat-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e6e9ed;
}
.transmission-stat-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.7rem;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 4px;
}
.transmission-stat-final {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.65rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd166;
}
/* ============================================
   PROCESOS FFMPEG (Acordeón de procesos activos)
   ============================================ */
.transmission-processes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  min-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 4px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

/* ============================================
   YOUTUBE EMBED (Acordeón de YouTube)
   ============================================ */
.transmission-youtube-embed {
  padding: 12px 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.youtube-embed-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Aspect ratio 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
}

.youtube-embed-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* Tarjetas mini de procesos - diseño compacto y limpio */
.transmission-item--mini {
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(15, 15, 15, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  cursor: default;
  transition: all 0.2s ease;
  min-height: unset;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.transmission-item--mini:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(25, 25, 25, 0.95), rgba(20, 20, 20, 0.95));
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Header del proceso */
.transmission-item--mini .transmission-item__header {
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.transmission-item--mini h4 {
  margin: 0;
  font-size: 0.82rem !important;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Botón de stop en procesos mini */
.transmission-item--mini .ghost-icon-btn {
  padding: 2px;
  min-height: 24px;
  min-width: 24px;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.transmission-item--mini .ghost-icon-btn:hover {
  opacity: 1;
  background: rgba(244, 67, 54, 0.15);
  color: #f44336;
}

.transmission-item--mini .ghost-icon-btn .material-symbols-outlined {
  font-size: 16px;
}

/* Grid de información compacto */
.transmission-item--mini .transmission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 4px 8px;
  margin: 0;
}

.transmission-item--mini .transmission-label {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 500;
  margin-bottom: 0px;
}

.transmission-item--mini .transmission-value {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

/* Badge de estado en procesos */
.transmission-item--mini .transmission-pill {
  padding: 2px 8px;
  font-size: 0.65rem;
  border-radius: 10px;
  display: inline-block;
}

.transmission-item--mini .transmission-pill--live {
  background: rgba(244, 67, 54, 0.15);
  color: #f44336;
}

.transmission-item--mini .transmission-pill--success {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
}

.transmission-item--mini .transmission-pill--warning {
  background: rgba(255, 152, 0, 0.15);
  color: #ff9800;
}

/* Scrollbar personalizado para procesos */
.transmission-processes::-webkit-scrollbar {
  width: 6px;
}

.transmission-processes::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}

.transmission-processes::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.transmission-processes::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   MODAL DE CONFIRMACIÓN
   ============================================ */
.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.confirm-modal__content {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.98), rgba(20, 20, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 24px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
  text-align: center;
}

.confirm-modal__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: rgba(244, 67, 54, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-modal__icon .material-symbols-outlined {
  font-size: 32px;
  color: #f44336;
}

[data-schedule-visibility-modal] .confirm-modal__icon {
  background: rgba(100, 181, 246, 0.15);
}

[data-schedule-visibility-modal] .confirm-modal__icon .material-symbols-outlined {
  color: #64b5f6;
}

[data-automation-modal] .confirm-modal__content {
  max-width: 980px;
  width: 95%;
  text-align: left;
}

.confirm-modal__title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.confirm-modal__message {
  margin: 0 0 24px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  white-space: pre-line;
}

.confirm-modal__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.confirm-modal__actions--space-between {
  justify-content: space-between;
}

.confirm-modal__actions-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.confirm-modal__btn {
  display: flex;
  align-items: center;
  gap: 6px;
}

.confirm-modal__btn .material-symbols-outlined {
  font-size: 18px;
}

.confirm-modal__btn--success {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
  border-color: rgba(76, 175, 80, 0.3);
}

.confirm-modal__btn--success:hover {
  background: rgba(76, 175, 80, 0.25);
  border-color: rgba(76, 175, 80, 0.5);
}

.confirm-modal__btn--danger {
  background: rgba(244, 67, 54, 0.15);
  color: #f44336;
  border-color: rgba(244, 67, 54, 0.3);
}

.confirm-modal__btn--danger:hover {
  background: rgba(244, 67, 54, 0.25);
  border-color: rgba(244, 67, 54, 0.5);
}

.confirm-modal__btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.confirm-modal__btn--cancel {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
}

.confirm-modal__btn--cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Modal de formulario (más ancho) */
.confirm-modal__content--form {
  max-width: 520px;
  text-align: left;
}

.confirm-modal__content--form .confirm-modal__title {
  text-align: center;
  margin-bottom: 8px;
}

.confirm-modal__content--form .confirm-modal__message {
  text-align: center;
  margin-bottom: 24px;
  padding: 10px 16px;
  background: rgba(100, 181, 246, 0.1);
  border-radius: 6px;
  font-weight: 500;
  color: #64b5f6;
}

.schedule-visibility-form {
  margin-top: 20px;
}

.form-field {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.form-select,
.form-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-select:focus,
.form-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: #64b5f6;
  box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.15);
}

.form-select option {
  background: #1a1a1a;
  color: rgba(255, 255, 255, 0.9);
}

/* Elementos de visibilidad programada */
.transmission-visibility-inline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  max-width: 100%;
  overflow: hidden;
}

.transmission-visibility-scheduled {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
  width: 100%;
}

.transmission-visibility-current {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.transmission-visibility-target-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.transmission-visibility-arrow {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

.transmission-visibility-target {
  font-weight: 600;
  color: #64b5f6;
}

.transmission-visibility-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.transmission-visibility-scheduled .mini-btn--inline {
  align-self: center;
}

.mini-btn--inline {
  padding: 2px 4px;
  min-width: unset;
  height: 20px;
  flex-shrink: 0;
}

.mini-btn--inline .material-symbols-outlined {
  font-size: 16px;
}

.confirm-modal__btn--confirm {
  background: #f44336;
  color: #ffffff;
  border-color: #f44336;
}

.confirm-modal__btn--confirm:hover {
  background: #d32f2f;
  border-color: #d32f2f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.transmission-label {
  display: block;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}
.transmission-value {
  display: block;
  margin-top: 2px;
  font-weight: 600;
  color: #e6e9ed;
  word-break: break-word;
}

@media (max-width: 768px) {
  .transmission-shell {
    padding: 8px !important;
    /* margin: 8px !important; */
  }

  .transmission-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important; /* Más espacio entre tarjetas */
    padding: 0 !important;
    /* background: black !important; */
  }

  .transmission-item {
    display: block !important;
    height: auto !important;
    min-height: auto !important;
    background: #111111 !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    overflow: visible !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    margin-bottom: 10px !important;
    position: relative !important;
    margin: 4px !important;
  }

  .transmission-item.is-active {
    border-color: #41d4ad !important;
    background: rgba(65, 212, 173, 0.05) !important;
    box-shadow: 0 0 0 2px #41d4ad, 0 10px 40px rgba(0, 0, 0, 0.6) !important;
  }

  .transmission-row {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    position: static !important;
  }

  /* 1. SECCIÓN CABECERA: Miniatura + Info */
  .transmission-col--general {
    display: block !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 8px 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
    min-height: 120px !important;
  }

  .transmission-info {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    align-items: flex-start !important;
    width: 100% !important;
    position: static !important;
  }

  .transmission-thumb {
    width: 160px !important;
    height: 90px !important;
    border-radius: 12px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5) !important;
  }

  .transmission-info__text {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .transmission-title {
    font-size: var(--yt-font-size-base) !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 8px !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3; /* Máximo 3 líneas antes de cortar */
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    white-space: normal !important;
  }

  .transmission-channel {
    font-size: var(--yt-font-size-label) !important;
    color: #41d4ad !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
  }

  /* Botones de acción (Select/Open) */
  .transmission-mini-actions {
    position: absolute !important;
    bottom: 2px !important;
    left: 20px !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    z-index: 10 !important;
  }

  /* 2. FILAS DE DATOS: Visibilidad y Estado */
  .transmission-col--visibility,
  .transmission-col--status {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.01) !important;
    height: auto !important;
    min-height: 50px !important;
    position: static !important;
  }

  .transmission-col--visibility::before { content: "Visibilidad"; }
  .transmission-col--status::before { content: "Estado"; }

  .transmission-col--visibility::before,
  .transmission-col--status::before {
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    color: rgba(255, 255, 255, 0.4) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
  }

  .transmission-col-value {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #eee !important;
    text-align: right !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
  }

  /* 3. SECCIÓN HORARIOS */
  .transmission-col--datetime {
    display: block !important;
    background: rgba(0, 0, 0, 0.3) !important;
    padding: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    height: auto !important;
    position: static !important;
  }

  .transmission-datetime-block {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .transmission-datetime-group {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .transmission-datetime-label {
    font-size: 0.65rem !important;
    color: rgba(255, 255, 255, 0.3) !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
  }

  .transmission-datetime-value {
    font-size: 0.9rem !important;
    /* font-family: monospace !important; */
    color: #eee !important;
  }

  /* 4. SECCIÓN ESTADÍSTICAS EN VIVO */
  .transmission-col--live {
    display: block !important;
    padding: 20px !important;
    background: rgba(65, 212, 173, 0.04) !important;
    border-radius: 0 0 20px 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-top: 1px solid rgba(65, 212, 173, 0.1) !important;
    height: auto !important;
    position: static !important;
  }

  .transmission-stats {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .transmission-stat-item {
    background: rgba(255, 255, 255, 0.04) !important;
    padding: 10px !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
  }

  .transmission-stat-label {
    font-size: 0.65rem !important;
    color: rgba(65, 212, 173, 0.6) !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
    margin-bottom: 4px !important;
  }

  .transmission-stat-value {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
  }

  /* Ocultar separadores antiguos y cabecera de tabla */
  .transmission-separator,
  .transmission-table-header {
    display: none !important;
  }
}

.ns-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ns-btn-icon .material-symbols-outlined {
  font-size: 1.25rem;
  line-height: 1;
}

.ns-secondary,
.ns-primary {
  flex: 1 1 200px;
  border-radius: 10px;
  border: none;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.ns-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.ns-primary {
  background: #f44336;
  color: #fff;
}

.ns-secondary:hover,
.ns-primary:hover {
  filter: brightness(1.05);
}

.new-stream-selector-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding:0 8px;
}

.new-stream-selector-block--channel {
  flex: 0 0 320px;
  width: 320px;
  min-width: 320px;
  max-width: 320px;
}

.new-stream-selector-block--channel .channel-selector-slot {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.new-stream-selector-block--theme {
  flex: 1 1 auto;
  min-width: 0;
  width: calc(100% - 320px - 8px);
}

.new-stream-selector-block--theme .channel-selector-slot {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.theme-selector {
  width: 100%;
  min-width: 0;
  min-height: 50px;
}

@media (max-width: 639px) {
  .new-stream-selector-row {
    flex-wrap: wrap;
  }
  .new-stream-selector-block--channel {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }
  .new-stream-selector-block--theme {
    flex: 1 1 100%;
    width: 100%;
  }
}

.theme-select-field {
  position: relative;
  width: 100%;
  min-width: 0;
}

.theme-select-label {
  position: absolute;
  top: 6px;
  left: 14px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.theme-select-trigger {
  width: 100%;
  min-height: 50px;
  padding: 16px 42px 6px 16px;
  border-radius: 14px;
  border: 1px solid var(--ly-floating-surface-border);
  background: var(--ly-floating-surface-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  text-align: left;
  transition: border 0.2s ease, background 0.2s ease;
}

.theme-select-trigger:hover,
.theme-select-trigger.is-open {
  border-color: var(--ly-floating-surface-border-hover);
  background: var(--ly-floating-surface-bg-hover);
}

.theme-select-name {
  font-size: var(--yt-font-size-base);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}

.theme-select-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  transition: transform 0.2s ease;
}

.theme-select-trigger.is-open .theme-select-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.theme-select-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #1b1b1b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: var(--yt-shadow-3);
  padding: 0;
  display: flex;
  flex-direction: column;
  z-index: 40;
  max-height: 300px;
  overflow: hidden;
}

.theme-select-menu[hidden] {
  display: none !important;
}

.theme-select-menu .theme-select-options {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.theme-select-option {
  border: none;
  border-radius: 11px;
  background: transparent;
  color: #fff;
  text-align: left;
  padding: 8px 12px;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 10px;
  transition: background 0.15s ease;
  cursor: pointer;
  width: 100% !important;
  box-sizing: border-box !important;
}

.theme-select-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.theme-select-option.is-active {
  background: rgba(65, 212, 173, 0.15);
  color: #41d4ad;
}

.theme-select-option .option-name {
  font-size: var(--yt-font-size-base);
  line-height: 1.2;
  flex: 1 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-select-option .theme-option-count {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--yt-spec-text-secondary);
  min-width: 20px;
  text-align: center;
  margin-left: auto !important; /* Forzar al extremo derecho */
}

.theme-select-option.is-active .theme-option-count {
  background: rgba(65, 212, 173, 0.2);
  color: #41d4ad;
}

.new-stream-theme-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .new-stream-columns {
    grid-template-columns: 1fr;
  }
}

.media-usage-bar span {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3ea6ff, #9c5dff);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.media-usage-indicator small {
  display: none;
}

/* .upload-progress-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2px 8px;
  /* margin-bottom: var(--yt-spacing-xs); 
} */
.upload-progress-panel {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 2px 8px;

  border: 2px solid rgba(0, 153, 255, 0.8);
  box-shadow: 1 1 1 1 rgba(0, 153, 255, 0.4);
  animation: upload-border-pulse 1.8s ease-in-out infinite;
margin: 0 8px;  
}

@keyframes upload-border-pulse {
  0% {
    border-color: rgba(0, 153, 255, 0.9);
    box-shadow: 0 0 0 0 rgba(0, 153, 255, 0.5);
  }
  50% {
    border-color: rgba(0, 204, 255, 1);
    box-shadow: 0 0 0 4px rgba(0, 153, 255, 0.15);
  }
  100% {
    border-color: rgba(0, 153, 255, 0.9);
    box-shadow: 0 0 0 0 rgba(0, 153, 255, 0.0);
  }
}


.upload-progress-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.upload-progress-item + .upload-progress-item {
  margin-top: 4px;
}

.upload-progress-item {
  padding: 2px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.upload-progress-item:last-child {
  border-bottom: none;
}

/* Overlay de inicio de transmisión */
.transmission-start-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: transmission-overlay-fadein 0.3s ease-out;
}

.transmission-start-overlay[hidden] {
  display: none;
}

@keyframes transmission-overlay-fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.transmission-start-content {
  text-align: center;
  padding: 48px;
}

.transmission-start-text {
  font-size: 1.2rem;
  font-weight: 400;
  color: #999;
  letter-spacing: 0.5px;
}

.transmission-start-dots::after {
  content: '...';
  display: inline-block;
  width: 1.5em;
  text-align: left;
  animation: transmission-dots 1.5s steps(4, end) infinite;
}

@keyframes transmission-dots {
  0%, 25% {
    content: '.';
  }
  26%, 50% {
    content: '..';
  }
  51%, 75% {
    content: '...';
  }
  76%, 100% {
    content: '';
  }
}

/* .upload-summary {
  padding: 2px 0px;
  background: #222;
  /* border-bottom: 1px solid #333; 
} */

.upload-summary {
  position: relative;
  padding: 2px 0px;
  background: #222;
   z-index: 1; /* asegura que su contenido queda arriba del efecto */
}

.upload-summary::before {
  content: "";
  position: absolute;
  top: -2px;        /* expandimos hacia afuera */
  left: -8px;
  right: -8px;
  bottom: -2px;

  border-radius: 16px;
  background: #222;
  /* opacity: 0.35; */

  z-index: -999;      /* queda detrás del panel */
 /*  filter: blur(4px); suaviza como glow */
  pointer-events: none;
}

/* FIN */



.upload-summary-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.upload-summary-toggle {
  /* border: 1px solid rgba(255, 255, 255, 0.2); */
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
  width: 25px;
  height: 25px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border 0.2s ease;
}

.upload-summary-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.upload-summary-chevron {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.upload-summary-toggle.is-collapsed .upload-summary-chevron {
  transform: rotate(180deg);
}

.upload-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: #fff;
}

.upload-progress-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.upload-progress-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.78rem;
  font-weight: 600;
}

.upload-progress-channel {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-summary .upload-progress-title {
  color: rgba(255, 255, 255, 0.65);
}

.upload-progress-bar {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.upload-progress-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.2) 40%,
    rgba(255, 255, 255, 0.05) 80%
  );
  transform: translateX(-60%);
  opacity: 0;
  pointer-events: none;
}

.upload-progress-bar span {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3ea6ff, #34a853);
  transition: width 0.2s ease;
}

.upload-progress-bar.is-active::after {
  opacity: 1;
  animation: upload-bar-stripes 1.4s linear infinite;
}

@keyframes upload-bar-stripes {
  0% {
    transform: translateX(-60%);
  }
  100% {
    transform: translateX(60%);
  }
}

.upload-progress-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.upload-progress-bar-wrap {
  flex: 1;
  min-width: 260px;
}

.upload-progress-percent {
  min-width: 48px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.75);
}

.upload-progress-bytes {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.upload-progress-percent,
.upload-progress-status {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.upload-progress-status {
  min-width: 88px;
  text-align: center;
  padding: 0px 4px;
}

.upload-progress-btn {
  /* border: 1px solid rgba(255, 255, 255, 0.25); */
  background: #222;
  color: rgba(255, 255, 255, 0.85);
  padding: 2px 10px;
  font-size: 0.72rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.upload-progress-btn.is-icon {
  width: 25px;
  height: 25px;
  min-width: 25px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
}

.upload-progress-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.upload-progress-btn.is-danger {
  border-color: rgba(255, 99, 99, 0.65);
  color: #ff7b7b;
}

.upload-progress-btn.is-danger:hover {
  background: rgba(255, 99, 99, 0.18);
}

.media-board {
  display: flex;
  flex-direction: column;
  gap: var(--yt-spacing-l);
  flex: 1 1 auto;
  min-height: 0;
}

.media-tabs {
  display: flex;
  width: 100%;
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
}

.media-tab {
  flex: 1 1 25%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  border: none;
  font-size: var(--yt-font-size-filters);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  transition: color 0.15s ease, background 0.15s ease;
}

.media-tab:last-child {
  border-right: none;
}

.media-tab-label {
  font-weight: 400;
}

.media-tab-count {
  margin-left: auto;
  min-width: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
}

.media-tab::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: transparent;
  transition: background 0.2s ease;
}

.media-tab.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.media-tab.is-active .media-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.media-tab.is-active::after {
  background: #fff;
}

.media-tab-panels {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.media-tab-panel {
  display: none;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.media-tab-panel.is-active {
  display: flex;
}

.media-tab-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--yt-spacing-m);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--yt-spacing-m);
  flex-shrink: 0;
  padding-bottom: var(--yt-spacing-xs);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.media-tab-header-left,
.media-tab-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin-left: 8px;
}

.media-tab-header-left {
  flex: 0 0 200px;
}

.media-tab-header-right {
  flex: 0 0 200px;
  justify-content: flex-end;
}

.media-tab-header {
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .media-tab-header-left,
  .media-tab-header-right {
    flex: 0 0 100%;
    justify-content: flex-start;
  }
}

.media-tab-header-left .media-checkbox span {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: #666;
  transition: border 0.2s ease, background 0.2s ease;
  margin-top: 8px;
}

.media-tab-header-left .media-checkbox span::before {
  color: #666;
}

.media-tab-header-left .media-checkbox:hover span {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #999;
}

.media-tab-header-left .media-checkbox input:checked + span {
  background: rgba(62, 166, 255, 0.28);
  border-color: #3ea6ff;
  color: #0f0f0f;
}

.media-tab-header-center {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .media-tab-header-center {
    flex-direction: row;
    align-items: center;
  }
}

.media-tab-header-center .media-search {
  flex: 1 1 auto;
}

.media-filter-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.media-filter-pill {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.45);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  text-align: center;
}

.media-filter-pill-label {
  white-space: nowrap;
}

.media-filter-pill--loop {
  width: 70px;
  flex: 0 0 70px;
}

.media-filter-pill--audioEffects {
  width: 117px;
  flex: 0 0 117px;
}

.media-filter-pill--video {
  width: 127px;
  flex: 0 0 127px;
}

.media-filter-pill--thumbnail {
  width: 148px;
  flex: 0 0 148px;
}

.media-filter-pill.is-off {
  color: rgba(255, 255, 255, 0.45);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
}

.media-filter-pill.is-include {
  color: #b6ffe4;
  border-color: rgba(65, 212, 173, 0.9);
  background: rgba(32, 114, 96, 0.45);
}

.media-filter-pill.is-exclude {
  color: #ffdcdc;
  border-color: rgba(255, 120, 120, 0.9);
  background: rgba(118, 32, 32, 0.45);
}

.media-filter-pill:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.media-sort {
  display: inline-flex;
  align-items: stretch;
  padding: 2px;
  border-radius: 999px;
  /* border: 1px solid rgba(255, 255, 255, 0.18); */
  background: rgba(255, 255, 255, 0.02);
  gap: 0px;
  flex-shrink: 0;
}

.media-sort-pill {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  font-weight: 400;
  padding: 4px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  min-height: 28px;
  border-radius: 16px;
}

.media-sort-pill:first-child {
  border-top-right-radius: 0px;
  border-bottom-right-radius: 0px;
}

.media-sort-pill:last-child {
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
}

.media-sort-pill:not(:first-child):not(:last-child) {
  border-radius: 0px;
}

.media-sort-pill .media-sort-arrow {
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0.85;
  line-height: 1;
}

.media-sort-pill.is-active {
  color: #b6ffe4;
  border-color: rgba(65, 212, 173, 0.9);
  background: rgba(32, 114, 96, 0.45);
}

.media-sort-pill.is-active .media-sort-arrow {
  opacity: 1;
  color: #b6ffe4;
}

.media-bulk-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.media-bulk-actions .media-bulk-btn,
.media-bulk-actions .media-bulk-btn.danger {
  width: 20px;
  height: 20px;

  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: #666;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.media-bulk-actions .media-bulk-btn .material-symbols-outlined,
.media-bulk-actions .media-bulk-btn .media-bulk-icon {
  font-size: 16px;
  line-height: 1;
}

.media-bulk-actions .media-bulk-btn:hover,
.media-bulk-actions .media-bulk-btn.danger:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #999;
}

.media-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 4px 12px;
  min-height: 28px;
  font-size: 0.78rem;
  line-height: 1.2;
  color: #fff;
}

.media-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  padding-bottom: var(--yt-spacing-m);
}

.media-empty {
  margin: 0;
  padding: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.media-card {
  display: grid;
  /* Acciones ahora usan 2 columnas (más botones), por eso ampliamos el primer bloque */
  grid-template-columns: 44px 170px 1fr;
  gap: 4px;
  align-items: center;
  background: #111;
  /* border: 1px solid rgba(255, 255, 255, 0.08); */
  border: 1px solid rgba(255, 255, 255, 0.18);

  border-radius: 12px;
  /* Evita que thumbnails/video se “metan” en el área del borde (1px) por redondeos/subpíxel. */
  overflow: hidden;
  /* Altura total del card (incluye bordes). Esto evita el desplazamiento del thumbnail (160x90)
     que antes tapaba el borde al hover/selección. */
  box-sizing: border-box;
  height: 92px;
  min-height: 92px;
  padding: 0 0px 0 4px; 
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.media-card.is-selected {
  border-color: rgba(62, 166, 255, 0.8);
  background: rgba(62, 166, 255, 0.12);
}

.media-card:hover {
  /* background: #222; */
  border-color: rgba(0, 204, 58, 0.866);
}

.media-card-actions {
  width: 44px;
  display: grid;
  /* 4 items por columna (incluye checkbox). El 5to arranca arriba en la segunda columna. */
  grid-auto-flow: column;
  grid-template-rows: repeat(4, 20px);
  grid-auto-columns: 20px;
  gap: 2px 2px;
  align-content: center;
  justify-content: center;
  /* padding: 6px 0; */
}

.media-card-actions .media-checkbox {
  width: 20px;
  height: 20px;
  margin-bottom: 0;
}


.media-card-actions .ghost-btn,
.media-card-actions .ghost-btn.danger,
.media-card-actions .media-checkbox span {
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: #666;
  transition: border 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.media-card-actions .media-checkbox span {
  font-size: 0.62rem;
  color: #666;
}

.media-card-actions .ghost-btn:hover,
.media-card-actions .ghost-btn.danger:hover,
.media-card-actions .media-checkbox:hover span {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #999;
}

.media-card-actions .media-checkbox input:checked + span {
  background: rgba(62, 166, 255, 0.28);
  border-color: #3ea6ff;
  color: #0f0f0f;
}

/* .media-card-actions .ghost-btn.danger {
  border-color: rgba(255, 118, 118, 0.4);
  color: #ff7f7f;
} */

.media-card-actions .ghost-btn .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
}
.media-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  position: relative;
}

.media-checkbox input {
  position: absolute;
  opacity: 0;
}

.media-checkbox span {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: transparent;
  position: relative;
}

.media-checkbox span::before {
  content: '✔';
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1;
}

.media-checkbox input:checked + span {
  background: #3ea6ff;
  border-color: #3ea6ff;
  color: #ffffff;
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
}

.media-checkbox span::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: transparent;
  border-radius: 1px;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

[data-tab-master] + span::before {
  content: '✔';
}

[data-tab-master]:indeterminate + span {
  background: transparent;
  border-color: #3ea6ff;
}

[data-tab-master]:indeterminate + span::before {
  color: transparent;
}

[data-tab-master]:indeterminate + span::after {
 
  background: #3ea6ff;
  opacity: 1;
  width: 10px;
}

[data-tab-master] + span {
  content: '';
  color: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.3);
}

.media-checkbox input:checked + span::before {
  content: '✔';
  color: #ffffff;
}

.media-card-thumb {
  width: 160px;
  /* Estirar al alto real del card (padding box) para evitar offset de 1px por redondeo/subpíxel */
  height: 100%;
  max-height: 90px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
}

.media-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: rgba(0, 0, 0, 0.6);
}

.media-thumb-fallback {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-thumb-fallback .material-symbols-outlined {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.6);
}

.audio-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1b5e20, #00c853);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.audio-placeholder .material-symbols-outlined {
  font-size: 32px;
  color: #fff;
}

.media-card--audio .media-card-thumb::after {
  content: '♫';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  pointer-events: none;
  background: linear-gradient(135deg, #1b5e20, #00c853);
  z-index: 0;
}

.media-card--audio .media-card-thumb .media-card-duration {
  z-index: 1;
}
.media-card-duration {
  position: absolute;
  bottom: 0px;
  right: 0px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

.media-card-body h4 {
  margin: 0;
  font-size: 13px;
  color: #fff;
}

.media-card-body p {
  margin: 4px 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.media-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 400px);
  gap: 8px;
  align-items: center;
}

.media-card-body.has-assoc {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px) minmax(220px, 400px);
}
@media (max-width: 1280px) {
  .media-card-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .media-card-body.has-assoc {
    grid-template-columns: minmax(0, 1fr);
  }
}

.media-card--audio .media-card-body {
  align-items: center;
}

@media (max-width: 1280px) {
  .media-card-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .media-card-body.has-assoc {
    grid-template-columns: minmax(0, 1fr);
  }
}

.media-card-body-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.media-card-channel-panel {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  padding: 18px 0px 8px 4px;
  min-height: 90px;
  height: 92px;
  max-height: 92px;
  width: 100%;
  max-width: 350px;
  justify-self: start;
  display: flex;
  flex-direction: column;
}

.media-card-channel-label {
  position: absolute;
  top: 3px;
  left: 14px;
  padding: 0 8px;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  /* background: #121212; */
  border-radius: 999px;
}

.media-card-channel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 4px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  align-items: flex-start;
  align-content: flex-start;
  cursor: default;
}

.media-card-linked-panel {
  display: flex;
  /* gap: 6px; */
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0px 0px;
  height: 92px;
  width: 400px;
  max-width: 400px;
  justify-self: start;
}

.media-card-linked-panel--placeholder {
  visibility: hidden;
  pointer-events: none;
  border: none;
  background: transparent;
}

.media-card-linked-meta {
  width: 62px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.media-card-linked-label {
  font-size: 0.50rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 4px;
}

.media-card-linked-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(33, 150, 243, 0.18);
  color: #7dc4ff;
  font-weight: 700;
  font-size: 0.82rem;
}

.media-card-linked-action {
  margin-bottom: 6px;
  padding: 1px 4px;
  border-radius: 999px;
  border: 1px solid rgba(62, 166, 255, 0.8);
  background: rgba(62, 166, 255, 0.12);
  color: #7dc4ff;
  font-size: 0.52rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.media-card-linked-action:hover:not([data-linked-full]) {
  background: rgba(62, 166, 255, 0.2);
  color: #fff;
}

.media-card-linked-action[data-linked-full] {
  border-color: rgba(255, 99, 71, 0.65);
  color: rgba(255, 173, 153, 0.95);
  background: rgba(255, 99, 71, 0.08);
  cursor: not-allowed;
}

.media-card-linked-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.media-card-linked-strip {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 160px);
  grid-auto-rows: 90px;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 2px 0 0;
  justify-content: center;
  align-content: flex-start;
  scrollbar-gutter: stable;
}

.media-card-linked-preview {
  position: relative;
  width: 160px;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.media-card-linked-preview img {
  width: 160px !important;
  height: 90px !important;
  object-fit: cover;
  display: block;
  object-position: center;
}

.media-card-linked-preview-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px;
  text-align: center;
}

.media-card-linked-remove {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  /* border: 1px solid rgba(255, 255, 255, 0.25); */
  background: rgba(194, 0, 0, 1);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  /* transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease; */
}

.media-card-linked-remove .material-symbols-outlined {
  font-size: 0.75rem;
  line-height: 1;
}

.media-card-linked-remove:hover {
  background: rgba(255, 0, 0, 0.85);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  /* transform: scale(1.05); */
}

.media-card-linked-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 160px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

.media-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  background: rgba(33, 58, 70, 0.5);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(117, 167, 195, 0.4);
  white-space: nowrap;
}

.media-card-channel-chips .media-chip.is-empty {
  opacity: 0.55;
  font-style: italic;
}

.media-card-channel-chips::-webkit-scrollbar {
  width: 4px;
}

.media-card-channel-chips::-webkit-scrollbar-track {
  background: transparent;
}

.media-card-channel-chips::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}


.media-card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 16px;
  margin-top: 2px;
  cursor: default;
}

.media-card-flags:empty::before {
  content: '';
  display: block;
  width: 100%;
  height: 12px;
}

.media-card-flag {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.55rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

.media-card-flag--loop {
  border-color: rgba(0, 210, 132, 0.5);
  background: rgba(0, 210, 132, 0.18);
  color: #6af8c0;
}

.media-card-flag--effects {
  border-color: rgba(152, 94, 255, 0.6);
  background: rgba(152, 94, 255, 0.2);
  color: #d2c0ff;
}

.media-card-flag--thumbnail {
  border-color: rgba(41, 121, 255, 0.55);
  background: rgba(33, 150, 243, 0.16);
  color: #a5d5ff;
}

.media-card-flag--link {
  border-color: rgba(255, 193, 7, 0.5);
  background: rgba(255, 193, 7, 0.16);
  color: #ffe196;
}

.media-card-flag--theme {
  border-color: rgba(126, 184, 255, 0.55);
  background: rgba(80, 132, 220, 0.2);
  color: #d6e6ff;
}

.media-card-flag--original {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
}

.media-card-flag--encoded {
  border-color: rgba(0, 200, 255, 0.55);
  background: rgba(0, 200, 255, 0.16);
  color: #bfefff;
}

.media-card-flag--encoding {
  border-color: rgba(255, 153, 0, 0.55);
  background: rgba(255, 153, 0, 0.16);
  color: #ffd4a1;
}

.media-card-flag--encoding-error {
  border-color: rgba(255, 76, 76, 0.6);
  background: rgba(255, 76, 76, 0.14);
  color: #ffb3b3;
}

.media-confirm {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.media-confirm[hidden] {
  display: none;
}

.media-confirm-content {
  width: min(640px, 96%);
  max-height: 95vh;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 24px 24px 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.media-confirm-header {
  display: flex;
  gap: 14px;
}

.media-confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 193, 7, 0.15);
  color: #ffe196;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.media-confirm-icon .material-symbols-outlined {
  font-size: 26px;
}

.media-confirm-copy h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #fff;
}

.media-confirm-copy p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.media-confirm-list {
  margin: 16px 0 0 12px;
  padding-left: 18px;
  padding-right: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  flex: 1 1 auto;
  overflow-y: auto;
}

.media-confirm-list li {
  margin-bottom: 4px;
}

.media-confirm-list[hidden] {
  display: none;
}

.media-confirm-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.media-confirm-btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  padding: 8px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease;
}

.media-confirm-btn.ghost {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
}

.media-confirm-btn.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.media-confirm-btn.danger {
  border-color: rgba(255, 87, 115, 0.75);
  background: rgba(255, 87, 115, 0.15);
  color: #ff94a9;
}

.media-confirm-btn.danger:hover {
  background: rgba(255, 87, 115, 0.3);
}

.media-confirm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.media-assoc-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.media-assoc-modal[hidden] {
  display: none;
}

.media-assoc-modal-content {
  width: min(920px, 94%);
  max-height: 92vh;
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.media-assoc-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.media-assoc-modal-head h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #fff;
}

.media-assoc-modal-head p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.media-assoc-reference-label {
  display: block;
  margin: 4px 0 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.media-assoc-close {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
}

.media-assoc-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.media-assoc-suggest {
  border-radius: 999px;
  border: 1px solid rgba(62, 166, 255, 0.4);
  background: rgba(62, 166, 255, 0.12);
  color: #8cc8ff;
  padding: 6px 14px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.media-assoc-suggest:hover {
  border-color: rgba(62, 166, 255, 0.7);
  background: rgba(62, 166, 255, 0.2);
  color: #b3dcff;
}

.media-assoc-suggest[hidden] {
  display: none;
}

.media-assoc-controls input {
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  color: #fff;
}

.media-assoc-count {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.media-assoc-reference {
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 8px;
}

.media-assoc-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 6px;
  max-height: 60vh;
}

.media-assoc-option {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 120px;
  gap: 16px;
  padding: 0px 16px 0px 0px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  min-height: 92px;
  background: rgba(255, 255, 255, 0.01);
  align-items: center;
}

.media-assoc-option.is-linked {
  border-color: rgba(62, 166, 255, 0.4);
  background: rgba(62, 166, 255, 0.08);
}

.media-assoc-option--reference {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.media-assoc-thumb {
  width: 160px;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.media-assoc-thumb img,
.media-assoc-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-assoc-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}

.media-assoc-details h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #fff;
}

.media-assoc-details p {
  margin: 4px 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}

.media-assoc-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.media-assoc-actions button {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  padding: 6px 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.media-assoc-actions button.primary {
  border-color: rgba(62, 166, 255, 0.6);
  background: rgba(62, 166, 255, 0.1);
}

.media-assoc-actions button.danger {
  border-color: rgba(255, 87, 115, 0.6);
  background: rgba(255, 87, 115, 0.1);
}

.media-assoc-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.media-assoc-option--reference .media-assoc-actions {
  align-items: flex-end;
}

.media-assoc-option--reference .media-chip {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.media-assoc-empty {
  text-align: center;
  padding: 40px 0;
  color: rgba(255, 255, 255, 0.6);
}

.bulk-link-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.bulk-link-modal[hidden] {
  display: none;
}

.bulk-link-modal-content {
  width: min(560px, 94%);
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bulk-link-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.bulk-link-header h3 {
  margin: 0;
  color: #fff;
}

.bulk-link-header p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.bulk-link-close {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.4rem;
  cursor: pointer;
}

.bulk-link-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bulk-link-selected {
  padding: 0;
  border: none;
  background: transparent;
}

.bulk-link-selector {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.bulk-link-selector .channel-linked-selector {
  flex: 1;
}

.bulk-link-selector .bulk-link-action-btn {
  width: 56px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bulk-link-selector .bulk-link-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.theme-modal .theme-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.theme-modal .theme-modal-input {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 10px 14px;
  font-size: 1rem;
}

.theme-modal .theme-modal-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
}

.theme-modal .theme-modal-hint {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

.theme-modal .theme-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.media-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.media-modal[hidden] {
  display: none;
}

.media-modal-content {
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 12px 24px;
  width: min(720px, 90%);
  max-height: 98vh;
  overflow-y: auto;
}

.media-modal-content p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}

/* Contenedor para los dos paneles laterales */
.media-modal-panels-container {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

/* Panel de información de encode (izquierda) - Ultra compacto */
.media-modal-encode-panel {
  flex: 0 0 auto;
  min-width: 170px;
  max-width: 170px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 4px 4px;
  background: rgba(255, 255, 255, 0.01);
  font-size: 0.68rem;
  line-height: 1.6;
  font-family: var(--yt-font-family-primary);
  color: rgba(255, 255, 255, 0.85);
}

.media-modal-encode-panel .encode-info-title {
  font-size: var(--yt-font-size-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  margin-bottom: 4px;
  font-family: var(--yt-font-family-primary);
}

.media-modal-encode-panel .encode-label {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  font-size: var(--yt-font-size-label);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-family: var(--yt-font-family-primary);
}

/* Panel de canales (derecha) */
.media-modal-channel-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.01);
}

/* Responsive: en pantallas pequeñas, apilar verticalmente */
@media (max-width: 900px) {
  .media-modal-panels-container {
    flex-direction: column;
  }
  
  .media-modal-encode-panel {
    min-width: unset;
    max-width: unset;
  }
}

.media-modal-channel-current {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 24px 16px 14px;
  background: rgba(255, 255, 255, 0.02);
}

.media-modal-channel-current .media-modal-channel-label {
  position: absolute;
  top: 4px;
  left: 14px;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.media-modal-channel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.media-modal-channel-add {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.media-modal-channel-add .channel-linked-selector {
  flex: 1 1 auto;
}

.media-modal-channel-add .media-preview-icon-btn {
  height: 100%;
  aspect-ratio: 1 / 1;
  width: auto;
  min-height: 54px;
  border-radius: 14px;
  font-size: 0;
}

.media-chip--interactive {
  gap: 6px;
}

.media-chip-remove {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.media-chip-remove:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.channel-linked-selector {
  position: relative;
  flex: 1 1 auto;
}

.channel-linked-selector .channel-linked-label {
  position: absolute;
  top: 4px;
  left: 48px;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.channel-linked-selector .channel-linked-trigger {
  width: 100%;
  min-height: 50px;
  padding: 16px 42px 6px 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-align: left;
  position: relative;
  transition: border 0.2s ease, background 0.2s ease;
}

.channel-linked-selector .channel-linked-trigger:hover,
.channel-linked-selector.is-open .channel-linked-trigger {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.channel-linked-selector .channel-linked-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.channel-linked-selector .channel-linked-avatar {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  left: 12px;
  top: 16px;
  background-size: cover;
  background-position: center;
  background-image: var(--linked-avatar, url('https://placehold.co/32x32?text=CH'));
}

.channel-linked-selector .channel-linked-name {
  flex: 1 1 auto;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-linked-selector .channel-linked-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
}

.channel-linked-selector.is-open .channel-linked-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.channel-linked-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: #1b1b1b;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
  z-index: 20;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
}

.channel-linked-selector:not(.is-open) .channel-linked-menu {
  display: none;
}

.channel-linked-option {
  width: 100%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.channel-linked-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.channel-linked-option-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.08);
}

.channel-linked-menu-empty {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  padding: 8px;
}

.channel-linked-selector.is-disabled .channel-linked-trigger {
  opacity: 0.5;
  cursor: not-allowed;
}

.media-modal-close {
  float: right;
  font-size: 1.4rem;
  line-height: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
}

.media-preview-frame {
  margin-top: 16px;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
}

.media-preview-frame video,
.media-preview-frame audio,
.media-preview-frame img {
  width: 100%;
  display: block;
  border-radius: 14px;
}




.media-preview-frame video::-webkit-media-controls {
  display: none !important;
} 

.media-preview-frame audio::-webkit-media-controls {
  display: none !important;
}


.media-preview-frame img {
  cursor: zoom-in;
}

.media-preview-frame img.media-preview-image--fullscreen {
  cursor: zoom-out;
}

.media-preview-primary {
  /* margin-top: 16px; */
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.media-preview-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.media-preview-stage:fullscreen,
.media-preview-stage:-webkit-full-screen {
  width: 100%;
  height: 100%;
  padding: 16px;
  box-sizing: border-box;
  background: #000;
  gap: 18px;
  justify-content: center;
}

.media-preview-stage:fullscreen .media-preview-frame,
.media-preview-stage:-webkit-full-screen .media-preview-frame {
  flex: 1 1 auto;
  height: calc(100% - 90px);
  display: flex;
}

.media-preview-stage:fullscreen .media-preview-frame video,
.media-preview-stage:-webkit-full-screen .media-preview-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-preview-stage:fullscreen .media-preview-controls,
.media-preview-stage:-webkit-full-screen .media-preview-controls {
  width: min(960px, 100%);
  align-self: center;
}

.media-preview-toggle-cluster {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.media-preview-stage--audio .media-preview-frame {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  background: transparent;
  min-height: auto;
  position: relative;
}

.media-preview-audio-visual {
  width: 100%;
  height: 90px;
  min-height: 90px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1b5e20, #00c853);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.25);
}

.media-preview-audio-icon {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.media-preview-audio-element {
  position: absolute;
  inset: 0;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.media-preview-stage--audio .media-preview-controls {
  background: rgba(255, 255, 255, 0.06);
}

.media-preview-main-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.media-loop-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
  align-self: center;
  min-height: 32px;
  line-height: 1;
  margin-top: 8px;
}

.media-loop-toggle:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.media-loop-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

.media-loop-toggle-box {
  min-width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  line-height: 1;
  color: transparent;
  background: rgba(255, 255, 255, 0.05);
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  padding: 0 4px;
}

.media-loop-toggle--audio-effects .media-loop-toggle-box {
  font-size: 0.6rem;
  letter-spacing: -0.02em;
}

.media-loop-toggle input:checked + .media-loop-toggle-box {
  background: #3ea6ff;
  border-color: #3ea6ff;
  color: #0b1828;
}

.media-loop-toggle input:focus-visible + .media-loop-toggle-box {
  outline: 2px solid rgba(62, 166, 255, 0.7);
  outline-offset: 2px;
}

.media-preview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.media-preview-actions button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.media-preview-actions button .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
}

.media-preview-action-icon {
  min-width: 32px;
  width: 32px;
  padding: 0;
}

.media-preview-action-icon.danger {
  border-color: rgba(255, 82, 82, 0.6);
  color: rgba(255, 120, 120, 0.9);
}

.media-preview-action-icon.danger:hover {
  border-color: rgba(255, 82, 82, 0.95);
  background: rgba(255, 82, 82, 0.12);
  color: #ffcdcd;
}

.media-preview-actions button:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.media-preview-controls {
  /* margin-top: 14px; */
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.media-preview-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.media-preview-progress-track {
  flex: 1 1 200px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.media-preview-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #3ea6ff;
  border-radius: 999px;
  width: 0%;
  transition: width 0.1s linear;
}

.media-preview-progress-time {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}

.media-preview-extra-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.media-preview-extra-controls--left {
  margin-left: 0;
  margin-right: 8px;
}

.media-preview-icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.8);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.media-preview-icon-btn.is-active {
  border-color: #3ea6ff;
  background: rgba(62, 166, 255, 0.18);
  color: #3ea6ff;
}

.media-preview-icon-btn:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.media-preview-icon-btn .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
}


.channel-selector .primary-toggle {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.channel-selector .primary-toggle.is-active {
  background: rgba(1, 210, 46, 0.7);
  border-color: rgba(1, 210, 46, 0.9);
  color: #fff;
}

.channel-selector .primary-toggle:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.channel-selector .channel-select-field {
  position: relative;
  flex: 0 1 auto;
  width: 100%;
  min-width: 0;
}

.channel-selector .channel-select-label {
  position: absolute;
  top: 4px;
  left: 48px;
  font-size: var(--yt-font-size-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.channel-selector .channel-select-trigger {
  width: 100%; /* ancho se hereda del bloque de 280px */
  min-height: 50px;
  padding: 16px 42px 6px 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-align: left;
  position: relative;
  transition: border 0.2s ease, background 0.2s ease;
}

.channel-selector .channel-select-trigger:hover,
.channel-selector .channel-select-trigger.is-open {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.28);
}

.channel-selector .channel-select-avatar {
  position: absolute;
  left: 12px;
  top: 16px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-image: var(--avatar-url, url('https://placehold.co/32x32?text=YT'));
  /* border: 1px solid rgba(255, 255, 255, 0.2); */
}

.channel-selector .channel-select-name {
  flex: 1 1 auto;
  font-size: var(--yt-font-size-base);
  white-space: nowrap;
  word-break: normal;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-selector .channel-select-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  transition: transform 0.2s ease;
}

.channel-selector .channel-select-trigger.is-open .channel-select-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.channel-selector .channel-select-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  width: 100%;
  min-width: 270px;
  background: #1b1b1b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: var(--yt-shadow-3);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 40;
  max-height: 300px;

  overflow-y: auto;
}

.channel-selector .channel-select-menu[hidden] {
  display: none !important;
}

.channel-selector .channel-select-option {
  flex-shrink: 0;
  width: 100%;
  max-width: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 11px;
  background: transparent;
  color: #fff;
  text-align: left;
  transition: background 0.15s ease;
  position: relative;
}

.channel-selector .channel-select-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.channel-selector .channel-select-option.is-active {
  background: rgba(255, 255, 255, 0.1);
}

.channel-selector .option-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.channel-selector .option-name {
  flex: 1 1 auto;
  white-space: nowrap;
  flex-shrink: 0;

  font-size: 0.92rem;
  line-height: 1.3;
}

.channel-selector .option-pill {
  position: absolute;
  top: 0px;
  right: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(1, 210, 46, 0.18);
  color: rgba(1, 210, 46, 0.85);
  font-size: var(--yt-font-size-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.channel-selector .channel-select-empty {
  margin: 0;
  padding: 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.channel-selector-bar {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  margin-bottom: var(--yt-spacing-s);
}

.channel-selector-slot {
  flex: 1 1 auto;
  max-width: 100%;
}

.streams-table-wrapper {
  overflow-x: auto;
}

.channel-sidebar .channel-list::-webkit-scrollbar {
  width: 6px;
}

.channel-sidebar .channel-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.channel-sidebar .channel-card {
  background: #1a1a1a;
  border-radius: 18px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 150px;
}

.channel-sidebar .channel-card:hover {
  border-color: #34a853;
  /* transform: translateY(-2px); */
}

.channel-sidebar .channel-card-header {
  display: flex;
  gap: 4px;
  align-items: stretch;
  width: 100%;
  flex: 1;
}

.channel-sidebar .channel-avatar-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 92px;
}

.channel-sidebar .channel-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.channel-sidebar .channel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-sidebar .primary-toggle {
  aspect-ratio: 1 / 1;
  /* border: 1px solid rgba(255, 255, 255, 0.2); */
  border-radius: 999px;
  padding: 6px 6px;
  background: #222;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.channel-sidebar .primary-toggle .icon {
  font-size: 1.5rem;
}

.channel-sidebar .primary-toggle.is-active {
  background: rgba(1, 210, 46, 0.604);
  border-color: rgba(1, 210, 46, 0.604);
  color: #FFFFFF;
  font-weight: 600;
}

.channel-sidebar .primary-toggle:not(.is-active):hover {
  /* border-color: #333; */
  background: #333;
  color: #FFFFFF;
  /* transform: translateY(-1px); */
}

.channel-sidebar .favorite-btn-rounded {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.4rem;
}

.channel-sidebar .favorite-btn-rounded.is-active {
  background: #f7c948;
  border-color: #f7c948;
  color: #1c1c1c;
}

.channel-sidebar .channel-card-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.channel-sidebar .channel-card-meta h3 {
  margin: 0;
  font-size: 1.2rem;
}

.channel-sidebar .channel-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.channel-sidebar .channel-card-title-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.channel-sidebar .channel-card-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.channel-sidebar .channel-card-title-row h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-sidebar .channel-title-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 140px;
}

.channel-sidebar .channel-title-actions a {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0.75rem;
  white-space: nowrap;
}

.channel-sidebar .channel-title-actions a:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.channel-sidebar .favorite-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
}

.channel-sidebar .favorite-btn.is-active {
  background: #f7c948;
  border-color: #f7c948;
  color: #1c1c1c;
}

.channel-sidebar .channel-handle {
  margin: 0;
  color: #b9b9b9;
  font-size: 0.9rem;
}

.channel-sidebar .channel-description {
  color: #d2d2d2;
  margin: 0px;
  width: 100%;
  line-height: 1.4;
  min-height: 40px;
  max-height: calc(1.4em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-sidebar .channel-stats-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0px;
  flex-wrap: wrap;
  margin-top: 2px;
  width: 100%;
}

.channel-sidebar .channel-stats-inline {
  color: #9ea0a5;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.channel-sidebar .stats-refresh-btn {
  /* border: 1px solid rgba(255, 255, 255, 0.2); */
  background: #222;
  color: #999;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
}

.channel-sidebar .stats-refresh-btn:hover {
  /* border-color: rgba(255, 255, 255, 0.5); */
  color: #ccc;
  background: rgba(255, 255, 255, 0.08);
}

.channel-sidebar .stats-refresh-btn .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
}

.channel-sidebar .channel-stat-group {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.channel-sidebar .channel-stat {
  min-width: 90px;
}

.channel-sidebar .channel-stat .value {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
}

.channel-sidebar .channel-stat .label {
  color: #8f8f8f;
  font-size: 0.85rem;
}

.channel-sidebar .channel-stats-row .tag-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
}

@media (max-width: 900px) {
  .channel-sidebar .channel-stats-row {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .channel-sidebar .channel-stats-row .tag-group,
  .channel-sidebar .channel-card-actions.inline {
    justify-content: flex-start;
    width: 100%;
  }
}

.channel-sidebar .channel-card-actions.inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
}

.channel-sidebar .channel-card-actions.inline .ghost-btn,
.channel-sidebar .channel-card-actions.inline .pill-btn,
.channel-sidebar .channel-card-actions.inline .danger-btn {
  padding: 3px 8px;
  font-size: 12px;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.badge-kids {
  background: rgba(255, 153, 0, 0.2);
  color: #ff9900;
  border-color: rgba(255, 153, 0, 0.5);
}

.badge-mode {
  background: rgba(120, 132, 255, 0.15);
  color: #a6b1ff;
  border-color: rgba(120, 132, 255, 0.4);
}

.badge-language {
  background: rgba(46, 204, 113, 0.15);
  color: #52f9b2;
  border-color: rgba(46, 204, 113, 0.4);
}

.channel-sidebar .ghost-btn,
.channel-sidebar .pill-btn,
.channel-sidebar .danger-btn {
  /* padding: 8px 18px; */
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #999;
}

.channel-sidebar .ghost-btn:hover,
.channel-sidebar .pill-btn:hover {
  border-color: #999;
  color: #ddd;
}

/* .channel-sidebar .pill-btn {
  background: rgba(255, 255, 255, 0.08);
} */

.channel-sidebar .danger-btn {
  border-color: rgba(255, 99, 132, 0.5);
  color: #ff6384;
}

.channel-sidebar .danger-btn:hover {
  /* border-color: #FF6B6B; */
  background: #ff0000;
  color: #ffffff;
}

.channel-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 32px;
}

.channel-modal {
  width: min(1040px, 95vw);
  height: 85vh;
  max-height: 85vh;
  min-height: 85vh;
  overflow: hidden;
  background: var(--yt-spec-raised-background);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
}

.channel-modal header {
  padding: 8px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.channel-modal .modal-title-block {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 60px;
  min-width: 0;
}

.channel-modal .modal-title-block h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #fff;
}

.channel-modal .modal-channel-name {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.channel-modal .modal-channel-name span {
  font-weight: 600;
  color: #fff;
}

.channel-modal .close-btn {
  border: none;
  /* background: rgba(255, 255, 255, 0.08); */
  border-radius: 999px;
  width: 36px;
  height: 36px;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.channel-modal .modal-body {
  padding: 0 16px 16px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.channel-settings-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.channel-settings-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.channel-settings-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-card {
  background: var(--ly-surface-panel);
  border: 1px solid var(--ly-surface-panel-border);
  box-shadow: var(--ly-surface-panel-shadow);
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-card.controls-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.settings-card--inline {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.settings-card--inline label {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.settings-card--inline .language-selector,
.settings-card--inline select,
.settings-card--inline .pill-toggle,
.settings-card--inline .media-select {
  flex: 1 1 auto;
}

.settings-card--inline select,
.settings-card--inline .media-select {
  width: 100%;
}

.settings-card--floating-select {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.settings-card--checkbox-pair {
  flex-direction: row;
  gap: 12px;
  align-items: stretch;
}

.general-settings-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  overflow: visible;
}

.general-settings-panel .ns-settings-card {
  flex: 0 0 auto;
  min-width: 180px;
  width: auto;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.general-settings-panel .settings-card--floating-select {
  flex: 1 1 0;
  min-width: 220px;
}

.general-settings-panel .ns-settings-card--pill {
  flex: 1 1 320px;

}

.general-settings-panel .ns-settings-card--category {
  width: 240px;
  flex: 0 0 auto;
}

.general-settings-panel .ns-settings-card--vertical {
  flex: 0 0 200px;
  flex-direction: column;
  gap: 0px;
}

.general-settings-panel .ns-settings-card--vertical .checkbox-box {
  width: 100%;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.85);
}

.general-settings-panel .ns-settings-card--vertical .checkbox-box.is-active {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
}

.general-settings-panel .ns-settings-card--vertical .checkbox-box input {
  border-width: 2px;
}

.general-settings-panel .pill-toggle {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
  display: flex;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.general-settings-panel .pill-toggle button {
  flex: 1;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  padding: 4px 10px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
  font-size: var(--yt-font-size-base);
}

.general-settings-panel .pill-toggle button.active {
  background: rgba(32, 114, 96, 0.4);
  border-color: rgba(65, 212, 173, 0.8);
  color: #d8fff4;
}

.ns-schedule-panel {
  display: flex;
  flex-direction: row;
  gap: 0px;
  margin-top: 0px;
}

.ns-schedule-picker {
  display: flex;
  flex-wrap: wrap;
   justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  width: 100%;
}

.ns-schedule-picker label {
  display: flex;
  /* flex-direction: column; */
  gap: 4px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  /* min-width: 150px; */
}

.ns-schedule-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0;
  /* gap: 10px; */
}


.ns-schedule-picker input {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  padding: 6px 10px;
  font-size: 0.9rem;
  color-scheme: dark;
}

.settings-card.settings-card--floating-select.ns-settings-card {
  gap: 0 !important;
}


.ns-schedule-picker input::-webkit-calendar-picker-indicator {
  /* filter: invert(1) brightness(1.2); */
  opacity: 0.95;
  cursor: pointer;
  color: #333;
}

.ns-schedule-picker input::-webkit-inner-spin-button,
.ns-schedule-picker input::-webkit-outer-spin-button {
  filter: invert(1) brightness(1.2);
}


.ns-settings-label {
  display: block;
  margin-bottom: 6px;
  color: #d5d5d5;
  font-size: var(--yt-font-size-base);
}

.general-settings-panel .media-select,
.general-settings-panel .media-select__trigger {
  width: 100%;
}

.general-settings-panel .media-select__dropdown {
  z-index: 80;
  top: 100%;
}

.checkbox-box {
  flex: 1 1 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0px;
  min-height: 20px;
  width: 100%;
  padding: 4px 8px;
  border-radius: 12px;
  /* border: 1px solid var(--ly-floating-surface-border);
  background: var(--ly-floating-surface-bg);
  box-shadow: var(--yt-shadow-1); */
  /* color: rgba(255, 255, 255, 0.85); */
  font-size: var(--yt-font-size-base);
  /* transition: border 0.2s ease, background 0.2s ease, color 0.2s ease; */
}

.checkbox-box.is-active {
  border-color: rgba(65, 212, 173, 0.8);
  /* background: rgba(32, 114, 96, 0.4); */
  /* color: #d8fff4; */
}

.checkbox-box input {
  order: 0;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  flex: 0 0 auto;
  vertical-align: middle; /* 👈 arregla el desalineado */
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--ly-floating-surface-border);
  border-radius: 6px;
  background: transparent;
  display: grid;
  place-items: center;
  transition: border 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.checkbox-box input::after {
  content: '';
  width: 8px;
  height: 12px;
  border: 2px solid transparent;
  border-left: 0;
  border-top: 0;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.checkbox-box input:checked {
  border-color: rgba(65, 212, 173, 0.8);
  background: rgba(32, 114, 96, 0.4);
}

.checkbox-box input:checked::after {
  border-color: #d8fff4;
  transform: rotate(45deg) scale(1);
}

.checkbox-box input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px rgba(65, 212, 173, 0.6);
}

.checkbox-box span {
  gap: 10px;
  order: 1;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  line-height: 1.3;
  white-space: nowrap;
}

.settings-card--stacked .checkbox + .checkbox {
  margin-top: 6px;
}

.channel-modal label {
  display: block;
  margin-bottom: 6px;
  color: #d5d5d5;
  font-size: 0.9rem;
}

.channel-modal .checkbox-box {
  display: flex;
  margin-bottom: 0;
}

.controls-card > label {
  width: 100%;
  text-align: center;
}

.channel-modal select {
  width: 100%;
  background: var(--ly-floating-surface-bg);
  border: 1px solid var(--ly-floating-surface-border);
  border-radius: 12px;
  padding: 8px 10px;
  color: #fff;
}

.channel-modal .media-select,
.settings-card .media-select {
  width: 100%;
}

.channel-modal select.cast-effect-select,
.channel-modal select.cast-effect-select--duration,
.settings-card select.cast-effect-select,
.settings-card select.cast-effect-select--duration {
  background: rgba(32, 32, 32, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.75);
  padding: 0 10px;
  min-height: 20px;
  border-radius: 8px;
}

.channel-modal .checkbox {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #c9c9c9;
}

.channel-modal footer {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-loading {
  padding: 40px;
  text-align: center;
  color: #b5b5b5;
}

.channel-modal .language-selector,
.channel-modal .pill-toggle,
.channel-modal .chip-group {
  background: var(--ly-floating-surface-bg);
  border: 1px solid var(--ly-floating-surface-border);
  border-radius: 12px;
  padding: 0px;
  display: flex;
  gap: 1px;
  box-shadow: var(--yt-shadow-1);
}

.channel-modal .language-selector button,
.channel-modal .pill-toggle button,
.channel-modal .chip-group .chip {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  padding: 4px 10px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.channel-modal .language-selector button:hover,
.channel-modal .pill-toggle button:hover,
.channel-modal .chip-group .chip:hover {
  border-color: var(--ly-floating-surface-border-hover);
  color: #fff;
}

.channel-modal .language-selector button.active,
.channel-modal .pill-toggle button.active,
.channel-modal .chip-group .chip.active {
  background: rgba(32, 114, 96, 0.4);
  border-color: rgba(65, 212, 173, 0.8);
  color: #d8fff4;
}

.channel-modal .chip-group .chip {
  flex: unset;
  padding: 8px 16px;
}

.channel-settings-right .media-controls {
  width: 100%;
}

@media (max-width: 1024px) {
  .channel-settings-columns {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .channel-settings-right {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .channel-sidebar {
    padding: 20px;
  }

  .channel-sidebar .channel-card-header {
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
  }

  .channel-sidebar .channel-avatar-column {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    gap: 16px;
  }

  .channel-sidebar .default-settings-btn {
    width: auto;
    padding: 8px 16px;
  }

  .channel-sidebar .channel-card-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* === Temas · Vinculaciones === */
.themes-assoc-shell {
  /* background: var(--ly-surface-panel); */
  /* border: 1px solid var(--ly-surface-panel-border); */
  border-radius: var(--yt-border-radius-large);
  box-shadow: var(--ly-surface-panel-shadow);
  padding: 0px;
}

.themes-assoc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.themes-assoc-header h4 {
  margin: 0;
}

.themes-assoc-header p {
  margin: 4px 0 0 0;
  color: var(--yt-spec-text-secondary);
}

.themes-assoc-filters {
  display: inline-flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 2px;
  /* border: 1px solid rgba(255, 255, 255, 0.14); */
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.themes-assoc-filters .pill-btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--yt-font-size-filters);
  /* text-transform: uppercase; */
  /* text-transform: none; */
  padding: 3px 8px;
  /* min-height: 30px; */
  transition: color 0.2s ease, background 0.2s ease, border 0.2s ease;
  border-radius: 0;
}

.themes-assoc-filters .pill-btn--icon-only {
  padding: 3px 8px;
  min-width: 32px;
}

.themes-assoc-filters .pill-btn:first-child {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.themes-assoc-filters .pill-btn:last-child {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.themes-assoc-filters .pill-btn:not(:first-child) {
  margin-left: -1px;
}

.themes-assoc-filters .pill-btn.is-active {
  border-color: rgba(65, 212, 173, 0.8);
  background: rgba(32, 114, 96, 0.4);
  color: #d8fff4;
}

.themes-assoc-filters .pill-btn:hover {
  /* border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06); */
  color: #fff;
}

.themes-assoc-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 8px;
}

.themes-assoc-column {
  background: var(--yt-spec-general-background-a);
  border: 1px solid var(--yt-spec-outline);
  border-radius: var(--yt-border-radius-xlarge);
  padding: 8px;
  min-height: 280px;
  max-height: calc(95vh - 160px);
}

.themes-assoc-column h5 {
  margin: 0;
}

.themes-assoc-column-header--themes {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 8px;
}

.themes-assoc-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.themes-assoc-filters--themes {
  margin-left: auto;
}

.themes-assoc-themes {
  display: flex;
  flex-direction: column;
  gap: 3px 4px;
  max-height: calc(95vh - 255px);
  overflow-y: auto;
}

.themes-assoc-search {
  margin-bottom: 6px;
}

.themes-assoc-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 6px 10px;
  color: #fff;
  font-size: 13px;
}

.themes-assoc-theme {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 4px 8px;
  border: 1px solid var(--yt-spec-outline);
  /* border-radius: var(--yt-border-radius-large); */
  background: rgba(255, 255, 255, 0.04);
  color: var(--yt-spec-text-primary);
  transition: all 0.15s ease;
  gap: 4px;
  margin-bottom: 2px;
  font-size: var(--yt-font-size-filters);
}

.themes-assoc-theme:hover {
  background: rgba(255, 255, 255, 0.08);
}

.themes-assoc-theme.is-active {
  background: rgba(62, 166, 255, 0.18);
  /* border-color: var(--yt-spec-static-brand-blue); */
  border-color: rgba(62, 166, 255, 0.5);
  /* box-shadow: 0 0 0 1px var(--yt-spec-static-brand-blue); */
}

.themes-assoc-theme__badge {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--yt-spec-text-secondary);
}

.themes-assoc-theme__name {
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
}

.themes-assoc-videos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.themes-assoc-subtitle {
  color: var(--yt-spec-text-secondary);
  margin: 2px 0 0 0;
}

.themes-assoc-counter {
  color: var(--yt-spec-text-secondary);
  font-size: 13px;
  min-width: 120px;
  text-align: right;
  flex: 0 0 120px;
}

.themes-assoc-videos {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(95vh - 215px);
  overflow-y: auto;
}

.themes-assoc-video {
  display: grid;
  grid-template-columns: 160px 1fr 300px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--yt-spec-outline);
  border-radius: var(--yt-border-radius-large);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  min-height: 92px;
  padding: 0px;
}

.themes-assoc-video:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.themes-assoc-video.is-linked {
  border-color: var(--yt-spec-static-brand-blue);
  box-shadow: 0 0 0 1px rgba(62, 166, 255, 0.4);
  background: rgba(62, 166, 255, 0.08);
}

.themes-assoc-video__thumb {
  position: relative;
  width: 100%;
  height: 90px;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
}

.themes-assoc-video__img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.9);
}

.themes-assoc-video__duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
}

.themes-assoc-video__check {
  position: absolute;
  left: 6px;
  top: 6px;
  font-size: 18px;
  color: #9e9e9e;
}

.themes-assoc-video.is-linked .themes-assoc-video__check {
  color: var(--yt-spec-static-brand-blue);
}

.themes-assoc-video__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 8px;
}

.themes-assoc-video__title {
  font-weight: 600;
  margin: 0;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.themes-assoc-video__meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--yt-spec-text-secondary);
}

.themes-assoc-video__info {
  color: var(--yt-spec-text-secondary);
  font-size: 13px;
}

.themes-assoc-video__panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 1px solid var(--yt-spec-outline);
  border-radius: var(--yt-border-radius-large);
  align-self: stretch;
  max-height: 92px;
  overflow-y: auto;
}

.themes-assoc-video__tags-header {
  font-size: var(--yt-font-size-filters);
  margin-left: 8px;
  color: var(--yt-spec-text-secondary);
}

.themes-assoc-video__tags-list {
  display: flex;
  flex-wrap: wrap;
  margin-left: 2px;
  gap: 6px;
}

.themes-assoc-video__tags-list--empty {
  color: var(--yt-spec-text-secondary);
  font-size: 12px;
}

.themes-assoc-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(62, 166, 255, 0.12);
  color: #fff;
  font-size: var(--yt-font-size-label);
  cursor: pointer;
  transition: background 0.15s ease, border 0.15s ease;
}

.themes-assoc-tag:hover {
  border-color: rgba(62, 166, 255, 0.6);
  background: rgba(62, 166, 255, 0.12);
}

.themes-assoc-tag__close {
  font-size: 14px;
}

.themes-assoc-video__tag {
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.themes-assoc-video__tag--muted {
  background: rgba(255, 255, 255, 0.04);
}

.themes-assoc-empty {
  margin-top: 14px;
  padding: 16px;
  text-align: center;
  color: var(--yt-spec-text-secondary);
  border: 1px dashed var(--yt-spec-outline);
  border-radius: var(--yt-border-radius-large);
}

.themes-assoc-empty-icon {
  font-size: 32px;
  color: var(--yt-spec-icon-inactive);
  margin-bottom: 6px;
}

.themes-assoc-loading {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--yt-spec-text-secondary);
  padding: 12px;
}

@media (max-width: 1024px) {
  .themes-assoc-grid {
    grid-template-columns: 1fr;
  }

  .themes-assoc-videos {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.automations-topbar {
  align-items: center;
  justify-content: space-between;
  gap: var(--yt-spacing-m);
}

.automations-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.automations-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
}

.automations-grid {
  display: grid;
  grid-template-columns: 2.8fr 2fr;
  gap: 8px;
  min-height: calc(95vh - 120px);
  height: calc(95vh - 120px);
}

.automations-card {
  padding: 8px;
  gap: 8px;
}

.automations-column {
  display: flex;
  flex-direction: column;
  gap: 0px; 
  padding: 0px;
  height: 100%;
  min-height: calc(95vh - 120px);
  overflow: hidden;
}

.automations-column--tabs {
  padding: 0;
  gap: 6px;
}

.automations-tabs {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.25);
  padding: 0;
  overflow: visible;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.automations-tab-bar {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 0;
}

.automations-tab {
  flex: 1;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  padding: 10px 16px;
  border-radius: 12px 12px 0 0;
  font-size: var(--yt-font-size-filters);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.automations-tab.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.automations-tab-panels {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: none;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  min-height: calc(95vh - 190px);
  flex: 1 1 auto;
}

.automations-tab-panel {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  overflow: visible;
  flex: 1 1 auto;
  min-height: 0;
}

.automations-tab-panel.is-active {
  display: flex;
}

.automations-content-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 8px;
  padding: 0px;
  background: transparent;
  border: none;
}

.automations-content-panel .ns-row.general-settings-panel {
  gap: 8px;
}

.automations-content-panel .settings-card {
  width: 100%;
}

.automations-content-panel .ns-generator-tabs--top {
  top: -2px;
  margin-top: 0px;
}

.automations-content-panel .ns-generator-tabs--description.ns-generator-tabs--bottom {
  margin-top: 6px;
}

.automations-content-panel textarea#ac-description {
  min-height: 280px;
  height: auto;
  flex: 1 1 auto;
}

.automations-content-panel .ns-tags-wrapper {
  min-height: 42px;
  max-height: 95px;
  overflow-y: auto;
}

.automations-content-panel .ns-floating-row--with-tabs {
  align-items: center;
}

.automations-content-panel .ns-field--textarea {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
}

.automations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.automations-header__center {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.automations-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.automations-count {
  color: var(--yt-spec-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.automations-title {
  font-size: 1rem;
  color: var(--yt-spec-text-primary);
  font-weight: 600;
}

.automations-subtitle {
  margin-top: 4px;
  color: var(--yt-spec-text-secondary);
  font-size: 0.9rem;
}

.automation-list,
.automation-schedule-list,
.automation-content-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: 100%;
}

.automation-summary {
  /* border: 1px solid rgba(255, 255, 255, 0.08); */
  /* border-radius: 12px; */
  padding: 0px 10px;
  /* background: rgba(255, 255, 255, 0.03); */
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.automation-content-info {
  margin-bottom: 0px;
}

.automation-content-info-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
  padding: 0px;
}

.automation-content-info-label {
  font-size: 0.8rem;
  color: var(--yt-spec-text-secondary);
  font-weight: 500;
}

.automation-content-info-value {
  font-size: 0.9rem;
  color: var(--yt-spec-text-primary);
  font-weight: 600;
}

.automation-placeholder {
  padding: 16px;
  text-align: center;
  color: var(--yt-spec-text-secondary);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.automation-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(28, 28, 28, 0.85);
  padding: 8px;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.automation-card:hover {
  border-color: rgba(65, 212, 173, 0.4);
  /* box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28); */
}

.automation-card.is-selected {
  border-color: rgba(65, 212, 173, 0.85);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.automation-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.automation-card__titles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.automation-card__name {
  color: var(--yt-spec-text-primary);
  font-weight: 600;
  font-size: 1rem;
}

.automation-card__meta {
  display: flex;
  flex-direction: column;
  min-width: 250px;
  gap: 2px;
  color: var(--yt-spec-text-secondary);
  font-size: 0.85rem;
}

.automation-card__row {
  margin-top: 4px;
  display: grid;
  gap: 10px;
}

.automation-card__row--general {
  display: flex !important;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 8px;
}

.automation-card__row--general > .automation-media-block {
  flex: 0.6;
  min-width: 0;
}

.automation-card__row--general > .automation-media-block:first-child {
  flex: 0.8;
}

.automation-card__row--general > .automation-media-block:last-child {
  flex: 1.2;
  justify-content: flex-start;
}

.automation-card__row--schedule {
  display: flex !important;
  flex-wrap: nowrap;
  gap: 8px;
}

.automation-card__row--schedule > .automation-media-block {
  flex: 1;
  min-width: 0;
}

.automation-card__row--schedule > .automation-media-block:nth-child(3) {
  flex: 1.6;
}

.automation-card__row--media {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.automation-card__section {
  min-height: 100%;
}

.automation-card__section--compact .checkbox-box {
  margin-bottom: 4px;
}

.automation-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.automation-field__label {
  font-size: 0.8rem;
  color: var(--yt-spec-text-secondary);
}

.automation-field__value {
  font-size: var(--yt-font-size-base);
  color: var(--yt-spec-text-primary);
  font-weight: 600;
}

.automation-field--inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-direction: row;
}

.automation-field__block {
  /* flex: 50px; */
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.automation-field--approx {
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
}

.automation-field--approx .automation-field__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.automation-approx-container.is-readonly {
  pointer-events: none;
  opacity: 0.9;
}

.automation-approx-container.is-readonly .approx-toggle-btn {
  cursor: default;
}

.automation-approx-container.is-readonly .approx-toggle-btn.is-active {
  background: rgba(65, 212, 173, 0.25);
  border-color: rgba(65, 212, 173, 0.5);
  color: #d8fff4;
}

.automation-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 20px;
}

.automation-modal-header .confirm-modal__title {
  margin-bottom: 0;
}

.automation-modal-channel-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.automation-theme-selector-section {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

.automation-media-block {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.02);
}

.automation-media-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.automation-media-block__title {
  font-weight: 600;
  color: var(--yt-spec-text-primary);
}

.automation-media-block__hint {
  margin-top: 6px;
  color: var(--yt-spec-text-secondary);
  font-size: 0.85rem;
}

.automation-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(65, 212, 173, 0.12);
  border: 1px solid rgba(65, 212, 173, 0.4);
  color: #d8fff4;
  font-size: var(--yt-font-size-filters);
  white-space: nowrap;
}

.automation-toggle {
  cursor: pointer;
}

.automation-schedule-card {
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 12px;
  /* padding: 12px; */
  background: rgba(15, 15, 15, 0.7);
  display: flex;
  flex-direction: row;
  gap: 4px;
  min-height: 92px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  position: relative;
}

.automation-schedule-card:hover {
  border-color: rgba(65, 212, 173, 0.85);
}

.automation-schedule-card.is-selected {
  border-color: rgba(65, 212, 173, 0.85);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  /* background: rgba(65, 212, 173, 0.1); */
}

/* Soporte para manejo independiente de filas en móvil sin romper desktop */
.automation-schedule-row {
  display: contents; /* Por defecto en desktop se comporta como si no existiera el wrapper */
}

.automation-schedule-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  z-index: 5;
}

.automation-schedule-time {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--yt-spec-text-primary);
}

.automation-schedule-label {
  font-size: var(--yt-font-size-filters);
  color: var(--yt-spec-text-secondary);
}

.automation-schedule-value {
  font-size: var(--yt-font-size-label);
  font-weight: 600;
  color: var(--yt-spec-text-primary);
}

.automation-status {
  font-weight: 500;
  padding: 1px 0px;
  border-radius: 6px;
  font-size: var(--yt-font-size-filters);
}

.automation-status--pending {
  color: #ffa726;
  background: rgba(255, 167, 38, 0.15);
}

.automation-status--sent {
  color: #66bb6a;
  background: rgba(102, 187, 106, 0.15);
}

.automation-status--sending {
  color: #42a5f5;
  background: rgba(66, 165, 245, 0.15);
  animation: pulse 1.5s ease-in-out infinite;
}

.automation-status--scheduled {
  color: #42a5f5;
  background: rgba(66, 165, 245, 0.12);
}

.automation-status--live {
  color: #ef5350;
  background: rgba(239, 83, 80, 0.12);
}

.automation-status-timer {
  margin-left: 0px;
  font-size: var(--yt-font-size-filters);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  padding: 1px 2px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
}

.automation-status-timer--live {
  color: #ffb3b0;
  border-color: rgba(239, 83, 80, 0.25);
  background: rgba(239, 83, 80, 0.10);
}

.automation-status--error {
  color: #ef5350;
  background: rgba(239, 83, 80, 0.15);
}

.automation-duration-sep {
  color: rgba(255, 255, 255, 0.35);
  padding: 0 0px;
}

.automation-duration-calculated {
  color: #42a5f5; /* azul */
  font-weight: 700;
}

.automation-duration-real {
  color: #ef5350; /* rojo */
  font-weight: 700;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.automation-schedule-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.automation-schedule-thumb {
  width: 160px;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.automation-schedule-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.automation-thumb-placeholder {
  font-size: 0.8rem;
  color: var(--yt-spec-text-secondary);
  padding: 6px;
  text-align: center;
}

.automation-schedule-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  padding: 3px 2px;
}

/* Acciones en cards de Transmisiones automatizadas (Regenerar/Eliminar) */
.automation-card-actions {
  min-width: 30px;
  display: grid;
  grid-template-rows: repeat(3, 20px);
  grid-template-columns: 20px;
  grid-auto-flow: row;
  gap: 6px;
  align-content: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px 4px;
}

.automation-card-actions.has-many-actions {
  grid-template-columns: repeat(2, 20px);
  grid-auto-flow: column;
}

.automation-card-actions.has-many-actions [data-automation-slot-delete] {
  grid-row: 3;
  grid-column: 2;
}

.automation-card-actions .ghost-btn,
.automation-card-actions .ghost-btn.danger {
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: #666;
  transition: border 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.automation-card-actions .ghost-btn:hover,
.automation-card-actions .ghost-btn.danger:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #999;
}

.automation-card-actions .ghost-btn .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
}

.automation-schedule-media {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.automation-schedule-media__group .automation-schedule-value {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pill-toggle--readonly button {
  opacity: 0.9;
  cursor: default;
}

.ghost-btn--small {
  padding: 6px 10px;
  font-size: 0.9rem;
}

.automation-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.automation-form-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 16px;
}

.automation-form-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.automation-form .form-field--checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.automation-form .pill-toggle {
  margin-top: 6px;
  background: var(--ly-floating-surface-bg);
  border: 1px solid var(--ly-floating-surface-border);
  border-radius: 12px;
  padding: 0;
  display: flex;
  gap: 1px;
  box-shadow: var(--yt-shadow-1);
}

.automation-form .pill-toggle--space {
  margin-top: 6px;
}

.automation-inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.automation-inline-label {
  color: var(--yt-spec-text-secondary);
  font-size: 0.9rem;
  min-width: 130px;
}

.automation-subtitle-row {
  margin: 12px 0px 0px;
  color: var(--yt-spec-text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

.automation-controls-row {
  justify-content: center;
  gap: 12px;
}

.automation-form .pill-toggle button {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  padding: 6px 12px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
  font-size: var(--yt-font-size-base);
}

.automation-form .pill-toggle button:hover {
  border-color: var(--ly-floating-surface-border-hover);
  color: #fff;
}

.automation-form .pill-toggle button.active {
  background: rgba(32, 114, 96, 0.4);
  border-color: rgba(65, 212, 173, 0.8);
  color: #d8fff4;
}

.automation-relative-wrapper {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.automation-relative-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.automation-relative-label {
  color: var(--yt-spec-text-secondary);
  font-size: 0.9rem;
  line-height: 32px;
}

.automation-relative-label-block {
  width: 100%;
  margin-top: 4px;
}

.automation-relative-toggle {
  gap: 0;
  
}

.automation-relative-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.automation-relative-buttons .cast-mode-pill {
  min-width: 24px;
  padding: 3px 6px;
  border-radius: 0;
}

.automation-relative-buttons .cast-mode-pill:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.automation-relative-buttons .cast-mode-pill:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.automation-time-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.automation-start-inline {
  justify-content: space-between;
  flex-wrap: nowrap;
}

.automation-start-inline .automation-relative-toggle {
  flex: 0 0 auto;
  min-width: 0;
}

.automation-start-time-field {
  margin-left: auto;
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: 0;
}

.automation-start-time-field.ns-schedule-inline {
  flex-wrap: nowrap;
}

.automation-time-split {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  padding: 6px 10px;
  font-size: 0.9rem;
  color-scheme: dark;
  min-height: 24px;
  height: 34px;
  max-width: 180px;
  margin-left: 4px;
  flex-wrap: nowrap;
}

.automation-time-part {
  width: 24px;
  border: none;
  background: transparent;
  color: #fff;
  outline: none;
  padding: 0 !important;
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
}

.automation-time-part:hover {
  border-color: #666;
}

.automation-time-part:focus{
  border-color: #666;
}

.automation-time-colon {
  padding: 0 4px;
  opacity: 0.9;
}

.automation-time-icon {
  font-size: 18px;
  opacity: 0.85;
  margin-left: 8px;
  cursor: pointer;
  user-select: none;
}

.automation-time-icon:hover {
  opacity: 1;
}

.automation-time-quick-add {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--yt-spec-text-secondary);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.2s ease;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 20px;
}

.automation-time-quick-add:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--yt-spec-text-primary);
}

.automation-time-quick-add:active {
  transform: translateY(1px);
  background: rgba(255, 255, 255, 0.2);
}

.automation-select-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.config-select-options button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--yt-spec-text-primary);
  text-align: left;
  cursor: pointer;
  font-size: var(--yt-font-size-base);
  gap: 10px;
}

.config-select-options button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.config-select-options button.is-active {
  background: rgba(65, 212, 173, 0.15);
  color: #41d4ad;
}

.theme-option-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-option-count {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--yt-spec-text-secondary);
  min-width: 20px;
  text-align: center;
}

.config-select-options button.is-active .theme-option-count {
  background: rgba(65, 212, 173, 0.2);
  color: #41d4ad;
}

.theme-select-trigger-count {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--yt-spec-text-secondary);
  font-weight: 600;
  margin-right: -4px; /* Acercar un poco más al chevron */
}

.theme-sort-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s ease;
  margin-left: 4px;
}

.theme-sort-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.theme-sort-btn.is-active {
  color: #41d4ad;
  background: rgba(65, 212, 173, 0.15);
}

.theme-sort-btn .material-symbols-outlined {
  font-size: 20px;
}

.automation-approx-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  gap: 4px;
  min-width: 50px;
  height: 50px;
}

.automation-approx-selector {
  width: 44px;
  height: 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* transition: border-color 0.2s ease; */
}

.automation-approx-selector:focus-within
.automation-approx-input:focus-within {
  border-color: rgba(65, 212, 173, 0.5);
}

/* .automation-approx-selector:active {
  border-color: rgba(65, 212, 173, 0.5);
} */

.automation-approx-input {
  width: 100%;
  height: 100%;
  /* background: transparent;
  border: none; */
  color: #d8fff4;
  text-align: center;
  font-size: var(--yt-font-size-filters);
  font-weight: 400;
  cursor: ns-resize;
  padding: 0;
  outline: none;
}



.automation-approx-toggles {
  display: flex;
  gap: 2px;
  width: 44px;
}

.approx-toggle-btn {
  flex: 1;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.approx-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

.approx-toggle-btn.is-active {
  background: rgba(65, 212, 173, 0.25);
  border-color: rgba(65, 212, 173, 0.5);
  color: #d8fff4;
}

.automation-jitter-offset {
  font-size: var(--yt-font-size-label);
  /* font-weight: 700; */
  margin-left: 0px;
  /* padding: 1px 1px; */
  border-radius: 4px;
  /* background: rgba(0, 0, 0, 0.2); */
}

.automation-jitter-offset.is-positive {
  color: #41d4ad;
}

.automation-jitter-offset.is-negative {
  color: #ff8a8a;
}

.automation-time-buttons {
  gap: 0;
}

.automation-relative-toggle .cast-mode-pill {
  border-radius: 0;
  padding: 3px 6px;
}

.automation-relative-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.automation-relative-toggle .cast-mode-pill:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.automation-relative-toggle .cast-mode-pill:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}


.automation-time-field {
  min-width: 60px;
}

@media (max-width: 768px) {
  .automation-form-columns {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  [data-automation-modal] .confirm-modal__content {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    padding: 16px !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .automation-form {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 60px; /* Espacio para acciones fijas */
  }

  .automation-modal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }

  .confirm-modal__actions--space-between {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
  }

  .confirm-modal__actions--space-between button {
    flex: 1;
  }

  .automation-inline-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Forzar controles de video/audio en una sola línea */
  .automation-controls-row {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    overflow-x: auto !important;
    padding-bottom: 4px !important;
    flex-wrap: nowrap !important;
  }

  .automation-controls-row .cast-mode-toggle,
  .automation-controls-row .cast-loop-toggle {
    flex-shrink: 0 !important;
  }

  .automation-effects-row {
    width: auto !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
  }

  .automation-effects-row select {
    flex: 0 0 auto !important;
    min-width: 100px !important;
  }

  /* Organizar Card de Automatización en Móvil - Más similar a desktop */
  .automation-card {
    padding: 10px !important;
    gap: 12px !important;
  }

  .automation-card__header {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .automation-card__meta {
    min-width: 100% !important; /* El meta (canal/tema) arriba ocupando todo */
    margin-bottom: 4px !important;
  }

  .automation-toggle {
    width: auto !important;
    flex: 1 !important;
    min-width: 120px !important;
  }

  .automation-card__actions {
    width: auto !important;
    flex: 1 !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 6px !important;
  }

  .automation-card__row--general,
  .automation-card__row--schedule {
    flex-direction: row !important; /* Volver a fila */
    flex-wrap: wrap !important; /* Pero permitir que bajen si no caben */
    gap: 8px !important;
  }

  .automation-card__row--general > .automation-media-block,
  .automation-card__row--schedule > .automation-media-block {
    flex: 1 1 auto !important;
    min-width: 110px !important;
  }

  /* Reducir el ancho del contenedor de Categoría (el tercero en la fila general) */
  .automation-card__row--general > .automation-media-block:nth-child(3) {
    flex: 0 1 auto !important;
    min-width: 100px !important;
  }

  /* Asegurar que el contenedor de niños/guardar (el cuarto) tenga espacio para crecer */
  .automation-card__row--general > .automation-media-block:nth-child(4) {
    /* flex: 2 1 auto !important; */
    min-width: 80px !important;
    max-width: 245px !important;
  }

  /* El bloque de Programación como Public suele ser más ancho */
  .automation-card__row--schedule > .automation-media-block:nth-child(3) {
    flex: 1 1 100% !important;
  }

  .automation-card__row--media {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .automation-media-block {
    padding: 8px !important;
  }

  .automation-media-block[style*="display: flex"] {
    flex-direction: row !important; /* Volver a fila interna */
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .automation-field--approx {
    flex-direction: row !important; /* Aproximación en fila */
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .automation-field--approx .automation-field__main {
    flex: 1 !important;
  }

  .automation-approx-container {
    width: auto !important;
  }

  /* Ajustar contenedores para ocupar más ancho en móvil */
  .automations-card {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .automations-column {
    padding: 4px !important;
    min-height: auto !important;
    
  }
.automation-schedule-list {
  touch-action: pan-y !important;
  overflow-x: hidden !important;
  
}
  /* Organizar Card de Transmisiones Automatizadas (Slots) en Móvil */
  .automation-schedule-card {
    display: grid !important;
    grid-template-columns: 160px 1fr !important;
    grid-template-rows: repeat(4, auto) auto auto !important;
    height: auto !important;
    min-height: auto !important;
    padding: 1px !important;
    gap: 0 2px !important;
    border-radius: 12px !important;
    position: relative !important;
    align-items: start !important;
  }

  .automation-schedule-thumb {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 5 !important;
    width: 160px !important;
    height: 90px !important;
    flex-shrink: 0 !important;
    margin-bottom: 12px !important;
  }

  .automation-schedule-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important;
  }

  .automation-schedule-body {
    display: contents !important;
  }

  .automation-schedule-time.is-technical {
    display: contents !important;
    padding: 2px !important;
  }

  .automation-schedule-row {
    grid-column: 2 / 3 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: left !important;
    align-items: center !important;
    width: 100% !important;
    /* gap: 2px !important; */
    padding: 1px !important;
    border-top: none !important;
  }

  /* Forzar orden exacto: Inicio, Final, Broadcast, Duracion a la derecha del thumb */
  .automation-schedule-row[style*="order: 1"] { grid-row: 1 !important; order: 1 !important; }
  .automation-schedule-row[style*="order: 2"] { grid-row: 2 !important; order: 2 !important; }
  .automation-schedule-row[style*="order: 3"] { grid-row: 3 !important; order: 3 !important; }
  .automation-schedule-row[style*="order: 4"] { grid-row: 4 !important; order: 4 !important; }

  /* Etiquetas y valores para esas 4 filas */
  .automation-schedule-label {
    font-size: 0.7rem !important;
    min-width: 20px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    text-align: left !important;
  }

  .automation-schedule-value {
    flex: 1 !important;
    text-align: left !important;
    font-size: var(--yt-font-size-filters) !important;
    color: #eee !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Filas de abajo: Visibilidad y Media/Estado */
  .automation-schedule-time:not(.is-technical) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 8px 0 !important;
    grid-column: 1 / 3 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    width: 100% !important;
    margin-left: 4px !important;
    margin-right: 4px !important;
  }

  .automation-schedule-time:not(.is-technical) .automation-schedule-value {
    flex: 0 1 auto !important;
    margin-right: 8px !important;
  }

  /* Visibilidad (fila 5) */
  .automation-schedule-body > .automation-schedule-time:nth-child(3) {
    grid-row: 5 !important;
    margin-top: 28px !important;
  }

  /* Videos, audios y estado (fila 6) */
  .automation-schedule-body > .automation-schedule-time:nth-child(4) {
    grid-row: 6 !important;
    padding-top: 4px !important;
    margin-top: -4px !important;
    border-top: none !important;
  }

  .automation-card-actions {
    position: absolute !important;
    top: 95px !important;
    left: 55px !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    /* background: rgba(0, 0, 0, 0.5) !important; */
    padding: 4px !important;
    border-radius: 8px !important;
    /* backdrop-filter: blur(4px) !important; */
    z-index: 10 !important;
  }

  .automation-card-actions .ghost-btn {
    width: 28px !important;
    height: 28px !important;
    aspect-ratio: 1 / 1 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

@media (max-width: 1200px) {
  .automations-grid {
    grid-template-columns: 1fr;
    height: auto !important;
    min-height: auto !important;
  }

  .automations-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ========================== Admin - Usuarios & Permisos ========================== */

.users-container {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.users-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--yt-spec-text-secondary);
}

.users-loading .material-symbols-outlined {
  font-size: 48px;
  margin-bottom: 16px;
}

.users-loading p {
  font-size: 0.95rem;
}

/* Estadísticas */
.users-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.users-stat-card {
  background: var(--yt-spec-raised-background);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--yt-spec-outline);
}

.users-stat-card .material-symbols-outlined {
  font-size: 40px;
  color: var(--yt-spec-static-brand-blue);
}

.users-stat-info {
  flex: 1;
}

.users-stat-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--yt-spec-text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.users-stat-label {
  font-size: 0.9rem;
  color: var(--yt-spec-text-secondary);
}

/* Tabla de usuarios */
.users-table-card {
  background: var(--yt-spec-raised-background);
  border-radius: 8px;
  border: 1px solid var(--yt-spec-outline);
  overflow: hidden;
}

.users-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--yt-spec-outline);
}

.users-table-header h2 {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--yt-spec-text-primary);
  margin: 0;
}

.users-table-header button {
  display: flex;
  align-items: center;
  gap: 8px;
}

.users-table-wrapper {
  overflow-x: auto;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table thead {
  background: var(--yt-spec-menu-background);
}

.users-table th {
  text-align: left;
  padding: 12px 24px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--yt-spec-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.users-table tbody tr {
  border-bottom: 1px solid var(--yt-spec-outline);
  transition: background-color 0.15s;
}

.users-table tbody tr:hover {
  background: var(--yt-spec-additive-background);
}

.users-table td {
  padding: 16px 24px;
  color: var(--yt-spec-text-primary);
}

/* Usuario info */
.users-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.users-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.users-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--yt-spec-menu-background);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yt-spec-text-secondary);
}

.users-avatar-placeholder .material-symbols-outlined {
  font-size: 24px;
}

.users-name {
  font-weight: 500;
  color: var(--yt-spec-text-primary);
}

.users-email {
  font-size: 0.85rem;
  color: var(--yt-spec-text-secondary);
  margin-top: 2px;
}

.users-date {
  font-size: 0.9rem;
  color: var(--yt-spec-text-secondary);
}

/* Role badge */
.users-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.users-role-badge--admin {
  background: rgba(244, 67, 54, 0.15);
  color: #ff6b6b;
}

.users-role-badge--editor {
  background: rgba(33, 150, 243, 0.15);
  color: #64b5f6;
}

.users-role-badge--viewer {
  background: rgba(158, 158, 158, 0.15);
  color: #bdbdbd;
}

/* Acciones */
.users-actions {
  display: flex;
  gap: 8px;
}

.users-action-btn {
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--yt-spec-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.users-action-btn:hover {
  background: var(--yt-spec-additive-background);
  color: var(--yt-spec-text-primary);
}

.users-action-btn--danger:hover {
  background: rgba(244, 67, 54, 0.1);
  color: #ff6b6b;
}

.users-action-btn .material-symbols-outlined {
  font-size: 20px;
}

/* Empty state */
.users-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--yt-spec-text-secondary);
}

.users-empty .material-symbols-outlined {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.users-empty p {
  font-size: 1rem;
}

/* Modales */
.users-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease-out;
}

.users-modal {
  background: var(--yt-spec-raised-background);
  border-radius: 8px;
  border: 1px solid var(--yt-spec-outline);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease-out;
}

.users-modal--small {
  max-width: 400px;
}

.users-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--yt-spec-outline);
}

.users-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--yt-spec-text-primary);
  margin: 0;
}

.users-modal-close {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--yt-spec-text-secondary);
  border-radius: 4px;
  transition: all 0.15s;
}

.users-modal-close:hover {
  background: var(--yt-spec-additive-background);
  color: var(--yt-spec-text-primary);
}

.users-modal-body {
  padding: 24px;
}

.users-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--yt-spec-outline);
}

/* Formulario */
.users-form-group {
  margin-bottom: 20px;
}

.users-form-group:last-child {
  margin-bottom: 0;
}

.users-form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--yt-spec-text-primary);
  margin-bottom: 8px;
}

.users-form-group input,
.users-form-group select {
  width: 100%;
  padding: 10px 12px;
  background: var(--yt-spec-menu-background);
  border: 1px solid var(--yt-spec-outline);
  border-radius: 4px;
  color: var(--yt-spec-text-primary);
  font-size: 0.95rem;
  transition: all 0.15s;
}

.users-form-group input:focus,
.users-form-group select:focus {
  outline: none;
  border-color: var(--yt-spec-static-brand-blue);
  background: var(--yt-spec-raised-background);
}

.users-help-text {
  display: block;
  font-size: 0.85rem;
  color: var(--yt-spec-text-secondary);
  margin-top: 6px;
  line-height: 1.4;
}

/* User preview en modal */
.users-user-preview {
  background: var(--yt-spec-menu-background);
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.users-user-preview .users-name {
  font-size: 1rem;
  margin-bottom: 4px;
}

.users-user-preview .users-email {
  font-size: 0.9rem;
}

/* Delete warning */
.users-delete-warning {
  text-align: center;
  padding: 20px;
}

.users-delete-warning .material-symbols-outlined {
  font-size: 64px;
  color: #ff6b6b;
  margin-bottom: 16px;
}

.users-delete-warning p {
  color: var(--yt-spec-text-primary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.users-warning-text {
  color: var(--yt-spec-text-secondary) !important;
  font-size: 0.9rem !important;
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.rotating {
  animation: rotate 1.5s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .users-container {
    padding: 16px;
  }

  .users-stats {
    grid-template-columns: 1fr;
  }

  .users-table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .users-table-header button {
    width: 100%;
    justify-content: center;
  }

  .users-table th,
  .users-table td {
    padding: 12px 16px;
  }

  .users-table th:nth-child(3),
  .users-table td:nth-child(3) {
    display: none;
  }

  .users-modal {
    max-width: 100%;
  }
}

/* ========================== Configuración - Sistema de Pestañas ========================== */

/* La vista de settings necesita altura completa sin padding */
.spa-view[data-view="settings"] {
  height: 100%;
  margin: calc(var(--yt-spacing-s) * -1);
  padding: 8px;
}

.settings-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.settings-tabs {
  height: 100%;
  display: flex;
  flex-direction: column;
  /* padding: 8px; */

}

.settings-tab-bar {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 0;
  background: var(--yt-spec-base-background);
  flex-shrink: 0;
}

.settings-tab {
  flex: 1;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  padding: 14px 20px;
  border-radius: 12px 12px 0 0;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border 0.2s ease;
  white-space: nowrap;
}

.settings-tab:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
}

.settings-tab.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.settings-tab-panels {
  flex: 1;
  position: relative;
  overflow: hidden;
  /* background: rgba(255, 255, 255, 0.08); */
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: none;
  border-radius: 0 0 12px 12px;
  min-height: 0;
}

.settings-tab-panel {
  position: absolute;
  top: 0;
  left: 0px;
  right: 0px;
  bottom: 0px;
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  /* transition: opacity 0.2s ease, visibility 0.2s ease; */
  background: rgba(255, 255, 255, 0.08);
}

.settings-tab-panel.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

/* Contenido de los paneles */
.settings-panel-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 12px;
}

.settings-panel-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--yt-spec-text-primary);
  margin: 0 0 8px 0;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--yt-spec-outline);
}

.settings-section {
  margin-bottom: 8px;
}

.settings-section:last-of-type {
  margin-bottom: 8px;
}

.settings-section-title {
  font-size: var(--yt-font-size-base);
  font-weight: 600;
  color: var(--yt-spec-text-primary);
  margin: 0 0 8px 0;
}

/* Formularios */
.settings-form-group {
  margin-bottom: 8px;
}

.settings-label {
  display: block;
  font-size: var(--yt-font-size-filters);
  font-weight: 500;
  color: var(--yt-spec-text-primary);
  margin-bottom: 8px;
}

.settings-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--yt-spec-menu-background);
  border: 1px solid var(--yt-spec-outline);
  border-radius: 6px;
  color: var(--yt-spec-text-primary);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.settings-input:focus {
  outline: none;
  border-color: var(--yt-spec-static-brand-blue);
  background: var(--yt-spec-raised-background);
}

.settings-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.settings-help-text {
  display: block;
  font-size: 0.85rem;
  color: var(--yt-spec-text-secondary);
  margin-top: 6px;
  line-height: 1.4;
}

/* Checkboxes */
.settings-checkbox-group {
  margin-bottom: 20px;
}

.settings-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  color: var(--yt-spec-text-primary);
  font-size: 0.95rem;
}

.settings-checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--yt-spec-call-to-action);
}

.settings-checkbox-group .settings-help-text {
  margin-left: 32px;
  margin-top: 4px;
}

/* Items de acción */
.settings-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 16px;
}

.settings-action-item--transcode {
  align-items: stretch;
}

.settings-checkbox-group--inline .settings-help-text {
  margin-left: 32px;
  margin-top: 6px;
}

.settings-form-group--compact {
  margin-top: 14px;
}

.transcode-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.transcode-profile-grid.is-disabled {
  opacity: 0.55;
}

.transcode-profile-card {
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 10px 10px 9px;
  cursor: pointer;
  color: var(--yt-spec-text-primary);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  min-height: 112px;
}

.transcode-profile-card:hover:not(:disabled) {
  /* border: 1px solid rgba(255, 255, 255, 0.1); */
  border-color: rgba(255, 255, 255, 0.22);
  /* background: rgba(255, 255, 255, 0.05); */
  /* transform: translateY(-1px); */
}

.transcode-profile-card:disabled {
  cursor: not-allowed;
}

.transcode-profile-card.is-active {
  border-color: rgba(0, 200, 255, 0.55);
  background: rgba(0, 200, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(0, 200, 255, 0.2) inset;
}

.transcode-profile-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.92);
}

.transcode-profile-lines {
  font-size: 0.72rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.68);
}

.transcode-profile-lines > div {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

@media (max-width: 1100px) {
  .transcode-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.settings-action-info {
  flex: 1;
  min-width: 0;
}

.settings-action-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--yt-spec-text-primary);
  margin-bottom: 4px;
}

.settings-action-description {
  font-size: 0.85rem;
  color: var(--yt-spec-text-secondary);
  line-height: 1.4;
}

.settings-action-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--yt-spec-brand-background-solid);
  color: var(--yt-spec-text-primary);
  border: none;
  border-radius: 18px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.settings-action-btn:hover:not(:disabled) {
  background: #d00;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(204, 0, 0, 0.3);
}

.settings-action-btn:active:not(:disabled) {
  transform: translateY(0);
}

.settings-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-action-btn .material-symbols-outlined {
  font-size: 18px;
}

/* Acciones */
.settings-actions {
  display: flex;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--yt-spec-outline);
  margin-top: 32px;
}

.settings-actions button {
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 900px) {
  .settings-tab {
    font-size: 0.85rem;
    padding: 12px 16px;
  }
}

@media (max-width: 768px) {
  .settings-panel-content {
    padding: 24px 16px;
  }

  .settings-tab-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .settings-tab {
    flex: 0 0 auto;
    min-width: 120px;
    font-size: 0.85rem;
    padding: 12px 16px;
  }

  .settings-panel-title {
    font-size: 1.5rem;
  }

  .settings-action-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .settings-action-btn {
    width: 100%;
    justify-content: center;
  }

  .settings-actions {
    flex-direction: column;
  }

  .settings-actions button {
    width: 100%;
  }
}



/* Overlay de previsualización */
.media-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: #fff;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

.media-preview-overlay[hidden] {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

/* --- Media Effects Modal (Aislado) --- */
.media-modal--effects .media-modal-content {
  width: min(1200px, 95vw);
  height: 700px;
  max-height: 90vh;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.eff-layout {
  display: flex;
  flex: 1;
  height: 100%;
  min-height: 0;
}

.eff-preview-area {
  flex: 1;
  background: #000;
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
}

.eff-sidebar {
  width: 320px;
  background: #1a1a1a;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.eff-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eff-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.eff-header-actions {
  display: flex;
  gap: 8px;
}

.eff-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.eff-action-btn .material-symbols-outlined {
  font-size: 18px;
}

.eff-action-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.eff-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.eff-action-btn.primary {
  background: rgba(62, 166, 255, 0.1);
  border-color: rgba(62, 166, 255, 0.3);
  color: #3ea6ff;
}

.eff-action-btn.primary:hover:not(:disabled) {
  background: rgba(62, 166, 255, 0.2);
  border-color: #3ea6ff;
}

.eff-action-btn.danger {
  background: rgba(255, 82, 82, 0.1);
  border-color: rgba(255, 82, 82, 0.3);
  color: #ff5252;
}

.eff-action-btn.danger:hover:not(:disabled) {
  background: rgba(255, 82, 82, 0.2);
  border-color: #ff5252;
}

.eff-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-content: start;
}

.eff-list::-webkit-scrollbar {
  width: 6px;
}
.eff-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.eff-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.eff-item-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* background: rgba(0, 0, 0, 0.4); */
  color: rgba(0, 0, 0, 0.6);
  border: none;
  /* border-radius: 50%; */
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  /* backdrop-filter: blur(4px); */
}

.eff-item-delete .material-symbols-outlined {
  font-size: 16px;
}

.eff-item-delete:hover {
  color: rgba(0, 0, 0, 1.6);
  /* color: #fff; */
  /* transform: scale(1.1); */
}

.eff-item:hover {
  /* background: rgba(255, 255, 255, 0.06); */
  border-color: rgba(0, 204, 58, 0.866);/* transform: translateY(-2px); */
}

.eff-item.is-selected {
  /* background: rgba(62, 166, 255, 0.15); */
  border-color: rgba(0, 204, 58, 0.866);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.eff-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.eff-thumb video, .eff-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eff-duration {
  position: absolute;
  bottom: 0px;
  right: 0px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 1px 4px;
  border-radius: 6px;
  font-size: var(--yt-font-size-filters);
  font-weight: 600;
  /* font-family: 'JetBrains Mono', monospace; */
}

.eff-info {
  flex: 1;
  min-width: 0;
}

.eff-name {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.eff-item-compact-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px;
  border-radius: 8px;
  margin-top: 4px;
}

.eff-compact-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.eff-compact-color-trigger {
  width: 20px;
  height: 16px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  border-radius: 2px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.eff-compact-color-trigger.is-active {
  border-color: #3ea6ff;
  box-shadow: 0 0 8px rgba(62, 166, 255, 0.5);
}

.eff-compact-none-trigger {
  width: 20px;
  height: 16px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  border-radius: 2px;
  flex-shrink: 0;
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAIElEQVQYV2Nk+M/AwMDEwMDBwMgAIggFmCB0AE7AgEAsDgA/A0EBXv9uXAAAAABJRU5ErkJggg==") repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.2s;
}

.eff-compact-none-trigger .material-symbols-outlined {
  font-size: 14px;
}

.eff-compact-none-trigger:hover {
  border-color: #fff;
  color: #fff;
}

.eff-compact-none-trigger.is-active {
  border-color: #3ea6ff;
  box-shadow: 0 0 8px rgba(62, 166, 255, 0.5);
  color: #fff;
}

/* Custom Color Picker for Effects */
.eff-color-picker-popup {
  position: fixed;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 12px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 180px;
  animation: eff-picker-in 0.2s ease-out;
}

@keyframes eff-picker-in {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

.eff-picker-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.eff-picker-swatch {
  aspect-ratio: 1;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.1s;
}

.eff-picker-swatch:hover {
  transform: scale(1.1);
  border-color: #fff;
}

.eff-picker-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.eff-picker-custom input[type="text"] {
  background: transparent;
  border: none;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  width: 100%;
  outline: none;
}

.eff-picker-custom input[type="color"] {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.eff-picker-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.eff-compact-opacity {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.5);
  min-width: 0;
}

.eff-compact-opacity input[type="range"] {
  flex: 1;
  height: 20px; /* Área de captura mucho más amplia */
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  cursor: pointer;
  margin: 0;
}

/* Track (la línea) */
.eff-compact-opacity input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  transition: background 0.2s ease;
}

.eff-compact-opacity input[type="range"]:hover::-webkit-slider-runnable-track {
  background: rgba(255, 255, 255, 0.25);
}

/* Handle (el círculo azul) */
.eff-compact-opacity input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #3ea6ff;
  cursor: pointer;
  margin-top: -7.5px; /* Centrar respecto al track de 3px */
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, background 0.2s ease;
  border: 2px solid #1e1e1e;
}

.eff-compact-opacity input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.2);
  background: #fff;
  box-shadow: 0 0 12px rgba(62, 166, 255, 0.6);
}

.eff-compact-opacity span {
  min-width: 32px;
  text-align: right;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
}

/* Compatibilidad con Firefox */
.eff-compact-opacity input[type="range"]::-moz-range-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.eff-compact-opacity input[type="range"]::-moz-range-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: #3ea6ff;
  cursor: pointer;
  border: 2px solid #1e1e1e;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.eff-compact-test,
.eff-compact-apply {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0px 8px;
  min-height: 20px;
  width: auto;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.eff-compact-test:hover {
  border-color: #3ea6ff;
  background: rgba(62, 166, 255, 0.1);
  color: #fff;
}

.eff-compact-apply:hover {
  border-color: rgba(65, 212, 173, 0.8);
  background: rgba(32, 114, 96, 0.4);
  color: #d8fff4;
}

.eff-compact-apply[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.4);
}

.eff-chroma-btn[data-chroma="none"] { color: #888; }
.eff-chroma-btn[data-chroma="green"] { color: #4caf50; }
.eff-chroma-btn[data-chroma="blue"] { color: #2196f3; }
.eff-chroma-btn[data-chroma="black"] { color: #fff; background: #000; }

.eff-chroma-btn.is-active {
  border-color: #3ea6ff;
  background: rgba(62, 166, 255, 0.2);
  box-shadow: 0 0 4px rgba(62, 166, 255, 0.4);
}

.eff-mini-apply {
  background: #3ea6ff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.eff-mini-apply:hover {
  background: #65b8ff;
}

.eff-opacity-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.eff-opacity-slider {
  flex: 1;
  height: 2px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

.eff-opacity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ea6ff;
  cursor: pointer;
}

.eff-opacity-val {
  font-size: 9px;
  color: #888;
  min-width: 24px;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}

.eff-footer {
  padding: 16px 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: #1a1a1a;
}

.eff-empty, .eff-loading {
  grid-column: span 2;
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.95rem;
}

/* Preview Stage Scoped */
.eff-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.eff-frame {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #000;
  overflow: hidden;
}

.eff-video-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eff-bg-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eff-chroma-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}

.eff-frame video, .eff-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.eff-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.eff-overlay-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #3ea6ff;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: eff-spin 1s linear infinite;
}

@keyframes eff-spin { to { transform: rotate(360deg); } }

.eff-controls {
  background: #0f0f0f;
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.eff-progress-track {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-bottom: 10px;
  cursor: pointer;
  position: relative;
}

.eff-progress-fill {
  position: absolute;
  top: 0; left: 0; height: 100%;
  background: #3ea6ff;
  border-radius: 2px;
  width: 0%;
}

.eff-btns {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eff-btns-left, .eff-btns-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.eff-btns-right {
  justify-content: flex-end;
}

.eff-btns-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.eff-back-to-original {
  width: 80px;
  height: 45px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  background-color: #000;
  position: relative;
  overflow: hidden;
}

.eff-back-to-original:hover {
  transform: scale(1.1);
  border-color: #3ea6ff;
}

.eff-icon-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border-radius: 50%;
}

.eff-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.eff-icon-btn.is-active {
  color: #3ea6ff;
}

.eff-time {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'JetBrains Mono', monospace;
  margin-left: 4px;
}

.eff-test-actions {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  background: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  justify-content: center;
}

.eff-test-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

.eff-test-btn:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.media-modal--effects .media-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 110;
  font-size: 1.4rem;
  line-height: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color 0.2s;
}

.media-modal--effects .media-modal-close:hover {
  color: #fff;
}
