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

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

:root {
  /* Colors */
  --primary:       #2563eb;
  --primary-light: #eff6ff;
  --primary-dark:  #1d4ed8;
  --sidebar-bg:    #ffffff;
  --sidebar-w:     240px;
  --body-bg:       #f3f4f8;
  --card-bg:       #ffffff;
  --border:        #e5e7eb;
  --text-main:     #111827;
  --text-sub:      #6b7280;
  --text-light:    #9ca3af;
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #3b82f6;
  --purple:        #8b5cf6;

  /* Sizing */
  --header-h:    56px;
  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 12px rgba(0,0,0,.10);
}

html, body { height: 100%; font-family: 'Inter', sans-serif; font-size: 14px; color: var(--text-main); background: var(--body-bg); }

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 99px; }

/* ===================== LAYOUT ===================== */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===================== SIDEBAR ===================== */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  transition: width .25s ease;
}

.sidebar.collapsed {
  width: 72px;
  min-width: 72px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .user-info,
.sidebar.collapsed .nav-arrow {
  display: none !important;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
}

.sidebar.collapsed .nav-icon {
  margin: 0;
  font-size: 18px;
}

.sidebar.collapsed .sidebar-logo {
  justify-content: center;
  padding: 16px 0;
}

.sidebar.collapsed .sidebar-user {
  justify-content: center;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  min-height: var(--header-h);
}
.sidebar-logo .logo-icon {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 13px;
  flex-shrink: 0;
}
.sidebar-logo .logo-text {
  font-weight: 700; font-size: 13px; color: var(--text-main);
  line-height: 1.3;
}
.sidebar-logo .logo-text span { color: var(--primary); }

.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-section {
  margin-top: 8px;
}
.nav-section-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 10px 18px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  margin: 1px 8px;
  color: var(--text-sub);
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  transition: background .15s, color .15s;
  position: relative;
  user-select: none;
}
.nav-item:hover { background: var(--primary-light); color: var(--primary); }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item .nav-badge {
  margin-left: auto;
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
}
.nav-item .nav-arrow {
  margin-left: auto;
  font-size: 11px;
  transition: transform .2s;
}
.nav-item.open .nav-arrow { transform: rotate(90deg); }

/* Submenu */
.nav-submenu {
  display: none;
  padding-left: 14px;
}
.nav-submenu.open { display: block; }
.nav-submenu .nav-item {
  font-size: 13px;
  padding: 7px 18px;
}

/* Sidebar footer */
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 12px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
}
.sidebar-user:hover { background: var(--body-bg); }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.user-info { flex: 1; overflow: hidden; }
.user-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11.5px; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===================== MAIN ===================== */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ===================== HEADER ===================== */
.topbar {
  height: var(--header-h);
  min-height: var(--header-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  z-index: 50;
}
.topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  flex: 1;
}
.topbar-title span { color: var(--text-sub); font-weight: 400; font-size: 13px; margin-left: 8px; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }
.btn-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-sub);
  font-size: 16px;
  transition: background .15s, color .15s;
  border: 1px solid transparent;
  position: relative;
}
.btn-icon:hover { background: var(--body-bg); color: var(--text-main); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  transition: background .15s, transform .1s;
  box-shadow: 0 2px 6px rgba(37,99,235,.3);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(.97); }

.topbar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
  border: 1px solid var(--border);
  margin-left: 4px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap; /* Tránh tràn header trên màn hình nhỏ */
  justify-content: flex-end;
}
@media (max-width: 768px) {
  .topbar-title { font-size: 13px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
  .topbar-actions button span { display: none; } /* Chỉ hiện icon trên mobile */
  .topbar-actions button { padding: 6px 10px; }
}

/* ===================== PAGE VIEW VISIBILITY ===================== */
.page-view {
  display: none;
  width: 100%;
}

.page-view.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

/* ===================== CONTENT ===================== */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* Section heading */
.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.section-heading h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  border-left: 3px solid var(--primary);
  padding-left: 10px;
}
.section-heading .spacer { flex: 1; }

