/* ===== MODERN DESIGN SYSTEM ===== */
/* Overrides AdminLTE 2 with a premium SaaS look */

:root {
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-light: #D1FAE5;
  --secondary: #0F172A;
  --secondary-light: #1E293B;
  --accent: #F59E0B;
  --accent-light: #FEF3C7;
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-sidebar: #081F3A;
  --text: #1E293B;
  --text-muted: #94A3B8;
  --text-light: #CBD5E1;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== DARK MODE ===== */
.dark-mode {
  --primary: #34D399;
  --primary-dark: #10B981;
  --primary-light: #064E3B;
  --secondary: #F8FAFC;
  --secondary-light: #E2E8F0;
  --accent: #FBBF24;
  --accent-light: #78350F;
  --bg: #0F172A;
  --bg-card: #1E293B;
  --text: #F1F5F9;
  --text-muted: #64748B;
  --text-light: #475569;
  --border: #334155;
  --border-light: #1E293B;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.3), 0 4px 6px rgba(0,0,0,0.2);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.3), 0 10px 10px rgba(0,0,0,0.2);
}

.dark-mode .main-header { background: #1E293B !important; border-bottom-color: #334155 !important; }
.dark-mode .main-header .navbar { background: transparent !important; }
.dark-mode .nav-page-title { color: #F1F5F9; }
.dark-mode .nav-icon-btn { color: #94A3B8; }
.dark-mode .nav-icon-btn:hover { background: #334155; color: #F1F5F9; }
.dark-mode #navEventDetails { color: #A5B4FC; }
.dark-mode #navEventDetails:hover { background: #334155; color: #C7D2FE; }
.dark-mode .nav-left .sidebar-toggle { color: #94A3B8; }
.dark-mode .nav-left .sidebar-toggle:hover { background: #334155; color: #F1F5F9; }
.dark-mode .nav-user-name { color: #F1F5F9; }
.dark-mode .nav-user-role { color: #94A3B8; }
.dark-mode .nav-chevron { color: #64748B; }
.dark-mode .nav-divider { background: #334155; }
.dark-mode .nav-search-input { background: #0F172A; border-color: #334155; color: #F1F5F9; }
.dark-mode .nav-search-input:focus { border-color: #34D399; background: #1E293B; box-shadow: 0 0 0 3px rgba(52,211,153,0.12); }
.dark-mode .nav-search-input:focus ~ .nav-search-icon { color: #34D399; }
.dark-mode .nav-search-icon { color: #475569; }
.dark-mode .nav-user > a:hover { background: #334155; }
.dark-mode .nav-avatar { border-color: #475569; }
.dark-mode .nav-online-dot { border-color: #1E293B; }
.dark-mode .nav-status-chip { backdrop-filter: brightness(1.2); }
.dark-mode .nav-status-chip:hover { filter: brightness(1.3); }

.dark-mode .content-wrapper { background: #0F172A; }
.dark-mode .content-header h1 { color: #F1F5F9; }
.dark-mode .content-header .breadcrumb a { color: #64748B; }
.dark-mode .content-header .breadcrumb > .active { color: #94A3B8; }
.dark-mode .content-header .breadcrumb > li + li:before { color: #475569; }

.dark-mode .chart-card { background: #1E293B; border-color: #334155; }
.dark-mode .chart-header .chart-label { color: #F1F5F9; }
.dark-mode .chart-header .chart-sub { color: #64748B; }
.dark-mode .chart-header .chart-badge { color: #F1F5F9; }

.dark-mode .widget-card { background: #1E293B; border-color: #334155; }
.dark-mode .widget-header { border-bottom-color: #334155; }
.dark-mode .widget-title { color: #F1F5F9; }
.dark-mode .widget-header .widget-menu-btn { color: #64748B; }
.dark-mode .widget-header .widget-menu-btn:hover { background: #334155; }
.dark-mode .widget-body > div { border-bottom-color: #334155 !important; }
.dark-mode .widget-body [style*="color:#0F172A"] { color: #F1F5F9 !important; }
.dark-mode .leaderboard-bar > div { background: #0F172A !important; }

.dark-mode .table thead th { background: #1E293B; color: #64748B; border-bottom-color: #334155; }
.dark-mode .table tbody td { border-color: #334155; color: #CBD5E1; }
.dark-mode .table tbody tr:hover { background: #1E293B; }
.dark-mode .table-bordered { border-color: #334155; }
.dark-mode .table-bordered thead th { border-color: #334155; }
.dark-mode .table-bordered tbody td { border-color: #334155; }

.dark-mode .box { background: #1E293B; border-color: #334155; }
.dark-mode .box-header { border-bottom-color: #334155; }
.dark-mode .box-header .box-title { color: #F1F5F9; }
.dark-mode .box-body { color: #CBD5E1; }

.dark-mode .form-input { background: #0F172A; border-color: #334155; color: #F1F5F9; }
.dark-mode .form-input:focus { background: #0F172A; border-color: #34D399; }
.dark-mode .form-input::placeholder { color: #475569; }
.dark-mode .form-label { color: #CBD5E1; }

.dark-mode .modal-content { background: #1E293B; border-color: #334155; }
.dark-mode .modal-header { border-bottom-color: #334155; }
.dark-mode .modal-header .close { color: #94A3B8; }
.dark-mode .modal-title { color: #F1F5F9; }
.dark-mode .modal-body { color: #CBD5E1; }
.dark-mode .modal-footer { border-top-color: #334155; }

.dark-mode .nav-notifications .dropdown-menu { background: #1E293B; border-color: #334155; }
.dark-mode .nav-notifications .dropdown-menu > .header { color: #F1F5F9; border-bottom-color: #334155; }
.dark-mode .nav-notifications .dropdown-menu > .footer { border-top-color: #334155; }
.dark-mode .nav-notifications .dropdown-menu > .footer a { color: #34D399; }

/* ===== USER PROFILE DROPDOWN ===== */
/* ===== PROFILE DROPDOWN — Premium SaaS ===== */
.nav-user .dropdown-menu {
  display: block !important;
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  width: 300px;
  padding: 0;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.04);
  overflow: visible;
  margin-top: 12px !important;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 250ms ease, transform 250ms ease, visibility 250ms ease;
  pointer-events: none;
  background: #fff;
}
.nav-user.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-user .dropdown-menu .user-header {
  background: linear-gradient(135deg, #041C3A, #07264D);
  padding: 24px 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}
.nav-user .dropdown-menu .user-header img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.nav-user .dropdown-menu .user-header-info {
  flex: 1;
  min-width: 0;
}
.nav-user .dropdown-menu .user-header-info p {
  color: #F1F5F9;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-user .dropdown-menu .user-header-role {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
}
.nav-user .dropdown-menu .user-header-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #22C55E;
}
.nav-user .dropdown-menu .user-header-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  animation: navPulse 1.5s ease-in-out infinite;
}
.nav-user .dropdown-menu .user-header-email {
  display: block;
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  font-weight: 400;
  margin-top: 4px;
}
.nav-user .dropdown-menu li > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 2px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #1E293B;
  border-radius: 10px;
  border: none;
  transition: background 200ms ease, color 200ms ease;
}
.nav-user .dropdown-menu li > a:hover {
  background: #F1F5F9;
  color: #1E293B;
}
.nav-user .dropdown-menu li > a i {
  width: 20px;
  text-align: center;
  color: #94A3B8;
  font-size: 14px;
  flex-shrink: 0;
}
.nav-user .dropdown-menu li.divider {
  background: #E2E8F0;
  margin: 4px 10px;
  height: 1px;
}
.nav-user .dropdown-menu li:last-child > a {
  color: #EF4444;
}
.nav-user .dropdown-menu li:last-child > a i {
  color: #EF4444;
}
.nav-user .dropdown-menu li:last-child > a:hover {
  background: #FEF2F2;
  color: #DC2626;
}

.dark-mode .nav-user .dropdown-menu {
  background: #1E293B;
  border-color: #334155;
  box-shadow: 0 12px 48px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
}
.dark-mode .nav-user .dropdown-menu .user-header {
  background: linear-gradient(135deg, #0A0F1A, #1E293B);
}
.dark-mode .nav-user .dropdown-menu li > a {
  color: #CBD5E1;
}
.dark-mode .nav-user .dropdown-menu li > a:hover {
  background: #1E293B;
  color: #F1F5F9;
}
.dark-mode .nav-user .dropdown-menu li > a i { color: #475569; }
.dark-mode .nav-user .dropdown-menu li.divider { background: #334155; }
.dark-mode .nav-user .dropdown-menu li:last-child > a { color: #F87171; }
.dark-mode .nav-user .dropdown-menu li:last-child > a i { color: #F87171; }
.dark-mode .nav-user .dropdown-menu li:last-child > a:hover { background: #1A0A0A; color: #FCA5A5; }

.dark-mode .kpi-card:hover { box-shadow: 0 15px 40px rgba(0,0,0,0.3); }

.dark-mode .search-dropdown { background: #1E293B; border-color: #334155; }
.dark-mode .search-dropdown .search-result-item { color: #CBD5E1; }
.dark-mode .search-dropdown .search-result-item:hover { background: #0F172A; }
.dark-mode .search-dropdown .search-result-item .result-icon { color: #475569; }
.dark-mode .search-dropdown .search-result-item .result-type { color: #64748B; }

.dark-mode .login-form-title { color: #F1F5F9; }
.dark-mode .login-form-subtitle { color: #94A3B8; }
.dark-mode .login-form-box .form-input { background: #0F172A; border-color: #334155; color: #F1F5F9; }
.dark-mode .login-form-box .form-input:focus { background: #0F172A; border-color: #34D399; }
.dark-mode .login-form-box .form-label { color: #CBD5E1; }
.dark-mode .login-form-box .checkbox-label { color: #94A3B8; }
.dark-mode .login-form-box .forgot-link { color: #34D399; }
.dark-mode .login-form-wrap { background: #0F172A; }

/* Theme transition */
.main-header,
.content-wrapper,
.chart-card,
.widget-card,
.box,
.table,
.form-input,
.modal-content,
.nav-page-title,
.nav-user-name,
.nav-user-role,
.nav-chevron,
.nav-icon-btn,
.nav-left .sidebar-toggle,
.kpi-card,
.search-dropdown {
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* ===== GLOBAL ===== */
* { box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text); }

/* ===== SIDEBAR — MINIMAL PREMIUM ===== */
.main-sidebar {
  background: #081F3A !important;
  border-right: none !important;
  width: 280px !important;
  position: fixed !important;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 810;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skin-blue .main-sidebar { background: #081F3A !important; }

.sidebar {
  padding-top: 0;
  min-height: 100vh;
}

/* ===== BRAND ===== */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 28px 24px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: rgba(217,192,106,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-text {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

/* ===== USER SECTION ===== */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 4px;
}

.user-avatar {
  flex-shrink: 0;
}

.user-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.role-badge {
  font-size: 10px;
  font-weight: 600;
  color: #D9C06A;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.online-indicator {
  width: 10px;
  height: 10px;
  background: #22C55E;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  animation: online-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

/* ===== NAVIGATION ===== */
.sidebar-menu {
  padding: 4px 14px 32px;
  list-style: none;
  margin: 0;
}

.sidebar-menu .menu-header {
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 28px 14px 8px;
  list-style: none;
}

.sidebar-menu li {
  list-style: none;
}

.sidebar-menu li > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 24px;
  margin: 2px 0;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  line-height: 1;
  min-height: 44px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-menu li > a .menu-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.75);
  transition: color 0.15s ease;
}

.sidebar-menu li > a span {
  flex: 1;
}

.sidebar-menu li > a:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.sidebar-menu li > a:hover .menu-icon {
  color: #fff;
}

/* Active state — clean and simple */
.skin-blue .sidebar-menu li.active > a,
.sidebar-menu li.active > a {
  background: #D9C06A;
  color: #06243F !important;
  font-weight: 600;
}

.skin-blue .sidebar-menu li.active > a .menu-icon,
.sidebar-menu li.active > a .menu-icon {
  color: #06243F !important;
}

/* ===== COLLAPSED SIDEBAR ===== */
.sidebar-mini.sidebar-collapse .main-sidebar { width: 64px !important; }

.sidebar-mini.sidebar-collapse .sidebar-brand .brand-text,
.sidebar-mini.sidebar-collapse .sidebar-user .user-info,
.sidebar-mini.sidebar-collapse .sidebar-menu li > a span,
.sidebar-mini.sidebar-collapse .sidebar-menu .menu-header,
.sidebar-mini.sidebar-collapse .sidebar-user .online-indicator,
.sidebar-mini.sidebar-collapse .sidebar-user .online-label {
  display: none;
}

.sidebar-mini.sidebar-collapse .sidebar-brand {
  justify-content: center;
  padding: 22px 8px;
}

.sidebar-mini.sidebar-collapse .sidebar-user {
  justify-content: center;
  padding: 12px 8px;
}

.sidebar-mini.sidebar-collapse .sidebar-menu {
  padding: 4px 8px 32px;
}

.sidebar-mini.sidebar-collapse .sidebar-menu li > a {
  justify-content: center;
  padding: 10px 8px;
  margin: 2px 0;
  min-height: 44px;
}

/* ===== SIDEBAR SCROLLBAR ===== */
.main-sidebar::-webkit-scrollbar { width: 4px; }
.main-sidebar::-webkit-scrollbar-track { background: #081F3A; }
.main-sidebar::-webkit-scrollbar-thumb { background: #D9C06A; border-radius: 10px; }
.main-sidebar::-webkit-scrollbar-thumb:hover { background: #BFA052; }

/* ===== TOP NAVIGATION (SaaS Premium) ===== */
.main-header {
  flex-shrink: 0;
  position: sticky !important;
  top: 0;
  left: auto !important;
  width: auto !important;
  background: #fff !important;
  border-bottom: 1px solid #E2E8F0 !important;
  height: 72px;
  z-index: 1000;
}

/* Reset any AdminLTE forced margins on content — Grid layout controls this */
.content-wrapper { margin-left: 0 !important; }
.main-footer { margin-left: 0 !important; }

.main-header .logo {
  display: none !important;
}

.main-header .navbar {
  background: transparent !important;
  border: none !important;
  margin-left: 0 !important;
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

/* ===== LEFT ===== */
.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-left .sidebar-toggle {
  background: transparent !important;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  color: #1E293B;
  transition: background 200ms ease, color 200ms ease;
  flex-shrink: 0;
}

.nav-left .sidebar-toggle:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.nav-page-title {
  font-size: 28px;
  font-weight: 700;
  color: #1E293B;
  letter-spacing: -0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ===== CENTER ===== */
.nav-center {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-search {
  position: relative;
  width: 420px;
  max-width: 480px;
  min-width: 0;
  flex-shrink: 1;
}

.nav-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #94A3B8;
  pointer-events: none;
  transition: color 200ms ease;
}

.nav-search-input {
  width: 100%;
  height: 44px;
  padding: 0 20px 0 48px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: #1E293B;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  outline: none;
  transition: all 200ms ease;
  box-sizing: border-box;
}

.nav-search-input::placeholder {
  color: #94A3B8;
}

.nav-search-input:focus {
  border-color: #10B981;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.10), 0 1px 4px rgba(0,0,0,0.04);
}

.nav-search-input:focus ~ .nav-search-icon {
  color: #10B981;
}

/* ===== RIGHT ===== */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Divider */
.nav-divider {
  width: 1px;
  height: 28px;
  background: #E2E8F0;
  flex-shrink: 0;
}

/* Utilities group */
.nav-utilities {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px 0 0;
}

/* Icon button base */
.nav-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #94A3B8;
  transition: all 200ms ease;
  text-decoration: none;
  position: relative;
}

.nav-icon-btn:hover {
  background: #F1F5F9;
  color: #1E293B;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

#navEventDetails {
  color: #0F766E;
}
#navEventDetails:hover {
  background: #EEF2FF;
  color: #0F172A;
}


/* Nav badge */
.nav-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #EF4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(239,68,68,0.3);
}

/* Status chips */
.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  flex-shrink: 0;
}

.nav-status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 4px 10px;
  border-radius: 0;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: all 200ms ease;
  background: rgba(16,185,129,0.10);
  color: #059669;
}

.nav-status-chip:hover {
  background: rgba(16,185,129,0.18);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.nav-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nav-status-dot--green  { background: #22C55E; box-shadow: 0 0 6px rgba(34,197,94,0.5); animation: navPulse 1.5s ease-in-out infinite; }
.nav-status-dot--yellow { background: #F59E0B; box-shadow: 0 0 6px rgba(245,158,11,0.5); }
.nav-status-dot--red    { background: #EF4444; box-shadow: 0 0 6px rgba(239,68,68,0.5); }

@keyframes navPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.8; }
}

/* ===== USER PROFILE ===== */
.nav-user {
  position: relative;
  padding: 0 0 0 12px;
  flex-shrink: 0;
}

.nav-user > a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 200ms ease;
}
.nav-user > a:hover { background: #F1F5F9; }

.nav-avatar-wrapper {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.nav-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid #E2E8F0;
}

.nav-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22C55E;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(34,197,94,0.3);
}

.nav-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.nav-user-name {
  font-size: 15px;
  font-weight: 600;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-user-role {
  font-size: 13px;
  font-weight: 500;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #94A3B8;
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
  .nav-search { width: 320px; max-width: 360px; }
  .nav-utilities { gap: 10px; padding: 0 12px 0 0; }
  .nav-status { gap: 6px; padding: 0 12px; }
  .nav-user { padding: 0 0 0 8px; }
}

/* ===== DASHBOARD WELCOME ===== */
.dash-welcome-wrap {
  border-radius: 18px;
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}

/* Circle/blob pattern on welcome banner */
.dash-welcome-wrap::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  top: -100px;
  right: -60px;
  pointer-events: none;
}

.dash-welcome-wrap::after {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  bottom: -40px;
  right: 120px;
  pointer-events: none;
}

.dash-welcome-wrap .dash-welcome-blob {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  bottom: 30px;
  left: -30px;
  pointer-events: none;
}

.dash-welcome-left { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; position: relative; z-index: 1; }
.dash-welcome-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.dash-welcome-avatar svg { width: 28px; height: 28px; color: #fff; }
.dash-welcome-photo {
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  border: 2px solid rgba(255,255,255,0.4) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12) !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: 1/1 !important;
  clip-path: circle(50%) !important;
  -webkit-clip-path: circle(50%) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.dash-welcome-text { flex: 1; min-width: 0; }
.dash-welcome-greeting {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 2px;
}
.dash-welcome-name {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  letter-spacing: -0.4px;
}
.dash-welcome-name span { color: rgba(255,255,255,0.9); }
.dash-welcome-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
  line-height: 1.5;
}
.dash-welcome-sub strong { color: rgba(255,255,255,0.9); font-weight: 600; }

/* Time badge */
.dash-welcome-time-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  z-index: 1;
}
.dash-welcome-time-badge svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.9);
}
.dash-welcome-time-inner {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.dash-welcome-time-date {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.dash-welcome-time-clock {
  font-size: 16px;
  font-weight: 700;
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Consolas', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  color: #fff;
}

/* Welcome badge at top-left of hero banner */
.dash-welcome-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
  color: #fff;
}

/* Dark mode — gradient cards hold their own background, minimal overrides */
.dark-mode .dash-welcome-wrap {
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.dark-mode .dash-welcome-time-badge {
  background: rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.06);
}

@media (max-width: 767px) {
  .dash-welcome-wrap { flex-direction: column; align-items: stretch; padding: 20px; gap: 16px; }
  .dash-welcome-left { gap: 16px; }
  .dash-welcome-avatar { width: 48px !important; height: 48px !important; }
  .dash-welcome-avatar svg { width: 22px; height: 22px; }
  .dash-welcome-photo { width: 48px !important; height: 48px !important; }
  .dash-welcome-name { font-size: 20px; }
  .dash-welcome-time-badge { align-self: stretch; justify-content: center; padding: 10px 16px; }
  .dash-welcome-time-clock { font-size: 14px; }
}

/* ===== PREMIUM KPI CARDS ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.kpi-card {
  position: relative;
  border-radius: 18px;
  padding: 28px;
  overflow: hidden;
  cursor: default;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

/* Circle / blob background pattern via pseudo-elements */
.kpi-card::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  top: -60px;
  right: -50px;
  pointer-events: none;
}

.kpi-card::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  bottom: -30px;
  right: 40px;
  pointer-events: none;
}

.kpi-card .kpi-blob {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  bottom: 20px;
  left: -20px;
  pointer-events: none;
}

/* Content layer */
.kpi-content {
  position: relative;
  z-index: 1;
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  margin-bottom: 18px;
  line-height: 1;
}

.kpi-value {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.kpi-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0;
}

.kpi-trend {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
}

.kpi-trend-up {
  color: #fff;
  background: rgba(255,255,255,0.15);
}

/* Gradient variants — 10 same-family color pairs */
.kpi-emerald  { background: linear-gradient(135deg, #10B981, #059669); }
.kpi-indigo   { background: linear-gradient(135deg, #041C3A, #07264D); }
.kpi-amber    { background: linear-gradient(135deg, #F59E0B, #D97706); }
.kpi-violet   { background: linear-gradient(135deg, #041C3A, #07264D); }
.kpi-crimson  { background: linear-gradient(135deg, #EF4444, #DC2626); }
.kpi-ocean    { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.kpi-teal     { background: linear-gradient(135deg, #10B981, #059669); }
.kpi-rose     { background: linear-gradient(135deg, #FCA5A5, #EF4444); }
.kpi-sunset   { background: linear-gradient(135deg, #FB923C, #EA580C); }
.kpi-royal    { background: linear-gradient(135deg, #041C3A, #07264D); }

/* ===== BOXES / CARDS ===== */
.box {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.box:hover { box-shadow: var(--shadow-md); }

.box-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
}

.box-header .box-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.box-body { padding: 24px; }
.box-footer { padding: 16px 24px; border-top: 1px solid var(--border-light); }

/* ===== TABLES ===== */
.table {
  margin: 0;
}

.table thead th {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  padding: 12px 16px;
  white-space: nowrap;
  background: var(--bg);
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background: var(--border-light);
}

.table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-color: var(--border-light);
  font-size: 13px;
}

.table tbody tr:last-child td { border-bottom: none; }

.table-bordered {
  border: 1px solid var(--border);
}

.table-bordered thead th { border-color: var(--border); }
.table-bordered tbody td { border-color: var(--border-light); }

/* DataTables styling */
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129, 0.1);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  margin: 0 2px;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  font-size: 13px;
  transition: var(--transition);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--border-light) !important;
  border-color: var(--border) !important;
}

/* ===== BUTTONS ===== */
.btn {
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  transition: var(--transition);
  border: none;
  letter-spacing: 0.2px;
}

.btn-flat { border-radius: var(--radius); }

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(4,28,58, 0.35);
  transform: translateY(-1px);
}

.btn-success {
  background: #059669;
  color: #fff;
}

.btn-success:hover {
  background: #047857;
  box-shadow: 0 2px 8px rgba(16,185,129, 0.3);
  transform: translateY(-1px);
}

.btn-danger {
  background: #EF4444;
  color: #fff;
}

.btn-danger:hover {
  background: #DC2626;
  box-shadow: 0 2px 8px rgba(239,68,68, 0.3);
  transform: translateY(-1px);
}

.btn-info {
  background: #06B6D4;
  color: #fff;
}

.btn-info:hover {
  background: #0891B2;
  transform: translateY(-1px);
}

.btn-warning {
  background: #F59E0B;
  color: #fff;
}

.btn-warning:hover {
  background: #D97706;
  transform: translateY(-1px);
}

.btn-default {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-default:hover {
  background: var(--bg);
  border-color: var(--text-muted);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-xs { padding: 4px 8px; font-size: 11px; }

.btn-block { width: 100%; }

/* ===== CODE / BADGE STYLING ===== */
code {
  background: #F1F5F9;
  color: #1E293B;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #E2E8F0;
}

.label {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.label-danger { background: #FEF2F2; color: #DC2626; }
.label-success { background: #D1FAE5; color: #059669; }
.label-warning { background: #FEF3C7; color: #D97706; }
.label-info { background: #DBEAFE; color: #2563EB; }
.label-primary { background: #EEF4FF; color: #0F172A; }
.label-default { background: #F1F5F9; color: #94A3B8; }

/* ===== FORMS ===== */
.form-control {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  transition: var(--transition);
  box-shadow: none;
  height: auto;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129, 0.1);
}

select.form-control {
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center;
  padding-right: 36px;
}

.form-group { margin-bottom: 20px; }
.form-group label { font-weight: 600; font-size: 13px; color: var(--text); margin-bottom: 6px; }

.input-group .input-group-addon {
  border: 1px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--bg);
  color: var(--text-muted);
}

/* ===== MODALS ===== */
.modal-content {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h4 { 
  font-weight: 700; 
  font-size: 18px;
  color: var(--text);
}

.modal-header .close {
  background: var(--bg);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  font-size: 16px;
  transition: var(--transition);
}

.modal-header .close:hover { background: var(--border-light); }

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
}

/* ===== LABELS / BADGES ===== */
.label {
  font-weight: 600;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.label-success { background: var(--primary-light); color: #059669; }
.label-danger { background: #FEF2F2; color: #DC2626; }
.label-warning { background: #FEF3C7; color: #D97706; }
.label-info { background: #E0F2FE; color: #0891B2; }
.label-primary { background: #DBEAFE; color: #2563EB; }
.label-default { background: var(--border-light); color: var(--text-muted); }

/* ===== ALERTS ===== */
.alert {
  border-radius: var(--radius);
  border: none;
  padding: 14px 18px;
  font-size: 13px;
}

.alert-success { background: var(--primary-light); color: #065F46; }
.alert-danger { background: #FEF2F2; color: #8F1F1F; }
.alert-warning { background: #FEF3C7; color: #92400E; }
.alert-info { background: #E0F2FE; color: #075985; }

.alert .close { opacity: 0.5; }
.alert .close:hover { opacity: 1; }

/* ===== TABS ===== */
.nav-tabs-custom {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.nav-tabs-custom > .nav-tabs {
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-card);
}

.nav-tabs-custom > .nav-tabs > li {
  margin-bottom: -1px;
}

.nav-tabs-custom > .nav-tabs > li > a {
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 16px;
  transition: var(--transition);
}

.nav-tabs-custom > .nav-tabs > li > a:hover {
  background: transparent;
  color: var(--text);
}

.nav-tabs-custom > .nav-tabs > li.active > a {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  background: transparent;
}

.nav-tabs-custom > .tab-content { padding: 20px; }

/* ===== PAGINATION ===== */
.pagination > li > a {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin: 0 2px;
  font-size: 13px;
  transition: var(--transition);
}

.pagination > li.active > a {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination > li > a:hover {
  background: var(--border-light);
  border-color: var(--border);
}

/* ===== PROGRESS BARS ===== */
.progress {
  border-radius: 20px;
  background: var(--border-light);
  height: 8px;
  box-shadow: none;
}

.progress-bar {
  background: var(--primary);
  border-radius: 20px;
}

.progress-bar-success { background: var(--primary); }
.progress-bar-warning { background: #F59E0B; }
.progress-bar-danger { background: #EF4444; }
.progress-bar-info { background: #06B6D4; }

/* ===== NAV TABS (regular) ===== */
.nav-tabs {
  border-bottom: 1px solid var(--border-light);
}

.nav-tabs > li > a {
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 16px;
  transition: var(--transition);
}

.nav-tabs > li > a:hover {
  background: transparent;
  color: var(--text);
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  background: transparent;
}

/* ===== TIMELINE / ACTIVITY FEED ===== */
.timeline { margin: 0; }
.timeline::before { background: var(--border); }

.timeline > li > .timeline-item {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.timeline > li > .fa, 
.timeline > li > .glyphicon, 
.timeline > li > .ion {
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--bg);
}

/* ===== CALL OUTS ===== */
.callout {
  border-radius: var(--radius);
  border-left: 4px solid var(--border);
}

.callout-success { border-left-color: var(--primary); background: var(--primary-light); }
.callout-danger { border-left-color: #EF4444; background: #FEF2F2; }
.callout-warning { border-left-color: #F59E0B; background: #FEF3C7; }
.callout-info { border-left-color: #06B6D4; background: #E0F2FE; }

/* ===== INFO BOXES ===== */
.info-box {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  min-height: 80px;
  background: var(--bg-card);
  transition: var(--transition);
  padding: 16px;
}

.info-box:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.info-box-icon {
  border-radius: var(--radius);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.info-box-content { margin-left: 72px; }
.info-box-text { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; font-weight: 600; }
.info-box-number { font-size: 22px; font-weight: 700; color: var(--text); }

/* ===== LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state i {
  font-size: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* ===== CHART CARDS ===== */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.chart-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #E2E8F0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.chart-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.chart-header {
  padding: 22px 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.chart-label {
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
}

.chart-sub {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
  margin-top: 2px;
}

.chart-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.badge-green { background: #D1FAE5; color: #059669; }
.badge-blue { background: #DBEAFE; color: #2563EB; }

.chart-body {
  padding: 16px 20px 20px;
}

/* ===== TABLE GRID ===== */
.table-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .table-grid { grid-template-columns: 1fr; }
}

/* ===== TOAST NOTIFICATION ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 300px;
  animation: toast-slide 0.3s ease;
  font-size: 13px;
}

.toast.toast-success { border-left: 4px solid var(--primary); }
.toast.toast-error { border-left: 4px solid #EF4444; }
.toast.toast-info { border-left: 4px solid #06B6D4; }
.toast.toast-warning { border-left: 4px solid #F59E0B; }

@keyframes toast-slide {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  .content-header { padding: 16px; }
  .content { padding: 16px; }
  .box-header { padding: 16px; }
  .box-body { padding: 16px; }
  .kpi-card { margin-bottom: 12px; }
  .table-responsive { border: none; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .content { padding: 16px; }
}

/* ===== RANKING / LEADERBOARD ===== */
.ranking-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.ranking-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.ranking-card .rank-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.ranking-card .rank-1 { background: #F59E0B; color: #fff; box-shadow: 0 2px 8px rgba(245,158,11,0.4); }
.ranking-card .rank-2 { background: #94A3B8; color: #fff; }
.ranking-card .rank-3 { background: #CD7F32; color: #fff; }

.ranking-card .candidate-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ranking-card .candidate-info { flex: 1; min-width: 0; }
.ranking-card .candidate-name { font-weight: 600; font-size: 14px; color: var(--text); }
.ranking-card .candidate-votes { font-size: 12px; color: var(--text-muted); }
.ranking-card .vote-bar { flex: 1; max-width: 200px; }

/* ===== WIDGET CARDS ===== */
.widget-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}

.widget-card:hover { box-shadow: var(--shadow-md); }

.widget-card .widget-title {
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
}

.widget-card .widget-subtitle {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
  margin-top: 1px;
}

.widget-card .widget-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget-card .widget-body { padding: 20px; }
.widget-card .widget-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--bg);
}

/* ===== MODERN GRID ===== */
.modern-grid {
  display: grid;
  gap: 20px;
}

.modern-grid-2 { grid-template-columns: 1fr 1fr; }
.modern-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.modern-grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

@media (max-width: 1024px) {
  .modern-grid-4 { grid-template-columns: 1fr 1fr; }
  .modern-grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .modern-grid-2, .modern-grid-3, .modern-grid-4 { grid-template-columns: 1fr; }
}

/* ===== DROPDOWN MENUS ===== */
.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px;
}

.dropdown-menu > li > a {
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  transition: var(--transition);
}

.dropdown-menu > li > a:hover {
  background: var(--border-light);
}

.dropdown-menu .divider {
  margin: 4px 0;
  background: var(--border-light);
}

/* ===== USER MENU IN NAV ===== */
.user-menu .user-image {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  float: none !important;
  margin-right: 4px;
}

.user-menu .dropdown-menu {
  width: 280px;
  padding: 0;
  overflow: hidden;
}

.user-menu .dropdown-menu .user-header {
  background: var(--secondary);
  color: #fff;
  padding: 24px 20px;
  text-align: center;
  height: auto;
}

.user-menu .dropdown-menu .user-header img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.2);
  margin-bottom: 8px;
}

.user-menu .dropdown-menu .user-footer {
  padding: 12px 16px;
  background: var(--bg);
}

/* ===== FOOTER ===== */
.main-footer {
  background: #fff;
  border-top: 1px solid #E2E8F0;
  color: #94A3B8;
  padding: 18px 28px;
  font-size: 13px;
}

.main-footer a {
  color: #10B981;
  font-weight: 500;
}

/* ===== CALLOUT MODERN ===== */
.callout-modern {
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 13px;
  border-left: 4px solid var(--border);
  background: var(--bg);
  margin-bottom: 16px;
}

.callout-modern.callout-modern-success { border-left-color: var(--primary); background: var(--primary-light); }
.callout-modern.callout-modern-danger { border-left-color: #EF4444; background: #FEF2F2; }

/* ===== PAGE TRANSITION ===== */
.content-wrapper {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== MODAL FADE IMPROVEMENT ===== */
.modal.fade .modal-dialog {
  transform: scale(0.95) translateY(20px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.in .modal-dialog {
  transform: scale(1) translateY(0);
}

/* ===== PROFILE.MODAL IMAGE ===== */
#profile .modal-body .text-center img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--border);
}

/* ===== NOMINEE CARDS ===== */
.nominee-card {
  text-align: center;
  padding: 20px;
  transition: var(--transition);
}

.nominee-card img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  transition: var(--transition);
}

.nominee-card:hover img {
  border-color: var(--primary);
  transform: scale(1.05);
}

.nominee-card h4 { font-weight: 600; margin: 12px 0 4px; }

/* ===== RESPONSIVE TABLE WRAPPER ===== */
.table-responsive {
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

/* ===== BADGE PULSE ===== */
.badge-pulse {
  animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16,185,129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129, 0); }
}

/* ===== LINK STYLES ===== */
a { color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ===== TABLE ACTIONS ===== */
.action-buttons { white-space: nowrap; }
.action-buttons .btn { margin: 0 2px; }

/* ===== SEARCH BOX ===== */
.search-box {
  position: relative;
}

.search-box input {
  padding-left: 36px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ===== GLOBAL SEARCH ===== */
.global-search {
  position: relative;
  margin: 8px 0;
}

.global-search input {
  border-radius: 20px;
  padding: 6px 16px 6px 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 13px;
  width: 240px;
  transition: var(--transition);
}

.global-search input:focus {
  width: 300px;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129, 0.1);
}

.global-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== NAVBAR CUSTOM MENU ===== */
.navbar-custom-menu .nav > li > a {
  position: relative;
}

.navbar-custom-menu .nav > li > a .label {
  position: absolute;
  top: 10px;
  right: 6px;
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== LOGIN PAGE — SPLIT SCREEN ===== */
.login-page.split-layout {
  background: #fff !important;
  padding: 0 !important;
  display: block !important;
  min-height: 100vh;
}

.login-wrap {
  display: flex;
  min-height: 100vh;
}

/* ===== LEFT — BRANDING ===== */
.login-brand {
  flex: 0 0 50%;
  position: relative;
  background: linear-gradient(135deg, #047857 0%, #065F46 30%, #064E3B 60%, #07264D 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 60px 40px;
}

.login-brand-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.brand-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.brand-glow-1 {
  width: 500px;
  height: 500px;
  background: rgba(16,185,129, 0.07);
  top: -150px;
  right: -80px;
}

.brand-glow-2 {
  width: 350px;
  height: 350px;
  background: rgba(217,192,106, 0.05);
  bottom: -100px;
  left: -80px;
}

.brand-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  opacity: 0.06;
}

.login-brand-content {
  position: relative;
  z-index: 1;
  max-width: 400px;
  text-align: center;
}

.brand-logo {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.brand-title {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 2px;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.brand-tagline {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin: 0 0 40px;
}

.brand-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
}

.brand-stat {
  text-align: center;
}

.brand-stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #34D399;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.brand-stat-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

/* ===== RIGHT — LOGIN FORM ===== */
.login-form-wrap {
  flex: 0 0 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #fff;
}

.login-form-box {
  width: 100%;
  max-width: 420px;
}

.mobile-brand-logo {
  display: none;
  margin-bottom: 20px;
}

.login-form-header {
  margin-bottom: 32px;
}

.login-form-title {
  font-size: 32px;
  font-weight: 700;
  color: #1E293B;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

.login-form-subtitle {
  font-size: 15px;
  color: #94A3B8;
  margin: 0;
  line-height: 1.5;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-size: 14px;
  font-family: inherit;
  color: #1E293B;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
  background: #fff;
}

.form-input::placeholder {
  color: #94A3B8;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.checkbox-input {
  width: 16px;
  height: 16px;
  accent-color: #10B981;
  margin: 0;
}

.forgot-link {
  font-size: 13px;
  font-weight: 500;
  color: #10B981;
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: #059669;
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  height: 52px;
  background: #10B981;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.login-btn:hover {
  background: #059669;
}

.login-btn:active {
  transform: scale(0.98);
}

.login-alert {
  margin-top: 20px;
  padding: 14px 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 12px;
  color: #8F1F1F;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-alert i {
  font-size: 15px;
  flex-shrink: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .brand-stats { gap: 24px; }
  .brand-stat-value { font-size: 24px; }
}

@media (max-width: 768px) {
  .login-wrap { flex-direction: column; }
  .login-brand {
    flex: none;
    padding: 40px 24px 32px;
    min-height: auto;
  }
  .login-brand-content { max-width: 100%; }
  .brand-title { font-size: 28px; }
  .brand-tagline { margin-bottom: 24px; font-size: 13px; }
  .brand-stats { gap: 20px; }
  .brand-stat-value { font-size: 22px; }
  .brand-stat-label { font-size: 11px; }
  .login-form-wrap {
    flex: none;
    padding: 32px 24px;
  }
  .mobile-brand-logo { display: flex; justify-content: center; }
  .login-form-title { font-size: 26px; }
}

@media (max-width: 480px) {
  .login-brand { padding: 32px 20px 24px; }
  .login-form-box { max-width: 100%; }
  .login-form-wrap { padding: 28px 20px; }
}

/* ===== MOBILE RESPONSIVENESS ===== */

/* Sidebar overlay for mobile drawer */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 809;
  opacity: 0;
  transition: opacity 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Leaderboard component */
.leaderboard-rank {
  font-size: 18px;
  font-weight: 800;
  color: #94A3B8;
  min-width: 28px;
  flex-shrink: 0;
}
.leaderboard-votes {
  flex-shrink: 0;
  min-width: 60px;
}
.leaderboard-bar {
  width: 120px;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .leaderboard-bar { width: 80px; }
  .leaderboard-votes { min-width: 50px; }
  .leaderboard-votes div:first-child { font-size: 14px; }
}
@media (max-width: 480px) {
  .leaderboard-bar { display: none; }
  .leaderboard-votes { min-width: 45px; }
  .leaderboard-rank { min-width: 24px; font-size: 15px; }
}

/* Touch-friendly sizing on interactive elements */
.btn {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-xs, .btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 12px;
}
.btn-lg {
  min-height: 52px;
  padding: 14px 28px;
  font-size: 16px;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* ===== TABLET: 768px – 1023px ===== */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Content padding */
  .content { padding: 16px 20px; }
  .content-header { padding: 16px 20px; }

  /* Tablet grid: 2 cards per row */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .table-grid { grid-template-columns: 1fr; }

  /* Modern grids tablet */
  .modern-grid-3 { grid-template-columns: 1fr 1fr; }
  .modern-grid-4 { grid-template-columns: 1fr 1fr; }

  /* Sidebar: auto-collapse on tablet */
  .sidebar-mini:not(.sidebar-collapse) .main-sidebar { width: 64px !important; }
  .sidebar-mini:not(.sidebar-collapse) .sidebar-brand .brand-text,
  .sidebar-mini:not(.sidebar-collapse) .sidebar-user .user-info,
  .sidebar-mini:not(.sidebar-collapse) .sidebar-menu li > a span,
  .sidebar-mini:not(.sidebar-collapse) .sidebar-menu .menu-header,
  .sidebar-mini:not(.sidebar-collapse) .sidebar-user .online-indicator,
  .sidebar-mini:not(.sidebar-collapse) .sidebar-user .online-label { display: none; }
  .sidebar-mini:not(.sidebar-collapse) .sidebar-brand { justify-content: center; padding: 22px 8px; }
  .sidebar-mini:not(.sidebar-collapse) .sidebar-user { justify-content: center; padding: 12px 8px; }
  .sidebar-mini:not(.sidebar-collapse) .sidebar-menu { padding: 4px 8px 32px; }
  .sidebar-mini:not(.sidebar-collapse) .sidebar-menu li > a { justify-content: center; padding: 10px 8px; margin: 2px 0; min-height: 44px; }
  .sidebar-mini:not(.sidebar-collapse) .wrapper { margin-left: 64px; }
  .sidebar-mini:not(.sidebar-collapse) .content-wrapper,
  .sidebar-mini:not(.sidebar-collapse) .main-footer { margin-left: 0 !important; }

  /* When expanded on tablet */
  .sidebar-mini.sidebar-open .main-sidebar { width: 280px !important; }
  .sidebar-mini.sidebar-open .sidebar-brand .brand-text,
  .sidebar-mini.sidebar-open .sidebar-user .user-info,
  .sidebar-mini.sidebar-open .sidebar-menu li > a span,
  .sidebar-mini.sidebar-open .sidebar-menu .menu-header,
  .sidebar-mini.sidebar-open .sidebar-user .online-indicator,
  .sidebar-mini.sidebar-open .sidebar-user .online-label { display: inline; }
  .sidebar-mini.sidebar-open .sidebar-brand { justify-content: flex-start; padding: 22px 16px; }
  .sidebar-mini.sidebar-open .sidebar-user { justify-content: flex-start; padding: 16px; }
  .sidebar-mini.sidebar-open .sidebar-menu { padding: 4px 12px 32px; }
  .sidebar-mini.sidebar-open .sidebar-menu li > a { justify-content: flex-start; padding: 10px 12px; }
  .sidebar-mini.sidebar-open .wrapper { margin-left: 280px; }
  .sidebar-mini.sidebar-open .content-wrapper,
  .sidebar-mini.sidebar-open .main-footer { margin-left: 0 !important; }
}

/* ===== MOBILE: 320px – 767px ===== */
@media (max-width: 767px) {
  /* ─── Sidebar ─── */
  .sidebar-overlay { display: block; pointer-events: none; }
  .sidebar-open .sidebar-overlay { pointer-events: auto; }

  /* ─── Wrapper & Layout ─── */
  .wrapper { margin-left: 0; overflow-x: hidden; }
  .content-wrapper { min-height: calc(100vh - 60px); }

  /* ─── Header ─── */
  .main-header .navbar { padding: 0 12px; height: 60px; }
  .main-header { height: 60px; }
  .nav-left { gap: 0; }
  .nav-left .sidebar-toggle {
    width: 36px;
    height: 36px;
    position: static;
    margin-right: 4px;
    transform: none;
  }
  .nav-left .nav-page-title {
    font-size: 15px;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-center { display: none; }
  .nav-right { gap: 2px; }
  .nav-utilities { gap: 8px; padding: 0 8px 0 0; }
  .nav-icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 44px;
  }
  .nav-user > a { padding: 2px 4px; }
  .nav-avatar-wrapper { width: 32px; height: 32px; }
  .nav-avatar { width: 32px; height: 32px; }
  .nav-user-info, .nav-chevron { display: none; }
  .nav-divider { height: 20px; }
  .nav-status { gap: 4px; padding: 0 8px; }
  .nav-status-chip { height: 30px; padding: 4px 10px; font-size: 11px; gap: 6px; }
  .nav-status-dot { width: 8px; height: 8px; }

  /* Notification dropdown */
  .nav-notifications .dropdown-menu {
    position: fixed;
    top: 60px;
    left: 8px;
    right: 8px;
    width: auto;
    min-width: 0;
    max-height: 70vh;
    overflow-y: auto;
  }

  /* Profile dropdown */
  .nav-user .dropdown-menu {
    position: fixed;
    top: 64px;
    right: 12px;
    left: 12px;
    width: auto;
    min-width: 0;
    max-width: none;
    border-radius: 16px;
  }
  .nav-user .dropdown-menu .user-header { padding: 18px 16px 14px; gap: 14px; }
  .nav-user .dropdown-menu .user-header img { width: 48px; height: 48px; }

  /* ─── Content ─── */
  .content-header { padding: 12px 16px; flex-direction: column; gap: 8px; }
  .content-header h1 { font-size: 20px; }
  .content-header .breadcrumb { font-size: 12px; }
  .content { padding: 12px 16px; }

  /* ─── KPI Cards ─── */
  .kpi-grid { grid-template-columns: 1fr; gap: 12px; }
  .kpi-card { padding: 20px; margin-bottom: 0; }
  .kpi-card .kpi-value { font-size: 28px; }
  .kpi-card .kpi-label { font-size: 12px; }

  /* ─── Charts ─── */
  .chart-grid { grid-template-columns: 1fr; gap: 12px; }
  .chart-card { padding: 16px; }

  /* ─── Tables ─── */
  .table-grid { grid-template-columns: 1fr; }
  .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 16px; }
  .table-container table { min-width: 600px; }

  /* Card-style tables for critical data */
  .table-card-view thead { display: none; }
  .table-card-view tbody tr {
    display: block;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  }
  .table-card-view tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid #F1F5F9;
    font-size: 13px;
  }
  .table-card-view tbody td:last-child { border-bottom: none; }
  .table-card-view tbody td:before {
    content: attr(data-label);
    font-weight: 600;
    color: #94A3B8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 12px;
    flex-shrink: 0;
  }
  .dark-mode .table-card-view tbody tr { background: #1E293B; border-color: #334155; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
  .dark-mode .table-card-view tbody td { border-bottom-color: #334155; }

  /* ─── Forms ─── */
  .form-group { margin-bottom: 16px; }
  .form-input, .form-control, input.form-control, select.form-control, textarea.form-control {
    font-size: 16px;
    height: 48px;
    padding: 12px 16px;
  }
  textarea.form-input, textarea.form-control { height: auto; }
  select.form-input, select.form-control { height: 48px; }
  .form-label { font-size: 13px; margin-bottom: 4px; }

  /* ─── Buttons ─── */
  .btn { min-height: 48px; padding: 12px 20px; font-size: 14px; width: 100%; }
  .btn-group { display: flex; flex-direction: column; gap: 8px; }
  .btn-group .btn { border-radius: 8px !important; width: 100%; }
  .btn-group .btn:first-child { border-radius: 8px !important; }
  .btn-group .btn:last-child { border-radius: 8px !important; }
  .btn-group .btn + .btn { margin-left: 0; }

  /* ─── Box / Widget ─── */
  .box { margin-bottom: 16px; }
  .box-header { padding: 14px 16px; flex-direction: column; gap: 8px; }
  .box-header .box-title { font-size: 16px; }
  .box-body { padding: 14px 16px; }
  .box-footer { padding: 14px 16px; }

  /* ─── Modals ─── */
  .modal-dialog { margin: 8px; width: auto; max-width: none; }
  .modal-content { border-radius: 16px; }
  .modal-header { padding: 16px; }
  .modal-body { padding: 16px; max-height: 55vh; overflow-y: auto; }
  .modal-footer { padding: 12px 16px; flex-direction: column; gap: 8px; }
  .modal-footer .btn { width: 100%; }

  /* ─── Cards / Small Boxes ─── */
  .small-box { margin-bottom: 12px; }
  .small-box .inner h3 { font-size: 28px; }
  .small-box .inner p { font-size: 13px; }
  .info-box { min-height: 80px; margin-bottom: 12px; }
  .info-box-icon { width: 60px; height: 60px; font-size: 24px; line-height: 60px; }
  .info-box-content { padding: 8px 10px; }
  .info-box-text { font-size: 13px; }
  .info-box-number { font-size: 18px; }

  /* ─── Modern Grids ─── */
  .modern-grid-2, .modern-grid-3, .modern-grid-4 { grid-template-columns: 1fr; gap: 12px; }

  /* ─── Search ─── */
  .nav-center { display: none; }
  .search-dropdown { position: fixed; top: auto; left: 8px; right: 8px; max-height: 50vh; }

  /* ─── Profile Modal ─── */
  #profile .modal-body { padding: 16px; }
  #profile .form-group { margin-bottom: 14px; }

  /* ─── Prevent overflow ─── */
  .row { margin-left: 0; margin-right: 0; }
  [class*="col-"] { padding-left: 8px; padding-right: 8px; }
  .row > [class*="col-"] { margin-bottom: 12px; }
}

/* Extra small: 320px – 480px */
@media (max-width: 480px) {
  .nav-left .nav-page-title { max-width: 90px; font-size: 14px; }
  .content-header h1 { font-size: 18px; }
  .modal-dialog { margin: 4px; }
  .kpi-card .kpi-value { font-size: 24px; }
}

/* ===== NOMINEES PAGE — TRADITIONAL MANAGEMENT ===== */
.nominees-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.nominees-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nominees-actions-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nominees-actions-right {
  flex: 1;
}

.panel-title {
  font-size: 17px;
  font-weight: 700;
  color: #1E293B;
  letter-spacing: -0.2px;
}

.panel-title i {
  color: #10B981;
  margin-right: 6px;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  background: #EEF4FF;
  color: #2563EB;
  padding: 4px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.btn-change-event {
  font-size: 12px !important;
  padding: 6px 12px !important;
  border: 1px solid #E2E8F0 !important;
}

.btn-change-event:hover {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
}

.nominee-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: #94A3B8;
}

.nominee-placeholder i {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  color: #CBD5E1;
}

.nominee-placeholder span {
  font-size: 15px;
}

/* ===== TABLE TOOLBAR ===== */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.table-toolbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-toolbar-left .btn {
  padding: 6px 16px;
  font-size: 12px;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.15s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.table-toolbar-left .btn i {
  font-size: 13px;
}

.btn-copy {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
}

.btn-copy:hover {
  background: #E2E8F0;
  border-color: #CBD5E1;
  color: #1E293B;
}

.btn-excel {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.btn-excel:hover {
  background: #D1FAE5;
  border-color: #6EE7B7;
  color: #047857;
}

.btn-pdf {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.btn-pdf:hover {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #DC2626;
}

.table-toolbar-left .btn.active {
  background: #10B981;
  border-color: #10B981;
  color: #fff;
}

.table-toolbar-right {
  display: flex;
  align-items: center;
}

.table-toolbar-right .search-box input {
  width: 240px;
  padding: 5px 12px 5px 32px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  font-size: 13px;
  transition: all 0.2s;
  background: #F8FAFC;
  height: 32px;
}

.table-toolbar-right .search-box input:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
  outline: none;
  background: #fff;
}

.table-toolbar-right .search-box i {
  left: 10px;
  font-size: 13px;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 260px;
  padding: 7px 14px 7px 36px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  font-size: 13px;
  transition: all 0.2s;
  background: #F8FAFC;
}

.search-box input:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
  outline: none;
  background: #fff;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  pointer-events: none;
}

/* ===== NOMINEE TABLE ===== */
.nominee-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #E2E8F0; transition: all 0.2s; }
.nominee-avatar:hover { border-color: #10B981; transform: scale(1.1); }

.event-thumb { width: 48px; height: 36px; border-radius: 6px; object-fit: cover; border: 1px solid #E2E8F0; }

/* ===== EVENTS TABLE ===== */
#eventsTable { font-size: 14px; }
#eventsTable thead th { font-size: 13px; letter-spacing: 0.3px; padding: 12px 8px; background: #F8FAFC; border-bottom: 2px solid #E2E8F0; color: #475569; font-weight: 600; text-transform: uppercase; }
#eventsTable tbody td { padding: 12px 8px; vertical-align: middle; border-bottom: 1px solid #F1F5F9; }
#eventsTable tbody tr:hover td { background: #FAFFFD; }
#eventsTable .event-name-cell { font-size: 15px; font-weight: 600; color: #1E293B; }
/* --- Shared code badge: event, category & nominee codes --- */
.code-badge {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.6px;
  color: #1E293B;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 4px 9px;
  white-space: nowrap;
  vertical-align: middle;
}
.code-badge--nominee { color: #047857; background: #ecfdf5; border-color: #bbf0d0; }
.code-badge--stacked { margin-top: 5px; }
#eventsTable .event-thumb-cell { padding: 8px 4px; }
#eventsTable .event-thumb { display: block; margin: 0 auto; }
#eventsTable .event-placeholder { display: inline-block; width: 48px; height: 36px; line-height: 36px; text-align: center; background: #F8FAFC; border-radius: 6px; color: #CBD5E1; font-size: 16px; }
#eventsTable .status-badge-cell { white-space: nowrap; }
#eventsTable .cost-cell { font-weight: 600; color: #1E293B; }
#eventsTable .tools-cell { white-space: nowrap; }

.dark-mode #eventsTable thead th { background: #1E293B; border-bottom-color: #334155; color: #94A3B8; }
.dark-mode #eventsTable tbody td { border-bottom-color: #1E293B; }
.dark-mode #eventsTable tbody tr:hover td { background: #0A1620; }
.dark-mode #eventsTable .event-name-cell { color: #F1F5F9; }
.dark-mode .code-badge { background: #334155; border-color: #475569; color: #e2e8f0; }
.dark-mode .code-badge--nominee { background: #052e22; border-color: #065f46; color: #6ee7b7; }
.dark-mode #eventsTable .event-placeholder { background: #1E293B; color: #475569; }
.dark-mode #eventsTable .cost-cell { color: #F1F5F9; }

/* ===== NOMINEE TABLE (continued) ===== */
.nominee-code { font-family: 'Courier New', monospace; font-size: 12px; color: #94A3B8; background: #F1F5F9; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.nominee-name { color: #1E293B; font-weight: 600; }

.vote-count { font-weight: 700; color: #0F766E; font-size: 13px; }
.vote-count::before { content: '\f0e7'; font-family: 'FontAwesome'; margin-right: 4px; color: #F59E0B; }

.profile-link { font-size: 12px; color: #3B82F6; text-decoration: none; font-weight: 500; }
.profile-link:hover { color: #2563EB; text-decoration: underline; }

/* ===== TABLE BUTTON GROUP ===== */
.btn-group .btn-info { background: #06B6D4; border-color: #06B6D4; }
.btn-group .btn-info:hover { background: #0891B2; }
.btn-group .btn-primary { background: #10B981; border-color: #10B981; }
.btn-group .btn-primary:hover { background: #059669; }
.btn-group .btn-warning { background: #F59E0B; border-color: #F59E0B; }
.btn-group .btn-warning:hover { background: #D97706; }

/* ===== VIEW MODAL ===== */
.view-profile-img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 4px solid #E2E8F0; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.view-table { margin-top: 10px; }
.view-table th { background: #F8FAFC; font-weight: 600; font-size: 13px; color: #475569; }
.view-table td { font-size: 14px; }

/* ===== DELETE MODAL ===== */
.delete-icon { font-size: 48px; margin-bottom: 12px; }
.delete-warning { font-size: 16px; color: #475569; }

/* ===== DATATABLE BASE ===== */
.dataTables_wrapper .dataTables_filter input {
  display: none;
}
.dataTables_length select {
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 4px 8px;
}

/* ===== EMPTY / NO-EVENT STATES ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-state .empty-icon {
  font-size: 72px;
  color: #CBD5E1;
  margin-bottom: 20px;
  display: block;
}

.empty-state h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1E293B;
  margin: 0 0 10px;
}

.empty-state p {
  font-size: 15px;
  color: #94A3B8;
  margin: 0 0 28px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-state .btn {
  padding: 12px 32px;
  font-size: 15px;
  border-radius: 10px;
}

/* ===== TABLE RESPONSIVE WRAPPER ===== */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive-wrapper table {
  margin-bottom: 0;
  min-width: 1000px;
}

/* ===== VIEW FILTER MODAL (Nominees / Categories) ===== */
.view-filter-modal {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.view-filter-modal-header {
  padding: 20px 24px 16px;
  border-bottom: none;
  text-align: center;
  position: relative;
}

.view-filter-header-nominees,
.view-filter-header-categories {
  background: linear-gradient(135deg, #10B981, #059669);
}

.view-filter-modal-header .close {
  position: absolute;
  top: 14px;
  right: 18px;
  color: rgba(255,255,255,0.7);
  opacity: 1;
  font-size: 24px;
  text-shadow: none;
  transition: color 0.15s;
}

.view-filter-modal-header .close:hover {
  color: #fff;
  opacity: 1;
}

.view-filter-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 18px;
  color: #fff;
  backdrop-filter: blur(4px);
}

.view-filter-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.view-filter-modal-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin: 0;
  font-weight: 400;
}

.view-filter-modal-body {
  padding: 16px 24px;
}

.view-filter-modal-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.view-filter-select-wrap {
  position: relative;
}

.view-filter-select-icon {
  display: none;
}

.view-filter-select {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 36px;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #1E293B;
  background: #F8FAFC;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.view-filter-select:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.1);
  background: #fff;
}

.view-filter-select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 12px;
  pointer-events: none;
}

.view-filter-modal-footer {
  padding: 12px 24px 20px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.view-filter-btn-close {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #1E293B;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.view-filter-btn-close:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  color: #1E293B;
}

.view-filter-btn-primary {
  height: 36px;
  padding: 0 18px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #10B981, #059669);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  box-shadow: 0 3px 8px rgba(16,185,129,0.3);
}

.view-filter-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(16,185,129,0.4);
  color: #fff;
}

.view-filter-btn-primary:active {
  transform: translateY(0);
}

/* Dark mode */
.dark-mode .view-filter-modal { background: #1E293B; }
.dark-mode .view-filter-modal-body { background: #1E293B; }
.dark-mode .view-filter-modal-label { color: #94A3B8; }
.dark-mode .view-filter-select { background: #0F172A; border-color: #334155; color: #F1F5F9; }
.dark-mode .view-filter-select:focus { background: #0F172A; border-color: #34D399; }
.dark-mode .view-filter-modal-footer { border-color: #334155; }
.dark-mode .view-filter-btn-close { background: #334155; border-color: #475569; color: #F1F5F9; }
.dark-mode .view-filter-btn-close:hover { background: #475569; color: #fff; }

/* ===== STAT CARDS (Event Details) ===== */
.stat-cards-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  border-radius: 14px;
  padding: 22px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.stat-card-blue {
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
}
.stat-card-green {
  background: linear-gradient(135deg, #22C55E, #16A34A);
}
.stat-card-yellow {
  background: linear-gradient(135deg, #F59E0B, #D97706);
}
.stat-card-red {
  background: linear-gradient(135deg, #EF4444, #DC2626);
}
.stat-card-purple {
  background: linear-gradient(135deg, #041C3A, #07264D);
}
.stat-card-orange {
  background: linear-gradient(135deg, #F97316, #EA580C);
}
.stat-card-indigo {
  background: linear-gradient(135deg, #041C3A, #07264D);
}
.stat-card-teal {
  background: linear-gradient(135deg, #10B981, #059669);
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  color: #fff;
  backdrop-filter: blur(4px);
}

.stat-card-body { flex: 1; min-width: 0; }

.stat-card-value {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.stat-card-label {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  margin-top: 2px;
}

.stat-card-switch select {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,0.2);
  outline: none;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.stat-card-switch select option {
  color: #1E293B;
  background: #fff;
}

.stat-card-switch select:focus {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

@media (max-width: 992px) {
  .stat-cards-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
  .stat-cards-row { grid-template-columns: 1fr; }
  .stat-card-value { font-size: 24px; }
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 12px;
  margin-bottom: 4px;
}

.section-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
  margin: 0;
}

.section-header h3 i {
  margin-right: 8px;
  color: #0F766E;
}

/* ===== EVENT DETAILS MODAL ===== */
.event-details-modal {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.event-details-modal-header {
  background: linear-gradient(135deg, #10B981, #059669);
  padding: 20px 24px 16px;
  border-bottom: none;
  text-align: center;
  position: relative;
}

.event-details-modal-header .close {
  position: absolute;
  top: 14px;
  right: 18px;
  color: rgba(255,255,255,0.7);
  opacity: 1;
  font-size: 24px;
  text-shadow: none;
  transition: color 0.15s;
}

.event-details-modal-header .close:hover {
  color: #fff;
  opacity: 1;
}

.event-details-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 18px;
  color: #fff;
  backdrop-filter: blur(4px);
}

.event-details-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.event-details-modal-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin: 0;
  font-weight: 400;
}

.event-details-modal-body {
  padding: 16px 24px;
}

.event-details-modal-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.event-details-select-wrap {
  position: relative;
}

.event-details-select-icon {
  display: none;
}

.event-details-select {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 36px;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #1E293B;
  background: #F8FAFC;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.event-details-select:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.1);
  background: #fff;
}

.event-details-select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 12px;
  pointer-events: none;
}

.event-details-modal-footer {
  padding: 12px 24px 20px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.event-details-btn-close {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #1E293B;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.event-details-btn-close:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  color: #1E293B;
}

.event-details-btn-primary {
  height: 36px;
  padding: 0 18px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #10B981, #059669);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  box-shadow: 0 3px 8px rgba(16,185,129,0.3);
}

.event-details-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(16,185,129,0.4);
  color: #fff;
}

.event-details-btn-primary:active {
  transform: translateY(0);
}

/* Dark mode */
.dark-mode .event-details-modal { background: #1E293B; }
.dark-mode .event-details-modal-body { background: #1E293B; }
.dark-mode .event-details-modal-label { color: #94A3B8; }
.dark-mode .event-details-select { background: #0F172A; border-color: #334155; color: #F1F5F9; }
.dark-mode .event-details-select:focus { background: #0F172A; border-color: #818CF8; }
.dark-mode .event-details-modal-footer { border-color: #334155; }
.dark-mode .event-details-btn-close { background: #334155; border-color: #475569; color: #F1F5F9; }
.dark-mode .event-details-btn-close:hover { background: #475569; color: #fff; }

/* ===== EVENT MODAL (Add / Edit) ===== */
.modal-event {
  width: 780px;
}

@media (min-width: 992px) {
  .modal-event { width: 780px; }
}

.modal-header-event {
  padding: 22px 28px 16px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-event {
  font-size: 18px;
  font-weight: 700;
  color: #1E293B;
  letter-spacing: -0.3px;
}

.modal-title-icon {
  color: #10B981;
  margin-right: 10px;
  font-size: 20px;
}

.ev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ev-field {
  display: flex;
  flex-direction: column;
}

.ev-field-full {
  grid-column: 1 / -1;
}

.ev-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: #1E293B;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ev-input {
  height: 48px !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 10px !important;
  padding: 0 16px !important;
  font-size: 14px !important;
  color: #1E293B !important;
  background: #fff !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.ev-input:focus {
  border-color: #10B981 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12) !important;
}

.ev-textarea {
  height: 48px !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
  resize: vertical;
  min-height: 48px;
}

.ev-input::placeholder {
  color: #94A3B8;
  font-size: 13px;
}

/* Select arrow fix */
.ev-input select,
select.ev-input {
  appearance: auto;
}

/* Upload zone */
.ev-upload-zone {
  position: relative;
  border: 2px dashed #CBD5E1;
  border-radius: 12px;
  background: #F8FAFC;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  overflow: hidden;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ev-upload-zone:hover {
  border-color: #10B981;
  background: #F0FDF4;
}

.ev-upload-zone--dragover {
  border-color: #10B981;
  background: #F0FDF4;
}

.ev-upload-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.ev-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px;
  pointer-events: none;
}

.ev-upload-text {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}

.ev-upload-hint {
  font-size: 12px;
  color: #94A3B8;
}

.ev-upload-preview {
  display: none;
  position: relative;
  width: 100%;
  min-height: 140px;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.ev-upload-preview img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.ev-upload-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.ev-upload-remove:hover {
  background: rgba(0,0,0,0.75);
}

/* Footer buttons */
.modal-footer-event {
  padding: 16px 28px 20px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.ev-btn-cancel {
  padding: 10px 28px;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
  background: #fff;
  color: #475569;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s;
}

.ev-btn-cancel:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #1E293B;
}

.ev-btn-save {
  padding: 10px 28px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.15s, transform 0.1s;
}

.ev-btn-save:hover {
  opacity: 0.92;
  color: #fff;
}

.ev-btn-save:active {
  transform: scale(0.97);
}

/* Dark mode overrides for event modal */
.dark-mode .modal-header-event {
  border-bottom-color: #334155;
}

.dark-mode .modal-title-event { color: #F1F5F9; }
.dark-mode .modal-title-icon { color: #34D399; }
.dark-mode .ev-label { color: #F1F5F9; }
.dark-mode .ev-input { background: #0F172A !important; border-color: #334155 !important; color: #F1F5F9 !important; }
.dark-mode .ev-input:focus { border-color: #34D399 !important; box-shadow: 0 0 0 3px rgba(52,211,153,0.15) !important; }
.dark-mode .ev-input::placeholder { color: #64748B; }
.dark-mode .ev-upload-zone { background: #0F172A; border-color: #334155; }
.dark-mode .ev-upload-zone:hover,
.dark-mode .ev-upload-zone--dragover { border-color: #34D399; background: #0B1E18; }
.dark-mode .ev-upload-text { color: #94A3B8; }
.dark-mode .ev-upload-hint { color: #64748B; }
.dark-mode .modal-footer-event { border-top-color: #334155; }
.dark-mode .ev-btn-cancel { background: #1E293B; border-color: #334155; color: #94A3B8; }
.dark-mode .ev-btn-cancel:hover { background: #334155; color: #F1F5F9; }
.dark-mode .ev-btn-save { background: linear-gradient(135deg, #059669, #047857); }

/* Mobile: stack grid */
@media (max-width: 575px) {
  .modal-event { width: auto; margin: 10px; }
  .ev-grid { grid-template-columns: 1fr; }
  .ev-grid .ev-field:nth-child(1) { order: 1; }
  .ev-grid .ev-field:nth-child(2) { order: 2; }
  .ev-grid .ev-field:nth-child(3) { order: 3; }
  .ev-grid .ev-field:nth-child(4) { order: 4; }
  .ev-grid .ev-field:nth-child(5) { order: 5; }
  .ev-grid .ev-field:nth-child(6) { order: 6; }
  .modal-footer-event { flex-direction: column-reverse; gap: 8px; }
  .modal-footer-event .btn { width: 100%; }
}

/* ===== ADD NOMINEE FORM ===== */
.add-form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.add-form-group {
  flex: 1;
  min-width: 0;
}

.add-form-full {
  flex: 0 0 100%;
}

.add-form-group label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: #1E293B;
  margin-bottom: 6px;
}

.add-form-group .form-control {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
}

.add-form-group .form-control:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}

.add-form-group select.form-control {
  background: #fff;
}

.add-form-group small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.nominee-preview-container {
  margin-top: 12px;
  text-align: center;
}

.nominee-preview-container img {
  max-width: 180px;
  max-height: 180px;
  border-radius: 12px;
  border: 2px solid #E2E8F0;
  padding: 4px;
  object-fit: cover;
  display: block;
  margin: 0 auto 8px;
}

.nominee-preview-container .btn {
  font-size: 12px;
  padding: 4px 12px;
}

/* ===== DARK MODE OVERRIDES ===== */
.dark-mode .add-form-group label { color: #F1F5F9; }
.dark-mode .add-form-group .form-control { background: #0F172A; border-color: #334155; color: #F1F5F9; }
.dark-mode .add-form-group select.form-control { background: #0F172A; }
.dark-mode .nominee-preview-container img { border-color: #334155; }
.dark-mode .section-header h3 { color: #F1F5F9; }
.dark-mode .section-header h3 i { color: #818CF8; }
.dark-mode .nominee-avatar { border-color: #334155; }
.dark-mode .event-thumb { border-color: #334155; }
.dark-mode .nominee-code { background: #334155; color: #94A3B8; }
.dark-mode .search-box input { background: #0F172A; border-color: #334155; color: #F1F5F9; }
.dark-mode .search-box input:focus { background: #0F172A; border-color: #34D399; }
.dark-mode .export-group .dropdown-menu { background: #1E293B; border-color: #334155; }
.dark-mode .export-group .dropdown-menu li a { color: #CBD5E1; }
.dark-mode .export-group .dropdown-menu li a:hover { background: #0F172A; }
.dark-mode .export-group .dropdown-menu li a i { color: #475569; }
.dark-mode .empty-state .empty-icon { color: #475569; }
.dark-mode .empty-state h3 { color: #F1F5F9; }
.dark-mode .empty-state p { color: #94A3B8; }
.dark-mode .panel-title { color: #F1F5F9; }
.dark-mode .event-badge { background: #1E3A5F; color: #60A5FA; }
.dark-mode .btn-change-event { border-color: #334155 !important; color: #94A3B8 !important; background: transparent !important; }
.dark-mode .btn-change-event:hover { background: #1E293B !important; border-color: #475569 !important; }
.dark-mode .nominee-placeholder { color: #64748B; }
.dark-mode .nominee-placeholder i { color: #475569; }
.dark-mode .btn-copy { background: #1E293B; border-color: #334155; color: #94A3B8; }
.dark-mode .btn-copy:hover { background: #334155; border-color: #475569; color: #F1F5F9; }
.dark-mode .btn-excel { background: #0C2E2A; border-color: #064E3B; color: #6EE7B7; }
.dark-mode .btn-excel:hover { background: #065F46; border-color: #059669; color: #D1FAE5; }
.dark-mode .btn-pdf { background: #2E0C0C; border-color: #7F1D1D; color: #FCA5A5; }
.dark-mode .btn-pdf:hover { background: #7F1D1D; border-color: #DC2626; color: #FEE2E2; }
.dark-mode .table-toolbar-right .search-box input { background: #0F172A; border-color: #334155; color: #F1F5F9; }
.dark-mode .table-toolbar-right .search-box input:focus { background: #0F172A; border-color: #34D399; }
.dark-mode .view-table th { background: #1E293B; color: #94A3B8; }
.dark-mode .view-table td { color: #CBD5E1; }

/* ===== PUBLIC PAGE / LANDING ===== */
.ev-page {
  background: #F8FAFC;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.ev-wrapper {
  overflow-x: hidden;
}

/* Container */
.ev-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== NAVBAR ===== */
.ev-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(4,28,58, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  height: 64px;
  display: flex;
  align-items: center;
}
.ev-navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.ev-navbar-left {
  flex-shrink: 0;
}
.ev-navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.3px;
}
.ev-navbar-brand:hover { color: #34D399; text-decoration: none; }
.ev-navbar-brand svg { color: #34D399; flex-shrink: 0; }
.ev-navbar-brand-text { color: #fff; }
.ev-navbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}
.ev-navbar-menu {
  display: flex;
  list-style: none;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.ev-navbar-menu li a {
  display: block;
  padding: 8px 18px;
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
}
.ev-navbar-menu li a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ev-nav-active a { background: rgba(52,211,153,0.15) !important; color: #34D399 !important; font-weight: 600; }
.ev-navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.ev-navbar-user { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 13px; font-weight: 500; }
.ev-navbar-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.15); }
.ev-navbar-username { color: rgba(255,255,255,0.85); }
.ev-navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.ev-navbar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.2s;
}

/* ===== HERO ===== */
.ev-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0F172A 0%, #07264D 50%, #10B981 100%);
  overflow: hidden;
  padding: 80px 24px;
}
.ev-hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.ev-hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  background: #fff;
}
.ev-hero-shape--1 {
  width: 500px; height: 500px;
  top: -150px; right: -100px;
  animation: evFloat 8s ease-in-out infinite;
}
.ev-hero-shape--2 {
  width: 300px; height: 300px;
  bottom: -80px; left: -60px;
  animation: evFloat 10s ease-in-out infinite reverse;
}
.ev-hero-shape--3 {
  width: 200px; height: 200px;
  top: 50%; left: 30%;
  animation: evFloat 6s ease-in-out infinite;
}
@keyframes evFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.1); }
}
.ev-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
}
.ev-hero-title {
  font-size: 42px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1.15;
  margin: 0 0 16px;
}
.ev-hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.ev-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.ev-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  gap: 6px;
}
.ev-btn--primary {
  background: #10B981;
  color: #fff;
}
.ev-btn--primary:hover { background: #059669; color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,0.35); }
.ev-btn--outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #fff;
}
.ev-btn--outline:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; border-color: rgba(255,255,255,0.5); }
.ev-btn--sm { padding: 8px 18px; font-size: 13px; }
.ev-btn--block { width: 100%; }
.ev-btn--ghost {
  background: transparent;
  border: 1px solid #E2E8F0;
  color: #94A3B8;
}
.ev-btn--ghost:hover { background: #F1F5F9; color: #1E293B; text-decoration: none; }

/* ===== STATISTICS ===== */
.ev-stats {
  padding: 0 0 60px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}
.ev-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.ev-stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid #E2E8F0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ev-stat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
.ev-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.ev-stat-icon--green { background: #D1FAE5; color: #059669; }
.ev-stat-icon--blue { background: #DBEAFE; color: #2563EB; }
.ev-stat-icon--purple { background: #F5F3FF; color: #0F766E; }
.ev-stat-icon--orange { background: #FEF3C7; color: #D97706; }
.ev-stat-info { display: flex; flex-direction: column; gap: 2px; }
.ev-stat-number { font-size: 28px; font-weight: 800; color: #1E293B; letter-spacing: -0.5px; line-height: 1.1; }
.ev-stat-label { font-size: 13px; color: #94A3B8; font-weight: 500; }

/* ===== SEARCH / FILTER ===== */
.ev-search {
  padding: 20px 0 10px;
}
.ev-search-bar {
  margin-bottom: 32px;
}
.ev-search-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.ev-search-field {
  position: relative;
}
.ev-search-field--grow { flex: 1; min-width: 220px; }
.ev-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 14px;
  pointer-events: none;
}
.ev-search-input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 14px;
  color: #1E293B;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ev-search-input:focus { border-color: #10B981; box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.ev-search-select {
  height: 44px;
  padding: 0 32px 0 14px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 14px;
  color: #1E293B;
  background: #fff;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  appearance: auto;
}
.ev-search-select:focus { border-color: #10B981; }

/* Section header */
.ev-section-header { text-align: center; margin-bottom: 32px; }
.ev-section-title {
  font-size: 28px;
  font-weight: 800;
  color: #1E293B;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}
.ev-section-desc {
  font-size: 15px;
  color: #94A3B8;
  margin: 0;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== EVENTS GRID ===== */
.ev-cards-section {
  padding: 10px 0 80px;
}
.ev-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* ===== EVENT CARD ===== */
.ev-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  border: 1px solid #E2E8F0;
}
.ev-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

/* Card image */
.ev-card-image {
  position: relative;
  height: 220px;
  background: #E2E8F0;
  overflow: hidden;
}
.ev-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ev-card-image-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.ev-card-image--placeholder img { display: none; }
.ev-card-image--placeholder .ev-card-image-fallback { display: flex; }
.ev-card-image:not(.ev-card-image--placeholder) .ev-card-image-fallback { display: none; }

/* Badge */
.ev-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.ev-badge--active { background: rgba(16,185,129,0.9); color: #fff; }
.ev-badge--upcoming { background: rgba(245,158,11,0.9); color: #fff; }
.ev-badge--closed { background: rgba(239,68,68,0.9); color: #fff; }
.ev-badge--open { background: rgba(59,130,246,0.9); color: #fff; }

/* Card body */
.ev-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.ev-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #1E293B;
  margin: 0;
  line-height: 1.3;
}
.ev-card-desc {
  font-size: 13px;
  color: #94A3B8;
  margin: 0;
  line-height: 1.5;
}
.ev-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: #94A3B8;
}
.ev-card-meta span { display: flex; align-items: center; gap: 5px; }
.ev-card-meta i { color: #94A3B8; font-size: 13px; }
.ev-card-dates {
  font-size: 12px;
  color: #94A3B8;
}
.ev-card-dates i { margin-right: 5px; }
.ev-card-price {
  font-size: 12px;
  color: #059669;
  font-weight: 600;
}
.ev-card-countdown {
  background: #F0FDF4;
  border: 1px solid #D1FAE5;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.ev-countdown-label {
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ev-countdown-timer {
  font-size: 16px;
  font-weight: 800;
  color: #065F46;
  letter-spacing: 0.5px;
}

/* ===== EMPTY STATE ===== */
.ev-empty {
  text-align: center;
  padding: 80px 20px;
  max-width: 500px;
  margin: 0 auto;
}
.ev-empty-icon { margin-bottom: 16px; opacity: 0.5; }
.ev-empty-title {
  font-size: 20px;
  font-weight: 700;
  color: #1E293B;
  margin: 0 0 8px;
}
.ev-empty-desc {
  font-size: 14px;
  color: #94A3B8;
  margin: 0 0 24px;
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.ev-footer {
  background: #081F3A;
  padding: 60px 0 0;
  border-top: none;
}
.ev-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ev-footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
}
.ev-footer-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  margin: 0;
  max-width: 320px;
}
.ev-footer-links h4 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ev-footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ev-footer-links ul li a {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s;
}
.ev-footer-links ul li a:hover { color: #34D399; }
.ev-footer-bottom {
  padding: 20px 0;
  text-align: center;
}
.ev-footer-bottom p {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  margin: 0;
}

/* ===== DARK MODE ===== */
.dark-mode .ev-page { background: #0F172A; }
.dark-mode .ev-navbar { background: rgba(15,23,42,0.96); border-bottom-color: rgba(255,255,255,0.06); }
.dark-mode .ev-stat-card { background: #1E293B; border-color: #334155; }
.dark-mode .ev-stat-number { color: #F1F5F9; }
.dark-mode .ev-stat-label { color: #94A3B8; }
.dark-mode .ev-card { background: #1E293B; border-color: #334155; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.dark-mode .ev-card:hover { box-shadow: 0 20px 50px rgba(0,0,0,0.35); }
.dark-mode .ev-card-title { color: #F1F5F9; }
.dark-mode .ev-card-desc { color: #94A3B8; }
.dark-mode .ev-card-meta { color: #94A3B8; }
.dark-mode .ev-card-meta i { color: #64748B; }
.dark-mode .ev-card-dates { color: #64748B; }
.dark-mode .ev-card-price { color: #34D399; }
.dark-mode .ev-card-countdown { background: #064E3B; border-color: #065F46; }
.dark-mode .ev-countdown-label { color: #6EE7B7; }
.dark-mode .ev-countdown-timer { color: #D1FAE5; }
.dark-mode .ev-card-image { background: #1E293B; }
.dark-mode .ev-section-title { color: #F1F5F9; }
.dark-mode .ev-section-desc { color: #94A3B8; }
.dark-mode .ev-search-input { background: #0F172A; border-color: #334155; color: #F1F5F9; }
.dark-mode .ev-search-input:focus { border-color: #34D399; }
.dark-mode .ev-search-select { background: #0F172A; border-color: #334155; color: #F1F5F9; }
.dark-mode .ev-empty-title { color: #F1F5F9; }
.dark-mode .ev-empty-desc { color: #94A3B8; }
.dark-mode .ev-btn--ghost { border-color: #334155; color: #94A3B8; }
.dark-mode .ev-btn--ghost:hover { background: #1E293B; color: #F1F5F9; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .ev-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 1024px) {
  .ev-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .ev-hero-title { font-size: 34px; }
}
@media (max-width: 767px) {
  .ev-navbar-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(4,28,58,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    display: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .ev-navbar-menu.ev-nav-open { display: flex; }
  .ev-navbar-toggle { display: flex; }
  .ev-navbar-center { flex: 0; }
  .ev-navbar-username { display: none; }
  .ev-hero { min-height: 320px; padding: 60px 20px; }
  .ev-hero-title { font-size: 28px; }
  .ev-hero-sub { font-size: 15px; }
  .ev-hero-actions { flex-direction: column; align-items: center; }
  .ev-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ev-stat-card { padding: 16px; }
  .ev-stat-number { font-size: 22px; }
  .ev-cards-grid { grid-template-columns: 1fr; gap: 20px; }
  .ev-card-image { height: 180px; }
  .ev-search-form { flex-direction: column; }
  .ev-search-field--grow { min-width: 0; width: 100%; }
  .ev-section-title { font-size: 22px; }
  .ev-footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .ev-hero-title { font-size: 24px; }
  .ev-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ev-stat-icon { width: 40px; height: 40px; font-size: 18px; }
  .ev-stat-number { font-size: 20px; }
  .ev-stat-label { font-size: 12px; }
}

/* ===== NOMINEES TABLE — LARGER TEXT & BUTTONS ===== */
.table th,
.table td {
  font-size: 16px;
  font-weight: 500;
}

.nominee-code,
.badge {
  font-size: 14px;
  font-weight: 600;
}

.dataTables_wrapper {
  font-size: 15px;
}

.btn-sm {
  min-width: 40px;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

.btn-xs {
  min-width: 36px;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

/* Dark mode sidebar styles moved to sidebar.css */

/* ================================
   GLOBAL SEARCH RESULTS DROPDOWN
   ================================ */

.nav-search {
  position: relative;
}

.gs-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 100000;
  max-height: 520px;
  overflow-y: auto;
  display: none;
  padding: 8px 0;
}

.gs-dropdown.gs-open {
  display: block;
  animation: gsFadeIn 0.2s ease;
}

@keyframes gsFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gs-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-top: 4px;
}

.gs-section-header:first-child {
  margin-top: 0;
}

.gs-section-header svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.gs-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.12s ease;
  text-decoration: none;
  color: inherit;
  margin: 0 6px;
  border-radius: 8px;
}

.gs-item:hover,
.gs-item.gs-highlighted {
  background: #F1F5F9;
  text-decoration: none;
  color: inherit;
}

.gs-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #94A3B8;
  font-size: 14px;
}

.gs-item-icon svg {
  width: 16px;
  height: 16px;
}

.gs-item-body {
  flex: 1;
  min-width: 0;
}

.gs-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-item-desc {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-empty {
  padding: 32px 24px;
  text-align: center;
}

.gs-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #F1F5F9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  font-size: 20px;
  margin-bottom: 12px;
}

.gs-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 4px;
}

.gs-empty-sub {
  font-size: 12px;
  color: #94A3B8;
}

.gs-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 16px;
  color: #94A3B8;
  font-size: 13px;
}

.gs-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #E2E8F0;
  border-top-color: #0F766E;
  border-radius: 50%;
  animation: gsSpin 0.6s linear infinite;
}

@keyframes gsSpin {
  to { transform: rotate(360deg); }
}

.gs-history {
  padding: 6px 6px 0;
}

.gs-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  transition: background 0.12s ease;
}

.gs-history-item:hover {
  background: #F1F5F9;
}

.gs-history-item svg {
  width: 14px;
  height: 14px;
  color: #94A3B8;
  flex-shrink: 0;
}

.gs-history-clear {
  display: block;
  width: 100%;
  text-align: center;
  padding: 8px;
  font-size: 12px;
  color: #94A3B8;
  cursor: pointer;
  border: none;
  background: none;
  border-radius: 8px;
  transition: background 0.12s ease;
}

.gs-history-clear:hover {
  background: #F1F5F9;
  color: #EF4444;
}

/* ── dark mode ── */

.dark-mode .gs-dropdown {
  background: #1E293B;
  border-color: #334155;
  box-shadow: 0 12px 48px rgba(0,0,0,0.4);
}

.dark-mode .gs-section-header {
  color: #64748B;
}

.dark-mode .gs-item:hover,
.dark-mode .gs-item.gs-highlighted {
  background: #1E293B;
}

.dark-mode .gs-item-icon {
  background: #1E293B;
  color: #64748B;
}

.dark-mode .gs-item-title {
  color: #F1F5F9;
}

.dark-mode .gs-item-desc {
  color: #64748B;
}

.dark-mode .gs-empty-icon {
  background: #1E293B;
  color: #64748B;
}

.dark-mode .gs-empty-title {
  color: #F1F5F9;
}

.dark-mode .gs-empty-sub {
  color: #64748B;
}

.dark-mode .gs-loading {
  color: #64748B;
}

.dark-mode .gs-spinner {
  border-color: #334155;
  border-top-color: #10B981;
}

.dark-mode .gs-history-item {
  color: #64748B;
}

.dark-mode .gs-history-item:hover {
  background: #1E293B;
}

.dark-mode .gs-history-item svg {
  color: #64748B;
}

.dark-mode .gs-history-clear {
  color: #64748B;
}

.dark-mode .gs-history-clear:hover {
  background: #1E293B;
  color: #F87171;
}

/* ── responsive ── */

@media (max-width: 767px) {
  .gs-dropdown {
    position: fixed;
    top: 60px;
    left: 8px;
    right: 8px;
    max-height: calc(100vh - 80px);
    border-radius: 12px;
  }
}

/* ── text highlighting ── */

.gs-mark {
  background: #FEF3C7;
  color: #92400E;
  border-radius: 3px;
  padding: 1px 2px;
  font-weight: 700;
}

.dark-mode .gs-mark {
  background: rgba(251,191,36,0.2);
  color: #FDE68A;
}

/* ── result badge ── */

.gs-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #0F766E;
  background: #EEF2FF;
  border-radius: 10px;
  padding: 2px 7px;
  letter-spacing: 0;
  text-transform: none;
  flex-shrink: 0;
}

.dark-mode .gs-badge {
  background: rgba(99,102,241,0.15);
  color: #A5B4FC;
}

/* ── section separator ── */

.gs-sep {
  height: 1px;
  background: #E2E8F0;
  margin: 4px 16px;
}

.dark-mode .gs-sep {
  background: #334155;
}

/* ── error state ── */

.gs-error {
  padding: 28px 24px;
  text-align: center;
}

.gs-error-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #FEF2F2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #EF4444;
  font-size: 20px;
  margin-bottom: 12px;
}

.gs-error-title {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 4px;
}

.gs-error-sub {
  font-size: 12px;
  color: #94A3B8;
  line-height: 1.5;
}

.gs-retry-btn {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #041C3A;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.gs-retry-btn:hover {
  background: #07264D;
}

.dark-mode .gs-error-icon {
  background: rgba(217,54,54,0.15);
}

.dark-mode .gs-error-title {
  color: #F1F5F9;
}

.dark-mode .gs-error-sub {
  color: #64748B;
}

.dark-mode .gs-retry-btn {
  background: #10B981;
}

.dark-mode .gs-retry-btn:hover {
  background: #10B981;
}
