:root {
  --font-ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg-deep: #0a0a12;
  --bg-panel: rgba(18, 18, 32, 0.72);
  --accent-a: #6366f1;
  --accent-b: #a855f7;
  --accent-c: #22d3ee;
  --glass-border: rgba(255, 255, 255, 0.08);
}

body.login-page {
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.admin-body,
body.login-page {
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 120% 80% at 20% -20%, rgba(99, 102, 241, 0.35), transparent 55%),
    radial-gradient(ellipse 100% 60% at 100% 10%, rgba(168, 85, 247, 0.25), transparent 50%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(34, 211, 238, 0.12), transparent 45%);
  background-attachment: fixed;
  color: #e2e8f0;
}

.glass {
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.login-page .login-card.glass {
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(15, 15, 28, 0.95) 0%, rgba(10, 10, 20, 0.98) 100%);
  border-right: 1px solid var(--glass-border);
}

.admin-sidebar .nav-link {
  color: rgba(255, 255, 255, 0.65);
  transition: background 0.2s, color 0.2s;
}

.admin-sidebar .nav-link:hover {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
}

.brand-glow {
  background: linear-gradient(90deg, var(--accent-c), var(--accent-a), var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.5));
}

.admin-header {
  background: rgba(12, 12, 22, 0.6);
  border-bottom: 1px solid var(--glass-border);
}

.btn-gradient {
  background: linear-gradient(120deg, var(--accent-a), var(--accent-b));
  border: none;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(168, 85, 247, 0.45);
  color: #fff !important;
}

.hero-gradient {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(168, 85, 247, 0.2), rgba(34, 211, 238, 0.15));
  border: 1px solid var(--glass-border);
}

.hero-number {
  text-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
  transition: transform 0.3s ease;
}

.hero-number.pulse {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.02); filter: brightness(1.1); }
}

.health-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.health-dot.bg-success,
.health-dot.health-green { background: #22c55e !important; box-shadow: 0 0 10px #22c55e; }
.health-dot.health-yellow { background: #eab308 !important; box-shadow: 0 0 10px #eab308; }
.health-dot.health-red { background: #ef4444 !important; box-shadow: 0 0 10px #ef4444; }

.timeline-wrap {
  min-height: 56px;
}

.timeline-bar {
  display: flex;
  gap: 2px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
}

/* Ancho proporcional á duración da franxa (o JS pon width %); non usar flex:1 ou todo parece igual */
.timeline-seg {
  flex: 0 0 auto;
  min-width: 3px;
  box-sizing: border-box;
  transition: opacity 0.2s, transform 0.2s;
  cursor: help;
}

.timeline-seg:hover {
  opacity: 0.85;
  transform: scaleY(1.08);
}

.timeline-seg.now {
  box-shadow: 0 0 0 2px var(--accent-c);
}

/* Axenda + detalle (panel programas) */
.programas-agenda-row {
  --bs-gutter-x: 1rem;
}

.programa-dia-detalle {
  min-height: 280px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--glass-border);
}

.programa-dia-detalle .spark-svg {
  display: block;
  width: 100%;
  height: 72px;
  margin: 0 auto;
}

/* Spark interactivo (detalle emisión): eixos + reixa + tooltip */
.spark-interactive-root {
  width: 100%;
}

.spark-interactive {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
}

.spark-interactive__yaxis {
  flex: 0 0 2.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0.15rem 0 0.15rem;
  font-size: 0.65rem;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.45);
  user-select: none;
}

.spark-interactive__plot {
  position: relative;
  flex: 1;
  min-width: 0;
}

.spark-interactive-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 72px;
  max-height: 120px;
  cursor: crosshair;
}

.spark-interactive-svg .spark-grid-line {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}

.spark-interactive-svg .spark-crosshair-line {
  stroke: rgba(34, 211, 238, 0.9);
  stroke-width: 0.9;
  vector-effect: non-scaling-stroke;
}

.spark-interactive-svg .spark-crosshair-dot {
  fill: #22d3ee;
  stroke: rgba(15, 23, 42, 0.85);
  stroke-width: 1;
}

.spark-interactive-tooltip {
  position: absolute;
  z-index: 20;
  left: 0;
  top: 0;
  max-width: min(100%, 14rem);
  padding: 0.4rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.35;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.1s ease;
}

.spark-interactive-tooltip.is-visible {
  opacity: 1;
}

.spark-interactive-tooltip-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: rgba(226, 232, 240, 0.65);
}

