/* =============================================================
   LFS Capacitaciones — Identidad visual oficial
   Pantone 485 C · Pantone 7459 C · Pantone 7458 C · Sofia Sans
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Sofia+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --lfs-red:      #DA291C;   /* Pantone 485 C  */
  --lfs-red-dark: #B5200F;
  --lfs-blue:     #5B9BD5;   /* Pantone 7459 C */
  --lfs-blue-lt:  #9DC3E6;   /* Pantone 7458 C */
  --lfs-black:    #1A1A1A;
  --lfs-gray:     #9B9B9B;
  --lfs-bg:       #F5F5F5;
  --lfs-white:    #FFFFFF;
}

/* ── Base ───────────────────────────────────────────── */
body {
  background-color: var(--lfs-bg);
  font-family: 'Sofia Sans', system-ui, sans-serif;
  color: var(--lfs-black);
}

h1, h2, h3, h4, h5, h6 { font-family: 'Sofia Sans', sans-serif; font-weight: 700; }

/* ── Logo SVG mark ──────────────────────────────────── */
.lfs-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.lfs-mark-icon {
  flex-shrink: 0;
}
.lfs-mark-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.lfs-mark-text .brand-name {
  font-family: 'Sofia Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  letter-spacing: .5px;
}
.lfs-mark-text .brand-sub {
  font-family: 'Sofia Sans', sans-serif;
  font-weight: 300;
  font-size: .65rem;
  color: rgba(255,255,255,.65);
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ── Navbar ─────────────────────────────────────────── */
.navbar-lfs {
  background-color: var(--lfs-black);
  border-bottom: 3px solid var(--lfs-red);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  padding: .6rem 1.5rem;
}
.navbar-lfs .navbar-brand { padding: 0; }
.navbar-lfs .badge-admin {
  background: var(--lfs-red) !important;
  color: white;
  font-family: 'Sofia Sans', sans-serif;
  font-weight: 600;
  letter-spacing: .3px;
}
.navbar-lfs .btn-outline-light {
  border-color: rgba(255,255,255,.3);
  color: rgba(255,255,255,.8);
  font-size: .85rem;
}
.navbar-lfs .btn-outline-light:hover {
  background: var(--lfs-red);
  border-color: var(--lfs-red);
  color: white;
}

/* ── Login ──────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  background-color: var(--lfs-red);
  background-image:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.08) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(0,0,0,.15) 0%, transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 100%;
  max-width: 420px;
  border: none;
  border-radius: 4px;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
}
.login-card .card-body { padding: 2.5rem; }
.login-logo-wrap { margin-bottom: 1.75rem; }
.login-logo-wrap img {
  filter: brightness(0) saturate(100%) invert(21%) sepia(96%) saturate(2000%) hue-rotate(349deg) brightness(90%);
  display: block;
  margin: 0 auto .1rem;
}
.login-subtitle {
  color: var(--lfs-gray);
  font-size: .82rem;
  font-weight: 400;
  letter-spacing: .1px;
  line-height: 1.55;
  max-width: 340px;
  margin: .4rem auto 0;
}
.login-card .form-control {
  border-radius: 3px;
  border-color: #E0E0E0;
  font-family: 'Sofia Sans', sans-serif;
  font-size: .95rem;
}
.login-card .form-control:focus {
  border-color: var(--lfs-red);
  box-shadow: 0 0 0 3px rgba(218,41,28,.12);
}
.login-card .btn-primary {
  background: var(--lfs-red);
  border-color: var(--lfs-red);
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: .65rem;
}
.login-card .btn-primary:hover {
  background: var(--lfs-red-dark);
  border-color: var(--lfs-red-dark);
}
.login-divider {
  color: #E0E0E0;
  font-size: .75rem;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ── Botones globales ───────────────────────────────── */
.btn-primary {
  background-color: var(--lfs-red);
  border-color: var(--lfs-red);
  font-family: 'Sofia Sans', sans-serif;
  font-weight: 600;
  border-radius: 3px;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--lfs-red-dark);
  border-color: var(--lfs-red-dark);
}
.btn-outline-primary {
  color: var(--lfs-red);
  border-color: var(--lfs-red);
}
.btn-outline-primary:hover {
  background-color: var(--lfs-red);
  border-color: var(--lfs-red);
}
.btn { font-family: 'Sofia Sans', sans-serif; }

/* ── Cards de capacitaciones ────────────────────────── */
.course-card {
  border: none;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  transition: transform .2s, box-shadow .2s;
  height: 100%;
}
.course-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.course-card .card-header {
  background-color: var(--lfs-black);
  color: white;
  border-radius: 4px 4px 0 0 !important;
  padding: 1.1rem 1.4rem;
  border-bottom: 3px solid var(--lfs-red);
}
.course-card .card-header h6 { font-weight: 700; margin: 0; font-size: 1rem; }

/* ── Módulos ────────────────────────────────────────── */
.module-item {
  border: 1px solid #E8E8E8;
  border-left: 3px solid transparent;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: .6rem;
  background: white;
  transition: border-color .15s, border-left-color .15s;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}
