/* ===== OLACADEMY Design System ===== */
:root {
  --navy-950: #071525;
  --navy-900: #0f2744;
  --navy-800: #1a365d;
  --navy-700: #234876;
  --navy-600: #2c5282;
  --gold-400: #d4af37;
  --gold-500: #c9a227;
  --gold-600: #a8841f;

  --primary: var(--navy-800);
  --primary-dark: var(--navy-900);
  --primary-light: var(--navy-600);
  --accent: var(--gold-500);
  --accent-light: var(--gold-400);

  --secondary: #0ea5e9;
  --success: #059669;
  --success-bg: #ecfdf5;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;

  --bg: #f4f7fb;
  --bg-elevated: #ffffff;
  --bg-subtle: #eef2f8;
  --bg-card: var(--bg-elevated);
  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --shadow-xs: 0 1px 2px rgba(15, 39, 68, .04);
  --shadow-sm: 0 2px 8px rgba(15, 39, 68, .06), 0 1px 2px rgba(15, 39, 68, .04);
  --shadow-md: 0 8px 24px rgba(15, 39, 68, .08), 0 2px 6px rgba(15, 39, 68, .04);
  --shadow-lg: 0 20px 48px rgba(15, 39, 68, .12), 0 8px 16px rgba(15, 39, 68, .06);
  --shadow-gold: 0 8px 32px rgba(201, 162, 39, .18);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --nav-height: 72px;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --transition: .22s cubic-bezier(.4, 0, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(26, 54, 93, .06), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(201, 162, 39, .04), transparent);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--navy-700);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--navy-900);
}

::selection {
  background: rgba(201, 162, 39, .25);
  color: var(--navy-900);
}

.hidden {
  display: none !important;
}

.text-muted {
  color: var(--text-muted);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, .8);
  display: flex;
  align-items: center;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  gap: 1.5rem;
  box-shadow: var(--shadow-xs);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: .06em;
  color: var(--navy-900);
  text-decoration: none;
  flex-shrink: 1;
  min-width: 0;
}

.nav-brand img {
  max-width: 100%;
}

.nav-brand:hover {
  text-decoration: none;
  color: var(--navy-900);
}

.brand-mark {
  display: flex;
  align-items: center;
  filter: drop-shadow(0 2px 4px rgba(15, 39, 68, .15));
}

.brand-text {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy-800);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  gap: .25rem;
  flex: 1;
}

.nav-link {
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: .875rem;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
}

.nav-link:hover {
  background: var(--bg-subtle);
  color: var(--navy-900);
  text-decoration: none;
}

.nav-link.active {
  background: rgba(26, 54, 93, .08);
  color: var(--navy-800);
  font-weight: 600;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: var(--shadow-sm);
}

.nav-username {
  font-weight: 600;
  font-size: .875rem;
  color: var(--text-secondary);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid rgba(26, 54, 93, 0.15);
  border-radius: 8px;
  background: #fff;
  color: var(--navy-800);
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: normal;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  color: var(--navy-900);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(26, 54, 93, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: #fff;
  box-shadow: 0 6px 16px rgba(26, 54, 93, 0.25);
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-950);
  border-color: transparent;
  box-shadow: var(--shadow-gold);
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500));
  color: var(--navy-950);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: #ef4444;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-sm {
  padding: .375rem .875rem;
  font-size: .8125rem;
}

.btn-lg {
  padding: .8125rem 1.75rem;
  font-size: .9375rem;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
}

.btn-import {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff;
  border-color: transparent;
}

.btn-import:hover {
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: #fff;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 1.125rem;
}

.form-group label {
  display: block;
  margin-bottom: .4rem;
  font-weight: 600;
  font-size: .8125rem;
  color: var(--text-secondary);
  letter-spacing: .01em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .6875rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .9375rem;
  background: var(--bg-card);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input::placeholder {
  color: #94a3b8;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px rgba(26, 54, 93, .1);
}

.form-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.form-row .form-group {
  flex: 1;
}

.form-actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: 1.75rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 400;
  cursor: pointer;
  font-size: .875rem;
}

/* ===== Layout ===== */
#app {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  overflow-x: hidden;
}

.page-header {
  margin-bottom: 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -.02em;
  line-height: 1.2;
}

.page-header p {
  color: var(--text-muted);
  margin-top: .4rem;
  font-size: .9375rem;
}

.page-eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: .5rem;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  border-radius: 16px;
  padding: 2.5rem 1.5rem 2rem;
  color: #fff;
  margin-bottom: 2.5rem;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 12px 30px -8px rgba(7, 21, 37, 0.25);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 70%, rgba(201, 162, 39, 0.25) 0%, transparent 60%),
    radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 45%, var(--navy-600) 100%);
  background-size: 200% 200%;
  animation: heroGradientShift 7s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes heroGradientShift {
  0% {
    background-position: 0% 0%;
  }

  50% {
    background-position: 100% 100%;
  }

  100% {
    background-position: 0% 100%;
  }
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
  z-index: 0;
  mix-blend-mode: overlay;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-academy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 1rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin: 0 auto;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero .highlight {
  background: linear-gradient(135deg, #fde68a 0%, var(--gold-400) 50%, var(--gold-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.hero p {
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  color: rgba(255, 255, 255, 0.9);
  margin: 1rem auto 1.5rem;
  max-width: 700px;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.hero .btn {
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
}

.hero .btn-primary {
  background: #fff;
  color: var(--navy-900);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.hero .btn-primary:hover {
  background: #f8fafc;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.hero .btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
  flex: 1;
  min-width: 120px;
}

.hero-stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 0.15rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.hero-stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-formalab {
  background: none;
}

.catalog-promo-block {
  margin-bottom: 2.5rem;
}

.catalog-promo-hero {
  margin-bottom: 2rem;
}

.catalog-promo-features {
  margin-bottom: 0;
}

.catalog-list-section {
  padding-top: .5rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 5.5rem;
}

.catalog-list-section .page-header {
  margin-top: 2rem;
}

.catalog-list-section--logged-in {
  border-top: none;
  padding-top: 0;
}

.catalog-list-section--logged-in .page-header {
  margin-top: 0;
}

.catalog-promo-cta {
  text-align: center;
  margin-top: 2rem;
}

/* ===== Sections ===== */
.section {
  margin-bottom: 4rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: .9375rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ===== Course Grid ===== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  position: relative;
}

.course-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.course-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px -15px rgba(26, 54, 93, 0.2);
}

.course-card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
  overflow: hidden;
}

.course-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(7, 21, 37, 0.6));
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.course-card:hover .course-card-img::after {
  opacity: 1;
}

.course-card-img span {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
  transition: transform 0.4s ease;
}

.course-card:hover .course-card-img span {
  transform: scale(1.15) rotate(5deg);
}

.course-card-body {
  padding: 1.75rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, #fff 100%);
}

.course-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.course-category {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--navy-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.course-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0.25rem 0 0.75rem;
  color: var(--navy-950);
  line-height: 1.4;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: auto;
}

.course-price {
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.course-level {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy-700);
  background: var(--bg-subtle);
  padding: 0.35rem 0.8rem;
  border-radius: 12px;
  flex: 1;
  min-width: 0;
  text-align: right;
  line-height: 1.4;
  word-break: break-word;
}

.formalab-card-img {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-600) 60%, rgba(201, 162, 39, .3) 100%) !important;
}

