/* ============================================================
   AULA VIRTUAL — CUERPO DE BOMBEROS PAUTÉ
   Paleta: rojo #800b01, crema #FFFFFF, Montserrat
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --rojo:       #800b01;
  --rojo-dk:    #5c0800;
  --rojo-lt:    rgba(128,11,1,0.08);
  --crema:      #FFFFFF;
  --crema-bd:   #E8DEDD;
  --texto:      #1A0400;
  --muted:      #7a6562;
  --blanco:     #ffffff;
  --success:    #2e7d32;
  --warning:    #f59e0b;
  --danger:     #c62828;
  --shadow:     0 2px 10px rgba(128,11,1,0.08);
  --shadow-lg:  0 6px 24px rgba(128,11,1,0.14);
  --radius:     12px;
  --transition: all 0.22s ease;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  background: var(--crema);
  color: var(--texto);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--rojo); }
a:hover { text-decoration: underline; }

/* ─── Layout dashboard ───────────────────────────────────── */
.dashboard { display: flex; min-height: 100vh; }

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  background: var(--rojo-dk);
  color: #fff;
  width: 250px;
  position: fixed;
  left: 0; top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  text-align: center;
}

.sidebar-header img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  margin-bottom: 10px;
  filter: brightness(0) invert(1);
}

.sidebar-header i {
  font-size: 38px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 10px;
  display: block;
}

.sidebar-header h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 3px;
}

.sidebar-header p {
  font-size: 11px;
  opacity: 0.65;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-menu {
  list-style: none;
  padding: 12px 0;
  flex: 1;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 18px;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}

.sidebar-menu li a i { font-size: 14px; width: 16px; flex-shrink: 0; }

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-left-color: rgba(255,255,255,0.7);
}

/* ─── Main content ───────────────────────────────────────── */
.main-content {
  margin-left: 250px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Topbar ─────────────────────────────────────────────── */
.topbar {
  background: var(--blanco);
  border-bottom: 1px solid var(--crema-bd);
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(128,11,1,0.06);
}

.topbar-left h1 {
  font-size: 17px;
  font-weight: 700;
  color: var(--texto);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100vw - 360px);
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

.user-info { display: flex; align-items: center; gap: 10px; }

.user-avatar {
  width: 36px; height: 36px;
  background: var(--rojo);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

.user-details { display: flex; flex-direction: column; }
.user-name  { font-size: 13px; font-weight: 700; color: var(--texto); line-height: 1.2; }
.user-role  { font-size: 11px; color: var(--muted); }

/* ─── Content area ───────────────────────────────────────── */
.content { padding: 20px 24px; flex: 1; }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--blanco);
  border-radius: var(--radius);
  border: 1.5px solid var(--crema-bd);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--crema-bd);
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--texto);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i { color: var(--rojo); }
.card-body { padding: 18px; }

/* ─── Botones ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  justify-content: center;
}

.btn-primary {
  background: var(--rojo);
  color: #fff;
  box-shadow: 0 3px 10px rgba(128,11,1,0.25);
}
.btn-primary:hover { background: var(--rojo-dk); transform: translateY(-1px); text-decoration: none; color: #fff; }

.btn-secondary {
  background: var(--crema);
  color: var(--texto);
  border: 1.5px solid var(--crema-bd);
}
.btn-secondary:hover { border-color: var(--rojo); color: var(--rojo); text-decoration: none; }

.btn-success  { background: var(--success); color: #fff; }
.btn-success:hover { opacity: 0.88; color: #fff; text-decoration: none; }

.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover  { opacity: 0.88; color: #fff; text-decoration: none; }

.btn-block { width: 100%; display: flex; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 6px; }

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 700; line-height: 1.4;
}
.badge-success { background: #e8f5e9; color: var(--success); }
.badge-danger  { background: #ffebee; color: var(--danger); }
.badge-warning { background: #fff8e1; color: #b45309; }
.badge-info    { background: #e3f2fd; color: #1565c0; }

/* ─── Alertas ────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-radius: 10px;
  font-size: 13px; margin-bottom: 16px; line-height: 1.5;
}
.alert i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #e8f5e9; color: var(--success); border-left: 4px solid var(--success); }
.alert-danger  { background: #ffebee; color: var(--danger);  border-left: 4px solid var(--danger); }
.alert-warning { background: #fff8e1; color: #b45309;        border-left: 4px solid var(--warning); }
.alert-info    { background: #e3f2fd; color: #1565c0;        border-left: 4px solid #1565c0; }

/* ─── Tablas ─────────────────────────────────────────────── */
.table-container, .table-responsive { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
table thead { background: var(--crema); }
table th {
  padding: 10px 14px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); text-align: left;
  border-bottom: 2px solid var(--crema-bd);
  white-space: nowrap;
}
table td {
  padding: 11px 14px;
  font-size: 13px; color: var(--texto);
  border-bottom: 1px solid var(--crema-bd);
  vertical-align: middle;
}
table tbody tr:hover { background: var(--crema); }
table tbody tr:last-child td { border-bottom: none; }

