/* ==========================================================================
   VINEN EXECUTIVE LEAD CRM 2.0 - PRO ENTERPRISE DESIGN SYSTEM
   Theme: Executive Midnight Navy, Champagne Gold & Glassmorphism
   Target: Hiệp hội Khởi nghiệp Quốc gia (VINEN)
   ========================================================================== */

:root {
  /* Core Brand Colors */
  --primary-deep: #020b1c;
  --primary-navy: #051838;
  --primary: #082c63;
  --primary-light: #0d3d8a;
  
  --gold-pure: #d4af37;
  --gold-light: #fff2a6;
  --gold-dark: #aa7c11;
  --gold-gradient: linear-gradient(135deg, #fff2a6 0%, #d4af37 60%, #aa7c11 100%);
  --gold-glow: 0 0 20px rgba(212, 175, 55, 0.35);

  --crimson: #c4161c;
  --crimson-light: #ef4444;

  /* Funnel Pipeline Stage Colors */
  --stage-new: #10b981;
  --stage-contacted: #f59e0b;
  --stage-consulting: #3b82f6;
  --stage-deposited: #8b5cf6;
  --stage-completed: #c4161c;
  --stage-cancelled: #64748b;

  /* Neutrals & Surfaces */
  --bg-page: #f8fafc;
  --bg-sidebar: #020b1c;
  --bg-card: #ffffff;
  --border-ui: #e2e8f0;
  --border-hover: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Elevation & Curves */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 16px rgba(8, 44, 99, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 12px 28px rgba(8, 44, 99, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-drawer: -10px 0 40px rgba(0, 0, 0, 0.25);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input, button, select, textarea, optgroup {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, kbd, samp, pre, .font-mono {
  font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;
}

/* ==========================================================================
   EXECUTIVE SIDEBAR
   ========================================================================== */
.admin-sidebar {
  width: 270px;
  background-color: var(--bg-sidebar);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 100;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.2);
}

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

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  flex-grow: 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}

.sidebar-brand-link:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.sidebar-brand-link:hover .sidebar-brand-crest {
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.5);
  border-color: #fff2a6;
}

.sidebar-logo {
  max-width: 180px;
  height: 38px;
  object-fit: contain;
  display: block;
}

.sidebar-brand-crest {
  width: 44px;
  height: 44px;
  background: radial-gradient(circle at top left, #0d3d8a 0%, #020b1c 100%);
  border: 1.5px solid var(--gold-pure);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
  flex-shrink: 0;
}

.sidebar-brand-crest svg {
  width: 24px;
  height: 24px;
}

.sidebar-title {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  line-height: 1.25;
}

.sidebar-title .gold-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-subtitle {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Database Engine Status Pill */
.sidebar-db-status {
  margin: 14px 16px 6px;
  padding: 8px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #34d399;
}

.sidebar-db-status .dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.16) 0%, rgba(212, 175, 55, 0.04) 100%);
  color: #fff2a6;
  border-left: 3px solid var(--gold-pure);
  box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.05);
}

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

.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
  transition: padding 0.25s ease;
}

.user-badge,
.user-badge-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.user-avatar,
.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: var(--primary-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
  flex-shrink: 0;
}

.user-meta,
.user-meta-sm {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  line-height: 1.25;
}

.user-meta-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta-role {
  font-size: 0.68rem;
  color: var(--gold-pure);
}

/* Sidebar Footer Action Buttons (Ẩn menu & Exit) */
.sidebar-footer-actions {
  display: flex;
  gap: 6px;
  width: 100%;
}

.btn-footer-action {
  flex: 1;
  height: 29px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-footer-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.btn-footer-action.btn-collapse-sidebar:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.35);
  color: #fff2a6;
}

.btn-footer-action.btn-exit-action:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