.course-academy {
  display: block;
  font-size: .6875rem;
  font-weight: 800;
  color: var(--gold-600);
  letter-spacing: .12em;
  margin-bottom: .25rem;
}

/* ===== Progress ===== */
.progress-bar {
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 99px;
  margin-top: .875rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), #34d399);
  border-radius: 99px;
  transition: width .4s cubic-bezier(.4, 0, .2, 1);
}

.progress-text {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .35rem;
  display: block;
  font-weight: 500;
}

/* ===== Auth ===== */
.auth-page {
  min-height: calc(100vh - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg-body);
  position: relative;
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(26, 54, 93, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(201, 162, 39, 0.06) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.auth-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  max-width: 1000px;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 60px -15px rgba(7, 21, 37, 0.2);
  border: 1px solid #fff;
  min-height: 480px;
  position: relative;
  z-index: 1;
}

.auth-brand-panel {
  background:
    linear-gradient(145deg, rgba(7, 21, 37, 0.92) 0%, rgba(201, 162, 39, 0.45) 100%),
    url("https://images.unsplash.com/photo-1532094349884-543bc11b234d?auto=format&fit=crop&q=80&w=1000") center/cover no-repeat;
  color: #fff;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(201, 162, 39, 0.3) 0%, transparent 70%);
  mix-blend-mode: overlay;
}

.auth-brand-panel h2 {
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  position: relative;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.auth-brand-panel p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  font-size: 0.95rem;
  position: relative;
  margin-bottom: 2.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.auth-brand-logo {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  margin-bottom: auto;
  position: relative;
  text-transform: uppercase;
  color: var(--gold-400);
  padding-bottom: 1.5rem;
}

.auth-brand-features {
  list-style: none;
  margin-top: auto;
  position: relative;
  padding-top: 1rem;
}

.auth-brand-features li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.auth-brand-features li::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--gold-400);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(201, 162, 39, 0.6);
}

.auth-form-panel {
  padding: 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.auth-form-panel h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--navy-950);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.auth-form-panel .auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.auth-form-panel .form-group {
  margin-bottom: 1rem;
}

.auth-form-panel .form-group label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 0.5rem;
  display: block;
}

.auth-form-panel .form-group input {
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 2px solid transparent;
  background: #f1f5f9;
  color: var(--navy-900);
  transition: all var(--transition);
  width: 100%;
}

.auth-form-panel .form-group input:focus {
  background: #fff;
  outline: none;
  border-color: var(--navy-500);
  box-shadow: 0 4px 12px rgba(26, 54, 93, 0.08);
}

.auth-form-panel .btn-primary {
  padding: 0.85rem;
  font-size: 0.95rem;
  border-radius: 10px;
  margin-top: 0.75rem;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  color: #fff;
  border: none;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(26, 54, 93, 0.2);
}

.auth-form-panel .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(26, 54, 93, 0.3);
}

.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-footer a {
  font-weight: 700;
  color: var(--navy-700);
}

.demo-credentials {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(241, 245, 249, 0.6);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  text-align: center;
}

.demo-credentials p {
  margin: 0.35rem 0;
}

/* ===== Features ===== */
.features-section {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  padding: clamp(2.25rem, 5vw, 3.75rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.features-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 80%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, .45), transparent);
}

.section-title-accent {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-subtitle--wide {
  max-width: 640px;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 1.75rem 1.625rem 1.625rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(26, 54, 93, .03), transparent 55%);
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(26, 54, 93, .14);
  box-shadow: var(--shadow-md);
}

.feature-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1.125rem;
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(26, 54, 93, .1), rgba(44, 82, 130, .06));
  border: 1px solid rgba(26, 54, 93, .08);
  border-radius: 14px;
  color: var(--navy-700);
  flex-shrink: 0;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-index {
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--gold-600);
  opacity: .85;
}

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: .625rem;
  letter-spacing: -.01em;
}

.feature-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
  flex: 1;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-top: 1rem;
}

.feature-tags span {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--navy-700);
  background: rgba(26, 54, 93, .06);
  border: 1px solid rgba(26, 54, 93, .08);
}

@media (max-width: 1100px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .feature-card {
    padding: 1.5rem 1.375rem;
  }
}

/* ===== Welcome Banner ===== */
.welcome-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 16px;
  padding: 2.25rem 2.5rem;
  color: #fff;
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.4);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
}

.welcome-banner::after {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.welcome-banner h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  position: relative;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-banner p {
  font-size: 1rem;
  margin-top: .25rem;
  position: relative;
  color: #cbd5e1;
}

.welcome-banner-actions {
  display: flex;
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.welcome-banner .btn-primary {
  background: #ffffff;
  color: #0f172a;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.welcome-banner .btn-primary:hover {
  background: var(--gold-400);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(10px);
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-2px);
}

/* ===== Course Detail ===== */
.course-detail-header {
  display: flex;
  gap: 2rem;
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.course-detail-header>div:first-child {
  flex: 1;
}

.course-detail-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin: .5rem 0;
  color: var(--navy-900);
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: .875rem;
  color: var(--text-muted);
}

.course-detail-actions {
  text-align: center;
  min-width: 220px;
}

.price-tag {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy-800);
  margin-bottom: 1rem;
  letter-spacing: -.02em;
}