.spark-interactive__xaxis {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  padding-left: 3.2rem;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  user-select: none;
}

.admin-theme-glass .spark-interactive__yaxis,
.admin-theme-glass .spark-interactive__xaxis {
  color: rgba(0, 0, 0, 0.42);
}

.admin-theme-glass .spark-interactive-svg .spark-grid-line {
  stroke: rgba(0, 0, 0, 0.1);
}

.admin-theme-glass .spark-interactive-tooltip {
  background: rgba(255, 255, 255, 0.96);
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  color: #1c1c1e;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.admin-theme-glass .spark-interactive-tooltip-sub {
  color: rgba(0, 0, 0, 0.5);
}

/* Axenda diaria (programación CRTVG) */
.day-cal-root {
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 12px;
  scrollbar-gutter: stable;
}

.day-cal-root--compact .day-cal-hours {
  flex: 0 0 2.15rem;
  font-size: 0.65rem;
}

.day-cal-root--compact .day-cal-outer {
  gap: 0.35rem;
}

.day-cal-root--compact .day-cal-event {
  left: 4px;
  right: 4px;
  padding: 4px 6px;
}

.day-cal-root--compact .day-cal-event__time {
  font-size: 0.6rem;
}

.day-cal-root--compact .day-cal-event__title {
  font-size: 0.68rem;
  -webkit-line-clamp: 2;
  margin-top: 1px;
}

.day-cal-root--compact .day-cal-event__stats {
  display: none;
}

.day-cal-event.is-selected {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55), 0 6px 20px rgba(0, 0, 0, 0.35);
  z-index: 7;
}

.day-cal-outer {
  display: flex;
  gap: 0.65rem;
  align-items: stretch;
}

.day-cal-hours {
  flex: 0 0 2.85rem;
  position: relative;
  height: 2640px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.42);
  text-align: right;
  padding-right: 2px;
  user-select: none;
}

.day-cal-hours span {
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  line-height: 1;
}

.day-cal-track {
  flex: 1;
  position: relative;
  height: 2640px;
  min-height: 2640px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.day-cal-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(100% / 24 - 1px),
    rgba(255, 255, 255, 0.08) calc(100% / 24 - 1px),
    rgba(255, 255, 255, 0.08) calc(100% / 24)
  );
}

.day-cal-events {
  position: absolute;
  inset: 0;
  padding: 2px 10px 2px 6px;
}

.day-cal-event {
  position: absolute;
  left: 8px;
  right: 8px;
  box-sizing: border-box;
  border-radius: 8px;
  padding: 6px 10px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  z-index: 1;
}

.day-cal-event:hover {
  filter: brightness(1.1);
  z-index: 6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: scale(1.01);
}

.day-cal-event.now {
  box-shadow: 0 0 0 2px var(--accent-c);
  z-index: 5;
}

.day-cal-event--short {
  padding: 4px 8px;
}

.day-cal-event--short .day-cal-event__title {
  -webkit-line-clamp: 1;
}

.day-cal-event__time {
  font-size: 0.68rem;
  opacity: 0.92;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.day-cal-event__title {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
}

.day-cal-event__stats {
  font-size: 0.65rem;
  opacity: 0.88;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.9);
}

.day-cal-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  margin-top: -1px;
  background: var(--accent-c);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.85);
  z-index: 8;
  pointer-events: none;
}

.day-cal-now-line::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-c);
  box-shadow: 0 0 8px var(--accent-c);
}

@media (max-width: 991px) {
  .programa-dia-detalle {
    min-height: 240px;
  }
}

@media (max-width: 576px) {
  .day-cal-hours {
    flex: 0 0 2.35rem;
    font-size: 0.62rem;
    height: 2016px;
  }

  .day-cal-track {
    height: 2016px;
    min-height: 2016px;
  }

  .day-cal-event__title {
    font-size: 0.74rem;
    -webkit-line-clamp: 2;
  }
}

.program-card .spark-svg {
  height: 48px;
  width: 100%;
}

.table-dark {
  --bs-table-bg: transparent;
}

