/* ===================================================================
   ZALO MINI APP - HIỂU MÌNH VÀ KHÁM PHÁ NGHỀ
   CỔNG QUẢN TRỊ TRÊN MÁY TÍNH (WEB ADMIN PORTAL)
   Màn 29 - Màn 33 | Thiết kế chuẩn Enterprise Education Dashboard
   =================================================================== */

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

:root {
  /* Brand Theme Colors */
  --primary: #0A4E35;              /* Xanh lá đậm Pine Forest */
  --primary-hover: #073B28;
  --primary-active: #052B1E;
  --primary-tint: #EAF4EE;         /* Nền nhạt thương hiệu */
  --primary-subtle: #F2F8F4;
  --primary-border: #C8E3D4;
  --primary-focus: rgba(10, 78, 53, 0.18);

  /* Secondary Accents */
  --accent-peach: #FFF0E6;
  --accent-peach-border: #FFDBC9;
  --accent-peach-text: #963810;

  --accent-purple: #F3F1FA;
  --accent-purple-border: #E0DBF0;
  --accent-purple-text: #594488;

  --accent-blue: #EEF5FC;
  --accent-blue-border: #CFE4FA;
  --accent-blue-text: #1B568F;

  --accent-amber: #FFF9E6;
  --accent-amber-border: #FFE699;
  --accent-amber-text: #8A6100;

  --accent-danger: #FDE8E8;
  --accent-danger-border: #F8B4B4;
  --accent-danger-text: #9B1C1C;

  /* Surfaces & Backgrounds */
  --bg-page: #F4F6F4;              /* Nền toàn trang web sáng thanh lịch */
  --bg-sidebar: #0C3827;           /* Sidebar tối màu xanh rêu quyền lực */
  --bg-sidebar-hover: #134B36;
  --surface: #FFFFFF;
  --surface-alt: #F9FBF9;
  --surface-hover: #F2F7F4;

  /* Text Colors */
  --text-main: #0E3525;
  --text-body: #2C4A3E;
  --text-muted: #5E7A6E;
  --text-light: #8DA69B;
  --text-inverse: #FFFFFF;

  /* Borders & Dividers */
  --border: #E1EAE3;
  --border-light: #EDF3EF;
  --border-dark: #C9D9CF;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10, 78, 53, 0.05);
  --shadow-card: 0 2px 10px rgba(14, 53, 37, 0.04), 0 1px 2px rgba(14, 53, 37, 0.02);
  --shadow-hover: 0 8px 24px rgba(14, 53, 37, 0.08);
  --shadow-modal: 0 20px 45px rgba(14, 53, 37, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-dropdown: 0 10px 30px rgba(10, 78, 53, 0.12);

  /* Dimensions */
  --sidebar-width: 320px;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

/* Reset & Basics */
* {
  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);
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
}

/* ===================================================================
   ADMIN APP LAYOUT (Sidebar + Main Area)
   =================================================================== */

.admin-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* --- SIDEBAR --- */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: #D2E2D8;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.06);
}

.sidebar-brand {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #18A058, #0A4E35);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(24, 160, 88, 0.35);
  flex-shrink: 0;
}

.brand-info h1 {
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.brand-info p {
  font-size: 11px;
  color: #8EB49F;
  margin-top: 2px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-nav-container {
  flex: 1;
  padding: 20px 16px;
  overflow-y: auto;
}

.sidebar-nav-container::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6C947F;
  padding: 10px 12px 6px;
  margin-top: 8px;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: #B5D2C2;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: var(--bg-sidebar-hover);
  color: #FFFFFF;
}

.nav-link.active {
  background: #18A058;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(24, 160, 88, 0.35);
  font-weight: 700;
}

.nav-link .nav-icon {
  font-size: 18px;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-link .nav-text {
  flex: 1;
  white-space: normal;
  word-break: normal;
  line-height: 1.35;
  font-size: 13.5px;
}

.nav-link .nav-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  flex-shrink: 0;
  margin-left: 6px;
  white-space: nowrap;
}

.nav-link.active .nav-badge {
  background: rgba(0, 0, 0, 0.25);
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 16px 8px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #256B4D;
  border: 2px solid #3AA876;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #FFF;
  font-size: 14px;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}

.user-role {
  font-size: 11px;
  color: #8EB49F;
}

/* --- MAIN CONTAINER --- */
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-page);
}

