@charset "UTF-8";
/* =============================================
   QLHS - Quản lý Nề nếp Học sinh
   Design System: Modern Clean White Theme
   Primary: #238940 | Accent: #e8a322
   ============================================= */

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

/* =============================================
   CSS VARIABLES - CLEAN LIGHT PALETTE
   ============================================= */
:root {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --bg-sidebar: #ffffff;

  /* Brand Colors requested by user */
  --accent: #238940;
  --accent-light: #2da14e;
  --accent-dark: #1b6e33;
  --accent-glow: rgba(35, 137, 64, 0.12);

  --secondary: #e8a322;
  --secondary-light: #f5b945;
  --secondary-dark: #ca8a04;
  --secondary-glow: rgba(232, 163, 34, 0.15);

  --brand-green: #238940;
  --brand-gold: #e8a322;

  --success: #238940;
  --success-bg: rgba(35, 137, 64, 0.1);
  --warning: #e8a322;
  --warning-bg: rgba(232, 163, 34, 0.12);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);
  --info: #0284c7;
  --info-bg: rgba(2, 132, 199, 0.08);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-accent: #238940;
  --text-gold: #b45309;

  --border: #e2e8f0;
  --border-accent: rgba(35, 137, 64, 0.35);
  --border-gold: rgba(232, 163, 34, 0.35);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-accent: 0 4px 14px rgba(35, 137, 64, 0.2);
  --shadow-gold: 0 4px 14px rgba(232, 163, 34, 0.2);

  --sidebar-width: 250px;
  --header-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: 'Be Vietnam Pro', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1 { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); }
h2 { font-size: 1.4rem; font-weight: 600; color: var(--text-primary); }
h3 { font-size: 1.15rem; font-weight: 600; color: var(--text-primary); }
h4 { font-size: 1rem; font-weight: 600; color: var(--text-primary); }

/* =============================================
   LAYOUT SHELL
   ============================================= */
#app { display: flex; height: 100vh; overflow: hidden; background: var(--bg-base); }

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
  transition: transform var(--transition);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.02);
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.sidebar-logo img {
  width: 56px;
  height: 56px;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto 8px auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.06));
}

.sidebar-logo .logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 10px;
  box-shadow: var(--shadow-accent);
}

.sidebar-logo h1 {
  font-size: 1.05rem; font-weight: 700;
  color: var(--text-primary); line-height: 1.3;
}
.sidebar-logo p { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 0; }

.nav-section { margin-bottom: 6px; }

.nav-section-label {
  padding: 8px 18px 4px;
  font-size: 0.68rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  color: var(--text-secondary);
  text-decoration: none; cursor: pointer;
  border-radius: var(--radius-sm); margin: 2px 10px;
  font-size: 0.88rem; font-weight: 500;
  transition: all var(--transition);
  position: relative;
}
.nav-item:hover { background: #f1f5f9; color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
  border: 1px solid var(--border-accent);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 65%; background: var(--accent);
  border-radius: 0 4px 4px 0;
}
.nav-item .nav-icon { width: 20px; text-align: center; font-size: 1.05rem; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--danger); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  padding: 2px 6px; border-radius: 99px; min-width: 18px; text-align: center;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: #f8fafc; border: 1px solid var(--border); cursor: pointer;
  transition: all var(--transition);
}
.sidebar-user:hover { background: #f1f5f9; border-color: var(--border-accent); }
.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: #fff; flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(35, 137, 64, 0.2);
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.7rem; color: var(--accent); font-weight: 500; }
.user-logout-btn { color: var(--text-muted); background: none; border: none; cursor: pointer; padding: 4px; font-size: 0.9rem; border-radius: 4px; }
.user-logout-btn:hover { color: var(--danger); }

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-wrapper {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}

/* HEADER */
.header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px; flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.header-title { font-size: 1.15rem; font-weight: 700; flex: 1; color: var(--text-primary); }
.header-subtitle { font-size: 0.78rem; color: var(--text-muted); }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* CONTENT AREA */
.content {
  flex: 1; overflow-y: auto; padding: 28px; background: var(--bg-base);
}

/* =============================================
   PAGE HEADER
   ============================================= */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.page-title { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; }
.page-subtitle { font-size: 0.84rem; color: var(--text-muted); margin-top: 2px; }

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-md); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.card-title { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }

/* STATS CARDS */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px; margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all var(--transition); cursor: default;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition);
}
.stat-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}
.stat-icon.indigo { background: var(--accent-glow); color: var(--accent); }
.stat-icon.green { background: rgba(35, 137, 64, 0.12); color: var(--accent); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.yellow { background: rgba(232, 163, 34, 0.15); color: var(--secondary-dark); }
.stat-icon.cyan { background: var(--info-bg); color: var(--info); }
.stat-value { font-size: 2.1rem; font-weight: 800; line-height: 1; color: var(--text-primary); }
.stat-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }
.stat-sub { font-size: 0.78rem; color: var(--text-muted); }