@media (max-width: 991px) {
  .admin-shell {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .admin-sidebar .nav {
    flex-direction: row !important;
    flex-wrap: wrap;
  }
}

/* ——— Tema panel: classic glass (mockup 06) ——— */
body.admin-body.admin-theme-glass {
  background: transparent !important;
  background-image: none !important;
  color: #1c1c1e;
  font-family: var(--font-ui);
  --bs-body-font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.admin-bg-fixed {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    url('../img/fondo2.jpg') center center / cover no-repeat,
    linear-gradient(135deg, #a8d8f0 0%, #f7c6a3 100%);
}

.admin-bg-fixed::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.admin-shell-outer {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 28px;
  gap: 12px;
}

.admin-wrap {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 14px 0 16px;
}

.admin-topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: #1c1c1e;
}

.admin-topbar-logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.admin-topbar-logo-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.admin-topbar-logo-text span {
  color: rgba(0, 0, 0, 0.38);
  font-weight: 400;
  font-size: 13px;
}

.admin-topbar-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 100px;
  padding: 3px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
}

.admin-topbar-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.5);
  text-decoration: none;
  border-radius: 100px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.admin-topbar-tabs a .bi {
  font-size: 1rem;
  opacity: 0.72;
}

.admin-topbar-tabs a.active .bi {
  opacity: 0.9;
  color: #4f46e5;
}

.admin-topbar-tabs a:hover {
  color: #1c1c1e;
}

.admin-topbar-tabs a.active {
  background: #fff;
  color: #1c1c1e;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
}

.admin-topbar-user .bi {
  font-size: 1.1rem;
  color: rgba(0, 0, 0, 0.35);
}

.admin-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.04);
  border: none;
  color: rgba(0, 0, 0, 0.55);
  text-decoration: none;
  transition: background 0.15s;
}

.admin-icon-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #1c1c1e;
}

.admin-page-title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
  color: #1c1c1e;
}

.section-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.section-heading .bi {
  font-size: 1.1em;
  opacity: 0.5;
  flex-shrink: 0;
}

#programas-day-cal.day-cal-root {
  max-height: 55vh;
}

.admin-theme-glass .admin-content {
  padding: 0;
  flex-grow: 1;
}

.admin-theme-glass .glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  border: 0.5px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 24px rgba(0, 0, 0, 0.06);
}

.admin-theme-glass .admin-content .text-white,
.admin-theme-glass .admin-content h2.text-white,
.admin-theme-glass .admin-content h3.text-white,
.admin-theme-glass .admin-content .fw-bold.text-white {
  color: #1c1c1e !important;
}

.admin-theme-glass .admin-content .text-white-50,
.admin-theme-glass .admin-content strong.text-white-50 {
  color: rgba(0, 0, 0, 0.45) !important;
}

.admin-theme-glass .admin-content code.text-white-50 {
  color: rgba(0, 0, 0, 0.5) !important;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.admin-theme-glass .hero-gradient {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.08), rgba(34, 211, 238, 0.1));
  border: 0.5px solid rgba(255, 255, 255, 0.85);
}

/* Hero: vídeo nítido ao fondo; capa difuminada só na tarxeta «Espectadores agora» */
.hero-stack {
  min-height: 13.5rem;
}

.hero-video-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 45%, #0f172a 100%);
  pointer-events: none;
  overflow: hidden;
}

.hero-video-backdrop__blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  filter: none;
  opacity: 1;
  -webkit-mask-image: none;
  mask-image: none;
}

/* Vídeo: ancho completo do contedor; 16:9; se o alto do bloque supera o do hero, recórtase en vertical (centrado) */
.hero-video-iframe {
  pointer-events: none;
}

.hero-video-backdrop__blur #youtube-live-embed.hero-video-iframe {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
  border: 0;
}

.hero-video-backdrop__blur #youtube-live-embed.hero-video-iframe iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

/* Contedor do hero: sen capa a pantalla completa */
.hero-stack #hero-card.hero-card {
  position: relative;
  z-index: 2;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Cristal só ao redor do texto/métricas: ancho ó contido + 15px padding */
.hero-stack .hero-card-frost {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 15px;
  box-sizing: border-box;
  border-radius: 1rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.32), rgba(168, 85, 247, 0.2), rgba(34, 211, 238, 0.16));
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.hero-video-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
}

.hero-live-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.85rem;
  pointer-events: none;
}

.hero-live-backdrop__inner {
  text-align: center;
  max-width: 100%;
  padding: 0 0.35rem;
  filter: blur(1.1px);
  opacity: 0.19;
  transform: scale(1.03);
  transition: opacity 0.35s ease;
}

.hero-live-backdrop.is-muted .hero-live-backdrop__inner {
  opacity: 0.09;
  filter: blur(1.4px);
}

.admin-theme-glass .hero-live-backdrop__kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.42);
  margin-bottom: 0.4rem;
}

