/* ========================================================
   OLM.VN MASTER & ENETVIET - CHUẨN MỰC GIÁO DỤC BÓNG SÁNG
   Thiết Kế Đẳng Cấp, Bóng Sáng Tinh Tế, Màu Nào Ra Màu Đó
   Không Màu Neon Lòe Loẹt - Đậm Chất Sư Phạm Chuyên Nghiệp
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Bảng màu OLM.vn chuẩn */
  --olm-blue: #0284c7;
  --olm-blue-dark: #0369a1;
  --olm-navy: #0f172a;
  --olm-sky: #e0f2fe;
  
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #f0f9ff;
  
  --success: #10b981;
  --success-dark: #059669;
  --success-light: #ecfdf5;
  
  --warning: #f59e0b;
  --warning-dark: #d97706;
  --warning-light: #fffbeb;
  
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --danger-light: #fef2f2;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-card: #e2e8f0;
  --border-hover: #7dd3fc;
  
  /* Hiệu ứng bóng sáng chuẩn OLM (Lustrous Gloss) */
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 20px -2px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 14px 34px -4px rgba(2, 132, 199, 0.12);
  --shadow-gloss: 0 4px 20px rgba(15, 23, 42, 0.05), inset 0 1px 0 #ffffff;
  
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  background-image: 
    linear-gradient(180deg, #f0f9ff 0%, #f8fafc 400px),
    radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
}

/* ========================================================
   1. THANH ĐIỀU HƯỚNG BÓNG SÁNG (GLOSSY NAVBAR)
   ======================================================== */
.liquid-navbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 2px solid #e0f2fe;
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.06);
  height: 74px;
  display: flex;
  align-items: center;
}

.nav-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0369a1;
  letter-spacing: -0.3px;
  display: block;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 700;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: #f0f9ff;
  color: var(--olm-blue);
  border-color: #bae6fd;
}

.nav-link.active {
  background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0369a1;
  border-color: #7dd3fc;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
}

/* ========================================================
   2. TIÊU ĐỀ & BANNER BÓNG SÁNG (HERO BANNERS)
   ======================================================== */
.page-hero, .enet-hero, .student-hero {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #0c4a6e 100%);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  color: white;
  box-shadow: 0 12px 36px rgba(2, 132, 199, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.page-hero::after, .enet-hero::after, .student-hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* ========================================================
   3. HỘP KHỐI BÓNG SÁNG: "Ô NÀO ĐI Ô ĐÓ"
   ======================================================== */
.glass-card, .glass-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-gloss);
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: #7dd3fc;
  box-shadow: 0 10px 28px rgba(2, 132, 199, 0.1), inset 0 1px 0 #ffffff;
  transform: translateY(-3px);
}

/* ========================================================
   4. NÚT BẤM BÓNG SÁNG CHUẨN OLM (GLOSSY BUTTONS)
   ======================================================== */
