/* =========================================================================
   styles.css — Academia MMS
   -------------------------------------------------------------------------
   Paleta de marca (tomada del sitio real de MMS):
     azul primario   #22539C   |  naranja de acento  #F05025
   Tipografía: Sora (display / marca) + Inter (texto de interfaz)
   ========================================================================= */

:root {
  /* Marca */
  --blue-900: #0f2a52;
  --blue-800: #163864;
  --blue-700: #1b4380;
  --blue-600: #22539c;   /* primario */
  --blue-500: #3868b3;
  --blue-100: #e8eefa;
  --blue-50:  #f4f7fd;

  --orange-700: #c43d16;
  --orange-600: #d5431c;
  --orange-500: #f05025; /* primario */
  --orange-100: #fdece6;

  --success: #16a34a;
  --success-bg: #ecfdf3;
  --danger: #c0362c;
  --danger-bg: #fdf1ef;

  /* Neutrales */
  --ink: #12151c;
  --slate: #4b5565;
  --mist: #8b95a5;
  --line: #e7eaf0;
  --line-soft: #f0f2f6;
  --surface: #ffffff;
  --canvas: #f3f5f9;

  /* Sistema */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(10, 20, 40, 0.18);
  --font-display: "Sora", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}
body {
  font-family: var(--font-body);
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button {
  font-family: inherit;
  cursor: pointer;
}
a {
  color: inherit;
}
.hidden {
  display: none !important;
}
::selection {
  background: var(--orange-100);
  color: var(--orange-700);
}
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-thumb {
  background: #d3d8e2;
  border-radius: 20px;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------------------------------------------------------------------
   Botones
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  border: none;
  transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn-orange {
  background: linear-gradient(180deg, var(--orange-500), var(--orange-600));
  color: #fff;
  box-shadow: 0 2px 8px rgba(240, 80, 37, 0.35);
}
.btn-orange:hover {
  background: linear-gradient(180deg, var(--orange-600), var(--orange-700));
  box-shadow: 0 4px 14px rgba(240, 80, 37, 0.42);
}
.btn-blue {
  background: linear-gradient(180deg, var(--blue-600), var(--blue-700));
  color: #fff;
}
.btn-blue:hover {
  background: linear-gradient(180deg, var(--blue-700), var(--blue-800));
}
.btn-ghost {
  background: transparent;
  color: var(--slate);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  background: #fff;
  border-color: #d6dbe4;
  color: var(--ink);
}
.btn-danger {
  background: #fff;
  color: var(--danger);
  border: 1px solid #f1c3bd;
}
.btn-danger:hover {
  background: var(--danger-bg);
}
.btn-sm {
  padding: 7px 13px;
  font-size: 12.5px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.back-link {
  margin-bottom: 18px;
}

/* ---------------------------------------------------------------------
   Login — split screen
   --------------------------------------------------------------------- */
#view-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-900);
  padding: 28px;
}
.auth-shell {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  width: 100%;
  max-width: 960px;
  min-height: 600px;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}
.auth-brand-panel {
  position: relative;
  background: radial-gradient(120% 140% at 15% 10%, #1c4d8f 0%, var(--blue-800) 45%, var(--blue-900) 100%);
  color: #fff;
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border-top-left-radius: 22px;
  border-bottom-left-radius: 22px;
}
.auth-brand-glow {
  position: absolute;
  width: 460px;
  height: 460px;
  right: -180px;
  bottom: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 80, 37, 0.55) 0%, rgba(240, 80, 37, 0) 68%);
  pointer-events: none;
}
.auth-brand-content {
  position: relative;
  z-index: 1;
}
.auth-logo-img {
  height: 34px;
  width: auto;
  margin-bottom: 40px;
  display: block;
}
.auth-brand-content h2 {
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 1.28;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.auth-brand-content p {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 28px;
  max-width: 360px;
}
.auth-brand-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-brand-points li {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-brand-points li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange-500);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(240, 80, 37, 0.2);
}
.auth-form-panel {
  padding: 52px 48px;
  display: flex;
  align-items: center;
  border-top-right-radius: 22px;
  border-bottom-right-radius: 22px;
}
.auth-form-inner {
  width: 100%;
}
.auth-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-600);
  background: var(--orange-100);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.auth-form-inner h1 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.auth-form-inner .sub {
  color: var(--mist);
  font-size: 13.5px;
  margin: 0 0 26px;
}
.field {
  text-align: left;
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--canvas);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  background: #fff;
  box-shadow: 0 0 0 3px var(--blue-100);
}
.auth-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #f1c3bd;
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: left;
}
.auth-submit {
  width: 100%;
  padding: 13px;
  margin-top: 4px;
  font-size: 14.5px;
}
.auth-hint {
  margin-top: 26px;
  font-size: 12px;
  color: var(--mist);
  border-top: 1px dashed var(--line);
  padding-top: 16px;
  line-height: 1.8;
}
.auth-hint strong {
  color: var(--slate);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-hint-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.auth-hint-row span {
  width: 46px;
  flex-shrink: 0;
  font-weight: 700;
  color: var(--slate);
}
.auth-hint-row code {
  background: var(--line-soft);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--ink);
}