.course-content-section {
  background: var(--bg-card);
  padding: 1.75rem 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-xs);
}

.course-content-section h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 1rem;
}

.module-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: .75rem;
  overflow: hidden;
  transition: border-color var(--transition);
}

.module-accordion:hover {
  border-color: var(--border-strong);
}

.module-accordion-header {
  padding: 1rem 1.125rem;
  background: var(--bg-subtle);
  display: flex;
  justify-content: space-between;
  font-size: .875rem;
  font-weight: 600;
}

.module-accordion-body {
  padding: .5rem 1.125rem;
}

.lesson-item {
  padding: .625rem 0;
  font-size: .875rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

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

.lesson-duration {
  margin-left: auto;
  color: var(--text-muted);
  font-size: .8125rem;
}

/* ===== Course Player (interfaz profesional) ===== */
#app:has(.course-player),
#app:has(.course-detail-page) {
  max-width: 1140px;
}

/* ===== Course detail page (ficha del curso) ===== */
.course-detail-page {
  margin: 0 auto 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.course-detail-hero .course-player-title {
  text-transform: none;
  letter-spacing: .01em;
}

.course-detail-breadcrumb-wrap {
  text-align: left;
  margin-bottom: 1rem;
}

.course-detail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
}

.course-detail-breadcrumb a {
  color: rgba(255, 255, 255, .92);
  text-decoration: none;
  font-weight: 600;
}

.course-detail-breadcrumb a:hover {
  text-decoration: underline;
}

.course-detail-breadcrumb span {
  opacity: .75;
  color: #fff;
}

.course-detail-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .85;
  margin: 0 0 .5rem;
}

.course-detail-regulations {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin: .75rem 0;
}

.course-detail-meta {
  border-left: none;
  border-right: none;
}

.course-detail-focus {
  padding: 1rem 1.75rem;
  background: linear-gradient(90deg, var(--warning-bg) 0%, var(--bg-card) 100%);
  border-bottom: 1px solid var(--border);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.55;
}

.course-detail-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.75rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.course-detail-cta-price {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.course-detail-cta-label {
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.course-detail-cta-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy-900);
}

.course-detail-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  flex: 1;
  justify-content: flex-end;
  min-width: 220px;
}

.course-detail-cta-actions .btn-lg {
  margin: 0;
}

.course-detail-cta-actions .purchase-hint {
  width: 100%;
  text-align: right;
  margin: 0;
}

.course-detail-body {
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem) 2rem;
}

.course-detail-block {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-detail-block:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.course-detail-block:last-child {
  margin-bottom: 0;
}

.course-detail-block-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.course-detail-block-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--primary-rgb), 0.05));
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-detail-block-icon svg {
  width: 24px;
  height: 24px;
}

.course-detail-block-head h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.01em;
}

.course-detail-block-body {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
}

.course-detail-block-body>p {
  margin: 0 0 1rem;
}

.course-detail-block-body>p:last-child {
  margin-bottom: 0;
}

.course-detail-prose p {
  margin-bottom: 1rem;
  line-height: 1.85;
}

.course-detail-prose p:last-child {
  margin-bottom: 0;
}

.course-detail-list {
  margin: 0;
  padding-left: 1.35rem;
}

.course-detail-list li {
  margin-bottom: .65rem;
  line-height: 1.65;
}

.course-detail-list li:last-child {
  margin-bottom: 0;
}

.course-detail-topics {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.course-detail-topic {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
}

.course-detail-topic h3 {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 .75rem;
}

.course-detail-topic ul {
  margin: 0;
  padding-left: 1.25rem;
}

.course-detail-topic li {
  margin-bottom: .4rem;
  line-height: 1.6;
  font-size: .875rem;
}

.course-player {
  margin: 0 auto 2.5rem;
}

.course-player-hero {
  background: linear-gradient(165deg, var(--navy-950) 0%, var(--navy-800) 55%, var(--navy-600) 100%);
  color: #fff;
  padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.25rem, 4vw, 2rem);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.course-player-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, .14), transparent 55%);
  pointer-events: none;
}

.course-player-hero>* {
  position: relative;
}

.course-player-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.course-player-back {
  background: rgba(255, 255, 255, .12) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .25) !important;
}

.course-player-back:hover {
  background: rgba(255, 255, 255, .2) !important;
}

.course-player-access-badge {
  font-size: .75rem;
  font-weight: 600;
  padding: .35rem .75rem;
  border-radius: 99px;
  background: rgba(16, 185, 129, .25);
  border: 1px solid rgba(255, 255, 255, .3);
  white-space: nowrap;
}

.course-player-brand {
  display: block;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: .2em;
}

.course-player-brand-sub {
  display: block;
  font-size: .75rem;
  opacity: .82;
  margin-top: .35rem;
  font-weight: 500;
}

.course-player-hero-divider {
  height: 2px;
  max-width: 320px;
  margin: 1rem auto;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
}

.course-player-title {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .02em;
  margin: 0 0 .5rem;
}

.course-player-subtitle {
  font-size: .9rem;
  opacity: .9;
  margin: 0 0 .5rem;
}

.course-player-meta-line {
  font-size: .8125rem;
  opacity: .75;
  margin: 0;
}

.course-player-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 3vw, 1.75rem);
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.cp-meta-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.125rem;
}

.cp-meta-card strong {
  display: block;
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy-800);
  margin-bottom: .4rem;
}