.btn-liquid, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary, .btn-liquid.btn-primary {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary:hover, .btn-liquid.btn-primary:hover {
  background: linear-gradient(180deg, #0369a1 0%, #075985 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.4);
}

.btn-success {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-success:hover {
  background: linear-gradient(180deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
}

.btn-warning {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-warning:hover {
  background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-danger:hover {
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
}

.btn-outline-primary {
  background: #ffffff;
  color: #0284c7;
  border: 1.5px solid #bae6fd;
}
.btn-outline-primary:hover {
  background: #f0f9ff;
  border-color: #0284c7;
}

.btn-outline-secondary {
  background: #ffffff;
  color: #64748b;
  border: 1.5px solid #e2e8f0;
}
.btn-outline-secondary:hover {
  background: #f8fafc;
  color: #1e293b;
}

/* ========================================================
   5. HUY HIỆU "MÀU NÀO RA MÀU ĐÓ" (DISTINCT BADGES)
   ======================================================== */
.badge, .pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.badge-primary {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-info {
  background: #f0fdfa;
  color: #115e59;
  border: 1px solid #99f6e4;
}

/* ========================================================
   6. BẢNG BIỂU CHUYÊN NGHIỆP (TABLES)
   ======================================================== */
.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.custom-table th {
  background: #f8fafc;
  padding: 14px 18px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}

.custom-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  font-size: 0.95rem;
}

.custom-table tbody tr:hover td {
  background: #f0f9ff;
}

/* ========================================================
   7. Ô NHẬP LIỆU (FORM CONTROLS)
   ======================================================== */
.form-control {
  width: 100%;
  padding: 10px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #1e293b;
  background: #ffffff;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* ========================================================
   8. TRỢ LÝ GEMINI AI WIDGET GIA SƯ
   ======================================================== */
.ai-tutor-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-tutor-fab:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.45);
}


/* ========================================================
   9. HỆ THỐNG TIÊU ĐỀ & BANNER BÓNG SÁNG TOÀN DIỆN (OLM HERO)
   ======================================================== */
.olm-hero-banner,
.admin-hero-banner,
.teacher-hero-banner,
.student-hero-banner,
.game-hero-banner,
.enet-hero-banner,
.hero-banner {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 40%, #0c4a6e 100%) !important;
  border-radius: var(--radius-xl) !important;
  padding: 32px 36px !important;
  color: #ffffff !important;
  box-shadow: 0 12px 36px rgba(2, 132, 199, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  position: relative !important;
  overflow: hidden !important;
  margin-bottom: 24px !important;
}

.olm-hero-banner::after,
.admin-hero-banner::after,
.teacher-hero-banner::after,
.student-hero-banner::after,
.game-hero-banner::after,
.enet-hero-banner::after,
.hero-banner::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-chip,
.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.25;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  margin-bottom: 10px;
}

.hero-subtitle {
  color: #e0f2fe;
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.6;
  max-width: 820px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-action-btn:hover {
  background: #ffffff;
  color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.hero-action-btn.solid {
  background: #ffffff;
  color: #0284c7;
  border-color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.hero-action-btn.solid:hover {
  background: #f0f9ff;
  color: #0369a1;
  transform: translateY(-2px);
}

.hero-stat-pill {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
}

.hero-stat-icon {
  font-size: 1.4rem;
}

.hero-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
}

.hero-stat-lbl {
  font-size: 0.72rem;
  opacity: 0.85;
  text-transform: uppercase;
  font-weight: 700;
}

/* ========================================================
   10. MODULES & Ô NÀO ĐI Ô ĐÓ (MODULAR CARDS)
   ======================================================== */
.card-module {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-gloss);
  transition: all 0.2s ease;
}

.card-module:hover {
  border-color: #7dd3fc;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.08), inset 0 1px 0 #ffffff;
  transform: translateY(-2px);
}

.card-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.card-module-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

/* ========================================================
   11. HỆ THỐNG MENU THU GỌN VÀ BỐ CỤC MOBILE (COLLAPSIBLE DRAWER)
   ======================================================== */
.mobile-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid #bae6fd;
  background: #f0f9ff;
  color: #0284c7;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-toggle-btn:hover {
  background: #0284c7;
  color: #ffffff;
}

/* Mobile Drawer Backdrop */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Collapsible Mobile Drawer Panel */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  max-width: 86vw;
  height: 100vh;
  background: #ffffff;
  z-index: 9999;
  box-shadow: -8px 0 36px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow-y: auto;
  padding: 24px 20px;
}

.mobile-drawer.active {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1.5px solid #f1f5f9;
  margin-bottom: 20px;
}

.mobile-drawer-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-drawer-close:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.mobile-drawer-link:hover, .mobile-drawer-link.active {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}

.mobile-user-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

/* ========================================================
   12. MEDIA QUERIES RESPONSIVE MOBILE & TABLET
   ======================================================== */
@media (max-width: 992px) {
  .nav-links {
    display: none !important;
  }
  .mobile-toggle-btn {
    display: inline-flex !important;
  }
  .admin-layout, .teacher-layout {
    grid-template-columns: 1fr !important;
    padding: 14px !important;
    gap: 16px !important;
  }
  .admin-sidebar, .teacher-sidebar {
    position: static !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding: 10px !important;
    gap: 8px !important;
    border-radius: var(--radius-md) !important;
    -webkit-overflow-scrolling: touch;
  }
  .admin-sidebar > div, .teacher-sidebar > div {
    display: none !important;
  }
  .admin-nav-item, .teacher-nav-item {
    width: auto !important;
    margin-bottom: 0 !important;
    padding: 8px 16px !important;
    font-size: 0.88rem !important;
    flex-shrink: 0 !important;
  }
}

@media (max-width: 768px) {
  .liquid-navbar {
    height: 64px !important;
  }
  .nav-content {
    padding: 0 14px !important;
  }
  .brand-title {
    font-size: 1.05rem !important;
  }
  .brand-subtitle {
    display: none !important;
  }
  .olm-hero-banner, .admin-hero-banner, .teacher-hero-banner, .student-hero-banner, .game-hero-banner, .enet-hero-banner, .hero-banner {
    padding: 22px 18px !important;
    border-radius: 18px !important;
    margin-bottom: 16px !important;
  }
  .hero-title {
    font-size: 1.6rem !important;
    line-height: 1.3 !important;
  }
  .hero-subtitle {
    font-size: 0.92rem !important;
  }
  .hero-chip, .hero-badge-pill {
    font-size: 0.72rem !important;
    padding: 4px 10px !important;
  }
  .hero-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .hero-action-btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 10px 16px !important;
  }
  .hero-stat-pill {
    width: 100% !important;
    justify-content: center !important;
  }
  .role-grid, .subject-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .kpi-card {
    padding: 14px 12px !important;
    gap: 10px !important;
  }
  .kpi-icon {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.25rem !important;
  }
  .custom-table th, .custom-table td {
    padding: 10px 8px !important;
    font-size: 0.85rem !important;
  }
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr !important;
  }
  .brand-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.2rem !important;
  }
}