.admin-theme-glass .hero-live-backdrop__title {
  font-size: clamp(1.25rem, 5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: #1c1c1e;
  display:none;
}

.admin-theme-glass .hero-live-backdrop__sub {
  font-size: 0.9rem;
  margin-top: 0.4rem;
  color: rgba(0, 0, 0, 0.38);
  font-weight: 500;
}

.admin-theme-glass .hero-stack #hero-card.hero-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.admin-theme-glass .hero-stack .hero-card-frost {
  background: rgba(255, 255, 255, 0.5);
  border: 0.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.admin-theme-glass .hero-stack .hero-card-frost #hero-youtube-audio.btn-outline-light {
  border-color: rgba(0, 0, 0, 0.2);
  color: #1c1c1e;
}

.admin-theme-glass .hero-stack .hero-card-frost #hero-youtube-audio.btn-outline-light:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.28);
  color: #1c1c1e;
}

.admin-theme-glass .hero-number {
  text-shadow: none;
  color: #1c1c1e !important;
}

.admin-theme-glass #health-card.border-secondary {
  border-color: rgba(0, 0, 0, 0.12) !important;
}

.admin-theme-glass .badge.bg-white.bg-opacity-10 {
  background: rgba(0, 0, 0, 0.06) !important;
  color: rgba(0, 0, 0, 0.55) !important;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
}

.admin-theme-glass .btn-outline-light {
  border-color: rgba(0, 0, 0, 0.18);
  color: #1c1c1e;
}

.admin-theme-glass .btn-outline-light:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.22);
  color: #1c1c1e;
}

.admin-theme-glass .table-dark {
  --bs-table-color: #1c1c1e;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(0, 0, 0, 0.08);
  --bs-table-hover-bg: rgba(0, 0, 0, 0.04);
  --bs-table-hover-color: #1c1c1e;
  color: #1c1c1e;
}

.admin-theme-glass .table-dark thead {
  color: rgba(0, 0, 0, 0.45);
}

.admin-theme-glass .form-control.bg-dark {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #1c1c1e !important;
}

.admin-theme-glass .form-control.bg-dark::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

.admin-theme-glass .programa-dia-detalle {
  background: rgba(255, 255, 255, 0.45);
  border: 0.5px solid rgba(0, 0, 0, 0.08);
}

.admin-theme-glass .day-cal-hours {
  color: rgba(0, 0, 0, 0.38);
}

.admin-theme-glass .day-cal-track {
  background: rgba(0, 0, 0, 0.04);
  border: 0.5px solid rgba(0, 0, 0, 0.08);
}

.admin-theme-glass .day-cal-grid {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(100% / 24 - 1px),
    rgba(0, 0, 0, 0.06) calc(100% / 24 - 1px),
    rgba(0, 0, 0, 0.06) calc(100% / 24)
  );
}

.admin-theme-glass .day-cal-event {
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.admin-theme-glass .day-cal-event.is-selected {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.55), 0 6px 20px rgba(0, 0, 0, 0.15);
}

.admin-theme-glass .day-cal-event__title {
  color: #fff;
}

.admin-theme-glass .day-cal-event__stats {
  color: rgba(255, 255, 255, 0.92);
}

.admin-theme-glass .timeline-seg.now {
  box-shadow: 0 0 0 2px #0ea5e9;
}

@media (max-width: 720px) {
  .admin-topbar {
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .admin-topbar-tabs {
    order: 3;
    width: 100%;
    margin: 8px 0 0;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
}

/* Lista programas: buscador + suxestións */
.programas-buscar-input {
  padding-left: 2.35rem;
}

.programas-buscar-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
  font-size: 0.95rem;
}

.admin-theme-glass .programas-buscar-input {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.12);
  color: #1c1c1e;
}

.admin-theme-glass .programas-buscar-input::placeholder {
  color: rgba(0, 0, 0, 0.38);
}

.programas-buscar-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  max-height: 280px;
  overflow-y: auto;
  border-radius: 12px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.95);
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.programas-buscar-sug {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1c1c1e;
  cursor: pointer;
  transition: background 0.12s;
}

.programas-buscar-sug:hover,
.programas-buscar-sug.is-active {
  background: rgba(99, 102, 241, 0.12);
  color: #1c1c1e;
}

@keyframes programas-buscar-pulse {
  0% { box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.55); }
  100% { box-shadow: inset 0 0 0 0 transparent; }
}

tr.programas-buscar-flash {
  animation: programas-buscar-pulse 1.2s ease-out 1;
}