/* ---------------------------------------------------------------------
   Shell general: sidebar + contenido
   --------------------------------------------------------------------- */
#app-shell {
  display: flex;
  min-height: 100vh;
}

#app-sidebar {
  width: 264px;
  flex-shrink: 0;
  background: linear-gradient(190deg, var(--blue-800) 0%, var(--blue-900) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-accent-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--orange-500), var(--blue-500) 85%);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 22px 26px;
  cursor: pointer;
}
.sidebar-logo-img {
  height: 42px;
  width: auto;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 6px 14px;
  overflow-y: auto;
}
.side-section-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  padding: 20px 10px 8px;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  margin-bottom: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}
.side-link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.85;
}
.side-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.side-link.active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--orange-500);
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
}
.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.07);
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-500), var(--blue-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-user-info {
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}
.sidebar-user-info .name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-info .email {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user .chev {
  width: 15px;
  height: 15px;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}
.user-menu {
  position: absolute;
  bottom: 62px;
  left: 14px;
  right: 14px;
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.user-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 12px 14px;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
}
.user-menu button:hover {
  background: var(--danger-bg);
}

/* ---------------------------------------------------------------------
   Contenido principal
   --------------------------------------------------------------------- */
#app-content {
  flex: 1;
  min-width: 0;
}
#content-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 245, 249, 0.85);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 30;
}
#btn-mobile-menu {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  color: var(--ink);
}
.topbar-greeting {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}
.topbar-date {
  font-size: 12.5px;
  color: var(--mist);
  text-transform: capitalize;
}

#app-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 36px 90px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.page-subtitle {
  color: var(--mist);
  font-size: 14px;
  margin: 0 0 28px;
}

/* ---------------------------------------------------------------------
   Biblioteca de cursos (alumno)
   --------------------------------------------------------------------- */
.course-row {
  display: flex;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  align-items: center;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.course-row:hover {
  box-shadow: var(--shadow);
  border-color: #dbe1ea;
  transform: translateY(-2px);
}
.course-thumb {
  width: 156px;
  height: 104px;
  border-radius: var(--radius);
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 -30px 30px -10px rgba(0, 0, 0, 0.25);
}
.course-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 140% at 15% 0%, rgba(255, 255, 255, 0.3), transparent 55%);
}
.course-thumb-icon {
  position: relative;
  z-index: 1;
  width: 40%;
  height: 40%;
  color: #fff;
  opacity: 0.92;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.28));
}
.course-row-body {
  flex: 1;
  min-width: 0;
}
.course-row-body h3 {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
}
.progress-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
  max-width: 420px;
}
.progress-track {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: var(--line-soft);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--orange-500), #ff7a4d);
}
.progress-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--slate);
  width: 32px;
  flex-shrink: 0;
  text-align: right;
}
.course-row-body p {
  margin: 0;
  font-size: 13px;
  color: var(--slate);
  line-height: 1.6;
  max-width: 620px;
}
.course-row-action {
  flex-shrink: 0;
}
.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--mist);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}
.empty-state .icon {
  font-size: 38px;
  margin-bottom: 14px;
}

