@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/academia/assets/fonts/dm-sans-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/academia/assets/fonts/instrument-serif-italic-latin.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --canvas: #0a0a0a;
  --surface: #151515;
  --ink: #f6f6f6;
  --muted: #b8b8b8;
  --line: #353535;
  --sans: 'DM Sans', 'Segoe UI', Arial, sans-serif;
  --display: var(--sans);
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font: 400 1rem/1.5 var(--sans);
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 3.35vw, 3.2rem);
  line-height: 1.12;
  font-weight: 550;
  letter-spacing: -.055em;
}

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

img {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: .6;
}

::selection {
  color: var(--canvas);
  background: #ddd;
}

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

.shell {
  width: min(1280px, calc(100% - 2 * clamp(20px, 6vw, 92px)));
  margin-inline: auto;
}

.sr-only,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip:focus {
  position: absolute;
  z-index: 5;
  inset: 8px auto auto 8px;
  padding: 9px 16px;
  background: var(--ink);
  color: var(--canvas);
}

.icon {
  display: inline-flex;
  flex: none;
  width: 16px;
  height: 16px;
}

.icon svg {
  width: 100%;
  height: 100%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 44px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 .94rem/1.2 var(--sans);
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.button:is(.primary, .solid) {
  color: #101010;
  background: var(--ink);
}

.button:is(.primary, .solid):hover {
  background: #d9d9d9;
}

.button.outline {
  color: var(--ink);
  border-color: #595959;
  background: transparent;
}

.button.outline:hover {
  background: #202020;
  border-color: #aaa;
}

.button.compact {
  min-height: 38px;
  font-size: .83rem;
  padding: 8px 15px;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 7px;
  color: #d6d6d6;
  font-size: .75rem;
  line-height: 1.4;
}

.status-text {
  color: var(--muted);
  margin: 12px 0;
}

.status-text:empty {
  display: none;
}

.status-text.error {
  color: var(--ink);
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header {
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.brand img {
  object-fit: contain;
  width: 32px;
  height: 32px;
}

.brand-name {
  font: 700 1.62rem/1 var(--sans);
  letter-spacing: -.065em;
}

.brand-sub {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid #505050;
  color: #ececec;
  font: 700 1.62rem/1 var(--sans);
  letter-spacing: -.055em;
  display: inline-flex;
  align-items: center;
}

.brand-ia {
  font-weight: 800;
  color: #38bdf8;
  background: linear-gradient(135deg, #38bdf8 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.65));
  transition: filter .2s ease;
}

.brand:hover .brand-ia {
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.95));
}

.main-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 42px);
}

.main-nav a:not(.button),
.site-footer nav a {
  font-size: .89rem;
  font-weight: 500;
  color: #c9c9c9;
}

.main-nav a:not(.button):hover,
.site-footer nav a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.main-nav .button .icon {
  width: 14px;
  height: 14px;
}

.nav-user-area {
  display: inline-flex;
  align-items: center;
}

/* Botón de acceso */
.nav-access-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 17px;
  border-radius: 999px;
  font: 600 .86rem/1.2 var(--sans);
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.nav-access-icon {
  display: inline-flex;
  width: 15px;
  height: 15px;
  color: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

.nav-access-icon svg {
  width: 100%;
  height: 100%;
}

.nav-access-btn:hover {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(168, 85, 247, 0.12));
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4), inset 0 0 12px rgba(56, 189, 248, 0.15);
  transform: translateY(-1px);
}

/* Badge y controles de usuario activo */
.nav-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.user-pill-card {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, rgba(24, 24, 30, 0.85), rgba(12, 12, 16, 0.95));
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.32);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 14px rgba(56, 189, 248, 0.15);
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.user-pill-card:hover {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 18px rgba(56, 189, 248, 0.3);
}

.user-avatar-wrap {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, #0284c7, #7c3aed);
  flex-shrink: 0;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-avatar-initials {
  font: 700 0.72rem var(--sans);
  color: #fff;
  letter-spacing: -0.02em;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-name {
  font: 600 0.84rem var(--sans);
  color: #fff;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-badge-role {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-badge-role.role-admin {
  background: linear-gradient(90deg, #ec4899, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 4px rgba(236, 72, 153, 0.5));
}

.user-badge-role.role-student {
  color: #38bdf8;
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.5));
}

.nav-tech-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 13px;
  border-radius: 999px;
  font: 600 0.78rem/1 var(--sans);
  cursor: pointer;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.nav-tech-btn .btn-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.admin-portal-btn {
  color: #f3e8ff;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(56, 189, 248, 0.15));
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.admin-portal-btn:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(56, 189, 248, 0.3));
  border-color: #c084fc;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.55);
  transform: translateY(-1px);
}