/* GRID LAYOUTS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; border: none; outline: none;
  transition: all var(--transition); text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(35, 137, 64, 0.25);
}
.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow-accent);
}

.btn-warning {
  background: var(--secondary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(232, 163, 34, 0.25);
}
.btn-warning:hover {
  background: var(--secondary-dark);
  box-shadow: var(--shadow-gold);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: #f8fafc;
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.2);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-success {
  background: rgba(35, 137, 64, 0.1);
  color: var(--accent);
  border: 1px solid var(--border-accent);
}
.btn-success:hover {
  background: var(--accent);
  color: #fff;
}

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-xs { padding: 3px 8px; font-size: 0.72rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: #f1f5f9; color: var(--text-primary); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* =============================================
   FORMS
   ============================================= */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-label.required::after { content: ' *'; color: var(--danger); }

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit; font-size: 0.88rem;
  transition: all var(--transition);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: #94a3b8; }
select.form-control { cursor: pointer; }
select.form-control option { background: #ffffff; color: var(--text-primary); }
textarea.form-control { resize: vertical; min-height: 85px; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: 4px; font-weight: 500; }
.form-control.error { border-color: var(--danger); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* =============================================
   FILTER BAR
   ============================================= */
.filter-bar {
  display: flex; align-items: center; gap: 12px;
  background: #ffffff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  margin-bottom: 20px; flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.filter-bar .form-control { width: auto; min-width: 160px; }
.filter-bar .form-control-sm { padding: 7px 12px; font-size: 0.82rem; }

/* =============================================
   TABLE
   ============================================= */
.table-wrapper {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  gap: 12px; flex-wrap: wrap;
  background: #ffffff;
}
.table-search {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 220px;
}
.table-count { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; white-space: nowrap; }

.table-scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
thead tr { background: #f8fafc; border-bottom: 1px solid var(--border); }
th {
  padding: 12px 14px; text-align: left;
  font-size: 0.74rem; font-weight: 700;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem; color: var(--text-primary);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: #f8fafc; }

/* Rank badge */
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  font-weight: 800; font-size: 0.85rem;
}
.rank-1 { background: linear-gradient(135deg, #e8a322, #fbbf24); color: #ffffff; box-shadow: 0 2px 8px rgba(232, 163, 34, 0.35); }
.rank-2 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #ffffff; }
.rank-3 { background: linear-gradient(135deg, #b45309, #d97706); color: #ffffff; }
.rank-other { background: #f1f5f9; color: var(--text-muted); font-weight: 600; }

/* =============================================
   BADGES / TAGS
   ============================================= */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 99px;
  font-size: 0.74rem; font-weight: 600; white-space: nowrap;
}
.badge-indigo { background: rgba(35, 137, 64, 0.1); color: var(--accent); border: 1px solid var(--border-accent); }
.badge-red { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.badge-green { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.badge-yellow { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge-cyan { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
.badge-gray { background: #f1f5f9; color: var(--text-muted); border: 1px solid #e2e8f0; }

/* Score badges */
.score-positive { color: var(--success); font-weight: 700; }
.score-negative { color: var(--danger); font-weight: 700; }

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
.modal {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.2s ease;
}
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1020px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
  background: #ffffff;
}
.modal-title { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.3rem; padding: 4px; border-radius: 4px; }
.modal-close:hover { color: var(--text-primary); background: #f1f5f9; }
.modal-body { padding: 24px; background: #ffffff; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px; border-top: 1px solid var(--border);
  background: #f8fafc; border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg);
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius);
  background: #ffffff; border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); min-width: 300px; max-width: 400px;
  pointer-events: all; animation: slideInRight 0.25s ease;
  font-size: 0.88rem; font-weight: 500;
}
.toast.success { border-left: 4px solid var(--accent); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--secondary); }
.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.4; color: var(--text-primary); }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; padding: 2px; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* =============================================
   LOADING STATES
   ============================================= */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid #e2e8f0;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-loader {
  display: flex; align-items: center; justify-content: center;
  min-height: 220px; color: var(--text-muted); gap: 12px; font-size: 0.95rem;
}

.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 24px; color: var(--text-muted); text-align: center; gap: 8px;
}
.empty-state .empty-icon { font-size: 3.2rem; margin-bottom: 8px; opacity: 0.7; }
.empty-state h3 { color: var(--text-secondary); font-size: 1.05rem; font-weight: 700; }
.empty-state p { font-size: 0.88rem; }

/* =============================================
   LOGIN PAGE
   ============================================= */
#login-page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: #0f172a;
  background-image: url('school-bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 24px;
}

.login-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  pointer-events: none;
}

.login-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.35) 0%,
    rgba(35, 137, 64, 0.20) 50%,
    rgba(15, 23, 42, 0.45) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: 42px 38px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 35px rgba(35, 137, 64, 0.2);
}
.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 28px;
}
.login-logo img {
  width: 100px;
  height: 100px;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto 16px auto;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
}
.login-logo .logo-box {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.8rem; box-shadow: var(--shadow-accent);
}
.login-logo h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; color: var(--text-primary); }
.login-logo p { font-size: 0.82rem; color: var(--text-muted); }
.login-footer { text-align: center; margin-top: 24px; font-size: 0.78rem; color: var(--text-muted); }

/* =============================================
   CHART CONTAINERS
   ============================================= */
.chart-container { position: relative; }
.chart-container canvas { max-height: 260px; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-muted); flex-wrap: wrap; gap: 8px;
  background: #ffffff;
}
.page-controls { display: flex; align-items: center; gap: 6px; }
.page-btn {
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: #ffffff; border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer; font-size: 0.82rem; font-weight: 500;
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

/* =============================================
   IMPORT DROPZONE
   ============================================= */
.dropzone {
  border: 2px dashed var(--border-accent);
  border-radius: var(--radius);
  padding: 44px 24px;
  text-align: center; cursor: pointer;
  transition: all var(--transition);
  background: #f8fafc;
}
.dropzone:hover, .dropzone.drag-over {
  background: var(--accent-glow); border-color: var(--accent);
}
.dropzone-icon { font-size: 2.8rem; margin-bottom: 12px; color: var(--accent); }
.dropzone p { color: var(--text-secondary); font-size: 0.95rem; font-weight: 600; }
.dropzone small { color: var(--text-muted); font-size: 0.8rem; }

/* =============================================
   TABS
   ============================================= */
.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px; cursor: pointer;
  background: none; border: none; color: var(--text-muted);
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--accent); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* =============================================
   NHAP VIPHAM SPECIAL LAYOUT
   ============================================= */
.vipham-layout {
  display: grid; grid-template-columns: 400px 1fr; gap: 24px; align-items: start;
}
.vipham-form-panel {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  position: sticky; top: 0;
  box-shadow: var(--shadow-sm);
}

/* =============================================
   SEARCHABLE COMBOBOX (VI PHAM / LOI)
   ============================================= */
.searchable-select-container {
  position: relative;
  width: 100%;
}

.searchable-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.searchable-icon {
  position: absolute;
  left: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
}

.searchable-input {
  padding-left: 36px !important;
  padding-right: 64px !important;
  width: 100%;
  cursor: text;
  background-color: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.searchable-input::-webkit-search-decoration,
.searchable-input::-webkit-search-cancel-button,
.searchable-input::-webkit-search-results-button,
.searchable-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}

.searchable-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(35, 137, 64, 0.12);
}

.searchable-clear-btn {
  position: absolute;
  right: 32px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
  z-index: 3;
}
.searchable-clear-btn:hover {
  color: var(--danger);
  background: rgba(220, 38, 38, 0.08);
}

.searchable-arrow-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.2s ease, color 0.15s ease;
  z-index: 3;
}
.searchable-arrow-btn:hover {
  color: var(--accent);
}
.searchable-select-container.open .searchable-arrow-btn {
  transform: rotate(180deg);
}