/* Legacy .btn-logout compatibility */
.btn-logout {
  width: 100%;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

/* ==========================================================================
   SIDEBAR COLLAPSED (MINI-MODE) - SAVES MAXIMUM SCREEN SPACE
   ========================================================================== */
.admin-sidebar {
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.25s ease;
}

body.sidebar-collapsed .admin-sidebar {
  width: 68px;
}

body.sidebar-collapsed .sidebar-header {
  padding: 18px 8px;
  justify-content: center;
}

body.sidebar-collapsed .sidebar-brand-link {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-title,
body.sidebar-collapsed .sidebar-subtitle,
body.sidebar-collapsed .sidebar-db-status,
body.sidebar-collapsed .nav-item span:not(.nav-icon),
body.sidebar-collapsed .user-meta,
body.sidebar-collapsed .user-meta-sm,
body.sidebar-collapsed .btn-action-text {
  display: none !important;
}

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

body.sidebar-collapsed .nav-icon {
  width: auto;
  font-size: 1.25rem;
}

body.sidebar-collapsed .sidebar-footer {
  padding: 10px 8px;
}

body.sidebar-collapsed .user-badge,
body.sidebar-collapsed .user-badge-compact {
  justify-content: center;
  margin-bottom: 8px;
}

body.sidebar-collapsed .sidebar-footer-actions {
  flex-direction: column;
  gap: 6px;
}

body.sidebar-collapsed .btn-footer-action {
  padding: 0;
  width: 100%;
  height: 28px;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.admin-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  background: #f8fafc;
}

/* TOPBAR */
.admin-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-ui);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-grow: 1;
}

.topbar-title-wrap {
  display: flex;
  flex-direction: column;
}

.topbar-page-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-deep);
  line-height: 1.2;
}

.topbar-page-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Live Search Bar */
.topbar-search-wrap {
  position: relative;
  max-width: 360px;
  width: 100%;
}

.topbar-search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1px solid var(--border-ui);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-family: inherit;
  background: #f1f5f9;
  color: var(--text-main);
  transition: var(--transition);
}

.topbar-search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 44, 99, 0.12);
}

.topbar-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.9rem;
  pointer-events: none;
}

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

.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-admin-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-admin-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 4px 12px rgba(8, 44, 99, 0.25);
}

.btn-admin-gold {
  background: var(--gold-gradient);
  color: var(--primary-deep);
  font-weight: 800;
  box-shadow: 0 3px 12px rgba(212, 175, 55, 0.35);
}

.btn-admin-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(212, 175, 55, 0.5);
}

.btn-admin-success {
  background: #10b981;
  color: #ffffff;
}

.btn-admin-success:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-admin-outline {
  background: #ffffff;
  border-color: var(--border-ui);
  color: var(--text-main);
}

.btn-admin-outline:hover {
  background: #f8fafc;
  border-color: var(--border-hover);
}

/* ==========================================================================
   ADMIN BODY & KPI SUMMARY CARDS
   ========================================================================== */
.admin-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.kpi-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-ui);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
}

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

