/* =====================================================================
   INDUCCIÓN EDILIZIA — OpenLab Style
   Palette: #005484 (corporate blue), #ffffff, #f4f7fb
===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
  --blue:        #005484;
  --blue-dark:   #003d63;
  --blue-mid:    #0070b0;
  --blue-light:  #e8f3fa;
  --white:       #ffffff;
  --gray-50:     #f4f7fb;
  --gray-100:    #e9eef5;
  --gray-300:    #b0bec5;
  --gray-600:    #546e7a;
  --gray-800:    #263238;
  --success:     #27ae60;
  --warning:     #f39c12;
  --danger:      #e74c3c;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 4px 20px rgba(0,84,132,.10);
  --shadow-lg:   0 8px 40px rgba(0,84,132,.16);
  --transition:  all .25s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--gray-50); color: var(--gray-800); line-height: 1.6; }

/* ── VIDEO VIEWER ───────────────────────────────────────────────── */
.video-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gray-900);
  z-index: 2000;
  display: none;
  flex-direction: column;
}

.video-viewer.active {
  display: flex;
}

.viewer-header {
  height: 64px;
  background: #000;
  display: flex;
  align-items: center;
  padding: 0 24px;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.viewer-title {
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
}

.viewer-title i {
  color: var(--blue-light);
  margin-right: 12px;
  font-size: 20px;
}

.btn-close-viewer {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-viewer:hover {
  background: rgba(255,255,255,0.2);
}

.viewer-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.video-main {
  flex: 1;
  background: #000;
  position: relative;
}

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

.video-sidebar {
  width: 380px;
  background: var(--white);
  border-left: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.sidebar-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-header p {
  font-size: 13px;
  color: var(--gray-600);
}

.module-list {
  padding: 12px 0;
}

.module-item {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s;
  align-items: flex-start;
}

.module-item:hover {
  background: var(--gray-50);
}

.module-item.active {
  background: #eef7ff;
  border-left: 4px solid var(--blue);
}

.module-index {
  width: 28px;
  height: 28px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  flex-shrink: 0;
}

.module-item.active .module-index {
  background: var(--blue);
  color: #fff;
}

.module-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
  line-height: 1.4;
}

.module-status {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.module-status.pending { background: #fef3c7; color: #92400e; }
.module-status.done { background: #dcfce7; color: #166534; }

@media (max-width: 900px) {
  .viewer-content { flex-direction: column; }
  .video-sidebar { width: 100%; border-left: none; border-top: 1px solid var(--gray-200); }
  .video-main { aspect-ratio: 16 / 9; flex: none; }
}

/* ── SCROLLBAR ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

/* ═════════════════════════════════════════════════════════════════ */
/*  LOGIN PAGE                                                       */
/* ═════════════════════════════════════════════════════════════════ */
#login-page {
  min-height: 100vh;
  display: flex;
  background: var(--white);
}

.login-left {
  flex: 1;
  background: linear-gradient(160deg, var(--blue-dark) 0%, var(--blue) 50%, var(--blue-mid) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 70px;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  top: -150px; right: -200px;
}
.login-left::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -80px; left: -100px;
}
.login-left .brand { z-index: 2; }
.login-left .brand-logo {
  display: flex; align-items: center; gap: 14px; margin-bottom: 60px;
}
.brand-icon {
  width: 24px; height: 52px;
  background: transparent !important;
  border: 2px solid #fff;
  border-radius: 40px;
  display: flex !important; align-items: flex-start; justify-content: center;
  padding-top: 6px;
  position: relative;
  flex-shrink: 0;
}
.brand-icon::after {
  content: '';
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
}
.brand-name { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: 2px; }
.brand-sub  { font-size: 11px; color: rgba(255,255,255,.6); letter-spacing: 3px; text-transform: uppercase; margin-top: 2px; }

.login-tagline { z-index: 2; }
.login-tagline h1 { font-size: 42px; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 20px; }
.login-tagline h1 span { color: rgba(255,255,255,.6); display: block; font-size: 18px; font-weight: 400; margin-bottom: 8px; letter-spacing: 2px; text-transform: uppercase; }
.login-tagline p { font-size: 16px; color: rgba(255,255,255,.75); max-width: 400px; line-height: 1.7; }

.login-stats { display: flex; gap: 40px; margin-top: 60px; z-index: 2; }
.login-stat { text-align: left; }
.login-stat strong { display: block; font-size: 32px; font-weight: 800; color: #fff; }
.login-stat span { font-size: 13px; color: rgba(255,255,255,.6); }

.login-right {
  width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 60px;
  background: var(--white);
}
.login-form-header { margin-bottom: 40px; }
.login-form-header h2 { font-size: 28px; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
.login-form-header p  { font-size: 14px; color: var(--gray-600); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 8px; }
.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-100);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: var(--transition);
  outline: none;
}
.form-group input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(0,84,132,.08); }
.form-group input::placeholder { color: var(--gray-300); }

.login-hint { font-size: 12px; color: var(--gray-600); margin-top: 6px; }

.login-error {
  background: #fde8e8;
  color: var(--danger);
  border: 1px solid #f5c6c6;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  display: none;
}
.login-error.show { display: block; }

.btn-login {
  width: 100%;
  padding: 15px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  letter-spacing: .5px;
}
.btn-login:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-login i { font-size: 16px; }

.login-footer-note { margin-top: 30px; text-align: center; font-size: 12px; color: var(--gray-300); }

/* ── APP LAYOUT ── */
#app { display: none; min-height: 100vh; }
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,84,132,.06);
}
.nav-container {
  max-width: 1300px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 68px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.nav-brand-icon {
  width: 18px; height: 40px;
  background: transparent !important;
  border: 2px solid var(--blue);
  border-radius: 30px;
  display: flex !important; align-items: flex-start; justify-content: center;
  padding-top: 4px;
  position: relative;
  flex-shrink: 0;
}
.nav-brand-icon::after {
  content: '';
  width: 8px; height: 8px;
  background: var(--blue);
  border-radius: 50%;
}
.nav-brand-text { font-size: 16px; font-weight: 700; color: var(--gray-800); letter-spacing: 1px; }
.nav-brand-sub { font-size: 10px; color: var(--gray-600); letter-spacing: 2px; text-transform: uppercase; }

.nav-tabs { display: flex; align-items: center; gap: 4px; }
.nav-tab {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  border: none; background: none; font-family: 'Inter', sans-serif;
  display: flex; align-items: center; gap: 8px;
}
.nav-tab:hover { background: var(--blue-light); color: var(--blue); }
.nav-tab.active { background: var(--blue-light); color: var(--blue); font-weight: 600; }
.nav-tab i { font-size: 15px; }

.nav-user { display: flex; align-items: center; gap: 12px; }
.nav-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blue-light);
  cursor: pointer;
  transition: var(--transition);
}
.nav-avatar:hover { border-color: var(--blue); }
.nav-user-name { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.nav-user-sub  { font-size: 11px; color: var(--gray-600); }
.btn-logout {
  padding: 7px 16px;
  background: none;
  border: 1.5px solid var(--gray-100);
  border-radius: 8px;
  font-size: 13px; color: var(--gray-600);
  cursor: pointer; transition: var(--transition);
  font-family: 'Inter', sans-serif;
  display: flex; align-items: center; gap: 6px;
}
.btn-logout:hover { border-color: var(--danger); color: var(--danger); background: #fde8e8; }

/* ── PAGES ───────────────────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ═════════════════════════════════════════════════════════════════ */
/*  HOME PAGE                                                        */
/* ═════════════════════════════════════════════════════════════════ */
.hero-section {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 60%, var(--blue-mid) 100%);
  padding: 72px 32px;
  position: relative; overflow: hidden;
}
.hero-section::before {
  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");
}
.hero-inner {
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center;
  position: relative; z-index: 2;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff; font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 20px; margin-bottom: 20px;
  letter-spacing: 1px; text-transform: uppercase;
}
.hero-badge i { color: #ffd700; font-size: 11px; }
.hero-section h1 { font-size: 38px; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 16px; }
.hero-section h1 span { color: rgba(255,255,255,.7); }
.hero-section p { font-size: 16px; color: rgba(255,255,255,.8); max-width: 500px; line-height: 1.7; margin-bottom: 32px; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-hero-primary {
  padding: 14px 28px;
  background: #fff; color: var(--blue);
  border: none; border-radius: 10px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  font-family: 'Inter', sans-serif;
  display: flex; align-items: center; gap: 8px;
}
.btn-hero-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.btn-hero-secondary {
  padding: 14px 28px;
  background: rgba(255,255,255,.1); color: #fff;
  border: 1.5px solid rgba(255,255,255,.3); border-radius: 10px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  font-family: 'Inter', sans-serif;
  display: flex; align-items: center; gap: 8px;
}
.btn-hero-secondary:hover { background: rgba(255,255,255,.2); }

.hero-stats-grid {
  display: flex; gap: 0;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px; overflow: hidden;
}
.hero-stat-item {
  padding: 24px 32px; text-align: center;
  border-right: 1px solid rgba(255,255,255,.15);
}
.hero-stat-item:last-child { border-right: none; }
.hero-stat-item strong { display: block; font-size: 28px; font-weight: 800; color: #fff; }
.hero-stat-item span { font-size: 12px; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: 1px; }

/* ── CONTENT AREA ────────────────────────────────────────────────── */
.content-area { max-width: 1300px; margin: 0 auto; padding: 48px 32px; }

.section-title {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.section-title h2 { font-size: 22px; font-weight: 700; color: var(--gray-800); }
.section-title .pill {
  background: var(--blue-light); color: var(--blue);
  font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 20px;
}

/* ── PROGRESS SUMMARY ────────────────────────────────────────────── */
.progress-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin-bottom: 48px;
}
.progress-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.progress-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--blue);
}
.progress-card.green::before  { background: var(--success); }
.progress-card.orange::before { background: var(--warning); }
.progress-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.progress-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 16px;
  background: var(--blue-light); color: var(--blue);
}
.progress-card.green  .progress-card-icon { background: #e8f8f0; color: var(--success); }
.progress-card.orange .progress-card-icon { background: #fef5e7; color: var(--warning); }
.progress-card strong { display: block; font-size: 32px; font-weight: 800; color: var(--gray-800); margin-bottom: 4px; }
.progress-card p { font-size: 13px; color: var(--gray-600); }

.progress-bar-wrap { margin-top: 16px; }
.progress-bar-bg { background: var(--gray-100); border-radius: 10px; height: 8px; }
.progress-bar-fill {
  height: 100%; border-radius: 10px;
  background: linear-gradient(90deg, var(--blue), var(--blue-mid));
  transition: width .6s ease;
}
.progress-bar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--gray-600); margin-bottom: 6px; }

/* ═════════════════════════════════════════════════════════════════ */
/*  COURSES PAGE                                                     */
/* ═════════════════════════════════════════════════════════════════ */
.courses-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 28px;
}
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: 10px; padding: 10px 16px;
  transition: var(--transition); width: 300px;
}
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,84,132,.06); }
.search-box i { color: var(--gray-300); font-size: 14px; }
.search-box input { border: none; outline: none; font-size: 14px; font-family: 'Inter', sans-serif; background: none; flex: 1; color: var(--gray-800); }
.search-box input::placeholder { color: var(--gray-300); }