.cp-meta-card span {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cp-meta-card--accent {
  border-color: rgba(201, 162, 39, .35);
  background: linear-gradient(180deg, #fffbeb 0%, var(--bg-subtle) 100%);
}

.course-player-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem 0;
  padding: 1.125rem 1.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-top: none;
}

.cps-step {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .75rem;
  border-radius: 99px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.cps-step--current {
  border-color: var(--navy-600);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.cps-step--done {
  border-color: rgba(16, 185, 129, .4);
  background: var(--success-bg);
}

.cps-num {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 800;
  background: var(--bg-subtle);
  color: var(--navy-800);
}

.cps-step--current .cps-num {
  background: var(--navy-800);
  color: #fff;
}

.cps-step--done .cps-num {
  background: #059669;
  color: #fff;
}

.cps-step--done .cps-num {
  font-size: 0;
}

.cps-step--done .cps-num::before {
  content: '✓';
  font-size: .7rem;
  font-weight: 800;
}

.cps-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.cps-step--current .cps-label {
  color: var(--navy-900);
}

.cps-connector {
  width: 2rem;
  height: 2px;
  background: var(--border);
  margin: 0 .25rem;
}

.cps-connector--done {
  background: #059669;
}

.course-player-body {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.course-player-content {
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.course-player-section {
  margin-bottom: 2rem;
}

.course-player-section:last-child {
  margin-bottom: 0;
}

.course-player-section-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.course-player-section-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.course-player-section-head h2 {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--navy-900);
  margin: 0 0 .25rem;
}

.course-player-section-head p {
  font-size: .8125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

.course-player-video {
  aspect-ratio: 16 / 9;
  background: var(--navy-950);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.course-player-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.course-player-video-empty {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: .9rem;
}

.course-player-material {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  max-height: 420px;
  overflow-y: auto;
}

.course-player-text {
  font-size: .9375rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.course-player-text p {
  margin-bottom: 1rem;
}

.course-player-text p:last-child {
  margin-bottom: 0;
}

.course-player-sidebar {
  display: block;
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  overflow-y: auto;
  max-height: 800px;
}

.course-player-modules {
  border: none;
}

.player-module-head {
  padding: 1.25rem 0 0.75rem 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--navy-900);
  border-bottom: none;
  background: transparent;
}

.player-module-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 0 0 1.5rem 0;
}

.player-lesson-item {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--navy-800);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
}

.player-lesson-item:hover {
  border-color: var(--navy-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.player-lesson-item.active {
  border-color: var(--brand-blue);
  background: rgba(30, 64, 175, 0.03);
  box-shadow: 0 0 0 1px var(--brand-blue);
}

.player-lesson-icon {
  font-size: 1.1rem;
  opacity: 0.7;
}

.player-lesson-item.done .player-lesson-icon {
  color: #059669;
  opacity: 1;
}

.course-player-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.course-player-cert {
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-card) 100%);
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-player-cert-card {
  width: 100%;
  max-width: 280px;
  text-align: center;
}

.course-player-cert-head {
  margin-bottom: .75rem;
}

.course-player-cert-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: .5rem;
}

.course-player-cert-head h2 {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--navy-900);
  margin: 0;
}

.course-player-cert-intro {
  font-size: .8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.course-player-cert-body {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.course-player-cert-hint,
.course-player-cert-note,
.course-player-cert-success {
  font-size: .8125rem;
  line-height: 1.5;
  margin: 0;
  color: var(--text-muted);
}

.course-player-cert-success {
  color: #065f46;
  font-weight: 600;
  padding: .5rem;
  background: var(--success-bg);
  border-radius: var(--radius);
}

.course-player-cert-body .btn-finish-course,
.course-player-cert-body .btn-cert-action {
  min-height: 2.85rem;
  font-weight: 700;
  font-size: .875rem;
}

.course-player-cert-body .btn-cert-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--navy-800);
  font-size: .8125rem;
}

/* ===== Player (legacy) ===== */
.player-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  min-height: calc(100vh - var(--nav-height) - 4rem);
  align-items: stretch;
}

.player-main {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.player-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-subtle);
}

.player-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy-900);
}

.player-video {
  aspect-ratio: 16/9;
  background: var(--navy-950);
  flex-shrink: 0;
}

.player-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.player-video-empty {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.player-text-panel {
  flex: 1;
  overflow-y: auto;
  min-height: 200px;
  max-height: 420px;
  border-top: 1px solid var(--border);
}

.player-topic-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 1rem;
}

.sidebar-video-note {
  font-size: .75rem;
  color: var(--text-muted);
  margin: -.25rem 0 .75rem;
}

.course-video-field input {
  font-family: monospace;
  font-size: .875rem;
}

.player-main {
  display: flex;
  flex-direction: column;
}

.text-content {
  padding: 2rem;
  font-size: .9375rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.player-sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.375rem;
  overflow-y: auto;
  max-height: calc(100vh - var(--nav-height) - 4rem);
  box-shadow: var(--shadow-sm);
}

.player-sidebar--actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  align-self: start;
  position: sticky;
  top: calc(var(--nav-height) + 1.25rem);
  /* Altura similar al bloque del video (16:9), no al texto inferior */
  min-height: clamp(220px, 32vw, 420px);
  height: auto;
  max-height: calc(100vh - var(--nav-height) - 2.5rem);
  padding: 1.5rem 1.375rem;
  gap: 1.25rem;
}

.player-sidebar-title {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0;
  line-height: 1.45;
  padding: 0;
  border-bottom: none;
  text-align: center;
}

.player-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: .875rem;
  justify-content: center;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.player-sidebar-actions .btn-finish-course {
  min-height: 3rem;
  font-weight: 700;
  font-size: .9375rem;
}

.player-sidebar-actions .btn-cert-action {
  min-height: 3rem;
  font-weight: 600;
}

.player-sidebar-actions .btn-cert-action:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.player-sidebar-actions .btn-cert-secondary {
  background: var(--bg-subtle);
  color: var(--navy-800);
  border: 1px solid var(--border);
}

.player-sidebar h3 {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: .875rem;
  line-height: 1.4;
}

.sidebar-progress {
  margin-bottom: 1.25rem;
  font-size: .8125rem;
  color: var(--text-muted);
}

.player-finish-panel {
  padding: 1rem;
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.player-finish-panel--ready,
.player-finish-panel--cert {
  border-color: rgba(201, 162, 39, .4);
  background: linear-gradient(180deg, #fffbeb 0%, var(--bg-card) 100%);
}

.player-finish-title {
  font-weight: 700;
  color: var(--navy-900);
  margin: .35rem 0 .5rem;
  font-size: .9375rem;
}

.player-finish-label {
  font-weight: 700;
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--navy-800);
  margin-bottom: .5rem;
}

.player-finish-icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: .35rem;
}

.player-finish-hint {
  font-size: .8125rem;
  margin-bottom: .75rem;
  line-height: 1.45;
}

.player-finish-panel .btn-block {
  width: 100%;
  margin-top: .5rem;
}