.logout-pill-btn {
  color: #a3a3a3;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.logout-pill-btn:hover {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.1);
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.3);
  transform: translateY(-1px);
}

.student-welcome-banner {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.3s ease-out;
}

.student-welcome-banner .banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent);
  flex-shrink: 0;
}

.student-welcome-banner .banner-icon svg {
  width: 24px;
  height: 24px;
}

.student-welcome-banner h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: #fff;
}

.student-welcome-banner p {
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(10px, 2vw, 32px);
  padding-block: clamp(32px, 4vw, 64px);
  isolation: isolate;
  background: var(--canvas);
}

.hero-content {
  min-width: 0;
}

.hero h1 {
  font-size: clamp(3.1rem, 5.3vw, 5.4rem);
  font-weight: 500;
  line-height: .99;
  letter-spacing: -.07em;
}

.hero h1 em {
  display: inline-block;
  margin-top: .08em;
  font-family: var(--sans);
  font-size: .94em;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  line-height: .95;
  letter-spacing: -.025em;
  white-space: nowrap;
  color: #38bdf8;
  background: linear-gradient(110deg, #38bdf8 0%, #818cf8 34%, #e879f9 68%, #38bdf8 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.45)) drop-shadow(0 0 32px rgba(168, 85, 247, 0.25));
  animation: holo-text 5.5s linear infinite;
}

@keyframes holo-text {
  to {
    background-position: 220% center;
  }
}

.hero p {
  max-width: 395px;
  margin-top: 22px;
  color: #c1c1c1;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.48;
}

.hero-action {
  gap: 19px;
  margin-top: 25px;
  min-height: 46px;
  padding-inline: 21px;
}

.hero-action .icon {
  width: 18px;
  height: 18px;
}

.hero-book-stage {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1.75;
  max-height: 390px;
  overflow: hidden;
  border-radius: 16px;
}

.book-holo-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 78% at 50% 50%, #000 45%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 78% at 50% 50%, #000 45%, transparent 100%);
}

.book-motion-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.book-fallback {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: lighten;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hero-book-stage[data-state=ready] .book-motion-canvas {
  visibility: visible;
  opacity: 1;
}

.hero-book-stage[data-state=fallback] .book-fallback {
  visibility: visible;
  opacity: 1;
}

.catalog {
  scroll-margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: clamp(24px, 2.6vw, 38px);
}

.catalog-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 18px;
  flex-wrap: wrap;
}

.catalog-heading .demo-label {
  gap: 8px;
  padding: 0;
  border: 0;
  color: #b3b3b3;
  font-size: .79rem;
}

.catalog-heading .demo-label::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #999;
  border-radius: 50%;
}

.catalog-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 21px 0 20px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.filter {
  min-height: 38px;
  padding: 7px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #c6c6c6;
  font-size: .88rem;
  font-weight: 500;
}

.filter:hover {
  color: #fff;
  background: #202020;
}

.filter[aria-pressed=true] {
  border-color: #626262;
  background: #242424;
  color: var(--ink);
  font-weight: 650;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(295px, 36%);
  min-height: 40px;
  padding: 7px 13px;
  border: 1px solid #505050;
  border-radius: 7px;
  background: #101010;
  color: #bfbfbf;
}

.search:focus-within {
  border-color: var(--ink);
}

.search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: .89rem;
}

.search input::placeholder {
  color: #a8a8a8;
}

/* Encabezado y controles del Carrusel */
.catalog-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.catalog-slider-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.slider-arrow-btn:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  transform: scale(1.06);
}

.slider-arrow-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

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

/* Track deslizable de cursos (Scroll Snap) */
.course-grid {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 10px 4px 26px;
  margin-inline: -4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.course-grid::-webkit-scrollbar {
  height: 6px;
}

.course-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
}

.course-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.course-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

/* Tarjeta de Curso Moderna y Legible */
.course-card {
  flex: 0 0 clamp(300px, 31vw, 360px);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, rgba(24, 24, 30, 0.85) 0%, rgba(13, 13, 17, 0.95) 100%);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.28s ease, box-shadow 0.28s ease;
  user-select: none;
}

.course-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(56, 189, 248, 0.12);
}

.course-card:focus-visible {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

/* Portada de tarjeta */
.course-art {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #09090c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.course-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.course-card:hover .course-cover {
  transform: scale(1.04);
}

.course-art-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 40%, rgba(13, 13, 17, 0.6) 100%);
  pointer-events: none;
}