.category-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-filter {
  padding: 7px 16px;
  border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--gray-100);
  background: var(--white); color: var(--gray-600);
  cursor: pointer; transition: var(--transition);
  font-family: 'Inter', sans-serif;
}
.cat-filter:hover { border-color: var(--blue); color: var(--blue); }
.cat-filter.active { background: var(--blue); color: #fff; border-color: var(--blue); }

.courses-list { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
  gap: 24px; 
}

.course-item {
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  display: flex; 
  flex-direction: column; 
  align-items: stretch; 
  transition: var(--transition);
  cursor: pointer;
  position: relative; 
  overflow: hidden;
  height: 100%;
}

.course-cover {
  aspect-ratio: 1 / 1;
  width: 100%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.course-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.course-cover h5 {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  max-width: 100%;
}

.course-item-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-item-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
  line-height: 1.4;
}

.course-item-actions {
  padding: 0 20px 20px;
  display: flex;
  gap: 10px;
}

.course-item-actions button {
  flex: 1;
  padding: 10px;
  font-size: 12px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid var(--gray-100);
  background: #fff;
  color: var(--gray-600);
}

.course-item-actions .btn-open-course {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.course-item-actions .btn-open-course:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.course-item-actions .btn-mark-done.is-done {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.course-status-icon.prog    { background: #fef5e7; color: var(--warning); }

.course-item-info { flex: 1; }
.course-item-info h4 { font-size: 15px; font-weight: 600; color: var(--gray-800); margin-bottom: 4px; line-height: 1.4; }
.course-item-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.course-cat-badge {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 12px;
  background: var(--blue-light); color: var(--blue);
  text-transform: uppercase; letter-spacing: .5px;
}
.course-item-meta span { font-size: 12px; color: var(--gray-600); display: flex; align-items: center; gap: 5px; }

.course-item-actions { display: flex; align-items: center; gap: 12px; }
.btn-open-course {
  padding: 9px 18px;
  background: var(--blue); color: #fff;
  border: none; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  font-family: 'Inter', sans-serif;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.btn-open-course:hover { background: var(--blue-dark); }
.btn-open-course.no-link { background: var(--gray-300); cursor: default; }
.btn-open-course.no-link:hover { background: var(--gray-300); }

.btn-mark-done {
  padding: 9px 18px;
  background: none; color: var(--success);
  border: 1.5px solid var(--success); border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  font-family: 'Inter', sans-serif;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.btn-mark-done:hover { background: var(--success); color: #fff; }
.btn-mark-done.is-done { background: var(--success); color: #fff; }

.no-courses {
  text-align: center; padding: 60px 20px; color: var(--gray-600);
}
.no-courses i { font-size: 48px; color: var(--gray-300); margin-bottom: 16px; display: block; }

/* ═════════════════════════════════════════════════════════════════ */
/*  PROFILE PAGE                                                     */
/* ═════════════════════════════════════════════════════════════════ */
.profile-container {
  display: grid; grid-template-columns: 320px 1fr;
  gap: 28px; align-items: start;
}
.profile-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.profile-avatar-wrap { position: relative; display: inline-block; margin-bottom: 20px; }
.profile-avatar {
  width: 120px; height: 120px;
  border-radius: 50%; object-fit: cover;
  border: 4px solid var(--blue-light);
}
.profile-avatar-badge {
  position: absolute; bottom: 4px; right: 4px;
  width: 26px; height: 26px;
  background: var(--success); border-radius: 50%;
  border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center;
}
.profile-avatar-badge i { font-size: 10px; color: #fff; }
.profile-name { font-size: 20px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.profile-subarea {
  display: inline-block;
  background: var(--blue-light); color: var(--blue);
  font-size: 12px; font-weight: 600;
  padding: 5px 14px; border-radius: 20px; margin-bottom: 20px;
}
.profile-email { font-size: 13px; color: var(--gray-600); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; justify-content: center; }
.profile-id { font-size: 12px; color: var(--gray-300); font-weight: 600; letter-spacing: 1px; }

.profile-progress-ring { margin: 28px 0; }
.ring-container { position: relative; width: 120px; height: 120px; margin: 0 auto 12px; }
.ring-svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--gray-100); stroke-width: 10; }
.ring-fill { fill: none; stroke: var(--blue); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.ring-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring-percent { font-size: 24px; font-weight: 800; color: var(--gray-800); }
.ring-label   { font-size: 10px; color: var(--gray-600); text-transform: uppercase; letter-spacing: 1px; }
.profile-progress-ring p { font-size: 13px; color: var(--gray-600); }

.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.profile-stat {
  background: var(--gray-50); border-radius: 10px; padding: 14px 10px; text-align: center;
}
.profile-stat strong { display: block; font-size: 22px; font-weight: 800; color: var(--gray-800); }
.profile-stat span { font-size: 11px; color: var(--gray-600); }

/* profile right panel */
.profile-right { display: flex; flex-direction: column; gap: 24px; }
.panel-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-card-header h3 { font-size: 16px; font-weight: 700; color: var(--gray-800); display: flex; align-items: center; gap: 10px; }
.panel-card-header h3 i { color: var(--blue); }
.panel-card-body { padding: 24px; }

.timeline { display: flex; flex-direction: column; gap: 16px; }
.timeline-item { display: flex; gap: 16px; align-items: flex-start; }
.timeline-dot {
  width: 12px; height: 12px; min-width: 12px;
  border-radius: 50%; margin-top: 5px;
  background: var(--success);
}
.timeline-dot.pending { background: var(--gray-300); }
.timeline-item-info h5 { font-size: 14px; font-weight: 600; color: var(--gray-800); margin-bottom: 3px; }
.timeline-item-info span { font-size: 12px; color: var(--gray-600); }

.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px; }
.badge-item {
  text-align: center; padding: 16px 12px;
  background: var(--gray-50); border-radius: 10px;
  border: 1.5px solid var(--gray-100);
  transition: var(--transition);
}
.badge-item.earned { border-color: var(--blue-light); background: var(--blue-light); }
.badge-item:hover { transform: translateY(-2px); }
.badge-item i { font-size: 28px; margin-bottom: 8px; display: block; color: var(--gray-300); }
.badge-item.earned i { color: var(--blue); }
.badge-item span { font-size: 12px; color: var(--gray-600); font-weight: 500; }
.badge-item.earned span { color: var(--blue); font-weight: 600; }

/* ═════════════════════════════════════════════════════════════════ */
/*  ADMIN / RRHH PAGE                                               */
/* ═════════════════════════════════════════════════════════════════ */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.employee-card {
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}
.employee-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--blue-light); }
.employee-card-header {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
}
.employee-card-avatar {
  width: 56px; height: 56px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,.3);
}
.employee-card-name { color: #fff; }
.employee-card-name h4 { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.employee-card-name span { font-size: 12px; color: rgba(255,255,255,.75); }
.employee-card-body { padding: 16px 20px; }
.employee-subarea {
  display: inline-block;
  background: var(--blue-light); color: var(--blue);
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 12px; margin-bottom: 12px;
}
.employee-progress-mini { margin-bottom: 10px; }
.employee-progress-mini label { display: flex; justify-content: space-between; font-size: 12px; color: var(--gray-600); margin-bottom: 5px; }
.mini-bar { background: var(--gray-100); border-radius: 4px; height: 6px; }
.mini-bar-fill { height: 100%; border-radius: 4px; background: var(--blue); }
.employee-email { font-size: 11px; color: var(--gray-600); display: flex; align-items: center; gap: 5px; }

.admin-filter-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 28px; background: var(--white);
  border: 1px solid var(--gray-100); border-radius: var(--radius);
  padding: 16px 20px; box-shadow: var(--shadow);
}
.admin-filter-bar label { font-size: 13px; font-weight: 600; color: var(--gray-600); }
.admin-filter-select {
  padding: 8px 14px;
  border: 1.5px solid var(--gray-100); border-radius: 8px;
  font-family: 'Inter', sans-serif; font-size: 13px; color: var(--gray-800);
  background: var(--gray-50); cursor: pointer; outline: none;
  transition: var(--transition);
}
.admin-filter-select:focus { border-color: var(--blue); background: #fff; }
.admin-search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--gray-50); border: 1.5px solid var(--gray-100);
  border-radius: 8px; padding: 8px 14px;
  transition: var(--transition); min-width: 200px;
}
.admin-search:focus-within { border-color: var(--blue); background: #fff; }
.admin-search i { color: var(--gray-300); font-size: 13px; }
.admin-search input { border: none; outline: none; font-size: 13px; font-family: 'Inter', sans-serif; background: none; flex: 1; }

/* ═════════════════════════════════════════════════════════════════ */
/*  MODAL                                                            */
/* ═════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
  width: 100%; max-width: 640px;
  max-height: 85vh; overflow-y: auto;
  transform: scale(.95) translateY(20px);
  transition: transform .3s;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.modal-header h3 { font-size: 18px; font-weight: 700; color: var(--gray-800); line-height: 1.3; }
.modal-close {
  width: 36px; min-width: 36px; height: 36px;
  border: none; background: var(--gray-50); color: var(--gray-600);
  border-radius: 8px; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: #fde8e8; color: var(--danger); }
.modal-body { padding: 24px 32px 32px; }
.modal-emp-header {
  display: flex; align-items: center; gap: 20px;
  background: var(--blue-light); border-radius: 12px;
  padding: 20px; margin-bottom: 24px;
}
.modal-emp-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; }
.modal-emp-name h4 { font-size: 18px; font-weight: 700; color: var(--blue-dark); margin-bottom: 4px; }
.modal-emp-name span { font-size: 13px; color: var(--blue); font-weight: 500; }
.modal-emp-prog { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.modal-prog-bar { flex: 1; background: rgba(0,84,132,.1); border-radius: 6px; height: 10px; }
.modal-prog-fill { height: 100%; background: var(--blue); border-radius: 6px; transition: width .6s; }
.modal-prog-label { font-size: 14px; font-weight: 700; color: var(--blue-dark); }

.modal-course-list { display: flex; flex-direction: column; gap: 10px; }
.modal-course-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--gray-50);
  border-radius: 10px; border: 1px solid var(--gray-100);
}
.modal-course-row .status-dot {
  width: 10px; height: 10px; min-width: 10px;
  border-radius: 50%; background: var(--gray-300);
}
.modal-course-row .status-dot.done { background: var(--success); }
.modal-course-row p { flex: 1; font-size: 13px; color: var(--gray-800); font-weight: 500; line-height: 1.3; }
.modal-course-row span { font-size: 11px; color: var(--gray-600); white-space: nowrap; }

/* ═════════════════════════════════════════════════════════════════ */
/*  TOAST                                                            */
/* ═════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 32px; right: 32px; z-index: 9999;
  background: var(--gray-800); color: #fff;
  padding: 14px 22px; border-radius: 12px;
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  transform: translateY(20px); opacity: 0;
  transition: all .3s; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success i { color: #2ecc71; }
.toast.info    i { color: #3498db; }

/* ═════════════════════════════════════════════════════════════════ */
/*  RESPONSIVE                                                       */
/* ═════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .login-left { display: none; }
  .login-right { width: 100%; padding: 40px 32px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-stats-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .profile-container { grid-template-columns: 1fr; }
  .nav-user-name, .nav-user-sub { display: none; }
}
@media (max-width: 600px) {
  .nav-tabs .nav-tab span { display: none; }
  .content-area { padding: 24px 16px; }
  .hero-section { padding: 40px 16px; }
  .login-right { padding: 32px 20px; }
  .courses-toolbar { flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; }
}