/* ─── Formularios ────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--texto); margin-bottom: 5px; text-transform: uppercase;
  letter-spacing: 0.4px;
}
.form-control {
  width: 100%; padding: 9px 13px;
  border: 1.5px solid var(--crema-bd);
  border-radius: 8px; font-family: 'Montserrat', sans-serif;
  font-size: 13px; color: var(--texto);
  background: #fff; transition: border-color 0.2s;
  outline: none;
}
.form-control:focus { border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(128,11,1,0.08); }
textarea.form-control { resize: vertical; min-height: 90px; }

/* ─── Progress bars ──────────────────────────────────────── */
.progress-bar {
  background: #F0ECEC; border-radius: 8px;
  height: 8px; overflow: hidden; margin: 6px 0;
}
.progress-fill {
  height: 100%; background: var(--rojo);
  border-radius: 8px; transition: width 0.4s ease;
}

/* ─── Course cards ───────────────────────────────────────── */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 16px;
}

.course-card {
  background: var(--blanco);
  border: 1.5px solid var(--crema-bd);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: var(--transition);
}
.course-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--rojo);
}

.course-image {
  width: 100%; height: 150px;
  background: linear-gradient(135deg, var(--rojo-dk), var(--rojo));
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: rgba(255,255,255,0.55);
  position: relative; overflow: hidden;
  background-size: cover; background-position: center;
}

.course-content { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.course-description {
  font-size: 12px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.5; margin: 0;
}

.course-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 11px; color: var(--muted);
}
.course-meta span { display: flex; align-items: center; gap: 4px; }
.course-meta i { color: var(--rojo); font-size: 10px; }

/* ─── Login page ─────────────────────────────────────────── */
.login-bg {
  min-height: 100vh;
  background: linear-gradient(155deg, var(--rojo-dk) 0%, var(--rojo) 60%, #1A0400 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.login-wrap {
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}

.login-logo { text-align: center; }
.login-logo img {
  height: 72px; object-fit: contain;
  filter: brightness(0) invert(1); margin-bottom: 12px;
}
.login-logo h1 {
  font-size: 18px; font-weight: 800; color: #fff; letter-spacing: 0.3px;
}
.login-logo p { font-size: 12px; color: rgba(255,255,255,0.65); margin-top: 3px; }

.login-card {
  background: #fff;
  border-radius: 18px;
  padding: 32px 30px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  position: relative;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 32px;
  width: 48px; height: 4px;
  background: var(--rojo);
  border-radius: 0 0 4px 4px;
}

.login-card h2 {
  font-size: 20px; font-weight: 800;
  color: var(--texto); margin-bottom: 4px;
}
.login-card .login-sub {
  font-size: 12px; color: var(--muted); margin-bottom: 22px;
}

.input-group {
  position: relative; margin-bottom: 14px;
}
.input-group i {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--rojo); font-size: 13px;
}
.input-group input {
  width: 100%; padding: 10px 13px 10px 36px;
  border: 1.5px solid var(--crema-bd);
  border-radius: 9px; font-family: 'Montserrat', sans-serif;
  font-size: 13px; outline: none; transition: border-color 0.2s;
}
.input-group input:focus { border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(128,11,1,0.08); }