.course-badges-floating {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.category-badge {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.demo-badge {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #f87171;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}

/* Contenido de la tarjeta */
.course-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 20px;
}

.course-title {
  margin: 0 0 8px;
  font: 700 1.25rem/1.25 var(--display);
  color: #ffffff;
  letter-spacing: -0.025em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.course-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.48;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0 0 16px;
}

/* Fila de píldoras/chips de metadatos */
.course-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: auto 0 0;
  padding: 0;
}

.course-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #cbd5e1;
}

.course-chip .icon {
  width: 12px;
  height: 12px;
  color: #38bdf8;
  display: inline-flex;
}

/* Pie de tarjeta */
.course-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.price-container {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.price-amount {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: monospace;
  color: #ffffff;
}

.price-unit {
  font-size: 0.78rem;
  color: #38bdf8;
  font-weight: 600;
}

/* Botón píldora CTA */
.course-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #38bdf8;
  font: 600 0.8rem var(--sans);
  transition: all 0.2s ease;
}

.course-card:hover .course-action-pill {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  border-color: transparent;
  color: #030712;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

.pill-arrow {
  width: 13px;
  height: 13px;
  transition: transform 0.2s ease;
}

.course-card:hover .pill-arrow {
  transform: translateX(3px);
}

.course-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 3px 0 3px 8px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: .86rem;
  font-weight: 600;
}

.course-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.course-link .icon {
  width: 15px;
  height: 15px;
}

.how {
  margin-top: clamp(35px, 5vw, 74px);
  padding: clamp(24px, 3vw, 44px) 0;
  border-block: 1px solid var(--line);
}

.how-heading h2 {
  font-size: clamp(1.7rem, 2.3vw, 2.25rem);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 23px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: start;
  gap: 14px;
}

.step-number {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #545454;
  border-radius: 50%;
  color: #d5d5d5;
  font-size: .84rem;
  font-weight: 600;
}

.steps h3 {
  font-size: 1.04rem;
  line-height: 1.2;
  font-weight: 600;
}

.steps p {
  margin-top: 6px;
  max-width: 29ch;
  color: var(--muted);
  font-size: .88rem;
}

.site-footer {
  flex-wrap: wrap;
  min-height: 88px;
  padding-block: 20px;
}

.site-footer .brand img {
  width: 25px;
  height: 25px;
}

.site-footer .brand .brand-name,
.site-footer .brand .brand-sub {
  font-size: 1.3rem;
}

@media (max-width: 920px) {
  .course-grid {
    gap: 12px;
  }

  .course-content {
    padding: 15px;
  }

  .course-card .course-meta {
    gap: 5px 9px;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 5.6vw, 4rem);
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 65px;
  }

  .main-nav {
    gap: 14px;
  }

  .main-nav>a:not(.button) {
    display: none;
  }

  .brand img {
    width: 28px;
    height: 28px;
  }

  .brand .brand-name,
  .brand .brand-sub {
    font-size: 1.35rem;
  }

  .brand-sub {
    padding-left: 9px;
    margin-left: 2px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
    padding-block: 32px;
  }

  .hero p {
    font-size: .97rem;
  }

  .catalog-tools {
    flex-wrap: wrap;
  }

  .course-card {
    flex: 0 0 clamp(280px, 65vw, 340px);
  }

  .course-content {
    padding: 16px;
  }

  .steps {
    gap: 16px;
  }

  .steps li {
    gap: 8px;
  }
}

@media (max-width: 590px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-block: 34px 16px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 10vw, 3.6rem);
  }

  .hero h1 em {
    font-size: .95em;
  }

  .hero p {
    max-width: 33ch;
    margin-top: 14px;
  }

  .hero-action {
    margin-top: 18px;
  }

  .hero-book-stage {
    justify-self: center;
    margin: 10px auto 0;
    width: 100%;
    max-width: 380px;
  }

  .course-card {
    flex: 0 0 min(82vw, 320px);
    backdrop-filter: none;
    background: #141418;
  }

  .catalog-tools {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin: 14px 0 16px;
  }

  .filters {
    flex-wrap: nowrap;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .filter {
    flex: none;
    padding-inline: 10px;
    white-space: nowrap;
  }

  .search {
    width: 100%;
  }

  .course-card {
    flex: 0 0 clamp(260px, 84vw, 320px);
  }

  .course-card h3 {
    font-size: 1.45rem;
  }

  .course-art {
    aspect-ratio: 16 / 9;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 19px;
  }

  .steps li {
    gap: 15px;
  }

  .steps p {
    max-width: none;
    margin-top: 3px;
  }

  .site-footer nav {
    order: 3;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
  }

  .hero h1 em {
    animation: none;
  }
}