.stat-chips {
  display: flex;
  gap: 10px;
}
.stat-chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--slate);
  font-weight: 600;
}
.stat-chip strong {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink);
  display: block;
}

/* ---------------------------------------------------------------------
   Biblioteca — video de bienvenida
   --------------------------------------------------------------------- */
.welcome-section {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 44px;
}
.welcome-copy h2 {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  line-height: 1.28;
}
.welcome-copy p {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.7;
  margin: 0;
}
.welcome-video-wrap {
  background: #0b0e14;
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.welcome-video-wrap video {
  width: 100%;
  height: 100%;
}

/* ---------------------------------------------------------------------
   Biblioteca — galería "Activa tu mentalidad"
   --------------------------------------------------------------------- */
.mindset-section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.mindset-section h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 10px;
}
.mindset-section > p {
  font-size: 13.5px;
  color: var(--slate);
  line-height: 1.65;
  max-width: 720px;
  margin: 0 0 26px;
}
.mindset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.mindset-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.mindset-video-wrap {
  background: #0b0e14;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mindset-video-wrap video {
  width: 100%;
  height: 100%;
}
.mindset-card-body {
  padding: 16px 18px;
}
.mindset-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-700);
  background: var(--blue-100);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 9px;
}
.mindset-card-body h4 {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
}

/* ---------------------------------------------------------------------
   Admin — Portada (settings)
   --------------------------------------------------------------------- */
.settings-card {
  padding: 24px 26px;
  margin-bottom: 20px;
}
.settings-card h3 {
  font-family: var(--font-display);
  font-size: 15.5px;
  margin: 0 0 4px;
}
.settings-hint {
  font-size: 12.5px;
  color: var(--mist);
  margin: 0 0 18px;
}
.mindset-admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.mindset-admin-row:first-child {
  border-top: none;
}
.mindset-admin-row .mv-title {
  flex: 1;
  min-width: 0;
}
.mindset-admin-row .mv-title strong {
  display: block;
  font-size: 13.5px;
}
.mindset-admin-row .mv-title span {
  font-size: 11.5px;
  color: var(--mist);
}

/* ---------------------------------------------------------------------
   Reproductor de curso
   --------------------------------------------------------------------- */
.course-player {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}
.player-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 96px;
  box-shadow: var(--shadow-sm);
}
.player-sidebar-header {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}
.player-sidebar-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
}
.module-block {
  border-bottom: 1px solid var(--line);
}
.module-block:last-child {
  border-bottom: none;
}
.module-title {
  padding: 12px 18px;
  font-weight: 700;
  font-size: 11.5px;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--blue-50);
}
.lesson-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 18px;
  font-size: 13.5px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s ease;
}
.lesson-item:hover {
  background: var(--blue-50);
}
.lesson-item.active {
  background: var(--blue-100);
  border-left-color: var(--blue-600);
  font-weight: 700;
}
.lesson-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
}
.lesson-check.done {
  background: var(--success);
  border-color: var(--success);
}
.lesson-duration {
  margin-left: auto;
  font-size: 11px;
  color: var(--mist);
  flex-shrink: 0;
}
.player-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.video-wrap {
  background: #0b0e14;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-wrap video {
  width: 100%;
  height: 100%;
}
.video-placeholder {
  color: #7d8797;
  font-size: 13px;
  text-align: center;
  padding: 20px;
  line-height: 1.6;
}
.video-error-box {
  color: #d7dbe3;
  font-size: 12.5px;
  text-align: left;
  padding: 22px 28px;
  line-height: 1.65;
  max-width: 480px;
}
.video-error-box strong {
  display: block;
  color: #fff;
  font-size: 14px;
  margin-bottom: 8px;
}
.video-error-box code {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11.5px;
  word-break: break-all;
}
.video-error-box ol {
  margin: 10px 0 0;
  padding-left: 18px;
}
.video-error-box li {
  margin-bottom: 4px;
}
.player-info {
  padding: 22px 26px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.player-info h2 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 0 0 4px;
}
.player-info .module-name {
  font-size: 11.5px;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.player-nav {
  display: flex;
  gap: 10px;
  padding: 0 26px 26px;
}

/* ---------------------------------------------------------------------
   Admin — tablas y tarjetas
   --------------------------------------------------------------------- */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  gap: 12px;
  flex-wrap: wrap;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
thead th {
  text-align: left;
  padding: 13px 18px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mist);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: var(--blue-50);
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.badge-admin {
  background: var(--blue-100);
  color: var(--blue-700);
}
.badge-alumno {
  background: #f1f5f9;
  color: #475569;
}
.badge-activo {
  background: var(--success-bg);
  color: #027a48;
}
.badge-inactivo {
  background: var(--danger-bg);
  color: #b42318;
}
.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.icon-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
}
.icon-btn:hover {
  background: #fff;
  border-color: #cfd6e0;
  color: var(--ink);
}