.module-item:hover {
  border-left-color: var(--lfs-red);
  border-color: #D0D0D0;
  color: inherit;
}
.module-icon {
  width: 40px; height: 40px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.icon-youtube  { background: #FFEBEE; color: #DA291C; }
.icon-video    { background: #E3F2FD; color: #1565C0; }
.icon-pdf      { background: #FFEBEE; color: #C62828; }
.icon-pptx     { background: #FFF3E0; color: #E65100; }
.icon-link     { background: #F5F5F5; color: #555;    }
.completed-badge {
  font-size: .72rem;
  background: #F5F5F5;
  color: #555;
  border: 1px solid #E0E0E0;
  padding: .2rem .6rem;
  border-radius: 2px;
  white-space: nowrap;
}

/* ── Visor de contenido ─────────────────────────────── */
.content-viewer {
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16/9;
  width: 100%;
}
.content-viewer iframe,
.content-viewer video { width: 100%; height: 100%; border: none; }
.pdf-viewer { width: 100%; height: 70vh; border: none; border-radius: 4px; }

/* ── Admin sidebar ──────────────────────────────────── */
.admin-layout { display: flex; min-height: calc(100vh - 59px); }
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background-color: var(--lfs-black);
  padding: 1.25rem 0;
  border-right: 1px solid rgba(255,255,255,.06);
}
.admin-sidebar .nav-link {
  color: rgba(255,255,255,.6);
  padding: .55rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .875rem;
  font-weight: 500;
  transition: all .15s;
  border-left: 3px solid transparent;
}
.admin-sidebar .nav-link:hover {
  background: rgba(255,255,255,.06);
  color: white;
}
.admin-sidebar .nav-link.active {
  background: rgba(218,41,28,.12);
  color: white;
  border-left-color: var(--lfs-red);
}
.admin-sidebar .nav-section {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,.3);
  padding: 1rem 1.25rem .4rem;
  font-weight: 600;
}
.admin-main { flex: 1; padding: 2rem; overflow-x: hidden; }

/* ── Stat cards ─────────────────────────────────────── */
.stat-card {
  border: none;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}

/* ── Tablas ─────────────────────────────────────────── */
.table-card {
  border: none;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  overflow: hidden;
}
.table-card .table { margin: 0; }
.table-card .table thead th {
  background: #F5F5F5;
  border: none;
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: .9rem 1.25rem;
  color: #555;
}
.table-card .table tbody td {
  padding: .85rem 1.25rem;
  vertical-align: middle;
  border-color: #F0F0F0;
  font-size: .9rem;
}

/* ── Badges ─────────────────────────────────────────── */
.badge-active   { background: #F0FAF0; color: #2E7D32; border: 1px solid #C8E6C9; }
.badge-inactive { background: #FFF0EF; color: #C62828; border: 1px solid #FFCDD2; }
.badge-admin    { background: #FFF0EF; color: var(--lfs-red); border: 1px solid #FFCDD2; }

/* ── Evaluaciones ───────────────────────────────────── */
.quiz-container { max-width: 740px; margin: 0 auto; }
.question-card  {
  border: none;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  margin-bottom: 1.25rem;
}
.question-card .card-header {
  background: #F5F5F5;
  border-bottom: 1px solid #E8E8E8;
  border-radius: 4px 4px 0 0 !important;
}
.choice-label {
  cursor: pointer;
  padding: .7rem 1rem;
  border: 2px solid #E8E8E8;
  border-radius: 3px;
  margin-bottom: .4rem;
  transition: all .15s;
  display: block;
}
.choice-label:hover { border-color: var(--lfs-blue); background: #F0F6FC; }

.result-circle {
  width: 120px; height: 120px;
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  margin: 0 auto; font-weight: 800;
}
.result-pass { background: #F0FAF0; color: #2E7D32; border: 4px solid #4CAF50; }
.result-fail { background: #FFF0EF; color: #C62828; border: 4px solid var(--lfs-red); }
.answer-correct { background: #F0FAF0 !important; border-left: 4px solid #4CAF50; }
.answer-wrong   { background: #FFF0EF !important; border-left: 4px solid var(--lfs-red); }

/* ── Breadcrumb ─────────────────────────────────────── */
.breadcrumb { background: none; padding: 0; margin-bottom: 1.5rem; }
.breadcrumb-item a { color: var(--lfs-red); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* ── Alertas ────────────────────────────────────────── */
.alert { border-radius: 3px; font-size: .9rem; }

/* ── Cards genéricas ────────────────────────────────── */
.card { border-radius: 4px; }
.card.border-0.shadow-sm { box-shadow: 0 2px 12px rgba(0,0,0,.07) !important; }

/* ── Dashboard filtros sidebar ──────────────────────── */
.filter-sidebar .card {
  border-radius: 4px;
  border: 1px solid #E8E8E8;
  box-shadow: 0 2px 8px rgba(0,0,0,.05) !important;
}
.filter-sidebar .card-header {
  background: var(--lfs-black);
  color: white;
  border-radius: 3px 3px 0 0;
  padding: .75rem 1rem;
}
.filter-sidebar .card-header h6 { font-size: .8rem; letter-spacing: .4px; }
.filter-nav-link {
  font-size: .875rem;
  color: var(--lfs-black);
  border-left: 3px solid transparent;
  padding: .35rem .75rem;
  border-radius: 0 3px 3px 0;
  display: block;
  transition: all .15s;
  text-decoration: none;
}
.filter-nav-link:hover { background: #F5F5F5; color: var(--lfs-black); }
.filter-nav-link.active {
  color: var(--lfs-red);
  border-left-color: var(--lfs-red);
  background: #FFF0EF;
  font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-sidebar { width: 200px; }
  .admin-main    { padding: 1rem; }
}
@media (max-width: 576px) {
  .admin-layout  { flex-direction: column; }
  .admin-sidebar { width: 100%; }
}