/* Inscripción y confirmación */
.dialog {
  color-scheme: dark;
  width: min(580px, calc(100% - 24px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: linear-gradient(160deg, #16161d 0%, #0c0c11 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.dialog::-webkit-scrollbar {
  width: 6px;
}

.dialog::-webkit-scrollbar-track {
  background: transparent;
}

.dialog::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.dialog::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.dialog-content {
  position: relative;
  padding: clamp(22px, 4.5vw, 36px);
}

/* Botón de cerrar bien marcado y visible */
.close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(22, 22, 28, 0.92);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.22s ease;
  z-index: 30;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.close .close-svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
  stroke-width: 2.8;
  display: block;
  transition: transform 0.25s ease, stroke 0.2s ease;
}

.close:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  transform: scale(1.08);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.45);
}

.close:hover .close-svg {
  stroke: #ff6b6b;
  transform: rotate(90deg);
}



.dialog-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 0;
  margin-bottom: 8px;
}

.dialog-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0d11;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Dos botones separados en los laterales para deslizar entre cursos */
.dialog-side-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(14, 14, 20, 0.78);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  cursor: pointer;
  z-index: 10;
  transition: all 0.22s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.dialog-side-arrow.prev {
  left: 14px;
}

.dialog-side-arrow.next {
  right: 14px;
}

.dialog-side-arrow:hover {
  background: rgba(56, 189, 248, 0.32);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

.dialog-side-arrow svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  transition: stroke 0.2s ease;
}

.dialog-side-arrow:hover svg {
  stroke: #38bdf8;
}

.dialog-cover-wrap img,
.dialog-intro > img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  display: block;
}

.dialog h2,
.panel h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.dialog-intro h2 {
  margin: 8px 0;
}

.dialog-intro p,
.dialog-content .note,
.dialog-result p,
.syllabus {
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.dialog-intro p,
.dialog-content .note {
  font-size: .92rem;
}

.dialog-meta {
  margin: 18px 0;
}

.dialog-rule {
  height: 1px;
  margin: 20px 0;
  border: 0;
  background: var(--line);
}

.dialog h3 {
  font: 600 1.3rem/1.2 var(--sans);
  letter-spacing: -.025em;
}

.syllabus {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding-left: 20px;
}

.dialog-content .note {
  margin: 8px 0 18px;
  line-height: 1.55;
  color: var(--muted);
}

/* Formularios dentro de modales (Inscripción, Borrar curso, etc.) */
.dialog form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.dialog form label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
  text-align: left;
}

.dialog form input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 11px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
}

.dialog form input:focus {
  border-color: #38bdf8;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.dialog form input::placeholder {
  color: #64748b;
}

.summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 0 16px;
}

.summary strong {
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  color: #fff;
}

.summary .price {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
  font-family: monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dialog-content .wide {
  width: 100%;
}

.dialog-result {
  padding-right: 34px;
}

.dialog-result p {
  margin: 14px 0;
}

.dialog-result .reservation strong {
  color: var(--ink);
}

/* Administración */
/* Escenario Holográfico de Login */
.login-stage {
  position: relative;
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: clamp(32px, 6vw, 80px) 20px;
  background: radial-gradient(circle at 50% 30%, rgba(20, 24, 38, 0.75) 0%, #0a0a0a 85%);
  isolation: isolate;
}

.login-holo-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.login-stage-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  display: flex;
  justify-content: center;
}

.login-brand-header {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.login-tech-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: linear-gradient(145deg, rgba(20, 20, 26, 0.88), rgba(10, 10, 14, 0.96));
  backdrop-filter: blur(28px);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 22px;
  padding: 38px 32px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(56, 189, 248, 0.14);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.login-tech-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8 30%, #a855f7 70%, transparent);
}

.login-card-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 200px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, rgba(168, 85, 247, 0.1) 50%, transparent 70%);
  filter: blur(35px);
  pointer-events: none;
}

.login-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 700 0.68rem/1 var(--sans);
  letter-spacing: 0.1em;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

.login-tech-card h2 {
  font-size: 1.65rem;
  margin: 0 0 10px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: #fff;
}

.login-lead {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 auto 26px;
  line-height: 1.5;
  max-width: 340px;
}

.google-login-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.google-btn-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
}