/* --- HEADER / TOPBAR --- */
.admin-header {
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.breadcrumb-area {
  display: flex;
  flex-direction: column;
}

.breadcrumb-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.breadcrumb-path {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.school-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-tint);
  border: 1px solid var(--primary-border);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.school-selector select {
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}

.btn-mobile-sim {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0A4E35, #146C49);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 3px 10px rgba(10, 78, 53, 0.25);
  transition: all 0.2s ease;
}

.btn-mobile-sim:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(10, 78, 53, 0.35);
  background: linear-gradient(135deg, #0E5E41, #1A7E56);
}

.header-action-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  color: var(--text-body);
  transition: all 0.2s;
}

.header-action-btn:hover {
  background: var(--primary-tint);
  border-color: var(--primary-border);
  color: var(--primary);
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #E02424;
  border-radius: 50%;
  border: 2px solid #FFF;
}

/* --- CONTENT CANVAS --- */
.admin-content {
  flex: 1;
  padding: 28px 32px 48px;
  max-width: 1600px;
  width: 100%;
}

/* Tab panes */
.admin-tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.admin-tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- SECTION HEADER TOOLBAR (KHOA HỌC, CHUYÊN NGHIỆP, KHÔNG MÀU MÈ) --- */
.section-banner {
  background: #FFFFFF;
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.section-banner::after {
  display: none;
}

.banner-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.banner-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0;
  letter-spacing: -0.01em;
}

.banner-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.meta-tag {
  font-weight: 600;
}

.meta-tag.active {
  color: #03543F;
  background: #DEF7EC;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meta-sep {
  color: var(--border-dark);
}

.banner-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

/* --- METRIC STAT CARDS GRID --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-icon.green {
  background: var(--primary-tint);
  color: var(--primary);
}
.stat-icon.blue {
  background: var(--accent-blue);
  color: var(--accent-blue-text);
}
.stat-icon.amber {
  background: var(--accent-amber);
  color: var(--accent-amber-text);
}
.stat-icon.purple {
  background: var(--accent-purple);
  color: var(--accent-purple-text);
}

.stat-trend {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-trend.positive {
  background: #DEF7EC;
  color: #03543F;
}
.stat-trend.neutral {
  background: #EDF2F7;
  color: #4A5568;
}
.stat-trend.alert {
  background: #FDE8E8;
  color: #9B1C1C;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 11.5px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- CARD CONTAINERS --- */
.card-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
  overflow: hidden;
}

.card-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FAFCFA;
}

.panel-title-area h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.panel-title-area p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- FUNNEL PIPELINE SECTION --- */
.funnel-container {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--surface-alt);
}

.funnel-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  position: relative;
  transition: all 0.2s;
}

.funnel-step.highlight {
  border-color: var(--primary);
  background: #F6FAF7;
}