.player-finish-panel .btn-block+.btn-block {
  margin-top: .35rem;
}

.sidebar-module {
  margin-bottom: .875rem;
}

.sidebar-module-title {
  font-weight: 700;
  font-size: .75rem;
  padding: .5rem 0;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.sidebar-lesson {
  padding: .5625rem .875rem;
  font-size: .8125rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.sidebar-lesson:hover {
  background: var(--bg-subtle);
}

.sidebar-lesson.active {
  background: rgba(26, 54, 93, .08);
  color: var(--navy-800);
  font-weight: 600;
}

.sidebar-lesson.completed {
  color: var(--success);
}

.session-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: .75rem;
  font-size: .875rem;
  background: var(--bg-subtle);
  transition: all var(--transition);
}

.session-card:hover {
  background: var(--bg-card);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

/* ===== Admin ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(26, 54, 93, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 10px 30px -10px rgba(7, 21, 37, 0.08), 0 4px 6px -4px rgba(7, 21, 37, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--navy-500);
}

.stat-card--money::after {
  background: var(--gold-500);
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.stat-card:hover {
  box-shadow: 0 20px 40px -12px rgba(7, 21, 37, 0.12), 0 8px 12px -6px rgba(7, 21, 37, 0.06);
  transform: translateY(-4px);
  border-color: rgba(26, 54, 93, 0.1);
}

.stat-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(241, 245, 249, 0.8);
  border-radius: 12px;
  color: var(--navy-600);
}

.stat-card--money .stat-icon {
  background: rgba(201, 162, 39, 0.08);
  color: var(--gold-600);
}

.stat-value {
  display: block;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 900;
  color: var(--navy-950);
  letter-spacing: -.03em;
  line-height: 1;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.stat-card--money .stat-value {
  font-size: clamp(1.5rem, 2.8vw, 1.9rem);
  color: var(--navy-900);
}

.stat-label {
  font-size: .75rem;
  color: var(--text-secondary);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(26, 54, 93, 0.08);
  overflow-x: auto;
}

.tab-btn {
  padding: .875rem 1.25rem;
  border: none;
  background: none;
  font-family: var(--font);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--navy-900);
  border-bottom-color: var(--navy-800);
}

.tab-btn:hover {
  color: var(--navy-900);
  background: rgba(26, 54, 93, 0.03);
  border-radius: 8px 8px 0 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: .75rem;
}

.panel-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy-900);
}

.panel-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.import-hint {
  background: linear-gradient(135deg, rgba(26, 54, 93, .04), rgba(201, 162, 39, .04));
  border: 1px dashed rgba(26, 54, 93, .2);
  border-radius: var(--radius-sm);
  padding: .875rem 1.125rem;
  margin-bottom: 1.25rem;
  font-size: .875rem;
  color: var(--text-secondary);
}

.import-loading {
  text-align: center;
  padding: 2.5rem 1rem;
}

.import-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--navy-700);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin .8s linear infinite;
}

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

.import-preview {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem 1.125rem;
  margin: 1rem 0;
  border: 1px solid var(--border);
}

.import-preview-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .5625rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
}

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

.import-preview-row strong {
  color: var(--navy-800);
  min-width: 140px;
  font-weight: 600;
}

.import-preview-row span {
  text-align: right;
  color: var(--text-muted);
}

.import-warning {
  background: var(--warning-bg);
  color: #92400e;
  border: 1px solid #fde68a;
  padding: .875rem 1.125rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
}

.import-detection-reason {
  font-size: .875rem;
  color: var(--text-secondary);
  margin: .5rem 0 1rem;
  padding: .75rem 1rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold-500);
}

.import-subcourses {
  margin: 1rem 0;
}

.import-subcourses h3 {
  font-size: .9375rem;
  margin-bottom: .875rem;
  color: var(--navy-800);
  font-weight: 700;
}

.import-subcourse-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: .5rem;
  font-size: .875rem;
  border: 1px solid var(--border);
}

.import-subcourse-item span {
  color: var(--text-muted);
  white-space: nowrap;
}

.route-badge {
  display: inline-block;
  background: rgba(212, 175, 55, .2);
  color: var(--gold-400);
  padding: .4rem 1rem;
  border-radius: 99px;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  margin-bottom: .875rem;
  border: 1px solid rgba(212, 175, 55, .3);
}

.route-breadcrumb {
  padding: 1rem 2rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
}

.route-breadcrumb a {
  font-weight: 600;
  text-decoration: none;
  color: var(--navy-700);
}

.route-breadcrumb span {
  color: var(--text-muted);
  margin-left: .5rem;
}

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

.subcourse-card {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.375rem;
  cursor: pointer;
  transition: all var(--transition);
}

.subcourse-card:hover {
  border-color: var(--navy-600);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  background: var(--bg-card);
}

.subcourse-number {
  font-size: .6875rem;
  font-weight: 800;
  color: var(--gold-600);
  letter-spacing: .08em;
  margin-bottom: .4rem;
  text-transform: uppercase;
}

.subcourse-card h3 {
  font-size: 1.0625rem;
  color: var(--navy-900);
  margin-bottom: .25rem;
  font-weight: 700;
}

.subcourse-title {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: .875rem;
}

.subcourse-meta {
  display: flex;
  gap: 1rem;
  font-size: .8125rem;
  color: var(--text-muted);
  margin-bottom: .875rem;
}

.alert-warning {
  background: var(--warning-bg);
  color: #92400e;
  border: 1px solid #fde68a;
}

.table-wrapper {
  overflow-x: auto;
  background: #fff;
  border: 1px solid rgba(26, 54, 93, 0.08);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(7, 21, 37, 0.03);
}

.data-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: .875rem;
}

.data-table th {
  background: #f8fafc;
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--navy-600);
  border-bottom: 1px solid rgba(26, 54, 93, 0.08);
}

.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(26, 54, 93, 0.05);
  color: var(--navy-800);
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 320px;
}

.data-table td.td-money {
  max-width: none;
  white-space: nowrap;
  word-break: normal;
}

.data-table td .badge {
  white-space: nowrap;
}

.cert-code {
  font-family: monospace;
  background: var(--bg-subtle);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 0.85em;
}

.data-table td.actions {
  max-width: none;
  white-space: nowrap;
  word-break: normal;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(26, 54, 93, .02);
}

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

.actions {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .25rem .75rem;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .02em;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.badge-admin {
  background: rgba(139, 92, 246, 0.15);
  color: #5b21b6;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .35rem;
  margin-left: .35rem;
  border-radius: 99px;
  font-size: .65rem;
  font-weight: 700;
  background: var(--danger);
  color: #fff;
  vertical-align: middle;
}

.admin-purchase-alerts {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.admin-purchase-alerts .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.admin-purchase-alerts .panel-header h2 {
  margin: 0;
  font-size: 1.125rem;
}

.purchase-alert-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.purchase-alert-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s, box-shadow 0.2s;
}

.purchase-alert-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.purchase-alert-card--unread {
  border-left: 4px solid var(--warning-main);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

.purchase-alert-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(30, 58, 138, 0.05);
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
}

.purchase-alert-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.purchase-alert-main {
  flex: 1;
  min-width: 0;
}

.purchase-alert-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.purchase-alert-head strong {
  font-size: 1rem;
  color: var(--navy-900);
}

.purchase-alert-main p {
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.4;
}

.purchase-alert-main .purchase-amount {
  font-weight: 700;
  color: var(--success-main);
}

.purchase-alert-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}

.access-days-badge {
  margin-top: .5rem;
}

.badge-user {
  background: #e0f2fe;
  color: #075985;
}

/* ===== Certificates ===== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.cert-card {
  background: #ffffff;
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), inset 0 0 0 4px rgba(201, 162, 39, 0.03);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cert-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
}

.cert-card::before {
  content: '★';
  position: absolute;
  top: -30px;
  right: -20px;
  font-size: 10rem;
  color: rgba(201, 162, 39, 0.02);
  transform: rotate(15deg);
  pointer-events: none;
  z-index: 0;
}

.cert-card>* {
  z-index: 1;
  position: relative;
}

.cert-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), inset 0 0 0 4px rgba(201, 162, 39, 0.06);
  border-color: rgba(201, 162, 39, 0.4);
}

.cert-icon {
  margin-bottom: 1.25rem;
  transform: scale(1);
  transition: transform 0.4s ease;
}

.cert-card:hover .cert-icon {
  transform: scale(1.1) rotate(5deg);
}

.cert-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.cert-section {
  margin-bottom: 3rem;
}

.cert-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 0.5rem;
}

.cert-section-hint {
  margin-bottom: 1.5rem;
}

.cert-details {
  background: rgba(248, 250, 252, 0.8);
  border-radius: 8px;
  padding: 0.75rem;
  margin: 1rem 0;
  border: 1px dashed rgba(201, 162, 39, 0.3);
}

.cert-number {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-700);
  margin: 0;
  letter-spacing: 0.5px;
}

.cert-card-actions {
  margin-top: auto;
  padding-top: 1rem;
}

.cert-card--pending {
  border-color: rgba(201, 162, 39, 0.4);
  background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
}

.cert-card--progress {
  text-align: left;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.cert-grid--compact .cert-card {
  padding: 1.5rem;
}

.cert-page-empty {
  margin-top: 2rem;
}

.cert-empty {
  padding: 1.5rem;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.cert-code {
  font-size: .75rem;
  background: var(--bg-subtle);
  padding: .15rem .4rem;
  border-radius: 4px;
}

/* ===== Dashboard (inicio) ===== */
.dashboard-home {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-panel {
  background: var(--bg-card);
  padding: 1.5rem 1.75rem 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

.dashboard-panel-head h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0;
}

.dashboard-count {
  font-weight: 600;
  color: var(--text-muted);
  font-size: .875rem;
}

.dashboard-panel-link {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--navy-600);
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-panel-link:hover {
  text-decoration: underline;
}

.dashboard-courses-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}

/* 1 curso: alineado a la izquierda */
.dashboard-courses-row:has(.course-card:only-child) {
  grid-template-columns: minmax(280px, 360px);
  justify-content: start;
  max-width: none;
  margin: 0;
}

/* 2 cursos: 2 columnas desde la izquierda */
.dashboard-courses-row:has(.course-card:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  max-width: none;
  margin: 0;
}

.dashboard-courses-row .course-card {
  width: 100%;
  max-width: none;
  flex: none;
}

.dashboard-sessions-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
}

.session-card--dashboard {
  flex: 1 1 260px;
  min-width: 220px;
  margin: 0;
}

.dashboard-empty {
  margin: 0;
  padding: .5rem 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

.dashboard-section {
  background: var(--bg-card);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.dashboard-section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 1.125rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

/* ===== Advanced Filters ===== */
.advanced-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  align-items: center;
  justify-content: space-between;
}

.filter-search {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.filter-search svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
}

.filter-search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font);
  font-size: 0.9375rem;
  background: var(--bg-card);
  transition: all var(--transition);
}