.login-footer-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #888;
  font-size: 0.78rem;
}

.shield-icon {
  width: 15px;
  height: 15px;
  color: #22c55e;
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.5));
  flex-shrink: 0;
}

.login-back-row {
  margin-top: 20px;
  text-align: center;
}

.login-back-link {
  font-size: 0.84rem;
  color: var(--muted);
  transition: color 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.login-back-link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* =========================================================
   PANEL DE ADMINISTRACIÓN (DISEÑO MODERNO Y ESPACIOSO)
   ========================================================= */

.admin-page {
  min-height: 80vh;
  padding-block: clamp(24px, 4vw, 56px);
  max-width: 1200px;
}

/* Header del panel */
.admin-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  background: linear-gradient(135deg, rgba(24, 24, 30, 0.75), rgba(14, 14, 18, 0.85));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.admin-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.badge-role-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 750 0.65rem var(--sans);
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
}

.badge-role-admin .badge-svg-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.admin-email-pill {
  font: 500 0.78rem var(--sans);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-title-area h1 {
  margin: 0 0 6px;
  font: 700 clamp(1.6rem, 2.8vw, 2.4rem)/1.15 var(--display);
  letter-spacing: -0.04em;
  color: #fff;
}

.admin-title-area p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Tabs cápsula modernas */
.tabs-container {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px;
}

.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  font: 600 0.88rem/1 var(--sans);
  transition: all 0.2s ease;
  cursor: pointer;
}

.tabs button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.tabs button[aria-pressed=true] {
  color: #fff;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(168, 85, 247, 0.22));
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.tab-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Contenedor de la sección de cursos */
.admin-courses-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Card contenedor de tablas */
.admin-card-section {
  background: linear-gradient(145deg, rgba(20, 20, 24, 0.7), rgba(12, 12, 16, 0.85));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 24px 28px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

/* Barra de herramientas de sección */
.admin-section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.toolbar-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-title-group h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
  letter-spacing: -0.02em;
}

.catalog-count-badge {
  font: 700 0.72rem var(--sans);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
}

/* Botón de crear curso */
.create-course-btn {
  color: #000;
  background: #fff;
  font-weight: 600;
  padding: 8px 18px;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.2);
}

.create-course-btn:hover {
  background: #38bdf8;
  color: #000;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

/* Tablas amplias y legibles */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 14, 0.6);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 14px 18px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.admin-table td {
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.92rem;
  vertical-align: middle;
}

.admin-table tbody tr {
  transition: background-color 0.15s ease;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.admin-table td strong {
  display: block;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}

.admin-table td small {
  color: var(--muted);
  font-size: 0.82rem;
}

.actions-header {
  text-align: right;
  padding-right: 24px !important;
}

/* Píldoras de estado */
.status-published {
  background: rgba(34, 197, 94, 0.12) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
  font-weight: 600;
}

.status-draft {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #a3a3a3 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.status-pending {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  font-weight: 600;
}

/* Botones de acción limpios en las filas */
.course-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  font: 600 0.8rem var(--sans);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  text-decoration: none;
}

.mini-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.edit-btn {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.09);
  border-color: rgba(56, 189, 248, 0.28);
}

.edit-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.delete-btn {
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.24);
}

.delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.cash-btn {
  color: #34d399;
  background: rgba(52, 211, 153, 0.09);
  border-color: rgba(52, 211, 153, 0.3);
}

.cash-btn:hover {
  background: rgba(52, 211, 153, 0.2);
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}

/* Formulario editor de cursos espacioso */
.course-form-card {
  background: linear-gradient(145deg, rgba(22, 22, 28, 0.95), rgba(14, 14, 18, 0.98)) !important;
  border: 1px solid rgba(56, 189, 248, 0.32) !important;
  border-radius: 20px !important;
  padding: 32px 36px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 35px rgba(56, 189, 248, 0.12) !important;
  margin-bottom: 24px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-header h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  color: #fff;
}

.editor-subtitle {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.editor-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.editor-close-btn:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* Grid del formulario */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}

.grid-full {
  grid-column: 1 / -1;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
}

.form-grid :is(input, textarea, select) {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 10, 14, 0.8);
  color: #fff;
  font: 400 0.95rem var(--sans);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-grid :is(input, textarea, select):focus {
  border-color: #38bdf8;
  outline: none;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.cover-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 18px;
  margin-top: 6px;
}

.cover-preview-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.cover-preview-row img {
  width: 220px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #000;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .admin-header-card {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .admin-table th,
  .admin-table td {
    padding: 12px 10px;
  }
}