/* Alert Banner */
.alert-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 16px;
}
.alert-banner strong { color: #c2410c; }
.alert-banner .btn-link {
  margin-left: auto;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.alert-banner .btn-link:hover { text-decoration: underline; }

/* ===================== KPI CARDS ===================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Tự thích ứng số cột */
  gap: 14px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.kpi-icon.blue   { background: #eff6ff; }
.kpi-icon.orange { background: #fff7ed; }
.kpi-icon.red    { background: #fef2f2; }
.kpi-icon.green  { background: #f0fdf4; }

.kpi-value { font-size: 28px; font-weight: 800; line-height: 1; color: var(--text-main); }
.kpi-label { font-size: 12.5px; color: var(--text-sub); margin-top: 3px; }
.kpi-delta { font-size: 11.5px; font-weight: 500; margin-top: 4px; }
.kpi-delta.up   { color: var(--success); }
.kpi-delta.down { color: var(--danger); }

/* ===================== TWO COLUMNS ===================== */
.two-col { display: grid; grid-template-columns: 1fr 380px; gap: 16px; align-items: stretch; }

/* ===================== CARD ===================== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 14px; font-weight: 700; flex: 1; }
.card-header .chip {
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}
.card-link { font-size: 12.5px; font-weight: 600; color: var(--primary); cursor: pointer; }
.card-link:hover { text-decoration: underline; }
.card-body { padding: 14px 18px; flex: 1; display: flex; flex-direction: column; }

/* ===================== PREMIUM ADMISSIONS LIST ===================== */
#admissionsList {
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hoso-item {
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
}
.hoso-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
}
.hoso-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e2e8f0;
}
.student-info { display: flex; align-items: center; gap: 12px; }
.student-icon {
  width: 36px; height: 36px;
  background: #eff6ff; color: var(--primary);
  border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.major-student-info { display: flex; flex-direction: column; }
.hoso-nganh {
  color: var(--primary); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px;
}
.hoso-ten { color: var(--text-main); font-size: 15px; font-weight: 700; }
.staff-badge {
  background: #f8fafc; border: 1px solid #e2e8f0;
  padding: 6px 12px; border-radius: 20px;
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-sub);
}
.staff-badge i { color: #94a3b8; }
.staff-badge strong { color: var(--text-main); font-weight: 600; }

.pipeline-steps { display: flex; justify-content: space-between; align-items: flex-start; position: relative; width: 100%; }
.step { display: flex; flex-direction: column; align-items: center; position: relative; flex: 1; z-index: 1; }
.step:not(:last-child)::after {
  content: ''; position: absolute; top: 17px; left: calc(50% + 18px);
  width: calc(100% - 36px); height: 3px; background: #e2e8f0; z-index: -1; transition: background 0.4s ease;
}
.import-steps .step::after { display: none !important; }
.step.done:not(:last-child)::after { background: #10b981; }
.step-circle {
  width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 2px solid #e2e8f0;
  display: flex; justify-content: center; align-items: center; font-weight: 700; font-size: 13px; color: #94a3b8;
  transition: all 0.3s ease; box-shadow: 0 0 0 4px #fff; margin-bottom: 10px;
}
.step.done .step-circle { background: #10b981; border-color: #10b981; color: #fff; }
.step.active .step-circle {
  background: #fff; border-color: var(--primary); color: var(--primary);
  box-shadow: 0 0 0 4px #fff, 0 0 12px rgba(37, 99, 235, 0.25); transform: scale(1.1);
}
.step-label { font-size: 10.5px; font-weight: 600; color: #64748b; max-width: 80px; line-height: 1.3; text-align: center; }
.step.active .step-label { color: var(--primary); font-weight: 700; }
.step.done .step-label { color: var(--text-main); }

.step.failed .step-circle {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.step.failed .step-label {
    color: #ef4444;
    font-weight: 700;
}

/* Line connectors update for failed steps */
.step.failed:not(:last-child)::after {
    background: #fecaca;
}

/* ===================== CHỈ TIÊU PANEL ===================== */
.chitieu-item { margin-bottom: 16px; }
.chitieu-item:last-child { margin-bottom: 0; }
.chitieu-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.chitieu-label { font-size: 13px; font-weight: 500; }
.chitieu-numbers { font-size: 12.5px; font-weight: 700; color: var(--text-sub); }
.chitieu-numbers strong { color: var(--text-main); }
.progress-bar {
  height: 7px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.fill-green  { background: var(--success); }
.fill-red    { background: var(--danger); }
.fill-blue   { background: var(--info); }
.fill-yellow { background: var(--warning); }

.chitieu-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.chitieu-header h3 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.chitieu-header .deadline { font-size: 11.5px; color: var(--danger); background: #fef2f2; padding: 2px 7px; border-radius: 99px; font-weight: 600; }

/* ===================== BADGES & TAGS ===================== */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge-green  { background: #dcfce7; color: #15803d; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-orange { background: #fff7ed; color: #c2410c; }
.badge-red    { background: #fef2f2; color: #b91c1c; }
.badge-gray   { background: #f3f4f6; color: #4b5563; }

/* ===================== TABLES ===================== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: #fafafa;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--primary-light); }

/* ===================== KANBAN ===================== */
.kanban-wrapper {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.kanban-col {
  min-width: 250px;
  max-width: 280px;
  flex: 1;
  background: #f8f9fb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.kanban-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 13px;
}
.kanban-col-header .count {
  margin-left: auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.kanban-cards { padding: 10px; flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.kcard {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: grab;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .15s;
}
.kcard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kcard:active { cursor: grabbing; }
.kcard-name { font-weight: 600; font-size: 13px; margin-bottom: 3px; }
.kcard-phone { font-size: 12px; color: var(--text-sub); margin-bottom: 6px; }
.kcard-footer { display: flex; align-items: center; gap: 6px; }
.kcard-tag { font-size: 11px; padding: 2px 7px; border-radius: 99px; font-weight: 500; }

/* ===================== MODALS ===================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: none; /* Mặc định ẩn */
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    transition: all 0.3s;
}
.modal.show {
    display: flex; /* Hiện khi có class .show */
}

/* Modal Content Box */
.modal-content {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
    transform: translateY(16px) scale(.98);
    transition: transform .25s;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal.show .modal-content {
    transform: none;
}
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.modal-header h3 { font-size: 16px; font-weight: 700; flex: 1; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-sub); font-size: 18px;
  transition: background .15s;
}
.modal-close:hover { background: var(--body-bg); color: var(--text-main); }
.modal-body { padding: 20px 22px; overflow-y: visible; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* Form */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-sub); margin-bottom: 5px; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-main);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: var(--body-bg);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 13px;
  transition: background .15s;
}
.btn-secondary:hover { background: #e5e7eb; }

/* ===================== LOGIN PAGE ===================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(37,99,235,.12);
  padding: 36px 40px;
  width: 100%;
  max-width: 400px;
}
.login-logo {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  text-align: center;
}
.login-logo .ico {
  width: 52px; height: 52px;
  background: var(--primary);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 800;
}
.login-logo h1 { font-size: 20px; font-weight: 800; color: var(--text-main); }
.login-logo p  { font-size: 12.5px; color: var(--text-sub); }
.login-form .form-control { padding: 10px 13px; }
.login-form .btn-primary { width: 100%; justify-content: center; padding: 10px; font-size: 14px; }
.quick-login { margin-top: 18px; }
.quick-login p { font-size: 12px; color: var(--text-sub); text-align: center; margin-bottom: 8px; }
.quick-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.quick-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-sub);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.quick-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* ===================== TOOLBAR ===================== */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-box {
  display: flex; align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
  width: 240px;
}
.search-box input {
  padding: 7px 10px;
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font-size: 13px;
}
.search-box .icon { padding: 0 10px; color: var(--text-light); }
.filter-select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-main);
  outline: none;
  font-size: 13px;
  cursor: pointer;
}
.toolbar .spacer { flex: 1; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { position: fixed; left: -var(--sidebar-w); z-index: 200; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}

/* ===================== PAGE VIEWS ===================== */
.page-view { display: none; }
.page-view.active { display: block; }

/* ===================== PIPELINE DASHBOARD SECTION ===================== */
.pipeline-section {
    margin-top: 24px;
}
#pipeline-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    flex-shrink: 0;
}
#pipeline-title i { color: var(--primary); font-size: 18px; }
.pipeline-view-tabs {
    display: flex;
    gap: 8px;
    margin-left: 20px;
    flex: 1;
}
.p-tab {
    padding: 8px 16px;
    border: 1px solid transparent;
    background: #f3f4f6;
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap; /* Buộc tất cả nội dung trên 1 hàng */
    flex-shrink: 0;
}
.p-tab i { font-size: 14px; opacity: 0.8; }
.p-tab:hover { background: #e5e7eb; color: var(--text-main); }
.p-tab.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}
.p-tab.active i { opacity: 1; }
.tab-count {
    font-size: 11px;
    padding: 1px 8px;
    background: rgba(0,0,0,0.08);
    color: inherit;
    border-radius: 20px;
    font-weight: 700;
}
.p-tab.active .tab-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.header-tools { display: flex; align-items: center; gap: 12px; }
.search-mini {
    display: flex; align-items: center; gap: 8px;
    background: #f9fafb;
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}
.search-mini input { border: none; background: transparent; outline: none; font-size: 12px; width: 120px; }
.search-mini i { font-size: 12px; color: var(--text-light); }

.pipeline-board {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 12px 14px;
    background: #ffffff;
}

.pipeline-column {
    min-width: 250px;
    flex: 1 1 0px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.column-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 2px 0 8px;
}
.column-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 700;
}
.column-count {
    background: #e5e7eb; color: var(--text-sub);
    font-size: 11px; padding: 1px 6px; border-radius: 4px;
}

/* Lead Card Styles */
.lead-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    box-shadow: var(--shadow);
    transition: all .24s cubic-bezier(.4, 0, .2, 1);
    position: relative;
    cursor: pointer;
}
.lead-card:hover { 
    box-shadow: var(--shadow-md); 
    transform: translateY(-3px); 
    border-color: var(--primary);
}

.lead-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 12px;
}
.lead-name { font-weight: 800; font-size: 14.5px; color: var(--text-main); margin-bottom: 3px; }
.lead-school { 
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text-sub); font-weight: 500; 
}
.lead-school i { color: var(--primary); font-size: 11px; opacity: 0.8; }
.lead-last-activity { font-size: 10px; color: var(--text-light); white-space: nowrap; margin-top: 4px; }

.lead-info {
    display: flex; gap: 16px;
    padding: 10px 0;
    border-top: 1px dashed var(--border);
    margin-bottom: 8px;
}
.lead-info-column { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.lead-info-item { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-sub); }
.lead-info-item i { width: 14px; text-align: center; color: var(--text-light); transition: color 0.2s; }
.lead-info-item:hover i { color: var(--primary); }

/* semantic icon colors */
.lead-info-item i.fa-phone { color: #10b981; } /* Green for calling */
.lead-info-item i.fa-facebook-messenger, .lead-info-item i.fa-comments { color: #3b82f6; } /* Blue for Chat */
.lead-info-item i.fa-graduation-cap, .lead-info-item i.fa-book-open { color: #8b5cf6; } /* Purple for Education */
.lead-info-item i.fa-bullhorn, .lead-info-item i.fa-share-nodes { color: #f59e0b; } /* Orange for Source */
.lead-info-item i.fa-user-tie { color: #64748b; } /* Slate for Staff */

.lead-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.lead-tag { 
    font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; 
    background: #f3f4f6; color: var(--text-sub); text-transform: uppercase;
}
.lead-tag.VIP { background: #fee2e2; color: #b91c1c; }
.lead-tag.priority-high { background: #fef2f2; color: #ef4444; }
.lead-tag.priority-medium { background: #fff7ed; color: #f59e0b; }
.lead-tag.priority-low { background: #f0fdf4; color: #10b981; }


.lead-footer {
    display: flex; align-items: center; justify-content: center;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}
.lead-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lead-action-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-sub); font-size: 14px;
    background: #f9fafb; border: 1px solid var(--border);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.lead-action-btn.call:hover { background: var(--success); color: #fff; border-color: var(--success); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); }
.lead-action-btn.zalo:hover { background: #0068ff; color: #fff; border-color: #0068ff; box-shadow: 0 4px 12px rgba(0, 104, 255, 0.2); }
.lead-action-btn.video:hover { background: #db2777; color: #fff; border-color: #db2777; box-shadow: 0 4px 12px rgba(219, 39, 119, 0.2); }
.lead-action-btn.appointment:hover { background: var(--warning); color: #fff; border-color: var(--warning); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2); }
.lead-action-btn.quote:hover { background: #d97706; color: #fff; border-color: #d97706; box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2); }
.lead-action-btn.contract:hover { background: #059669; color: #fff; border-color: #059669; box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2); }

/* Tooltip implementation */
.lead-action-btn { position: relative; }
.lead-action-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: rgba(30, 41, 59, 0.95);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.lead-action-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Contracted style */
.lead-card.contracted { border-left: 4px solid var(--success); }

/* Column Content */
.column-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
}

/* ===================== IMPORT MODAL STYLES ===================== */
.upload-dropzone {
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.upload-dropzone:hover {
    border-color: var(--primary);
    background: #eff6ff;
}
.upload-dropzone i {
    font-size: 32px;
    color: var(--text-light);
    margin-bottom: 8px;
}
.upload-dropzone p { font-weight: 600; color: var(--text-main); margin: 0; }
.upload-dropzone span { font-size: 13px; color: var(--text-sub); }

.template-link {
    margin-top: 20px;
    padding: 12px;
    background: #fff9eb;
    border: 1px solid #fef3c7;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
}
.template-link i { margin-right: 6px; }
.btn-link { color: var(--primary); text-decoration: underline; font-weight: 600; cursor: pointer; }

/* Progress Bar */
.parsing-status {
    margin-top: 25px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
}
.status-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}
.progress-bar-container {
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}
/* ===================== CARE HISTORY MODAL ===================== */
.modal-xl { max-width: 1000px !important; width: 95% !important; }
.crm-modal { border-radius: 16px; overflow: hidden; }
.modal-subtitle { font-size: 13px; color: var(--text-sub); margin-top: 4px; }
.modal-header > div:first-child { flex: 1; } /* Đẩy nút X về bên phải */
.btn-close-circle {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #f8fafc; color: #94a3b8;
    border: none; cursor: pointer;
    transition: all 0.2s;
}
.btn-close-circle:hover { background: #fee2e2; color: #ef4444; transform: rotate(90deg); }

.care-history-layout { display: flex; height: 600px; background: #fff; }

/* Drag and Drop Styles */
.lead-card.dragging {
    opacity: 0.4;
    cursor: move;
    transform: scale(0.98);
    transition: all 0.1s ease;
    border: 2px dashed var(--primary);
}

/* Hiệu ứng mượt mà khi chốt hồ sơ tự động */
.fadeIn {
    animation: fadeIn 0.5s ease-in-out;
}

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

.column-content.drag-over {
    background-color: var(--primary-light) !important;
    outline: 2px dashed var(--primary);
    outline-offset: -4px;
    border-radius: var(--radius);
    transition: background-color 0.2s ease;
}

.kanban-cards.drag-over {
    background-color: rgba(37, 99, 235, 0.05) !important;
    outline: 2px dashed var(--primary);
    outline-offset: -2px;
}

/* Left: Timeline Section */
.care-timeline-section {
    flex: 1; border-right: 1px solid var(--border);
    display: flex; flex-direction: column; background: #f8fafc;
}
.timeline-header { padding: 20px; border-bottom: 1px solid var(--border); }
.timeline-header h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }

.care-timeline { flex: 1; overflow-y: auto; padding: 20px; }
.timeline-item { position: relative; padding-left: 30px; margin-bottom: 25px; }
.timeline-item::before {
    content: ''; position: absolute; left: 11px; top: 20px;
    bottom: -20px; width: 2px; background: #e2e8f0;
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
    position: absolute; left: 0; top: 0;
    width: 24px; height: 24px; border-radius: 50%;
    background: #fff; border: 2px solid var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 10px;
    color: var(--primary); z-index: 1;
}
.timeline-content {
    background: #fff; padding: 12px; border-radius: 10px;
    border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.timeline-time { font-size: 11px; color: var(--text-light); margin-bottom: 4px; }
.timeline-title { font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--text-main); }
.timeline-desc { font-size: 13px; color: var(--text-sub); line-height: 1.5; }

/* Right: Form Section */
.care-form-section { flex: 1; display: flex; flex-direction: column; }
.form-body-scroll { flex: 1; overflow-y: auto; padding: 25px; }
.form-header { margin-bottom: 20px; }
.form-header h3 { font-size: 16px; color: var(--primary); display: flex; align-items: center; gap: 8px; }

.datetime-row { display: flex; gap: 15px; margin-bottom: 15px; }
.datetime-group { flex: 1; }
.input-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; color: var(--text-main); }
.input-field {
    width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
    border-radius: 8px; outline: none; transition: all 0.2s;
}
.input-field:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.input-group { margin-bottom: 15px; }
.input-textarea { resize: vertical; min-height: 100px; }

.care-reminder-box {
    background: #fffbeb; border: 1px solid #fde68a;
    padding: 12px; border-radius: 10px; margin-top: 10px;
}
.reminder-label { font-size: 12px; font-weight: 600; color: #92400e; margin-bottom: 8px; }
.reminder-controls { display: flex; align-items: center; gap: 10px; }
.reminder-check-wrapper { font-size: 13px; color: var(--text-main); display: flex; align-items: center; gap: 6px; }
.sel-reminder-time { padding: 4px 8px; border-radius: 4px; border: 1px solid #fde68a; font-size: 12px; outline: none; }

.action-buttons {
    padding: 20px 25px; border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 12px; background: #fff;
}
.action-btn {
    padding: 10px 20px; border-radius: 8px; font-weight: 600;
    font-size: 14px; display: flex; align-items: center; gap: 8px; transition: all 0.2s;
}
.btn-cancel { background: #f1f5f9; color: var(--text-sub); }
.btn-cancel:hover { background: #e2e8f0; }
.btn-save { background: var(--primary); color: #fff; }
.btn-save:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }

/* ===================== ACTIVE BUTTON STATES (SÁNG LÊN) ===================== */
.lead-action-btn.active.call { 
    background: var(--success); color: #fff; border-color: var(--success); 
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6); 
}
.lead-action-btn.active.zalo { 
    background: #0068ff; color: #fff; border-color: #0068ff; 
    box-shadow: 0 0 10px rgba(0, 104, 255, 0.6); 
}
.lead-action-btn.active.video { 
    background: #db2777; color: #fff; border-color: #db2777; 
    box-shadow: 0 0 10px rgba(219, 39, 119, 0.6); 
}
.lead-action-btn.active.appointment { 
    background: var(--warning); color: #fff; border-color: var(--warning); 
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); 
}
.lead-action-btn.active.quote { 
    background: #d97706; color: #fff; border-color: #d97706; 
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.6); 
}
.lead-action-btn.active.contract { 
    background: #059669; color: #fff; border-color: #059669; 
    box-shadow: 0 0 15px rgba(5, 150, 105, 0.8); 
    animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
    0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(5, 150, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* ===================== PREMIUM ADMISSIONS PERFORMANCE PAGE (ROW-BASED) ===================== */
.performance-metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.perf-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #edf2f7;
    transition: transform 0.3s ease;
}

.perf-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.perf-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.perf-icon.blue { background: #eff6ff; color: #2563eb; }
.perf-icon.green { background: #ecfdf5; color: #10b981; }
.perf-icon.orange { background: #fff7ed; color: #f59e0b; }
.perf-icon.purple { background: #faf5ff; color: #8b5cf6; }

.perf-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.perf-label {
    font-size: 12px;
    color: var(--text-sub);
    font-weight: 500;
}

/* Toolbar Premium */
.toolbar-premium {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.search-box-large {
    flex: 1;
    position: relative;
}

.search-box-large i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-box-large input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
}

.search-box-large input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.filters-group {
    display: flex;
    gap: 12px;
}

.p-select {
    padding: 9px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    background: #f8fafc;
    cursor: pointer;
}

.btn-export-premium {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    padding: 10px 22px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-export-premium::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
    transition: all 0.5s;
    pointer-events: none;
}

.btn-export-premium:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-export-premium:hover::after {
    left: 120%;
    transition: all 0.6s ease;
}

.btn-export-premium i {
    font-size: 16px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Horizontal Row Item */
.admissions-rows-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-right: 8px;
    margin-bottom: 20px;
}
.admissions-rows-container::-webkit-scrollbar { width: 6px; }
.admissions-rows-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Dashboard Small Cards (Compact) - Vertical Scroll 2 Items */
#admissionsList {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 310px !important;
    gap: 12px;
    padding-bottom: 12px;
    padding-right: 5px;
}
#admissionsList::-webkit-scrollbar { width: 5px; }
#admissionsList::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.hoso-item {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 0px;
    min-width: 280px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* .hoso-item:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
} */

.hoso-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.student-info { display: flex; align-items: center; gap: 8px; }
.student-icon {
    width: 28px;
    height: 28px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.hoso-nganh { font-size: 9px; font-weight: 700; color: var(--primary); text-transform: uppercase; margin: 0; }
.hoso-ten { font-size: 13.5px; font-weight: 700; color: var(--text-main); line-height: 1.2; }
.staff-badge { font-size: 10.5px; color: var(--text-sub); }

/* Pipeline thon gọn cho Dashboard */
.pipeline-steps {
    display: flex;
    justify-content: space-between;
    padding-top: 4px;
}

/* Horizontal Row Item (Restored & Refined) */
.hoso-item-row {
    background: #ffffff;
    border-radius: 16px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    border: 1px solid #edf2f7;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.hoso-item-row:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    transform: translateX(4px);
}

.student-meta-box { width: 220px; min-width: 220px; }
.row-student-info { display: flex; align-items: center; gap: 12px; }
.row-student-icon {
    width: 40px; height: 40px;
    background: #eff6ff; color: var(--primary);
    border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.row-student-details { display: flex; flex-direction: column; }
.row-hoso-ten { font-weight: 700; font-size: 15px; color: var(--text-main); }
.row-hoso-nganh { font-size: 11px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; }

.row-pipeline-area {
    flex: 1;
    margin: 0 20px;
}

.row-province-box {
    width: 140px;
    min-width: 140px;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.province-tag {
    font-size: 12px;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.province-tag strong {
    color: var(--text-main);
}

/* Responsive adjustment */
@media (max-width: 1200px) {
    .performance-metrics-row { grid-template-columns: repeat(2, 1fr); }
    .hoso-item-row { flex-direction: column; align-items: stretch; gap: 20px; }
    .student-meta-box, .row-province-box { width: 100%; text-align: left; }
    .row-province-box { justify-content: flex-start; }
    .province-tag { justify-content: flex-start; }
}

/* ===================== DASHBOARD PREMIUM ENHANCEMENTS ===================== */
.card-header-premium {
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    background: #fcfdfe;
    border-radius: 16px 16px 0 0;
}

.perf-stats-mini {
    display: flex;
    gap: 20px;
    margin-right: 20px;
}

.stat-item {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-item i { font-size: 14px; }
.stat-item.blue i { color: #2563eb; }
.stat-item.green i { color: #10b981; }

.stat-item strong { color: #1e293b; font-weight: 700; }
/* ===================== DISTRIBUTE DATA PAGE ===================== */
.distribute-container {
    padding: 10px 0;
}

.distribute-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.distribute-main-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.staff-distribute-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.staff-distribute-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.staff-distribute-item:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.staff-distribute-item.selected {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.staff-check-box {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    background: #fff;
}

.staff-distribute-item.selected .staff-check-box {
    background: var(--primary);
    border-color: var(--primary);
}

/* ===================== ZALO MULTI-ACCOUNT CHAT ===================== */
.zalochat-wrapper {
    display: flex;
    height: calc(100vh - 120px);
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
}

/* COL 1: ACCOUNT BAR */
.z-account-bar {
    width: 70px;
    background: #f1f5f9;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 15px;
}

.z-account-item {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.z-account-item.active {
    border-radius: 12px;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--primary);
}

.z-account-item .z-avatar {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.z-account-item .status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 3px solid #f1f5f9;
    border-radius: 50%;
}

.z-account-add {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
}

/* COL 2: CHAT SIDEBAR */
.z-chat-sidebar {
    width: 320px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background: #fff;
}

.z-sidebar-header {
    padding: 20px;
}

.z-sidebar-header h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.z-search-box {
    position: relative;
    width: 100%;
}

.z-search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-sub);
}

.z-search-box input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 14px;
}

.z-convo-list {
    flex: 1;
    overflow-y: auto;
}

.z-convo-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.z-convo-item:hover { background: #f8fafc; }
.z-convo-item.active { background: #eff6ff; border-left: 3px solid var(--primary); }

.z-convo-info { flex: 1; overflow: hidden; }
.z-convo-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.z-convo-top h4 { font-size: 14px; color: var(--text-main); font-weight: 600; }
.z-convo-time { font-size: 11px; color: var(--text-sub); }
.z-convo-last { font-size: 13px; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* COL 3: CHAT MAIN */
.z-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    position: relative;
}

.z-chat-header {
    padding: 15px 25px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.z-header-user { display: flex; align-items: center; gap: 12px; }
.z-avatar-main {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.z-header-info h4 { margin: 0; font-size: 15px; }
.z-status-text { font-size: 12px; color: #10b981; }

.z-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* MESSAGE BUBBLES */
.z-msg {
    max-width: 70%;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    border-radius: 18px;
}

.z-msg.received {
    align-self: flex-start;
    background: #fff;
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    border-bottom-left-radius: 4px;
}

.z-msg.sent {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.z-msg-time {
    font-size: 10px;
    margin-top: 5px;
    opacity: 0.7;
    display: block;
}

/* INPUT AREA */
.z-chat-input-area {
    padding: 20px 25px;
    background: #fff;
    border-top: 1px solid var(--border);
}

.z-input-tools {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
}

.z-input-tools button {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s;
}

.z-input-tools button:hover { color: var(--primary); }

.z-input-wrapper {
    display: flex;
    gap: 10px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 5px 12px;
    align-items: center;
}

.z-input-wrapper input {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 0;
    outline: none;
    font-size: 14px;
}

.btn-send {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 18px;
}

.z-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-sub);
    text-align: center;
    padding: 40px;
}

/* ===================== SETTINGS & USER MANAGEMENT ===================== */
.user-management-wrapper {
    padding: 10px 0;
}

.top-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.top-header-bar .title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-header-bar .title i { color: var(--primary); }
.top-header-bar .subtitle { color: var(--text-sub); font-size: 14px; margin-top: 4px; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.bg-soft-blue { background: #eff6ff; color: #3b82f6; }
.bg-soft-green { background: #ecfdf5; color: #10b981; }
.bg-soft-purple { background: #faf5ff; color: #8b5cf6; }

.stat-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
}

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

/* Tabs */
.tabs-container {
    background: #fff;
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    padding: 10px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}

.tab-btn {
    padding: 12px 20px;
    border: none;
    background: none;
    font-weight: 600;
    color: var(--text-sub);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 14px;
}

.tab-btn.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.tab-content { padding: 25px; display: none; }
.tab-content.active { display: block; }

/* Table E */
.e-table {
    width: 100%;
    border-collapse: collapse;
}

.e-table th {
    text-align: left;
    padding: 15px;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-sub);
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
}

.e-table td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
}

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

.cell-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
}

.cell-meta { display: flex; flex-direction: column; }
.cell-name { font-weight: 600; font-size: 14px; color: var(--text-main); }
.cell-sub { font-size: 12px; color: var(--text-sub); }

.badge-role {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
}

.role-admin { background: #fee2e2; color: #ef4444; }
.role-senior_sale { background: #e0e7ff; color: #4338ca; }
.role-sale { background: #fef3c7; color: #d97706; }

.status-cell { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-active { background: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }

.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Roles Management */
.roles-management-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}

.roles-list-pane {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.role-card {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s;
}

.role-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.role-card.active { border-color: var(--primary); background: #f5f3ff; }

.role-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.role-name { font-weight: 700; font-size: 16px; color: var(--text-main); }
.role-key { font-size: 11px; font-weight: 700; color: var(--text-sub); background: #f1f5f9; padding: 2px 6px; border-radius: 4px; }
.role-desc { font-size: 13px; color: var(--text-sub); margin-bottom: 15px; }

.role-permissions-pane {
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 30px;
    min-height: 400px;
}

.permission-group {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.permission-group h4 {
    margin-bottom: 15px;
    font-size: 15px;
    color: var(--text-main);
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.perm-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.perm-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #475569; }
.perm-item input[type="checkbox"] { width: 16px; height: 16px; border-radius: 4px; cursor: pointer; }

.empty-state { text-align: center; padding: 50px; color: var(--text-sub); }
.empty-state i { font-size: 40px; margin-bottom: 15px; opacity: 0.3; }
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.distribute-action-box .action-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.distribute-action-box h4 { margin-bottom: 10px; font-size: 18px; color: var(--text-main); }
.distribute-action-box p { font-size: 13px; color: var(--text-sub); line-height: 1.5; }

.results-log-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.log-item {
    padding: 12px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-staff { font-weight: 700; color: var(--text-main); }
.log-count { font-weight: 800; color: var(--primary); font-size: 16px; }

@media (max-width: 992px) {
    .distribute-main-layout { grid-template-columns: 1fr; }
}

.card-link-premium {
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    padding: 6px 12px;
    background: #eff6ff;
    border-radius: 8px;
}

.card-link-premium:hover { 
    background: #2563eb;
    color: #fff;
    transform: translateX(3px); 
}

.two-col-reverse {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 16px;
    margin-top: 24px;
}

.info-tips-card {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(191, 219, 254, 0.2);
}

.tip-header { font-size: 15px; font-weight: 700; color: #1e40af; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.tip-content { font-size: 13.5px; color: #1e3a8a; line-height: 1.6; font-style: italic; }

#admissionsList {
    max-height: 380px; /* Chiều cao vừa đủ cho khoảng 2 hồ sơ */
    overflow-y: auto;
    padding-right: 8px;
    margin-top: 10px;
}

#admissionsList::-webkit-scrollbar {
    width: 5px;
}

#admissionsList::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

#admissionsList::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

#admissionsList::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===================== DISTRIBUTE DATA 3-STEPS ===================== */
.distribute-workflow {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
    margin-top: 30px; /* Tăng lề để có chỗ cho Badge */
}

.distribute-step-card {
    position: relative;
    padding-top: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible !important; /* Đảm bảo hiện Badge phía trên */
}

.step-badge {
    position: absolute;
    top: -20px; /* Đẩy cao lên thêm chút */
    left: 20px;
    width: 44px; /* Tăng kích thước nhẹ cho sang */
    height: 44px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    border: 4px solid #fff;
    z-index: 100;
}

.import-source-box {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 30px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}

.import-source-box:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.import-source-box i {
    font-size: 32px;
    color: #10b981;
    margin-bottom: 10px;
}

.import-source-box p {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 5px;
}

.file-hint {
    font-size: 11px;
    color: var(--text-sub);
}

.parsing-status {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.distribute-step-card.disabled-step {
    filter: grayscale(1);
    opacity: 0.6;
    pointer-events: none;
}

.action-summary-box {
    border-left: 4px solid var(--primary);
}

@media (max-width: 1200px) {
    .distribute-workflow { grid-template-columns: 1fr; gap: 30px; }
}

/* ===================== ZALO AUTOMATION TOOL ===================== */
.zalo-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.z-stat-card {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.z-stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); }

.z-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.z-stat-icon.active-c { background: #ecfdf5; color: #10b981; }
.z-stat-icon.done-c { background: #fff7ed; color: #f59e0b; }

.z-stat-info { display: flex; flex-direction: column; gap: 4px; }
.z-label { font-size: 13px; color: #64748b; font-weight: 500; }
.z-val { font-size: 24px; font-weight: 800; color: #1e293b; }
.z-trend { font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.z-trend.up { color: #10b981; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.feature-card:hover { border-color: #cbd5e1; background: #f8fafc; }

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-content { flex: 1; }
.feature-title { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.feature-description { font-size: 12px; color: #64748b; line-height: 1.4; }
.feature-stats { margin-top: 8px; font-size: 11px; font-weight: 600; color: #2563eb; }

.feature-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: transparent;
    transition: all 0.2s;
}

.feature-card:hover .feature-action-btn { background: #fff; color: #1e293b; border-color: #cbd5e1; }

.z-table {
    width: 100%;
    border-collapse: collapse;
}

.z-table th {
    text-align: left;
    padding: 12px 24px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-bottom: 1px solid #f1f5f9;
}

.z-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13.5px;
    color: #334155;
}

.badge-zalo-type {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
}

.status-pill.completed { background: #dcfce7; color: #166534; }
.status-pill.in-progress { background: #fef3c7; color: #92400e; }

.z-actions { display: flex; gap: 8px; }

.btn-z-action {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-z-action:hover { background: #f1f5f9; color: #1e293b; border-color: #cbd5e1; }
.btn-z-action.delete:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

@media (max-width: 1024px) {
    .zalo-stats-grid, .features-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .zalo-stats-grid, .features-grid { grid-template-columns: 1fr; }
}

/* ===================== RADAR THÍ SINH - ZALO AUTO HUNTER ===================== */
.hunter-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.h-stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 15px;
}

.h-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.h-stat-icon.active-c { background: #fef2f2; color: #ef4444; }
.h-stat-icon.running-c { background: #ecfdf5; color: #10b981; }

.h-stat-info { display: flex; flex-direction: column; }
.h-label { font-size: 12px; color: #64748b; font-weight: 500; }
.h-val { font-size: 20px; font-weight: 800; color: #1e293b; }

.hunter-main-layout {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 20px;
    align-items: stretch;
}

/* Control Panel */
.radar-control-panel { padding: 20px; }
.control-section { margin-bottom: 24px; }
.control-section h3 { font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

.radar-account-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.radar-account-card.active { border-color: var(--primary); background: #eff6ff; }

.account-avatar-wrapper { position: relative; }
.account-avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; }
.status-dot.online { position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; background: #10b981; border: 2px solid #fff; border-radius: 50%; }

.account-details { display: flex; flex-direction: column; }
.account-name { font-size: 13px; font-weight: 700; color: #1e293b; }
.account-role { font-size: 11px; color: #64748b; }
.select-icon { position: absolute; right: 10px; color: var(--primary); display: none; }
.radar-account-card.active .select-icon { display: block; }

.group-list-box {
    max-height: 180px;
    overflow-y: auto;
    background: #f8fafc;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.group-item { font-size: 13px; color: #475569; display: flex; align-items: center; gap: 8px; cursor: pointer; }

.keyword-input-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.keyword-tag {
    background: #fff;
    border: 1px solid #cbd5e1;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.keyword-tag i { cursor: pointer; color: #94a3b8; }
.keyword-input-inner { border: none; background: transparent; font-size: 12px; outline: none; flex: 1; min-width: 60px; padding: 4px; }

.mode-toggle-group { display: flex; justify-content: space-between; align-items: center; }
.mode-label { font-size: 13px; font-weight: 600; color: #334155; }

.btn-hunter-start {
    width: 100%;
    margin-top: 20px;
    height: 48px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    transition: all 0.3s;
}

.btn-hunter-start.stop { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3); }

/* Radar Display Area */
.radar-display-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #0f172a;
    position: relative;
    overflow: hidden;
}

.radar-circle-outer {
    width: 320px;
    height: 320px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-circle-mid {
    width: 200px;
    height: 200px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-circle-inner {
    width: 80px;
    height: 80px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
}

.radar-grid-line {
    position: absolute;
    background: rgba(16, 185, 129, 0.1);
}

.radar-grid-line.h { width: 100%; height: 1px; top: 50%; left: 0; }
.radar-grid-line.v { width: 1px; height: 100%; top: 0; left: 50%; }

.radar-sweep-modern {
    position: absolute;
    width: 50%;
    height: 2px;
    background: linear-gradient(to right, transparent, #10b981);
    top: 50%;
    left: 50%;
    transform-origin: left center;
    animation: radar-sweep 2s linear infinite;
    z-index: 5;
    box-shadow: 0 0 15px #10b981;
}

@keyframes radar-sweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.signal-point {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 10;
}

.signal-point.active {
    animation: signal-pulse 2s ease-out infinite;
}

@keyframes signal-pulse {
    0% { opacity: 0.8; transform: scale(1); box-shadow: 0 0 10px #10b981; }
    50% { opacity: 0.3; transform: scale(1.5); box-shadow: 0 0 20px #10b981; }
    100% { opacity: 0; transform: scale(2); }
}

.radar-terminal {
    width: 100%;
    margin-top: 30px;
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    line-height: 1.6;
    color: #4ade80;
}

/* Feed Panel */
.radar-feed-panel { display: flex; flex-direction: column; height: 100%; padding: 0; }
.feed-header { padding: 15px 20px; border-bottom: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; }

.feed-scroll { flex: 1; overflow-y: auto; padding: 15px; }

.feed-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    animation: slideInRight 0.3s ease-out;
}

.feed-user { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.feed-avatar { width: 30px; height: 30px; border-radius: 50%; }
.feed-name { font-size: 13px; font-weight: 700; color: #1e293b; }
.feed-time { font-size: 11px; color: #94a3b8; margin-left: auto; }

.feed-content { font-size: 12.5px; color: #475569; line-height: 1.5; margin-bottom: 10px; }
.feed-tags { display: flex; gap: 5px; }
.match-tag { background: #dcfce7; color: #166534; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }

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

/* Pipeline Grid View for Isolated Column Filters */
.pipeline-column.grid-view {
    flex: 1 1 100%;
}
.pipeline-column.grid-view .column-content {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
}
@media (max-width: 1200px) {
    .pipeline-column.grid-view .column-content {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .pipeline-column.grid-view .column-content {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .pipeline-column.grid-view .column-content {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 1200px) {
    .hunter-main-layout { grid-template-columns: 1fr; }
}
/* ===================== PAGINATION ===================== */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 10px;
    border-top: 1px solid #edf2f7;
    width: 100%;
}

.dashboard-pagination {
    padding: 30px 0 50px;
    margin-top: 20px;
    background: transparent;
    border-top: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.pagination-info {
    font-size: 14px;
    color: #475569;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

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

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

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8fafc;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-size-selector select {
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    color: #475569;
    outline: none;
    cursor: pointer;
}

.page-size-selector select:focus {
    border-color: var(--primary);
}

/* ===================== CONFIRM STEP MODAL ===================== */
.confirm-modal-content {
    background: #fff;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.btn-contract-info-top {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.btn-contract-info-top:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.confirm-icon-box {
    width: 60px;
    height: 60px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 15px;
}

.confirm-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    text-align: center;
}

.confirm-message {
    font-size: 14px;
    color: #64748b;
    text-align: center;
    margin-bottom: 10px;
}

.confirm-note-section {
    padding: 15px 20px;
    background: #fff;
    text-align: left;
}

.confirm-note-section label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.confirm-note-section textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    font-size: 13px;
    color: #1e293b;
    resize: none;
    outline: none;
    transition: all 0.2s;
}

.confirm-note-section textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.confirm-actions-triple {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    padding: 20px;
    background: #f8fafc;
}

.btn-triple {
    padding: 10px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: #e2e8f0;
    color: #475569;
}

.btn-cancel:hover {
    background: #cbd5e1;
}

.btn-pending {
    background: #fef3c7;
    color: #b45309;
}

.btn-pending:hover {
    background: #fde68a;
}

.btn-completed {
    background: var(--primary);
    color: #fff;
}

.btn-completed:hover {
    background: #4f46e5;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.contract-history-item {
    transition: transform 0.2s;
}

.contract-history-item:hover {
    transform: translateX(4px);
    border-color: var(--primary) !important;
}

#contractHistoryContent::-webkit-scrollbar {
    width: 5px;
}

#contractHistoryContent::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

/* Step clickability */
.pipeline-steps .step {
    cursor: pointer;
    transition: transform 0.2s;
}

.pipeline-steps .step:hover {
    transform: scale(1.05);
}

/* ===================== TOAST NOTIFICATIONS ===================== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.custom-toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.custom-toast.toast-hide {
    animation: toastFadeOut 0.4s ease forwards;
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastFadeOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-message {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

/* Types */
.toast-success { color: #10b981; border-left: 5px solid #10b981; }
.toast-success .toast-icon { background: #ecfdf5; color: #10b981; }

.toast-warning { color: #f59e0b; border-left: 5px solid #f59e0b; }
.toast-warning .toast-icon { background: #fffbeb; color: #f59e0b; }

.toast-error { color: #ef4444; border-left: 5px solid #ef4444; }
.toast-error .toast-icon { background: #fef2f2; color: #ef4444; }

.toast-info { color: #3b82f6; border-left: 5px solid #3b82f6; }
.toast-info .toast-icon { background: #eff6ff; color: #3b82f6; }

/* Progress bar inside toast */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
}

.toast-progress-fill {
    height: 100%;
    width: 100%;
    transform-origin: left;
    filter: brightness(0.9);
}

.toast-success .toast-progress-fill { background: #10b981; }
.toast-warning .toast-progress-fill { background: #f59e0b; }
.toast-error .toast-progress-fill { background: #ef4444; }
.toast-info .toast-progress-fill { background: #3b82f6; }

/* ===================== ADMISSIONS DATA LIFECYCLE ===================== */

/* Step clickability */
.admissionsList .step, .fullAdmissionsList .step {
    cursor: pointer;
}

/* Withdrawal Action Button */
.btn-withdraw {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin: 15px 0 0 auto;
}

.btn-withdraw:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

.btn-withdraw i {
    color: #94a3b8;
}

/* Admissions Tab Filter System */
.admissions-tabs-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 2px;
}

.admissions-tabs {
    display: flex;
    gap: 0;
}

.admission-tab {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.admission-tab:hover {
    color: var(--primary);
    background: #f8fafc;
}

.admission-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: #eff6ff;
}

.admission-tab .tab-count {
    background: #f1f5f9;
    color: #94a3b8;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
}

.admission-tab.active .tab-count {
    background: var(--primary);
    color: #fff;
}

/* ===================== ACTIVITY LOG TIMELINE ===================== */
.activity-log-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
}

.activity-log-item:not(:last-child):after {
    content: '';
    position: absolute;
    left: 89px;
    top: 35px;
    bottom: -25px;
    width: 2px;
    background: #e2e8f0;
}

.activity-time {
    width: 70px;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.time-main {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.time-sub {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
}

.activity-marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 0 0 4px #fff;
}

.activity-details {
    flex: 1;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

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

.activity-staff {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.activity-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 100px;
    text-transform: uppercase;
}

.activity-content {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.5;
}

.activity-content strong {
    color: #1e293b;
}

/* ===================== ACTIVITY SIDEBAR & OVERLAY ===================== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.activity-sidebar {
    position: fixed;
    top: 0;
    right: -420px; /* Hidden by default */
    width: 420px;
    height: 100%;
    background: #fff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1501;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.activity-sidebar.active {
    transform: translateX(-420px);
}

.sidebar-header {
    padding: 24px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.sidebar-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 4px 0 0;
}

.btn-close-sidebar {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px 20px;
    background: #f8fafc;
}

/* Custom scrollbar for sidebar */
.sidebar-body::-webkit-scrollbar {
    width: 6px;
}

.sidebar-body::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.sidebar-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===================== NOTIFICATION UI ===================== */
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.notification-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.notification-item:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.notification-item.unread {
    background: #fdf2f2;
    border-left: 4px solid #ef4444;
}

.notification-item.read {
    opacity: 0.8;
}

.note-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.note-info {
    flex: 1;
}

.note-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3px;
}

.note-msg {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 6px;
}

.note-time {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
}

.unread-dot {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
}

.btn-text-only:hover {
    text-decoration: underline;
}

/* ===================== URGENT TASKS & BANNER PULSE ===================== */
.pulse-alert {
    animation: alert-pulse 2s infinite;
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
    color: #fff !important;
    border: none !important;
}

.pulse-alert .btn-link {
    color: #fff !important;
    text-decoration: underline;
}

@keyframes alert-pulse {
    0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
    100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

.urgent-task-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid #fed7aa;
    transition: transform 0.2s;
}

.urgent-task-item:hover {
    transform: scale(1.02);
    border-color: #fdba74;
}

.task-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.task-icon.school {
    background: #dbeafe;
    color: #2563eb;
}

.task-icon.alarm {
    background: #fef3c7;
    color: #d97706;
}

.task-info {
    flex: 1;
}

.task-title {
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 2px;
}

.task-desc {
    font-size: 12px;
    color: #64748b;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 11px;
}

/* --- DISTRIBUTE TABS & HISTORY --- */
.distribute-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 12px;
    width: fit-content;
}

.d-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.d-tab.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.distribute-history-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.distribute-history-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

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

.batch-badge {
    background: #e2e8f0;
    color: #475569;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 10px;
}

.batch-time {
    font-size: 13px;
    color: #94a3b8;
}

.batch-total {
    font-size: 14px;
    color: #334155;
}

.batch-total strong {
    color: var(--primary);
    font-size: 16px;
}

.history-card-body {
    padding: 20px;
}

.staff-allocation-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.allocation-tag {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    padding: 6px 14px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.a-name {
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
}

.a-count {
    background: #0369a1;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.history-card-footer {
    padding: 12px 20px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}

.btn-undo-red {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-undo-red:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* ===================== CARE HISTORY MODAL REDESIGN ===================== */
.care-action-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 25px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom-right-radius: 16px;
    box-shadow: inset 0 1px 0 #fff;
    margin-top: auto;
}

.btn-care-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    letter-spacing: 0.3px;
}
/* ===================== ANALYTICS DASHBOARD STYLES ===================== */
#reportPage {
    padding: 0;
    background: #f8fafc;
}

.report-filters-bar {
    background: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap; /* Cho phép rớt dòng khi màn hình hẹp */
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.filter-group { display: flex; align-items: center; gap: 10px; }
.filter-group label { font-size: 13px; font-weight: 600; color: #64748b; white-space: nowrap; }
.filter-divider { width: 1px; height: 30px; background: #e2e8f0; }

.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Tự thích ứng số cột */
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card-premium {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card-premium:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}

.stat-info .stat-label { font-size: 13px; color: #64748b; margin-bottom: 4px; }
.stat-info .stat-value { font-size: 24px; font-weight: 800; color: #1e293b; }

.report-main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); /* Tự nhảy dòng khi hẹp */
    gap: 20px;
}

.report-card { border-radius: 16px; box-shadow: var(--shadow-sm); border: 1px solid #e2e8f0; overflow: hidden; }
.report-card .card-header { padding: 18px 20px; background: #fff; border-bottom: 1px solid #f1f5f9; }
.report-card .card-header h3 { font-size: 15px; font-weight: 700; color: #1e293b; }

.source-flex-container {
    display: flex;
    flex-wrap: wrap; 
    gap: 30px;
    align-items: center;
    padding: 10px 0;
}

.table-container-fixed { flex: 1.2; min-width: 350px; }
.pie-container-fixed { 
    flex: 0.8; 
    min-width: 250px; 
    height: 250px; 
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Source Table Enhancements */
.source-item-cell { display: flex; align-items: center; gap: 12px; }
.source-icon-box {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    background: #f1f5f9;
    color: #475569;
}

.source-vol-box { width: 100%; display: flex; flex-direction: column; gap: 4px; }
.source-mini-bar {
    height: 6px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
}
.source-mini-bar-fill { height: 100%; border-radius: 10px; transition: width 0.5s ease-out; }

/* Custom Badge for Report */
.cr-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}
.cr-badge.high { background: #dcfce7; color: #15803d; }
.cr-badge.medium { background: #fef9c3; color: #a16207; }
.cr-badge.low { background: #fee2e2; color: #b91c1c; }

/* Doughnut Center Text */
.doughnut-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}
.doughnut-center .val { font-size: 24px; font-weight: 800; color: #1e293b; display: block; }
.doughnut-center .lab { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }

.report-left, .report-right { display: flex; flex-direction: column; gap: 20px; }

.staff-performance-item {
    padding: 12px 15px;
    border-radius: 10px;
    background: #f8fafc;
    margin-bottom: 10px;
}

.staff-rank-badge {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

.text-center { text-align: center !important; }
.cr-badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.cr-badge.high { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.cr-badge.medium { background: #fef9c3; color: #a16207; border: 1px solid #fef08a; }
.cr-badge.low { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

@media print {
    body * { visibility: hidden; }
    #reportPage, #reportPage * { visibility: visible; }
    #reportPage { position: absolute; left: 0; top: 0; width: 100%; margin: 0; padding: 0; }
}
.btn-care-cancel {
    background: #ffffff;
    color: #64748b;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.btn-care-cancel:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #94a3b8;
    transform: translateY(-2px);
}

.btn-care-save {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
}

.btn-care-save:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

/* STAFF PERFORMANCE GRID */
.staff-perf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.staff-card-premium {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #eef2f6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.staff-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-light);
}

.staff-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.staff-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.staff-main-info {
    flex: 1;
}

.staff-main-info h3 {
    margin: 0;
    font-size: 17px;
    color: #1e293b;
}

.staff-main-info p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.staff-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 12px;
}

.staff-stat-mini {
    display: flex;
    flex-direction: column;
}

.staff-stat-mini .label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.staff-stat-mini .val {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.staff-progress-box {
    margin-top: 8px;
}

.staff-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 6px;
}

.staff-card-actions {
    margin-top: auto;
}

.btn-view-staff-dash {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-view-staff-dash:hover {
    background: var(--primary);
    color: white;
}

/* Back button in Mirror mode */
.mirror-back-banner {
    background: linear-gradient(90deg, #1e293b, #334155);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mirror-back-banner .back-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mirror-back-banner .btn-back {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.mirror-back-banner .btn-back:hover {
    background: white;
    color: #1e293b;
}

/* STAFF RECEIVED DATA STYLES */
.staff-received-header {
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}
.staff-received-header h3 { font-size: 16px; font-weight: 800; color: #1e293b; margin-bottom: 4px; }
.staff-received-header p { font-size: 13px; color: #64748b; }

.staff-data-list-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.staff-data-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.staff-data-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
    border-color: var(--primary-light);
    transform: translateX(4px);
}

.sd-info .sd-name { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 6px; }
.sd-meta { display: flex; gap: 15px; align-items: center; }
.sd-meta span { font-size: 12.5px; color: #64748b; display: flex; align-items: center; gap: 6px; }
.sd-meta i { color: #94a3b8; width: 14px; }

.sd-actions { display: flex; gap: 10px; }
.btn-sd {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-sd i { font-size: 12px; }

.btn-sd.blue { background: #eff6ff; color: #2563eb; }
.btn-sd.blue:hover { background: #2563eb; color: #fff; }

.btn-sd.orange { background: #fff7ed; color: #f59e0b; }
.btn-sd.orange:hover { background: #f59e0b; color: #fff; }

.btn-sd.red { background: #fef2f2; color: #ef4444; }
.btn-sd.red:hover { background: #ef4444; color: #fff; }

/* --- TRIAGE TABLE & BULK ACTIONS (PREMIUM DESIGN) --- */
.triage-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.triage-filters {
    display: flex;
    gap: 12px;
    flex-grow: 1;
}

.filter-input {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 13.5px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #1e293b;
    min-width: 180px;
}

.filter-input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.triage-table-container {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.triage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.triage-table th {
    background: #f8fafc;
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #f1f5f9;
}

.triage-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.triage-table tr:hover {
    background: #fdfdfd;
}

.triage-table tr.selected {
    background: #f0f7ff;
}

.triage-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border-radius: 6px;
    accent-color: var(--primary);
}

.badge-province {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
}

.badge-major {
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
}

.badge-source {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #64748b;
    text-transform: uppercase;
}

/* Floating Action Bar */
.triage-action-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    padding: 12px 30px;
    border-radius: 60px;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.triage-action-bar.active {
    bottom: 40px;
}

.selection-count {
    border-right: 1px solid rgba(255,255,255,0.15);
    padding-right: 25px;
    font-weight: 500;
    color: #94a3b8;
    font-size: 14px;
}

.selection-count span {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin-right: 5px;
}

.bulk-btn-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.bulk-btn {
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 13.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bulk-btn.cool { background: #3b82f6; color: #fff; box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3); }
.bulk-btn.warm { background: #f59e0b; color: #fff; box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3); }
.bulk-btn.hot { background: #ef4444; color: #fff; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3); }

.bulk-btn:hover {
    transform: translateY(-3px) scale(1.05);
    filter: brightness(1.15);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.bulk-btn:active {
    transform: translateY(-1px);
}