.filter-search input:focus {
  outline: none;
  border-color: var(--navy-500);
  box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.filter-dropdowns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-dropdowns select {
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font);
  font-size: 0.9375rem;
  background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234a5568'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat right 0.75rem center/1.25rem;
  appearance: none;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-dropdowns select:focus {
  outline: none;
  border-color: var(--navy-500);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 21, 37, .55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 200;
  padding: 3rem 1rem;
  overflow-y: auto;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 580px;
  width: 100%;
  margin: auto;
  max-height: none;
  overflow: visible;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: slideUp .25s cubic-bezier(.4, 0, .2, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.98);
  }

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

.modal h2 {
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -.02em;
}

.modal.modal-lg,
.modal:has(.course-edit-form) {
  max-width: 920px;
  max-height: none;
}

.course-edit-form {
  max-height: calc(92vh - 3rem);
  overflow-y: auto;
  padding-right: .25rem;
}

.course-edit-form h2 {
  margin-bottom: .35rem;
}

.course-edit-form code {
  font-size: .8125rem;
  background: var(--bg-subtle);
  padding: .1rem .35rem;
  border-radius: 4px;
}

.course-edit-type {
  font-size: .875rem;
  margin-bottom: 1rem;
}

.course-edit-back {
  margin-bottom: 1rem;
}

.admin-edit-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.admin-edit-section:last-of-type {
  border-bottom: none;
}

.admin-edit-section-title {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--gold-400);
}