.funnel-step-num {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

.funnel-step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.funnel-step-metrics {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.funnel-step-count {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.funnel-step-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.funnel-progress-bar {
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.funnel-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #18A058, #0A4E35);
  transition: width 0.6s ease;
}

/* --- FILTER BAR --- */
.filter-toolbar {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.filter-group-left {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex: 1;
}

.search-input-wrapper {
  position: relative;
  min-width: 260px;
}

.search-input-wrapper input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  background: var(--surface);
  color: var(--text-body);
  transition: border-color 0.2s;
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 14px;
  pointer-events: none;
}

.select-filter {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  color: var(--text-body);
  background: var(--surface);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.select-filter:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

.filter-group-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* --- DATA TABLE --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 13px 20px;
  background: #F8FAF8;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13.5px;
  vertical-align: middle;
  color: var(--text-body);
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: var(--surface-hover);
}

.student-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  border: 1px solid var(--primary-border);
}

.student-meta {
  display: flex;
  flex-direction: column;
}

.student-name {
  font-weight: 700;
  color: var(--text-main);
}

.student-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Status Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.pill-green {
  background: #DEF7EC;
  color: #03543F;
}
.pill-green .pill-dot { background: #0E9F6E; }

.pill-amber {
  background: #FEF08A;
  color: #854D0E;
}
.pill-amber .pill-dot { background: #CA8A04; }

.pill-blue {
  background: #E1EFFE;
  color: #1E429F;
}
.pill-blue .pill-dot { background: #3F83F8; }

.pill-purple {
  background: #EDEBFE;
  color: #5521B5;
}
.pill-purple .pill-dot { background: #7E3AF2; }

.pill-red {
  background: #FDE8E8;
  color: #9B1C1C;
}
.pill-red .pill-dot { background: #E02424; }

.pill-gray {
  background: #F3F4F6;
  color: #4B5563;
}
.pill-gray .pill-dot { background: #9CA3AF; }

/* Table Actions */
.btn-action-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
}

.btn-action-icon:hover {
  background: var(--primary-tint);
  border-color: var(--primary);
  color: var(--primary);
}

/* Pagination bar */
.table-pagination {
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.pagination-pages {
  display: flex;
  gap: 6px;
}

.page-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-body);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s;
}

.page-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.page-btn:hover:not(.active) {
  background: var(--surface-hover);
}

/* --- BUTTONS SYSTEM --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(10, 78, 53, 0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(10, 78, 53, 0.3);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-body);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-dark);
}

.btn-tint {
  background: var(--primary-tint);
  color: var(--primary);
  border-color: var(--primary-border);
}

.btn-tint:hover {
  background: #DFEFE5;
}

.btn-danger {
  background: #FDE8E8;
  color: #9B1C1C;
  border-color: #F8B4B4;
}

.btn-danger:hover {
  background: #FBD5D5;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 14.5px;
  border-radius: var(--radius-md);
}

/* ===================================================================
   MODAL & SLIDE-OVER DRAWER
   =================================================================== */

.modal-backdrop-custom {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(14, 53, 37, 0.45);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop-custom.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-window {
  background: var(--surface);
  border-radius: var(--radius-xl);
  max-width: 840px;
  width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  border: 1px solid var(--border);
}

.modal-backdrop-custom.show .modal-window {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FAFCFA;
}

.modal-title-wrap h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

.modal-title-wrap p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.btn-close-modal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
  transition: all 0.15s;
}

.btn-close-modal:hover {
  background: var(--surface-hover);
  color: var(--text-main);
}

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: #FAFCFA;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Slide-over Drawer for Student Dossier */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(14, 53, 37, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1050;
  display: none;
  opacity: 0;
  transition: opacity 0.25s;
}

.drawer-backdrop.show {
  display: block;
  opacity: 1;
}

.drawer-container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 620px;
  max-width: 90vw;
  background: var(--surface);
  box-shadow: -8px 0 35px rgba(0, 0, 0, 0.15);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop.show .drawer-container {
  transform: translateX(0);
}

.drawer-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #FAFCFA;
}

.drawer-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
  background: #F8FAF8;
}

.drawer-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- STUDENT DOSSIER 4 BLOCKS (FRAMEWORK 3 CÂU HỎI) --- */
.dossier-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dossier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.dossier-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.evidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.evidence-badge.self {
  background: var(--accent-purple);
  color: var(--accent-purple-text);
  border: 1px solid var(--accent-purple-border);
}

.evidence-badge.tested {
  background: var(--primary-tint);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.evidence-badge.pending {
  background: var(--accent-peach);
  color: var(--accent-peach-text);
  border: 1px solid var(--accent-peach-border);
}

/* --- FORM CONTROLS --- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: span 2;
}

.form-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.form-input, .form-textarea, .form-select {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  color: var(--text-body);
  background: var(--surface);
  transition: all 0.2s;
}

.form-textarea {
  resize: vertical;
  min-height: 85px;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

.form-help {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* --- TOAST NOTIFICATIONS (ĐÃ TẮT HOÀN TOÀN) --- */
.toast-container {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.toast {
  display: none !important;
}

/* --- ZALO PHONE PREVIEW IN MODAL --- */
.zalo-mockup-frame {
  width: 320px;
  height: 480px;
  background: #EEF2EE;
  border-radius: 36px;
  border: 8px solid #222;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.zalo-mock-header {
  background: #0068FF;
  color: #FFF;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.zalo-mock-body {
  padding: 14px;
  flex: 1;
  overflow-y: auto;
}

.zalo-msg-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #E1E8E2;
}

.zalo-oa-badge {
  font-size: 11px;
  font-weight: 700;
  color: #0068FF;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.zalo-cta-btn {
  display: block;
  width: 100%;
  background: #0068FF;
  color: #FFF;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  margin-top: 10px;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .funnel-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .workflow-grid-6 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .triangle-framework-grid {
    grid-template-columns: 1fr !important;
  }
  .matrix-2x2-wrapper {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 900px) {
  .admin-sidebar {
    width: 72px;
  }
  .admin-sidebar .brand-info, 
  .admin-sidebar .nav-text, 
  .admin-sidebar .nav-badge, 
  .admin-sidebar .nav-section-title,
  .admin-sidebar .user-info {
    display: none;
  }
  .admin-sidebar .sidebar-brand {
    justify-content: center;
    padding: 16px 0;
  }
  .admin-sidebar .nav-link {
    justify-content: center;
    padding: 12px;
  }
  .admin-main {
    margin-left: 72px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .workflow-grid-6 {
    grid-template-columns: 1fr !important;
  }
}

/* ===================================================================
   VISUAL DIAGRAMS & WORKFLOW PROCESS MODELS (GIẢM TEXT - TĂNG SƠ ĐỒ)
   =================================================================== */

/* --- 1. CORE LOOP 6 BƯỚC WORKFLOW DIAGRAM --- */
.workflow-section-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
}

.diagram-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.diagram-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.diagram-icon-badge {
  width: 38px;
  height: 38px;
  background: var(--primary-tint);
  border: 1px solid var(--primary-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
}

.diagram-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.diagram-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* 6-step horizontal grid */
.workflow-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  position: relative;
}

.wf-step-node {
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s ease;
  cursor: pointer;
}

.wf-step-node:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: var(--shadow-hover);
}

.wf-step-node.active-focus {
  border-color: var(--primary);
  background: #F4FAF6;
  box-shadow: 0 0 0 2px var(--primary-focus);
}

.wf-node-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.wf-node-num {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  background: var(--primary);
  color: #FFFFFF;
  border-radius: 6px;
}

.wf-node-icon {
  font-size: 20px;
}

.wf-node-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.3;
}

.wf-node-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1;
}

.wf-node-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  background: #E8F2EC;
  color: var(--primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Connecting Arrow */
.wf-step-node:not(:last-child)::after {
  content: ""; background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230A4E35' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") no-repeat center;
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 900;
  color: #10B981;
  z-index: 5;
  background: #FFFFFF;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1200px) {
  .wf-step-node::after {
    display: none;
  }
}

/* --- 2. TRIANGLE FRAMEWORK: 3 CÂU HỎI NHẬN ĐỊNH --- */
.triangle-framework-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tf-card {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
}

.tf-card.q1 {
  background: #F0FDF4;
  border-color: #BBF7D0;
}
.tf-card.q2 {
  background: #FFF7ED;
  border-color: #FED7AA;
}
.tf-card.q3 {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.tf-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.tf-card.q1 .tf-badge { color: #166534; }
.tf-card.q2 .tf-badge { color: #9A3412; }
.tf-card.q3 .tf-badge { color: #1E40AF; }

.tf-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tf-card.q1 .tf-title { color: #14532D; }
.tf-card.q2 .tf-title { color: #7C2D12; }
.tf-card.q3 .tf-title { color: #1E3A8A; }

.tf-content-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}

.tf-content-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

/* --- 3. MA TRẬN 2x2 TÁC ĐỘNG AI (INTERACTIVE MATRIX) --- */
.matrix-2x2-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  position: relative;
  background: var(--surface-alt);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.matrix-quadrant {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
  min-height: 180px;
}

.matrix-quadrant:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.mq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mq-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mq-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.mq-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mq-career-chip {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.15s;
}

.mq-career-chip:hover {
  background: var(--primary-tint);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* --- 4. ZBS FLOWCHART AUTOMATION DIAGRAM --- */
.flowchart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 10px;
  overflow-x: auto;
}

.fc-node {
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  min-width: 170px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.fc-node.highlight {
  border-color: #0A4E35;
  background: #F4FAF6;
}

.fc-node-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.fc-node-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.fc-node-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.fc-arrow {
  color: #10B981;
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
}

/* --- 5. LIKERT VISUAL GAUGE --- */
.likert-scale-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.likert-step {
  flex: 1;
  padding: 8px;
  text-align: center;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface);
}

.likert-step.lvl-1 { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.likert-step.lvl-2 { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.likert-step.lvl-3 { background: #F3F4F6; color: #374151; border-color: #E5E7EB; }
.likert-step.lvl-4 { background: #ECFDF5; color: #065F46; border-color: #A7F3D0; }
.likert-step.lvl-5 { background: #D1FAE5; color: #047857; border-color: #6EE7B7; }

/* ===================================================================
   MODERN VECTOR ICONS (LUCIDE SVG STYLING)
   =================================================================== */
svg.lucide {
  stroke-width: 2;
  vertical-align: middle;
  display: inline-block;
}

.brand-icon svg.lucide {
  width: 22px;
  height: 22px;
  stroke: #FFFFFF;
}

.nav-link .nav-icon svg.lucide {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.diagram-icon-badge svg.lucide {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
}

.wf-node-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
}

.wf-node-icon svg.lucide {
  width: 22px;
  height: 22px;
  stroke: var(--primary);
}

.stat-icon svg.lucide {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.fc-node-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  height: 32px;
}

.fc-node-icon svg.lucide {
  width: 24px;
  height: 24px;
  stroke: var(--primary);
}

.fc-arrow svg.lucide {
  width: 20px;
  height: 20px;
  stroke: #10B981;
}

.mq-title svg.lucide {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.tf-title svg.lucide {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.school-selector svg.lucide {
  width: 16px;
  height: 16px;
  stroke: var(--primary);
}

.btn-mobile-sim svg.lucide {
  width: 15px;
  height: 15px;
  stroke: #FFFFFF;
}

.header-action-btn svg.lucide {
  width: 18px;
  height: 18px;
  stroke: var(--text-body);
}

.btn svg.lucide {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.search-icon svg.lucide {
  width: 15px;
  height: 15px;
  stroke: var(--text-light);
}




/* MODERN VECTOR ICONS STYLING (LUCIDE ICONS) */
i[data-lucide], svg.lucide {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.wf-node-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.wf-node-icon svg {
  width: 17px;
  height: 17px;
  stroke: var(--primary);
  stroke-width: 2;
}

.wf-step-node.active-focus .wf-node-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.wf-step-node.active-focus .wf-node-icon svg {
  stroke: #FFFFFF;
}

.diagram-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.diagram-icon-badge svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
  stroke-width: 2;
}

.fc-node-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-alt);
  color: var(--primary);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.fc-node-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
  stroke-width: 2;
}

.fc-node.highlight .fc-node-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.fc-node.highlight .fc-node-icon svg {
  stroke: #FFFFFF;
}

.fc-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10B981;
}

.fc-arrow svg {
  width: 20px;
  height: 20px;
  stroke: #10B981;
  stroke-width: 2.5;
}

.mq-career-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mq-career-chip svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.btn i[data-lucide], .btn svg.lucide {
  margin-right: 4px;
  width: 15px;
  height: 15px;
}