.login-card .btn-primary { width: 100%; padding: 11px; font-size: 14px; margin-top: 4px; }
.login-divider {
  text-align: center; font-size: 12px; color: var(--muted);
  margin: 16px 0; position: relative;
}
.login-divider::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  width: 100%; height: 1px; background: var(--crema-bd);
}
.login-divider span { background: #fff; padding: 0 10px; position: relative; z-index: 1; }

.login-back {
  text-align: center; color: var(--muted); font-size: 12px;
}
.login-back a { color: rgba(255,255,255,0.8); font-weight: 600; text-decoration: none; }
.login-back a:hover { color: #fff; }

.login-footer {
  text-align: center; color: rgba(255,255,255,0.45); font-size: 11px;
}

/* ─── Empty state ────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-state i { font-size: 64px; color: var(--crema-bd); margin-bottom: 16px; display: block; }
.empty-state p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

/* ─── Modal ──────────────────────────────────────────────── */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(26,4,0,0.5); z-index: 9000;
  align-items: center; justify-content: center; padding: 16px;
}
.modal.active, .modal.show { display: flex; }
.modal-content {
  background: #fff; border-radius: 16px;
  padding: 28px; width: 100%; max-width: 480px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  position: relative;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.modal-header h2 { font-size: 17px; font-weight: 700; color: var(--texto); }
.modal-close {
  background: none; border: none; font-size: 20px;
  color: var(--muted); cursor: pointer; line-height: 1;
}

/* ─── Scrollbar personalizado ────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--crema); }
::-webkit-scrollbar-thumb { background: rgba(128,11,1,0.3); border-radius: 3px; }

/* ─── Mobile menu toggle ─────────────────────────────────── */
.mobile-menu-toggle {
  display: none;
  position: fixed; top: 14px; left: 14px;
  z-index: 1100;
  background: var(--rojo); color: #fff;
  border: none; border-radius: 8px;
  width: 40px; height: 40px;
  font-size: 16px; cursor: pointer;
  align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(128,11,1,0.35);
}

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 999;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .mobile-menu-toggle { display: flex; }

  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }
  .sidebar-overlay.active { display: block; }

  .main-content { margin-left: 0; }
  .topbar { padding-left: 62px; }
}

@media (max-width: 600px) {
  .content { padding: 12px 14px; }
  .topbar-left h1 { font-size: 14px; }
  .user-details { display: none; }
  .courses-grid { grid-template-columns: 1fr; gap: 12px; padding: 12px; }
}

/* ─── Utilidades ─────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-100 { width: 100%; }

/* ─── Stats grid (estudiante dashboard) ──────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--blanco);
  border: 1.5px solid var(--crema-bd);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
}

.stat-icon {
  width: 44px; height: 44px;
  background: var(--rojo-lt);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--rojo); font-size: 18px; flex-shrink: 0;
}

.stat-details h3 {
  font-size: 22px; font-weight: 800; color: var(--rojo); line-height: 1;
}
.stat-details p {
  font-size: 11px; color: var(--muted); margin-top: 3px;
}

/* ─── Perfil ─────────────────────────────────────────────── */
.profile-header {
  display: flex; align-items: center; gap: 20px;
  padding: 20px; background: var(--blanco);
  border-radius: var(--radius); border: 1.5px solid var(--crema-bd);
  margin-bottom: 20px;
}

.profile-avatar {
  width: 80px; height: 80px;
  background: var(--rojo); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 32px; font-weight: 800;
  flex-shrink: 0; overflow: hidden;
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-info h2 { font-size: 18px; font-weight: 800; color: var(--texto); margin-bottom: 3px; }
.profile-info p  { font-size: 12px; color: var(--muted); }

/* ─── Certificate card ───────────────────────────────────── */
.cert-card {
  background: var(--blanco);
  border: 2px solid var(--crema-bd);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
}
.cert-card:hover { border-color: var(--rojo); box-shadow: var(--shadow); }

.cert-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--rojo-dk), var(--rojo));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; flex-shrink: 0;
}

.cert-info { flex: 1; min-width: 0; }
.cert-title { font-size: 14px; font-weight: 700; color: var(--texto); margin-bottom: 3px; }
.cert-meta  { font-size: 11px; color: var(--muted); }
.cert-code  {
  font-size: 10px; font-family: 'Courier New', monospace;
  background: var(--crema); color: var(--muted);
  padding: 2px 7px; border-radius: 4px; margin-top: 4px;
  display: inline-block;
}