.searchable-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 290px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.05);
  z-index: 999;
  padding: 4px 0;
}

.searchable-group-header {
  padding: 6px 12px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}
.searchable-group-header:first-child {
  border-top: none;
}

.searchable-option {
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.15s ease;
}
.searchable-option:last-child {
  border-bottom: none;
}

.searchable-option:hover,
.searchable-option.active {
  background: rgba(35, 137, 64, 0.08);
}

.searchable-option.selected {
  background: rgba(35, 137, 64, 0.14);
  font-weight: 600;
}

.searchable-opt-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.searchable-code-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #e2e8f0;
  color: #1e293b;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.searchable-opt-name {
  color: var(--text-primary);
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.searchable-opt-name mark {
  background: rgba(232, 163, 34, 0.35);
  color: inherit;
  font-weight: 700;
  padding: 0 2px;
  border-radius: 2px;
}

.searchable-score-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}
.searchable-score-pos {
  background: rgba(35, 137, 64, 0.12);
  color: #1b6e33;
}
.searchable-score-neg {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.searchable-empty {
  padding: 18px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.animate-in { animation: fadeInUp 0.25s ease; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .vipham-layout { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { position: fixed; left: -100%; }
  .sidebar.open { left: 0; }
  .content { padding: 18px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

/* =============================================
   SIDEBAR TOGGLE (mobile)
   ============================================= */
.menu-toggle {
  display: none; background: none; border: none; color: var(--text-primary);
  font-size: 1.3rem; cursor: pointer; padding: 8px;
}
@media (max-width: 768px) { .menu-toggle { display: block; } }

/* =============================================
   MISC UTILITIES
   ============================================= */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-gold { color: var(--text-gold); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.fw-bold { font-weight: 700; }
.fw-600 { font-weight: 600; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