.admin-edit-hint {
  font-size: .875rem;
  margin-bottom: .75rem;
}

.course-edit-actions {
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  padding-top: 1rem;
  margin-top: .5rem;
  border-top: 1px solid var(--border);
}

.module-list {
  max-height: none;
  overflow: visible;
}

.module-item-editable {
  padding: 1rem 1.125rem 1.25rem;
  background: var(--bg-subtle);
}

.module-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.module-index {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--navy-700);
}

.content-list-label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 1rem 0 .75rem;
}

.content-edit-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: .75rem;
}

.content-edit-item:last-child {
  margin-bottom: 0;
}

.content-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
}

.content-index {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.content-edit-item .form-group {
  margin-bottom: .75rem;
}

.content-edit-item .form-group:last-child {
  margin-bottom: 0;
}

.content-edit-item label {
  font-size: .75rem;
  margin-bottom: .25rem;
}

.content-edit-item input,
.content-edit-item select,
.content-edit-item textarea {
  font-size: .875rem;
  padding: .5rem .75rem;
}

.module-desc {
  font-size: .8125rem;
  padding: 0 1rem .5rem;
}

.module-add-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.subcourses-admin-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.subcourse-admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: .875rem;
}

.subcourse-admin-row span.text-muted {
  font-size: .8125rem;
}

.subcourse-admin-row .actions {
  display: flex;
  gap: .35rem;
  flex-shrink: 0;
}

.admin-field-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.125rem;
  margin-bottom: 1rem;
}

.admin-field-table {
  margin-top: .5rem;
}

.admin-field-table input {
  width: 100%;
  padding: .5rem .65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .875rem;
}

.admin-field-table td {
  vertical-align: middle;
}

.admin-row-actions {
  width: 48px;
  text-align: center;
}

.topic-edit-card {
  margin-bottom: 1rem;
}

.topic-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.topics-edit-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.subtopic-input-row,
.list-input-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-bottom: .5rem;
}

.subtopic-input-row input,
.list-input-row input {
  flex: 1;
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .875rem;
}

.subtopics-list {
  margin-bottom: .75rem;
}

.list-edit-box {
  margin-top: 1rem;
}

.module-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: .75rem;
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .875rem 1.125rem;
  background: var(--bg-subtle);
}

.content-list {
  padding: .5rem 1.125rem;
}

.content-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .4rem 0;
  font-size: .875rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .875rem;
  background: var(--bg-subtle);
  border-radius: 99px;
  font-size: .8125rem;
  border: 1px solid var(--border);
}

.chip button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--danger);
  font-size: .9rem;
}

/* ===== Alerts ===== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: .875rem;
  font-weight: 500;
}

.alert-success {
  background: var(--success-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 1rem);
  right: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.toast {
  padding: .875rem 1.375rem;
  border-radius: var(--radius-sm);
  background: var(--navy-900);
  color: #fff;
  font-size: .875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateX(calc(100% + 2rem));
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  max-width: 360px;
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--danger);
}

.toast-info {
  background: var(--navy-700);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
}

.empty-state h2 {
  margin-bottom: .75rem;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--navy-900);
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--navy-950);
  background-image: radial-gradient(circle at top, rgba(255, 255, 255, 0.04) 0%, transparent 60%);
  color: rgba(255, 255, 255, .7);
  margin-top: 4rem;
  padding: 4rem clamp(1.5rem, 5vw, 3rem) 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}

.footer-logo-box {
  background: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.footer-logo-box img {
  height: 36px;
  width: auto;
  display: block;
}

.footer-brand p {
  font-size: .95rem;
  line-height: 1.6;
  max-width: 340px;
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.5);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.footer-social a:hover {
  color: #fff;
  background: var(--blue-500);
  transform: translateY(-2px);
}

.footer-links-group h4,
.footer-contact h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: .05em;
}

.footer-links-group {
  display: flex;
  flex-direction: column;
  gap: .875rem;
}

.footer-links-group a {
  color: rgba(255, 255, 255, .65);
  font-size: .95rem;
  font-weight: 500;
  transition: color var(--transition);
  text-decoration: none;
}

.footer-links-group a:hover {
  color: var(--blue-400);
}

.footer-contact p {
  font-size: .95rem;
  color: rgba(255, 255, 255, .65);
  margin-bottom: .5rem;
}

.footer-bottom {
  max-width: 1280px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: .875rem;
  color: rgba(255, 255, 255, .4);
}

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ===== FORMALAB Course Document ===== */
/* formalab-course-doc: reemplazado por .course-detail-page */

.formalab-course-doc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.formalab-header {
  background: linear-gradient(165deg, var(--navy-950) 0%, var(--navy-800) 55%, var(--navy-600) 100%);
  color: #fff;
  padding: clamp(2rem, 5vw, 3rem) 2rem;
  text-align: center;
  position: relative;
}

.formalab-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, .12), transparent 50%);
  pointer-events: none;
}

.formalab-brand {
  margin-bottom: 1.25rem;
  position: relative;
}

.formalab-logo {
  display: block;
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.formalab-subtitle {
  display: block;
  font-size: .8125rem;
  opacity: .8;
  margin-top: .4rem;
  font-weight: 500;
}

.formalab-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
  margin: 1.25rem auto;
  max-width: 360px;
  position: relative;
}

.formalab-title {
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.35;
  margin-bottom: .875rem;
  position: relative;
}

.formalab-tags {
  font-size: .9375rem;
  opacity: .88;
  margin-bottom: 1rem;
  position: relative;
}

.formalab-regulations {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin: 1rem 0;
  position: relative;
}

.reg-badge {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: .3rem .875rem;
  border-radius: 99px;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .04em;
  backdrop-filter: blur(4px);
}

.formalab-location {
  font-size: .8125rem;
  opacity: .7;
  margin-top: .5rem;
  position: relative;
}

.formalab-section {
  padding: 2rem;
  border-bottom: 1px solid var(--border);
}

.formalab-section:last-child {
  border-bottom: none;
}

.formalab-section-title {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 1.25rem;
  padding-bottom: .625rem;
  border-bottom: 2px solid var(--gold-400);
  letter-spacing: -.01em;
}