.kpi-card.blue::before { background: #3b82f6; }
.kpi-card.green::before { background: #10b981; }
.kpi-card.amber::before { background: #f59e0b; }
.kpi-card.purple::before { background: #8b5cf6; }

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

.kpi-info-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-info-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary-deep);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.kpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-top: 4px;
  width: fit-content;
}

.kpi-badge.badge-green {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.kpi-badge.badge-blue {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.kpi-badge.badge-amber {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.kpi-badge.badge-purple {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.kpi-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.kpi-icon-box.blue { background: #eff6ff; color: #2563eb; }
.kpi-icon-box.green { background: #ecfdf5; color: #059669; }
.kpi-icon-box.amber { background: #fffbeb; color: #d97706; }
.kpi-icon-box.purple { background: #f5f3ff; color: #7c3aed; }

/* ==========================================================================
   KANBAN PIPELINE BOARD
   ========================================================================== */
.kanban-board-wrap {
  flex-grow: 1;
  overflow-x: auto;
  padding-bottom: 20px;
}

.kanban-columns {
  display: grid;
  grid-template-columns: repeat(6, minmax(290px, 1fr));
  gap: 16px;
  align-items: start;
}

.kanban-col {
  background: #f1f5f9;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-ui);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 270px);
  min-height: 480px;
}

.kanban-col-head {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid transparent;
  background: #ffffff;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  border-bottom: 1px solid var(--border-ui);
  position: sticky;
  top: 0;
  z-index: 10;
}

.col-new .kanban-col-head { border-top: 3px solid var(--stage-new); }
.col-contacted .kanban-col-head { border-top: 3px solid var(--stage-contacted); }
.col-consulting .kanban-col-head { border-top: 3px solid var(--stage-consulting); }
.col-deposited .kanban-col-head { border-top: 3px solid var(--stage-deposited); }
.col-completed .kanban-col-head { border-top: 3px solid var(--stage-completed); }
.col-cancelled .kanban-col-head { border-top: 3px solid var(--stage-cancelled); }

.kanban-col-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--primary-deep);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban-badge {
  background: #e2e8f0;
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.kanban-card-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex-grow: 1;
  min-height: 200px;
}

.kanban-card-list.drag-over {
  background: rgba(212, 175, 55, 0.08);
  outline: 2px dashed var(--gold-pure);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   PRO RICH LEAD CARD
   ========================================================================== */
.lead-card {
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border: 1px solid var(--border-ui);
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.lead-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(212, 175, 55, 0.5);
}

.lead-card.dragging {
  opacity: 0.4;
  transform: rotate(2deg);
}

.lead-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lead-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.lead-avatar-initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.lead-name-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-card-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.lead-card-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-card-phone {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  width: fit-content;
}

.lead-card-phone:hover {
  background: #e2e8f0;
  color: var(--crimson);
}

.lead-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.lead-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.source-facebook { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.source-google { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.source-direct { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
.source-zalo { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.lead-action-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lead-btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid var(--border-ui);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-size: 0.8rem;
}

.lead-btn-icon:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.lead-btn-icon.btn-zalo:hover {
  background: #0068ff;
  border-color: #0068ff;
  color: #fff;
}

/* ==========================================================================
   SLIDE-OVER DRAWER (EXECUTIVE DETAIL PANEL)
   ========================================================================== */
.drawer-backdrop,
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 11, 28, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
}

.drawer-backdrop.active,
.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.slide-drawer,
.lead-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 540px;
  max-width: 95vw;
  background: #ffffff;
  z-index: 1001;
  box-shadow: var(--shadow-drawer);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.drawer-backdrop.active .slide-drawer,
.drawer-backdrop.active .lead-drawer,
.drawer-overlay.active + .lead-drawer,
.slide-drawer.active,
.lead-drawer.active,
.lead-drawer.open {
  transform: translateX(0);
}

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

.drawer-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-deep);
}

.drawer-close-btn {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 1.1rem;
  transition: var(--transition);
}

.drawer-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.drawer-body {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Candidate Hero Profile Card inside Drawer */
.drawer-hero-card {
  background: linear-gradient(135deg, #020b1c 0%, #082c63 100%);
  border-radius: var(--radius-md);
  padding: 20px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(8, 44, 99, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.drawer-hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.drawer-hero-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: var(--primary-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
}

.drawer-hero-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}

.drawer-hero-org {
  font-size: 0.82rem;
  color: #cbd5e1;
}

.drawer-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.drawer-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.btn-drawer-call {
  background: #10b981;
  color: #ffffff;
}

.btn-drawer-call:hover {
  background: #059669;
}

.btn-drawer-zalo {
  background: #0068ff;
  color: #ffffff;
}

.btn-drawer-zalo:hover {
  background: #0052cc;
}

/* Status Stage Selector */
.drawer-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.drawer-status-pill {
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-ui);
  background: #f8fafc;
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.drawer-status-pill:hover {
  border-color: var(--primary);
  background: #ffffff;
}

.drawer-status-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(8, 44, 99, 0.2);
}

/* Info Details Grid */
.drawer-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: #f8fafc;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-ui);
}

.drawer-detail-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.drawer-detail-item.full-width {
  grid-column: span 2;
}

.drawer-detail-item label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.drawer-detail-item span, .drawer-detail-item p {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
}

/* Activity Notes & Timeline Feed */
.drawer-note-input-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-ui);
}

.drawer-note-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-ui);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.drawer-note-textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
}

.drawer-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  padding-left: 20px;
}

.drawer-timeline-list::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 6px;
  width: 2px;
  background: #e2e8f0;
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--primary);
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.timeline-author {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-deep);
}

.timeline-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.timeline-content {
  font-size: 0.82rem;
  color: #334155;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid #e2e8f0;
  line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  body {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    height: auto;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   EXECUTIVE LOGIN SCREEN
   ========================================================================== */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #051b3e 0%, #020b1c 100%);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(212, 175, 55, 0.3);
  text-align: center;
  position: relative;
}

.login-logo {
  height: 60px;
  width: auto;
  margin-bottom: 16px;
}

.login-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-deep);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.login-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.form-input-search {
  padding: 12px 14px;
  border: 1px solid var(--border-ui);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-input-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 44, 99, 0.12);
}

.btn-primary-admin {
  background: var(--primary);
  color: #ffffff;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary-admin:hover {
  background: var(--primary-light);
  box-shadow: 0 4px 15px rgba(8, 44, 99, 0.3);
}

/* ==========================================================================
   DATA TABLE & ADVANCED FILTER STYLES
   ========================================================================== */
.filter-bar {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  border: 1px solid var(--border-ui);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.filter-inputs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.form-select {
  padding: 10px 14px;
  border: 1px solid var(--border-ui);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  background: #ffffff;
  color: var(--text-main);
  transition: var(--transition);
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 44, 99, 0.12);
}

.table-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-ui);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.admin-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-ui);
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-ui);
  color: var(--text-main);
  vertical-align: middle;
}