.course-admin-card {
  padding: 20px;
  margin-bottom: 14px;
  transition: box-shadow 0.15s ease;
}
.course-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.course-admin-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
}
.course-admin-head .meta {
  font-size: 12px;
  color: var(--mist);
  margin-top: 3px;
}
.icon-btn-square {
  background: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
  font-size: 13px;
  line-height: 1;
}
.icon-btn-square:hover:not(:disabled) {
  background: #fff;
  border-color: #cfd6e0;
  color: var(--ink);
}
.icon-btn-square:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.course-admin-body {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.module-admin-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  margin-bottom: 10px;
  background: var(--blue-50);
}
.module-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}
.module-admin-head strong {
  font-size: 13.5px;
  font-family: var(--font-display);
}
.lesson-admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  border-top: 1px solid var(--line);
}
.lesson-admin-row:first-of-type {
  border-top: none;
}
.lesson-admin-row .title {
  flex: 1;
}
.lesson-admin-row .dur {
  color: var(--mist);
  font-size: 11.5px;
}

/* ---------------------------------------------------------------------
   Modal
   --------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 25, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.modal h2 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: 18px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.modal-actions .btn {
  flex: 1;
}
.checkbox-list {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line-soft);
}
.checkbox-row:last-child {
  border-bottom: none;
}
.checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue-600);
}

/* ---------------------------------------------------------------------
   Subida de archivos (video / imagen) dentro de los modales
   --------------------------------------------------------------------- */
.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.upload-row input[type="file"] {
  display: none;
}
.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.upload-status {
  font-size: 12px;
  color: var(--slate);
  font-weight: 600;
}
.upload-status.uploading {
  color: var(--blue-600);
}
.upload-status.success {
  color: var(--success);
}
.upload-status.error {
  color: var(--danger);
}
.upload-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 10px;
  font-size: 11px;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.upload-divider::before,
.upload-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.cover-preview {
  width: 100%;
  height: 90px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  margin-top: 10px;
  display: none;
}
.cover-preview.visible {
  display: block;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  z-index: 200;
  box-shadow: var(--shadow-lg);
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .auth-brand-panel {
    display: none;
  }
}

@media (max-width: 900px) {
  #app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  #app-sidebar.open {
    transform: translateX(0);
  }
  #btn-mobile-menu {
    display: inline-flex;
  }
  #app-main {
    padding: 24px 18px 80px;
  }
  #content-topbar {
    padding: 14px 18px;
  }
  .course-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .course-thumb {
    width: 100%;
    height: 140px;
  }
  .course-player {
    grid-template-columns: 1fr;
  }
  .player-sidebar {
    position: static;
  }
  .welcome-section {
    grid-template-columns: 1fr;
  }
  .mindset-grid {
    grid-template-columns: 1fr;
  }
}