.formalab-focus {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.25rem;
  font-size: .9375rem;
}

.formalab-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.formalab-info-item {
  background: var(--bg-subtle);
  padding: 1.125rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--navy-700);
}

.formalab-info-item strong {
  display: block;
  font-size: .6875rem;
  color: var(--navy-700);
  margin-bottom: .4rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}

.formalab-info-item span {
  font-size: .9375rem;
  color: var(--text-secondary);
}

.formalab-info-block {
  margin-bottom: 1rem;
}

.formalab-info-block strong {
  display: block;
  font-size: .8125rem;
  color: var(--navy-800);
  margin-bottom: .4rem;
  font-weight: 700;
}

.formalab-info-block p {
  font-size: .9375rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.formalab-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.75rem 2rem;
  background: linear-gradient(180deg, var(--bg-subtle), var(--bg-card));
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.purchase-hint {
  width: 100%;
  text-align: center;
  font-size: .875rem;
  margin-top: .25rem;
}

.formalab-actions .btn-lg+.btn-lg {
  margin-left: 0;
}

.formalab-text p {
  margin-bottom: 1rem;
  font-size: .9375rem;
  line-height: 1.85;
  color: var(--text-secondary);
  text-align: justify;
}

.formalab-text p:last-child {
  margin-bottom: 0;
}

.formalab-competencies {
  padding-left: 1.5rem;
  list-style: decimal;
}

.formalab-competencies li {
  margin-bottom: .65rem;
  font-size: .9375rem;
  line-height: 1.65;
  padding-left: .35rem;
  color: var(--text-secondary);
}

.formalab-table th {
  background: var(--navy-800);
  color: #fff;
}

.formalab-table td:first-child {
  font-weight: 600;
  color: var(--navy-900);
}

.formalab-topic {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.formalab-topic:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.formalab-topic-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: .75rem;
}

.formalab-subtopics {
  list-style: none;
  padding-left: 0;
}

.formalab-subtopics li {
  position: relative;
  padding: .45rem 0 .45rem 1.25rem;
  font-size: .875rem;
  line-height: 1.65;
  color: var(--text-muted);
  border-bottom: 1px dotted var(--border);
}

.formalab-subtopics li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--gold-500);
  font-weight: 700;
}

.formalab-subtopics li:last-child {
  border-bottom: none;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .auth-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-brand-panel {
    padding: 2rem;
    min-height: 200px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p {
    margin: 0 auto;
  }

  .footer-links {
    align-items: center;
  }

  .footer-copy {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .navbar {
    flex-wrap: wrap;
    position: sticky;
    align-content: flex-start;
    height: auto;
    min-height: var(--nav-height);
    padding-top: 10px;
    padding-bottom: 10px;
  }
  
  .nav-brand img {
    height: 45px !important;
    max-width: 65vw;
    transform: none;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex: 1 1 100%;
    flex-direction: column;
    background: var(--bg-subtle);
    padding: .75rem;
    border-radius: var(--radius-sm);
    margin-top: .5rem;
    gap: .25rem;
    order: 3;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    padding: .75rem 1rem;
  }

  .nav-user {
    display: none;
    width: 100%;
    flex: 1 1 100%;
    justify-content: space-between;
    padding: .75rem 0 0;
    margin-top: .5rem;
    border-top: 1px solid var(--border);
    order: 4;
  }

  .nav-links.open~.nav-user {
    display: flex;
  }

  #app {
    padding: 1rem;
  }

  .hero {
    padding: 2.5rem 1.25rem;
    border-radius: var(--radius);
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-stats {
    gap: 0.5rem;
    padding: 1rem 0.5rem;
  }

  .hero-stat {
    min-width: 0;
    flex: 1 1 30%;
  }
  
  .hero-stat-value {
    font-size: 1.4rem;
  }

  .course-detail-header {
    flex-direction: column;
  }

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

  .player-sidebar {
    max-height: none;
  }

  .player-sidebar--actions {
    position: static;
    min-height: auto;
    padding: 1.5rem 1.25rem;
    justify-content: flex-start;
  }

  .course-player-hero-top {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .course-player-steps {
    flex-direction: column;
    align-items: stretch;
  }

  .cps-connector {
    width: 2px;
    height: 1rem;
    margin: 0 auto;
  }

  .course-player-body {
    display: block;
  }

  .course-player-content {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .course-player-cert {
    padding: 1.5rem;
  }

  .course-player-cert-card {
    max-width: 100%;
  }

  .course-detail-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .course-detail-cta-actions {
    justify-content: stretch;
    min-width: 0;
  }

  .course-detail-cta-actions .btn-lg {
    width: 100%;
  }

  .course-detail-cta-actions .purchase-hint {
    text-align: center;
  }

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

  .dashboard-courses-row {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .dashboard-courses-row:has(.course-card:nth-child(2):last-child) {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .dashboard-courses-row .course-card {
    width: 100%;
  }

  .course-card-img {
    height: 120px;
    font-size: 2.5rem;
  }

  .dashboard-sessions-row {
    flex-direction: column;
  }

  .session-card--dashboard {
    flex: 1 1 auto;
    min-width: 0;
  }

  .form-row {
    flex-direction: column;
  }

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

  .formalab-title {
    font-size: 1.15rem;
  }

  .formalab-actions {
    flex-direction: column;
  }

  .welcome-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
  }

  .welcome-banner-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

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

  .course-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .course-level {
    text-align: left;
    flex: 0 1 auto;
    width: auto;
    align-self: flex-start;
  }

  .course-detail-block {
    padding: 1.25rem;
  }

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

/* Animaciones de Sesiones en Vivo */
@keyframes pulse-live {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #fef2f2;
  color: #ef4444;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid #fee2e2;
}

.live-indicator {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  animation: pulse-live 2s infinite;
}

.upcoming-badge {
  display: inline-flex;
  align-items: center;
  background-color: #eff6ff;
  color: #3b82f6;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid #dbeafe;
}

.session-card-premium {
  background: linear-gradient(to bottom, #ffffff, #f8fafc);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.session-card-premium:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.session-card-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1e3a8a, #3b82f6);
}

/* Fix Wompi 3DS Mobile Overflow */
@media (max-width: 768px) {
  iframe[src*="wompi"],
  div[id^="wompi-widget"] {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}