.admin-table tbody tr {
  transition: var(--transition);
}

.admin-table tbody tr:hover {
  background: #f1f5f9;
}

.table-pagination-bar {
  padding: 14px 20px;
  border-top: 1px solid var(--border-ui);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: #ffffff;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-ui);
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

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

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Status Badges */
.badge-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-status-new { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.badge-status-contacted { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.badge-status-consulting { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-status-deposited { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.badge-status-completed { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-status-cancelled { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }

/* Legacy modal overlay fallback */
.admin-modal-overlay {
  display: none !important;
}

/* ==========================================================================
   SCROLL TO TOP BUTTON (ADMIN PORTAL GOLD & NAVY)
   ========================================================================== */
.btn-scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  background: radial-gradient(circle at top left, #0d3d8a 0%, #020b1c 100%);
  color: var(--gold-pure);
  border: 1.5px solid var(--gold-pure);
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(212, 175, 55, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}

.btn-scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.btn-scroll-top:hover {
  background: var(--gold-gradient);
  color: #020b1c;
  border-color: #fff2a6;
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 25px rgba(212, 175, 55, 0.5);
}

.btn-scroll-top:active {
  transform: translateY(-1px) scale(0.96);
}

/* ==========================================================================
   MOBILE SIDEBAR HAMBURGER & BACKDROP
   ========================================================================== */
.btn-mobile-sidebar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #ffffff;
  border: 1px solid var(--border-ui);
  border-radius: var(--radius-sm);
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  margin-right: 12px;
  flex-shrink: 0;
}

.btn-mobile-sidebar:hover {
  background: #f1f5f9;
  border-color: var(--primary);
  color: var(--gold-pure);
}

.btn-close-sidebar {
  display: none;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.3rem;
  margin-left: auto;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: var(--transition);
}

.btn-close-sidebar:hover {
  color: var(--gold-pure);
}

.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 11, 28, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

body.sidebar-open .sidebar-backdrop {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   RESPONSIVE DESIGN (ADMIN MOBILE FIRST SYSTEM)
   ========================================================================== */
@media (max-width: 1024px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.4);
  }

  body.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .btn-mobile-sidebar {
    display: inline-flex;
  }

  .btn-close-sidebar {
    display: block;
  }

  .admin-main {
    width: 100%;
    margin-left: 0;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-topbar {
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .topbar-left {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .kanban-board {
    overflow-x: auto;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .kanban-col {
    min-width: 290px;
    flex: 0 0 290px;
    scroll-snap-align: start;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .admin-body {
    padding: 16px 12px;
  }

  .admin-topbar {
    padding: 12px 14px;
  }

  .topbar-page-title {
    font-size: 1.15rem;
  }

  .topbar-page-sub {
    font-size: 0.72rem;
  }

  .topbar-search-wrap {
    display: none; /* Hide top search or show compact icon on small mobile */
  }

  .topbar-actions {
    gap: 8px;
  }

  .topbar-actions .btn-admin {
    padding: 8px 12px;
    font-size: 0.78rem;
    flex: 1;
    justify-content: center;
  }

  /* 2x2 or 1-col KPI Grid */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }

  .kpi-card {
    padding: 14px 12px;
  }

  .kpi-info-val {
    font-size: 1.5rem;
  }

  .kpi-info-title {
    font-size: 0.74rem;
  }

  .kpi-icon-box {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  /* Kanban Columns */
  .kanban-board {
    gap: 12px;
    padding-bottom: 24px;
  }

  .kanban-col {
    min-width: 280px;
    flex: 0 0 85vw;
    max-width: 320px;
    scroll-snap-align: center;
  }

  /* Leads Table Responsive */
  .table-filter-bar {
    padding: 16px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .filter-search-box {
    width: 100%;
    min-width: unset;
  }

  .filter-inputs {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .form-select {
    width: 100%;
    min-height: 44px;
    font-size: 0.88rem;
  }

  .admin-table th, .admin-table td {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .table-pagination-bar {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 14px;
  }

  /* Slide-over Drawer on Mobile */
  .lead-drawer {
    width: 100% !important;
    max-width: 100vw !important;
  }

  .drawer-header {
    padding: 16px 14px;
  }

  .drawer-body {
    padding: 16px 14px;
  }

  .drawer-footer {
    padding: 14px;
    flex-direction: column;
    gap: 8px;
  }

  .drawer-footer .btn-admin {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }

  /* Events Grid Mobile */
  .event-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Table Cards & Containers */
  .table-card, .table-container, .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .table-card-header {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }

  /* Generic Modals Mobile */
  .admin-modal-card {
    width: 95% !important;
    max-width: 100vw !important;
    margin: 10px auto !important;
    max-height: 94vh !important;
  }

  .admin-modal-body {
    padding: 16px !important;
  }

  .admin-modal-footer {
    padding: 12px 16px !important;
    flex-direction: column;
    gap: 8px;
  }

  .admin-modal-footer .btn-admin {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  /* Scroll top position */
  .btn-scroll-top {
    bottom: 18px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    margin: 16px;
    padding: 30px 18px;
    width: calc(100% - 32px);
  }

  .login-logo {
    max-width: 140px;
  }

  .login-title {
    font-size: 1.35rem;
  }
}

/* ==========================================================================
   VINEN MODAL & EVENT CARD STYLES
   ========================================================================== */
.admin-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 11, 28, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-ui);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.admin-modal-header {
  padding: 18px 24px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-ui);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-deep);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.admin-modal-close:hover {
  color: var(--crimson);
}

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

.admin-modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--border-ui);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Event Cards Grid */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.event-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-ui);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
  position: relative;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(212, 175, 55, 0.4);
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.event-badge.upcoming { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.event-badge.happening { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.event-badge.completed { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

/* ==========================================================================
   UNIFIED VIEW MODE SWITCHER (KANBAN vs TABLE GRID)
   ========================================================================== */
.view-mode-switcher {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #cbd5e1;
  gap: 3px;
}

.btn-view-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-view-mode:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.6);
}

.btn-view-mode.active {
  background: #ffffff;
  color: var(--primary-deep);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  font-weight: 800;
}

.leads-view-container {
  transition: opacity 0.2s ease;
}

/* ==========================================================================
   RBAC ROLE BADGES & AVATARS
   ========================================================================== */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.role-badge.super-admin {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.role-badge.admin {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.role-badge.admissions {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.role-badge.event {
  background: #f5f3ff;
  color: #6b21a8;
  border: 1px solid #ddd6fe;
}
.role-badge.academic {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
}

.user-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.user-status-pill.active {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.user-status-pill.locked {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* ==========================================================================
   LEVEL-2 TWO-PANEL SETTINGS ARCHITECTURE (EXECUTIVE SUITE)
   ========================================================================== */
.settings-two-panel-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.settings-subnav-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-ui);
  box-shadow: var(--shadow-card);
  padding: 18px 12px;
  position: sticky;
  top: 85px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 10;
}

.settings-subnav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.settings-subnav-group-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  padding: 6px 12px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-subnav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}

.settings-subnav-item:hover {
  background: #f1f5f9;
  color: var(--primary);
  transform: translateX(2px);
}

.settings-subnav-item.active {
  background: linear-gradient(135deg, rgba(8, 44, 99, 0.06) 0%, rgba(212, 175, 55, 0.12) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--primary);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(8, 44, 99, 0.05);
  border-left: 3.5px solid var(--gold-pure);
}

.settings-subnav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-subnav-item-icon {
  font-size: 1.15rem;
  line-height: 1;
  width: 22px;
  text-align: center;
}

.settings-subnav-item-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: #e2e8f0;
  color: #475569;
}

.settings-subnav-item.active .settings-subnav-item-badge {
  background: var(--gold-pure);
  color: var(--primary-deep);
}

/* Settings Panels Container */
.settings-content-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
  animation: fadeInSettingsPanel 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Mobile First Responsive Styles */
@media (max-width: 992px) {
  .settings-two-panel-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .settings-subnav-card {
    position: static;
    padding: 10px;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 8px;
    scrollbar-width: thin;
  }

  .settings-subnav-card::-webkit-scrollbar {
    height: 4px;
  }

  .settings-subnav-card::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
  }

  .settings-subnav-group {
    flex-direction: row;
    gap: 6px;
    align-items: center;
  }

  .settings-subnav-group-title {
    display: none;
  }

  .settings-subnav-item {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 0.82rem;
    border-radius: var(--radius-pill);
    border-left-width: 1px;
  }

  .settings-subnav-item.active {
    border-left-width: 1px;
  }
}

/* ==========================================================================
   EXECUTIVE NOTIFICATION & CONFIRM SYSTEM (VINEN TOAST & MODAL)
   ========================================================================== */

/* Toast Container (Top Right Floating) */
#vinen-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
  width: calc(100% - 32px);
}

.vinen-toast {
  pointer-events: auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(2, 11, 28, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.vinen-toast.toast-hiding {
  opacity: 0;
  transform: translateX(30px) scale(0.95);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(35px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.vinen-toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
}

.vinen-toast.success::before { background: #10b981; }
.vinen-toast.error::before { background: #ef4444; }
.vinen-toast.warning::before { background: #f59e0b; }
.vinen-toast.info::before { background: #2563eb; }

.vinen-toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.vinen-toast.success .vinen-toast-icon { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.vinen-toast.error .vinen-toast-icon { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.vinen-toast.warning .vinen-toast-icon { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.vinen-toast.info .vinen-toast-icon { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

.vinen-toast-content {
  flex-grow: 1;
  min-width: 0;
}

.vinen-toast-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 2px;
  line-height: 1.3;
}

.vinen-toast-msg {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.45;
  word-break: break-word;
}

.vinen-toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
  flex-shrink: 0;
}

.vinen-toast-close:hover {
  color: #0f172a;
}

/* Loại bỏ hoàn toàn thanh tiến độ đếm ngược gây nhầm lẫn là thanh tiến trình tải dữ liệu */
.vinen-toast-progress {
  display: none !important;
}

/* Executive Confirm & Alert Dialog Overlay */
#vinen-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 11, 28, 0.72);
  backdrop-filter: blur(8px);
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: dialogFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dialogFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.vinen-dialog-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  border: 1px solid #e2e8f0;
  width: 100%;
  max-width: 480px;
  padding: 30px 26px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: dialogPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dialogPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.vinen-dialog-icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.vinen-dialog-icon-circle.danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
  border: 2px solid #fca5a5;
}

.vinen-dialog-icon-circle.warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #d97706;
  border: 2px solid #fcd34d;
}

.vinen-dialog-icon-circle.success {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #059669;
  border: 2px solid #6ee7b7;
}

.vinen-dialog-icon-circle.info {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  border: 2px solid #93c5fd;
}

.vinen-dialog-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-deep);
  margin-bottom: 12px;
  line-height: 1.35;
}

.vinen-dialog-message {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 26px;
  text-align: left;
  background: #f8fafc;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.vinen-dialog-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.vinen-dialog-btn-cancel {
  flex: 1;
  padding: 12px 18px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.92rem;
}

.vinen-dialog-btn-cancel:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.vinen-dialog-btn-confirm {
  flex: 1;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.92rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.vinen-dialog-btn-confirm.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.vinen-dialog-btn-confirm.danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
}

.vinen-dialog-btn-confirm.primary {
  background: linear-gradient(135deg, #0d3d8a 0%, #082c63 100%);
  color: #fff2a6;
  border: 1px solid #d4af37;
  box-shadow: 0 4px 14px rgba(8, 44, 99, 0.35);
}

.vinen-dialog-btn-confirm.primary:hover {
  background: linear-gradient(135deg, #082c63 0%, #020b1c 100%);
  transform: translateY(-1px);
}

/* ==========================================================================
   ENTERPRISE SWITCH UI COMPONENT (TOGGLE SWITCH)
   ========================================================================== */
.switch-ui {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  cursor: pointer;
  user-select: none;
  vertical-align: middle;
}

.switch-ui input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.switch-slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 3px;
  background-color: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.switch-ui input:checked + .switch-slider {
  background-color: #059669;
  border-color: #047857;
  box-shadow: 0 0 10px rgba(5, 150, 105, 0.35);
}

.switch-ui input:checked + .switch-slider::before {
  transform: translateX(24px);
}

.switch-ui:hover .switch-slider {
  filter: brightness(1.05);
}

.switch-ui:active .switch-slider::before {
  width: 24px;
}