/* ─── Evaluación ─────────────────────────────────────────── */
.eval-header {
  background: linear-gradient(135deg, var(--rojo-dk), var(--rojo));
  color: #fff; padding: 28px 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  text-align: center;
}
.eval-header h1 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.eval-header h2 { font-size: 16px; font-weight: 400; opacity: 0.9; margin-bottom: 16px; }
.eval-header p  { font-size: 13px; opacity: 0.8; }

.eval-info {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-top: 18px;
}
.eval-info-item {
  background: rgba(255,255,255,0.15);
  padding: 14px; border-radius: 10px; text-align: center;
}
.eval-info-item i { font-size: 22px; display: block; margin-bottom: 8px; }
.eval-info-item strong { display: block; font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.eval-info-item div   { font-size: 12px; opacity: 0.9; }

.pregunta-card {
  background: var(--blanco);
  border: 1.5px solid var(--crema-bd);
  border-left: 4px solid var(--rojo);
  border-radius: var(--radius);
  padding: 22px; margin-bottom: 16px;
}

.pregunta-numero {
  display: inline-block;
  background: var(--rojo); color: #fff;
  padding: 4px 14px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  margin-bottom: 12px;
}

.pregunta-texto {
  font-size: 15px; font-weight: 600;
  color: var(--texto); margin-bottom: 16px; line-height: 1.55;
}

.opciones-container { display: flex; flex-direction: column; gap: 10px; }

.opcion-label {
  display: flex; align-items: center;
  padding: 13px 16px;
  background: var(--crema);
  border: 1.5px solid var(--crema-bd);
  border-radius: 10px; cursor: pointer;
  transition: var(--transition);
}
.opcion-label:hover { background: #fff; border-color: var(--rojo); }
.opcion-label input { width: 18px; height: 18px; margin-right: 12px; accent-color: var(--rojo); cursor: pointer; }
.opcion-label span  { font-size: 14px; color: var(--texto); line-height: 1.4; }
.opcion-label input:checked + span { font-weight: 700; color: var(--rojo); }

.submit-section {
  background: var(--blanco);
  border: 1.5px solid var(--crema-bd);
  border-radius: var(--radius);
  padding: 24px; margin-top: 24px; text-align: center;
}

.progress-counter {
  font-size: 14px; color: var(--muted);
  background: var(--crema); padding: 12px 20px;
  border-radius: 8px; display: inline-block; margin-bottom: 18px;
}
.progress-counter span { font-weight: 800; color: var(--rojo); font-size: 16px; }

/* ─── Resultado evaluación ───────────────────────────────── */
.resultado-box {
  text-align: center; padding: 32px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.resultado-box.aprobado {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border: 2px solid #a5d6a7;
}
.resultado-box.reprobado {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  border: 2px solid #ef9a9a;
}
.resultado-nota {
  font-size: 72px; font-weight: 900; line-height: 1;
  margin: 12px 0;
}
.resultado-box.aprobado .resultado-nota { color: var(--success); }
.resultado-box.reprobado .resultado-nota { color: var(--danger); }

/* ─── Video player sidebar reuse ─────────────────────────── */
.sidebar-section {
  background: var(--blanco);
  border: 1.5px solid var(--crema-bd);
  border-radius: var(--radius);
  padding: 16px;
}
.sidebar-section-title {
  font-size: 13px; font-weight: 700; color: var(--texto);
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 10px; border-bottom: 1px solid var(--crema-bd);
  margin-bottom: 12px;
}
.sidebar-section-title i { color: var(--rojo); }

.progress-big-num {
  font-size: 42px; font-weight: 900;
  color: var(--rojo); text-align: center; line-height: 1;
}
.progress-sub { text-align: center; color: var(--muted); font-size: 12px; margin: 4px 0 10px; }

.evaluation-box {
  background: linear-gradient(135deg, var(--rojo-dk), var(--rojo));
  padding: 16px; border-radius: 10px; color: #fff; text-align: center;
}
.evaluation-box h4 { font-size: 14px; margin-bottom: 6px; }
.evaluation-box p  { font-size: 12px; opacity: 0.9; margin-bottom: 10px; }

.evaluation-info {
  background: rgba(255,255,255,0.15); padding: 10px 12px;
  border-radius: 8px; margin: 10px 0; font-size: 12px;
}
.evaluation-info-row {
  display: flex; justify-content: space-between; margin-bottom: 5px;
}
.evaluation-info-row:last-child { margin-bottom: 0; }

.evaluation-locked {
  background: var(--crema); border: 1.5px solid var(--crema-bd);
  border-radius: 10px; padding: 14px; margin: 8px 0;
  text-align: center; font-size: 12px; color: var(--muted);
}

.evaluation-progress  { background: #F0ECEC; height: 8px; border-radius: 8px; overflow: hidden; margin: 8px 0; }
.evaluation-progress-fill { height: 100%; background: var(--rojo); border-radius: 8px; transition: width 0.3s; }

.btn-evaluacion {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff; color: var(--rojo);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 8px; padding: 10px 18px;
  font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 700;
  text-decoration: none; width: 100%; margin-top: 10px;
  transition: var(--transition);
}
.btn-evaluacion:hover { background: var(--rojo-dk); color: #fff; border-color: var(--rojo-dk); text-decoration: none; }

/* ─── Nav button (video navigation) ─────────────────────── */
.nav-button {
  flex: 1; padding: 10px 14px;
  border: 1.5px solid var(--crema-bd);
  background: var(--blanco); border-radius: 10px;
  cursor: pointer; transition: var(--transition);
  text-align: center; text-decoration: none;
  color: var(--texto); font-weight: 600; font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.nav-button:hover:not(.disabled) {
  background: var(--rojo); color: #fff;
  border-color: var(--rojo); box-shadow: 0 4px 14px rgba(128,11,1,0.2);
  text-decoration: none;
}
.nav-button.disabled { opacity: 0.4; cursor: not-allowed; background: var(--crema); }

/* ─── Video section ──────────────────────────────────────── */
.video-section     { background: #0d0d14; border-radius: 12px 12px 0 0; }
.video-section-wrap{ border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.14); }
.video-container   {
  position: relative; padding-bottom: 56.25%; height: 0;
  background: #000; border-radius: 12px 12px 0 0; overflow: hidden;
}
@media(min-width:768px){
  .video-container { padding-bottom: 0; height: 45vh; min-height: 240px; max-height: 480px; }
}
.video-container iframe,
.video-container #ytPlayer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.video-container .yt-overlay { position: absolute; inset: 0; z-index: 15; cursor: pointer; }

.custom-player-controls {
  background: #0d0d14; padding: 8px 14px;
  display: flex; align-items: center; gap: 10px;
}
.player-btn {
  background: none; border: none; color: #fff;
  font-size: 16px; cursor: pointer; padding: 5px 7px;
  border-radius: 6px; transition: var(--transition);
}
.player-btn:hover { background: rgba(255,255,255,0.1); color: var(--rojo); }

.custom-progress-wrapper {
  flex: 1; min-width: 0; position: relative;
  height: 28px; display: flex; align-items: center; cursor: pointer;
}
.custom-progress-track {
  width: 100%; height: 5px; background: rgba(255,255,255,0.15);
  border-radius: 3px; position: relative; overflow: hidden; transition: height 0.15s;
}
.custom-progress-wrapper:hover .custom-progress-track { height: 8px; }
.custom-progress-played {
  height: 100%; background: linear-gradient(90deg, var(--rojo), #c0392b);
  border-radius: 3px; position: absolute; top: 0; left: 0; transition: width 0.3s;
}
.custom-progress-max {
  height: 100%; background: rgba(255,255,255,0.08);
  border-radius: 3px; position: absolute; top: 0; left: 0;
}
.custom-progress-thumb {
  width: 13px; height: 13px; background: var(--rojo); border-radius: 50%;
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(128,11,1,0.6); opacity: 0; transition: opacity 0.15s;
}
.custom-progress-wrapper:hover .custom-progress-thumb { opacity: 1; }

.player-time {
  color: rgba(255,255,255,0.65); font-size: 11px;
  font-family: 'Courier New', monospace; white-space: nowrap;
  min-width: 82px; text-align: center; flex-shrink: 0;
}
.player-volume-wrap { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.player-volume-slider {
  -webkit-appearance: none; width: 0; height: 4px;
  background: rgba(255,255,255,0.2); border-radius: 2px;
  outline: none; opacity: 0; transition: opacity 0.2s, width 0.2s;
}
.player-volume-wrap:hover .player-volume-slider { opacity: 1; width: 55px; }
.player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  background: #fff; border-radius: 50%; cursor: pointer;
}

.video-info {
  background: #fff; padding: 16px 18px;
  border-radius: 0 0 12px 12px;
}
.video-title     { font-size: 17px; font-weight: 700; color: var(--texto); margin-bottom: 8px; }
.video-meta      { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.video-meta-item { display: flex; align-items: center; gap: 5px; }
.video-description { color: var(--muted); line-height: 1.65; font-size: 13px; margin-bottom: 10px; }
.video-navigation  { display: flex; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--crema-bd); }

.video-progress      { background: var(--crema-bd); height: 7px; border-radius: 10px; overflow: hidden; margin: 10px 0 4px; }
.video-progress-fill { height: 100%; background: var(--rojo); border-radius: 10px; transition: width 0.3s; }

/* ─── Playlist ───────────────────────────────────────────── */
.video-playlist {
  background: var(--blanco);
  border: 1.5px solid var(--crema-bd);
  border-radius: var(--radius); overflow: hidden;
}
.video-playlist-header {
  padding: 12px 18px; border-bottom: 1px solid var(--crema-bd);
  display: flex; align-items: center; justify-content: space-between;
}
.video-playlist-header h3 {
  font-size: 13px; font-weight: 700; color: var(--texto);
  display: flex; align-items: center; gap: 7px; margin: 0;
}
.video-playlist-header h3 i { color: var(--rojo); }
.playlist-progress-text {
  font-size: 11px; color: var(--muted); font-weight: 700;
  background: var(--crema); padding: 3px 10px; border-radius: 20px;
}

.video-playlist-grid {
  display: grid; gap: 10px; padding: 12px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
@media(min-width:1100px){
  .video-playlist-grid {
    display: flex; flex-wrap: nowrap; overflow-x: auto;
    padding: 12px 14px 16px; gap: 10px;
    -webkit-overflow-scrolling: touch;
  }
  .video-playlist-grid::-webkit-scrollbar { height: 4px; }
  .video-playlist-grid::-webkit-scrollbar-thumb { background: var(--rojo); border-radius: 2px; }
  .playlist-item { flex: 0 0 160px; min-width: 0; }
}

.playlist-item {
  border-radius: 10px; border: 2px solid transparent;
  cursor: pointer; transition: var(--transition);
  overflow: hidden; background: var(--crema);
  display: flex; flex-direction: column;
}
.playlist-item:hover:not(.playlist-locked) {
  border-color: var(--rojo); background: #fff;
  transform: translateY(-2px); box-shadow: 0 4px 14px rgba(128,11,1,0.12);
}
.playlist-item.playlist-active    { border-color: var(--rojo) !important; background: rgba(128,11,1,0.04); }
.playlist-item.playlist-completed { background: #f0fbf4; border-color: #b2dfdb; }
.playlist-item.playlist-locked    { opacity: 0.5; cursor: not-allowed; }

.playlist-thumb {
  position: relative; aspect-ratio: 16/9;
  background: var(--rojo-dk); overflow: hidden; flex-shrink: 0;
}
.playlist-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.playlist-thumb-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.22);
}
.playlist-thumb-overlay i { font-size: 22px; color: #fff; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.playlist-item.playlist-completed .playlist-thumb-overlay i { color: var(--success); }
.playlist-item.playlist-active    .playlist-thumb-overlay i { color: var(--rojo); }
.playlist-item.playlist-locked    .playlist-thumb-overlay i { color: #bbb; }

.playlist-info  { padding: 7px 9px 4px; flex: 1; }
.playlist-num   { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 2px; }
.playlist-title { font-size: 12px; font-weight: 600; color: var(--texto); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 3px; }
.playlist-duration { font-size: 10px; color: var(--muted); }

.playlist-material {
  margin: 4px 9px 9px; padding: 6px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600; display: flex;
  align-items: flex-start; gap: 6px; text-decoration: none;
  line-height: 1.35; flex-shrink: 0;
}
.playlist-material i     { flex-shrink: 0; margin-top: 1px; font-size: 11px; }
.playlist-material span  { flex: 1; }
.playlist-material.unlocked   { background: #e8f5e9; color: var(--success); }
.playlist-material.unlocked:hover { background: #c8e6c9; }
.playlist-material.locked-mat { background: #f0f0f0; color: #aaa; cursor: default; }

/* ─── Toast / notificaciones ─────────────────────────────── */
.toast-container {
  position: fixed; top: 16px; right: 16px; z-index: 99999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; max-width: calc(100vw - 32px);
}
.toast {
  pointer-events: auto; min-width: 270px; max-width: 360px;
  padding: 13px 15px; border-radius: 12px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  animation: toastIn 0.35s cubic-bezier(.4,0,.2,1);
  position: relative; overflow: hidden;
}
.toast.toast-out { animation: toastOut 0.3s forwards; }
.toast-success { background: linear-gradient(135deg,#1b5e20,#2e7d32); color:#c8e6c9; }
.toast-warning { background: linear-gradient(135deg,#5c0800,#800b01); color:#fddede; }
.toast-error   { background: linear-gradient(135deg,#3e0a0a,#6a1313); color:#fddede; }
.toast-info    { background: linear-gradient(135deg,#0d1b2e,#1a2a4a); color:#e3f2fd; }
.toast-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.toast-success .toast-icon { background: rgba(76,175,80,.25); color:#81c784; }
.toast-warning .toast-icon { background: rgba(128,11,1,.25); color:#ef9a9a; }
.toast-error   .toast-icon { background: rgba(128,11,1,.3); color:#ef5350; }
.toast-info    .toast-icon { background: rgba(128,11,1,.15); color:var(--rojo); }
.toast-body  { flex: 1; min-width: 0; }
.toast-title { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.toast-message { font-size: 12px; opacity: 0.85; line-height: 1.4; }
.toast-close {
  background: none; border: none; color: inherit;
  font-size: 14px; cursor: pointer; opacity: 0.5; padding: 4px;
}
.toast-close:hover { opacity: 1; }
.toast-progress {
  position: absolute; bottom: 0; left: 0; height: 3px;
  border-radius: 0 0 12px 12px; background: rgba(255,255,255,0.3);
  animation: toastTimer linear forwards;
}
@keyframes toastIn  { from{opacity:0;transform:translateX(50px) scale(.93);} to{opacity:1;transform:none;} }
@keyframes toastOut { from{opacity:1;} to{opacity:0;transform:translateX(50px) scale(.85);} }
@keyframes toastTimer { from{width:100%;} to{width:0;} }

/* ─── Lock modal ─────────────────────────────────────────── */
.lock-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 9999;
}
.lock-modal-overlay.show { display: block; }
.lock-modal {
  display: none; position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0);
  background: #fff; padding: 32px 24px; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25); z-index: 10000;
  text-align: center; max-width: 400px; width: calc(100% - 32px);
  animation: modalBounce 0.45s ease forwards;
}
.lock-modal.show { display: block; }
@keyframes modalBounce {
  0%  { transform: translate(-50%,-50%) scale(0); }
  60% { transform: translate(-50%,-50%) scale(1.06); }
  100%{ transform: translate(-50%,-50%) scale(1); }
}
.lock-icon { font-size: 60px; color: var(--rojo); margin-bottom: 6px; }
.lock-modal h3 { color: var(--rojo); margin: 12px 0 8px; font-size: 20px; font-weight: 800; }
.lock-modal p  { color: var(--muted); margin-bottom: 16px; font-size: 14px; line-height: 1.6; }
.lock-modal-btn {
  background: linear-gradient(135deg, var(--rojo-dk), var(--rojo));
  color: #fff; border: none; padding: 11px 32px;
  border-radius: 25px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: var(--transition);
}
.lock-modal-btn:hover { transform: translateY(-2px); }

/* ─── Doc unlock panel ───────────────────────────────────── */
#docUnlockPanel {
  position: fixed; bottom: 24px; right: 24px; width: 300px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  border-left: 4px solid var(--success);
  padding: 16px; z-index: 9999; display: none;
  animation: slideInDoc 0.4s ease;
}
@keyframes slideInDoc { from{opacity:0;transform:translateX(40px);} to{opacity:1;transform:translateX(0);} }
#docUnlockPanel.show { display: block; }
.doc-panel-header { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.doc-panel-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--success), #1b5e20);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: 17px; flex-shrink: 0;
}
.doc-panel-title  { font-weight: 700; font-size: 13px; color: var(--texto); }
.doc-panel-sub    { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.doc-panel-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 9px;
  background: linear-gradient(135deg, var(--success), #1b5e20);
  color: #fff; border-radius: 8px; text-decoration: none;
  font-size: 13px; font-weight: 600; transition: opacity 0.2s;
}
.doc-panel-btn:hover { opacity: 0.88; color: #fff; text-decoration: none; }
.doc-panel-close {
  position: absolute; top: 9px; right: 11px;
  background: none; border: none; font-size: 15px;
  color: #bbb; cursor: pointer;
}
.doc-panel-close:hover { color: var(--texto); }

/* ─── Autoplay overlay ───────────────────────────────────── */
.autoplay-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,10,20,.94), rgba(0,0,0,.98));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 100; animation: overlayFadeIn 0.4s ease;
}
@keyframes overlayFadeIn { from{opacity:0;} to{opacity:1;} }
.autoplay-header { color: rgba(255,255,255,0.4); font-size: 10px; text-transform: uppercase; letter-spacing: 4px; margin-bottom: 16px; }
.autoplay-countdown {
  width: 110px; height: 110px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 900; color: #fff; margin-bottom: 18px; position: relative;
}
.autoplay-countdown svg { position: absolute; width: 110px; height: 110px; transform: rotate(-90deg); }
.autoplay-countdown svg circle.bg { fill: none; stroke: rgba(255,255,255,.07); stroke-width: 5; }
.autoplay-countdown svg circle.progress {
  fill: none; stroke: var(--rojo); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 314; stroke-dashoffset: 0;
  animation: countdownCircle 5s linear forwards;
}
.autoplay-countdown .countdown-num { position: relative; z-index: 2; line-height: 1; }
@keyframes countdownCircle { from{stroke-dashoffset:0;} to{stroke-dashoffset:314;} }
.autoplay-next-label { color: rgba(255,255,255,.35); font-size: 10px; margin-bottom: 7px; text-transform: uppercase; letter-spacing: 2px; }
.autoplay-next-name  { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 20px; max-width: 80%; text-align: center; }
.autoplay-btn-play {
  padding: 12px 32px; border-radius: 50px; font-size: 14px; font-weight: 700;
  cursor: pointer; border: none; display: flex; align-items: center; gap: 9px;
  background: linear-gradient(135deg, var(--rojo), var(--rojo-dk));
  color: #fff; box-shadow: 0 4px 20px rgba(128,11,1,0.45); transition: var(--transition);
}
.autoplay-btn-play:hover { transform: translateY(-3px) scale(1.04); }

/* ─── Progress indicator (lock modal) ───────────────────── */
.progress-indicator { background: var(--crema-bd); height: 9px; border-radius: 10px; margin: 14px 0; overflow: hidden; }
.progress-indicator-fill { height: 100%; background: linear-gradient(90deg, var(--rojo-dk), var(--rojo)); border-radius: 10px; }

/* ─── Material rows ──────────────────────────────────────── */
.video-material-row {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 9px 5px 12px; margin: 0 0 4px;
  background: #f0fbf4; border-radius: 6px;
  border-left: 3px solid var(--success);
  text-decoration: none; transition: background 0.2s;
}
.video-material-row:hover { background: #dcedc8; }
.video-material-row.locked { background: var(--crema); border-left-color: var(--crema-bd); cursor: default; }
.video-material-row .mat-row-icon    { font-size: 12px; flex-shrink: 0; }
.video-material-row.locked .mat-row-icon { color: #bbb; }
.video-material-row:not(.locked) .mat-row-icon { color: var(--success); }
.video-material-row .mat-row-text    { flex: 1; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-material-row.locked .mat-row-text { color: var(--muted); }
.video-material-row:not(.locked) .mat-row-text { color: #1b5e20; }

/* ─── Alert adicional ────────────────────────────────────── */
.alert-warning { background:#fff8e1; border:1px solid #ffe082; color:#b45309; padding:10px 14px; border-radius:8px; font-size:13px; }
.alert-success { background:#e8f5e9; border:1px solid #a5d6a7; color:var(--success); padding:10px 14px; border-radius:8px; font-size:13px; }
.alert-danger  { background:#ffebee; border:1px solid #ef9a9a; color:var(--danger);  padding:10px 14px; border-radius:8px; font-size:13px; line-height:1.5; }

.correo-admin { color: var(--rojo); font-weight: 800; text-decoration: none; }
.correo-admin:hover { text-decoration: underline; }
