/* ==========================================================================
   MSDH Admin — Light Theme (DropX-style, high contrast)
   All rules are scoped to body.admin so the public site is never affected.
   ========================================================================== */

body.admin {
  --admin-bg: #F8FAFC;
  --admin-surface: #FFFFFF;
  --admin-surface-2: #F1F5F9;
  --admin-border: #E2E8F0;
  --admin-border-strong: #CBD5E1;
  --admin-text: #0F172A;
  --admin-muted: #475569;
  --admin-indigo: #4F46E5;
  --admin-indigo-soft: #EEF2FF;
  --admin-radius: 12px;
  background: var(--admin-bg) !important;
  color: var(--admin-text) !important;
  min-height: 100vh;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* Remove the dark ambient glow on admin pages */
body.admin::before { display: none !important; }

/* Hide the public navigation on admin pages — replaced by the admin top bar */
body.admin > nav { display: none !important; }

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */
body.admin .admin-topbar {
  position: sticky;
  top: 0;
  z-index: 55;
  height: 68px;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
body.admin .admin-topbar-inner {
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
body.admin .admin-topbar-left,
body.admin .admin-topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
body.admin .admin-topbar-left { min-width: 210px; }
body.admin .admin-topbar-center { flex: 1; display: flex; justify-content: center; position: relative; min-width: 0; }
body.admin .admin-topbar-right { justify-content: flex-end; }

body.admin .icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #475569 !important;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s ease;
}
body.admin .icon-btn:hover { background: #EEF2FF; color: #4F46E5 !important; border-color: #C7D2FE; }

body.admin .admin-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: #475569 !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.admin .admin-breadcrumb a { color: #475569 !important; text-decoration: none; }
body.admin .admin-breadcrumb a:hover { color: #4F46E5 !important; }
body.admin .admin-breadcrumb .sep { color: #94A3B8; font-weight: 400; }
body.admin .admin-breadcrumb #adminCrumb { color: #0F172A !important; font-weight: 700; }

body.admin .admin-global-search {
  width: 100%; max-width: 460px;
  display: flex; align-items: center; gap: 10px;
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 0 12px;
  height: 38px;
  color: #64748B;
}
body.admin .admin-global-search:focus-within { border-color: #A5B4FC; box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
body.admin .admin-global-search input {
  flex: 1; min-width: 0;
  border: 0 !important; outline: none !important; background: transparent !important;
  color: #0F172A !important; font-size: 13px;
}
body.admin .admin-global-search input::placeholder { color: #64748B; opacity: 1; }
body.admin .admin-global-search kbd {
  font-family: inherit; font-size: 10px; font-weight: 700;
  color: #475569; background: #FFFFFF;
  border: 1px solid #E2E8F0; border-radius: 5px;
  padding: 2px 6px; white-space: nowrap;
}
body.admin .admin-search-results {
  position: absolute; top: 44px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 460px;
  background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 12px;
  box-shadow: 0 12px 28px -8px rgba(15, 23, 42, .18);
  padding: 6px; z-index: 60;
}
body.admin .admin-search-results a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  font-size: 13px; color: #0F172A !important; text-decoration: none;
}
body.admin .admin-search-results a:hover { background: #EEF2FF; color: #4F46E5 !important; }
body.admin .admin-search-results .empty { padding: 12px; font-size: 12px; color: #475569 !important; text-align: center; }

body.admin .support-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 13px;
  border: 1px solid #E2E8F0; border-radius: 9px;
  background: #FFFFFF; color: #0F172A !important;
  font-size: 12px; font-weight: 600; text-decoration: none;
  transition: all .15s ease;
}
body.admin .support-btn:hover { background: #EEF2FF; border-color: #C7D2FE; color: #4F46E5 !important; }
body.admin .support-btn i { color: #4F46E5 !important; }

body.admin .notif-btn { position: relative; }
body.admin .notif-dot {
  position: absolute; top: 7px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #EF4444; border: 1.5px solid #FFFFFF;
}
body.admin .notif-panel {
  position: absolute; top: 46px; right: 0;
  width: 272px; background: #FFFFFF;
  border: 1px solid #E2E8F0; border-radius: 12px;
  box-shadow: 0 12px 28px -8px rgba(15, 23, 42, .18);
  padding: 8px; z-index: 60;
}
body.admin .notif-panel h4 { font-size: 12px; font-weight: 700; color: #0F172A !important; padding: 6px 8px; }
body.admin .notif-panel a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 8px; border-radius: 8px; font-size: 12px;
  color: #475569 !important; text-decoration: none;
}
body.admin .notif-panel a:hover { background: #F1F5F9; color: #0F172A !important; }
body.admin .notif-panel a strong { color: #0F172A !important; }

body.admin .admin-profile {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid #E2E8F0; border-radius: 999px;
  background: #FFFFFF; cursor: pointer;
}
body.admin .admin-profile:hover { border-color: #C7D2FE; }
body.admin .admin-profile .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  color: #FFFFFF !important;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
body.admin .admin-profile .admin-profile-name { font-size: 12px; font-weight: 700; color: #0F172A !important; }
body.admin .admin-profile > i { font-size: 10px; color: #94A3B8; }

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
body.admin #adminSidebar {
  background: #FFFFFF !important;
  border-right: 1px solid #E2E8F0 !important;
  backdrop-filter: none !important;
  padding: 16px 12px !important;
  gap: 6px;
  width: 248px !important;
}
body.admin #adminSidebar .sideBtn {
  border-radius: 10px !important;
  padding: 8px 10px !important;
  color: #1E293B !important;
  font-weight: 600; font-size: 13px;
  transition: all .16s ease;
  text-decoration: none;
}
body.admin #adminSidebar .sideBtn > span.w-8 {
  background: #F1F5F9 !important;
  color: #475569 !important;
  border-radius: 8px !important;
  transition: all .16s ease;
}
body.admin #adminSidebar .sideBtn:hover { background: #F8FAFC !important; color: #0F172A !important; }
body.admin #adminSidebar .sideBtn:hover > span.w-8 { background: #EEF2FF !important; color: #4F46E5 !important; }
body.admin #adminSidebar .sideBtn.active {
  background: #EEF2FF !important;
  color: #4F46E5 !important;
}
body.admin #adminSidebar .sideBtn.active > span.w-8 { background: #FFFFFF !important; color: #4F46E5 !important; }
body.admin button[data-tab].active { background: #EEF2FF !important; color: #4F46E5 !important; border-color: #C7D2FE !important; }
body.admin #adminSidebar .sideHeading {
  font-size: 10px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #94A3B8 !important;
  padding: 8px 10px 4px;
}
body.admin #adminSidebar .back-site { color: #475569 !important; }
body.admin #adminSidebar .back-site:hover { color: #4F46E5 !important; }
body.admin #sidebarBackdrop { background: rgba(15, 23, 42, .45) !important; backdrop-filter: none !important; z-index:56 !important; }

@media (min-width: 1024px) {
  body.admin #adminSidebar {
    position: sticky !important;
    top: 68px;
    height: calc(100vh - 68px) !important;
    transform: none !important;
    overflow-y: auto;
    align-self: flex-start;
  }
}
@media (max-width: 1023px) {
  body.admin #adminSidebar {
    position: fixed !important;
    top: 0; left: 0; bottom: 0; height: 100vh !important;
    z-index: 70; transform: translateX(-100%);
    box-shadow: 0 16px 48px -12px rgba(15, 23, 42, .35);
  }
  body.admin #adminSidebar:not(.-translate-x-full) { transform: translateX(0) !important; }
}

/* --------------------------------------------------------------------------
   Cards / surfaces / typography overrides (all sub-pages included)
   -------------------------------------------------------------------------- */
body.admin .card,
body.admin .glass,
body.admin .glass-strong,
body.admin .tabPanel > .card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05) !important;
  backdrop-filter: none !important;
  color: #0F172A !important;
}
body.admin .card:hover { transform: none !important; border-color: #C7D2FE !important; box-shadow: 0 2px 8px rgba(15, 23, 42, .07) !important; }

/* Force readable text everywhere on admin pages */
body.admin h1, body.admin h2, body.admin h3, body.admin h4, body.admin h5, body.admin h6 {
  color: #0F172A !important; letter-spacing: -.015em;
}
body.admin .text-white,
body.admin [class*="text-slate-"],
body.admin [class*="text-gray-"],
body.admin [class*="text-zinc-"],
body.admin [class*="text-neutral-"],
body.admin .text-muted,
body.admin .ui-muted { color: #0F172A !important; }
body.admin p, body.admin span, body.admin div, body.admin label, body.admin strong, body.admin small {
  color: inherit;
}
body.admin .text-brand { color: #4F46E5 !important; }
/* Legacy hover:white utilities would be invisible on light surfaces */
body.admin [class*="hover:text-white"]:hover { color: #0F172A !important; }
body.admin [class*="hover:text-slate"]:hover { color: #0F172A !important; }
body.admin [class*="hover:text-brand"]:hover { color: #4F46E5 !important; }
/* Sidebar / brand headings must be dark, not the legacy gold gradient */
body.admin .grad-text {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
}

/* Muted labels remain dark slate (high contrast, not faint) */
body.admin .muted, body.admin .sub-label { color: #475569 !important; }

/* Status colours — darker variants for light backgrounds */
body.admin .text-green-400, body.admin .text-green-300, body.admin .text-green-500 { color: #047857 !important; }
body.admin .text-red-400, body.admin .text-red-300, body.admin .text-red-500 { color: #B91C1C !important; }
body.admin .text-yellow-400, body.admin .text-yellow-300, body.admin .text-yellow-200, body.admin .text-yellow-500 { color: #B45309 !important; }
body.admin .text-blue-400, body.admin .text-blue-300 { color: #1D4ED8 !important; }
/* Match exact utility tokens (not hover:/group-hover: variants) */
body.admin [class~="bg-white/5"] { background: #F1F5F9 !important; }
body.admin [class~="border-white/5"], body.admin [class~="border-white/10"] { border-color: #E2E8F0 !important; }
body.admin [class^="bg-brand/"], body.admin [class*=" bg-brand/"] { background: #EEF2FF !important; }
body.admin [class^="bg-green-500/"], body.admin [class*=" bg-green-500/"] { background: #ECFDF5 !important; }
body.admin [class^="bg-red-500/"], body.admin [class*=" bg-red-500/"] { background: #FEF2F2 !important; }
body.admin [class^="bg-yellow-500/"], body.admin [class*=" bg-yellow-500/"] { background: #FFFBEB !important; }

/* --------------------------------------------------------------------------
   Forms — every input white with black text
   -------------------------------------------------------------------------- */
body.admin input.input,
body.admin select.input,
body.admin select,
body.admin textarea,
body.admin .input,
body.admin input[type="text"],
body.admin input[type="email"],
body.admin input[type="password"],
body.admin input[type="number"],
body.admin input[type="url"],
body.admin input[type="date"],
body.admin input[type="file"] {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 8px !important;
  outline: none;
}
body.admin .input { padding: .625rem .875rem; width: 100%; transition: border-color .15s, box-shadow .15s; }
body.admin .input:focus,
body.admin input:focus,
body.admin select:focus,
body.admin textarea:focus {
  border-color: #6366F1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .14) !important;
}
body.admin select option,
body.admin select.input option { background: #FFFFFF !important; color: #0F172A !important; }
body.admin input::placeholder, body.admin textarea::placeholder { color: #64748B !important; opacity: 1; }
body.admin input[type="checkbox"] { accent-color: #4F46E5; width: 15px; height: 15px; }
body.admin input[type="file"]::file-selector-button {
  background: #EEF2FF; color: #4F46E5; border: 0;
  border-radius: 6px; padding: 5px 9px; margin-right: 8px; font-weight: 600; cursor: pointer;
}
body.admin .admin-global-search input { border: 0 !important; box-shadow: none !important; background: transparent !important; }

/* --------------------------------------------------------------------------
   Buttons & badges
   -------------------------------------------------------------------------- */
body.admin .grad-btn,
body.admin .btn-primary {
  background: linear-gradient(135deg, #6366F1, #8B5CF6) !important;
  color: #FFFFFF !important;
  border: 0 !important;
  border-radius: 9px !important;
  font-weight: 600;
  box-shadow: 0 4px 12px -4px rgba(99, 102, 241, .4);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
body.admin .grad-btn:hover, body.admin .btn-primary:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 6px 16px -4px rgba(99, 102, 241, .5); }
body.admin .grad-btn *, body.admin .btn-primary * { color: #FFFFFF !important; }

body.admin .btn-outline {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 9px !important;
  font-weight: 600;
}
body.admin .btn-outline:hover { background: #F8FAFC !important; border-color: #A5B4FC !important; }

body.admin .badge {
  border-radius: 9999px;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  background: #F1F5F9 !important;
  color: #334155 !important;
  border: 1px solid #E2E8F0 !important;
}
body.admin .badge[class*="green"] { background: #ECFDF5 !important; color: #047857 !important; border-color: #A7F3D0 !important; }
body.admin .badge[class*="red"] { background: #FEF2F2 !important; color: #B91C1C !important; border-color: #FECACA !important; }
body.admin .badge[class*="yellow"] { background: #FFFBEB !important; color: #B45309 !important; border-color: #FDE68A !important; }
body.admin .badge[class*="brand"] { background: #EEF2FF !important; color: #4F46E5 !important; border-color: #C7D2FE !important; }

/* --------------------------------------------------------------------------
   Tables — white rows, dark text, horizontal scroll on mobile
   -------------------------------------------------------------------------- */
body.admin table { border-collapse: separate; border-spacing: 0; width: 100%; }
body.admin thead tr { background: #F8FAFC !important; }
body.admin thead th {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: #475569 !important;
  padding: 12px 14px; border-bottom: 1px solid #E2E8F0 !important;
  white-space: nowrap;
}
body.admin tbody td {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border-bottom: 1px solid #E2E8F0 !important;
  padding: 11px 14px; font-size: 13px;
}
body.admin tbody tr:hover td { background: #F8FAFC !important; }
body.admin table a { color: #4F46E5 !important; }

/* --------------------------------------------------------------------------
   Dashboard — welcome, KPI, action cards, charts, quick actions
   -------------------------------------------------------------------------- */
body.admin .welcome-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05) !important;
  padding: 24px;
}
body.admin .welcome-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #4F46E5 !important; }
body.admin .welcome-title { font-size: 26px; font-weight: 800; color: #0F172A !important; line-height: 1.2; }
body.admin .welcome-subtitle { font-size: 13px; color: #475569 !important; margin-top: 4px; }

body.admin .kpi-card {
  position: relative; overflow: hidden;
  border-radius: 12px !important;
  padding: 18px;
  min-height: 132px;
  box-shadow: 0 6px 16px -8px rgba(15, 23, 42, .28);
  color: #FFFFFF !important;
}
body.admin .kpi-card, body.admin .kpi-card * { color: #FFFFFF !important; }
body.admin .kpi-card .kpi-label { font-size: 12px; font-weight: 600; opacity: .95; }
body.admin .kpi-card .kpi-value { font-size: 30px; font-weight: 800; line-height: 1.15; margin-top: 8px; letter-spacing: -.02em; }
body.admin .kpi-card .kpi-foot { font-size: 11px; opacity: .9; margin-top: 8px; }
body.admin .kpi-card .kpi-icon {
  position: absolute; right: 14px; top: 14px;
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255, 255, 255, .18);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
body.admin .kpi-card .kpi-orbit {
  position: absolute; right: -28px; bottom: -34px;
  width: 110px; height: 110px; border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}
body.admin .kpi-teal { background: linear-gradient(135deg, #10B981, #059669) !important; }
body.admin .kpi-purple { background: linear-gradient(135deg, #8B5CF6, #6D28D9) !important; }
body.admin .kpi-cyan { background: linear-gradient(135deg, #06B6D4, #0284C7) !important; }
body.admin .kpi-orange { background: linear-gradient(135deg, #F97316, #EA580C) !important; }
body.admin .kpi-card a { text-decoration: underline; text-underline-offset: 2px; }

body.admin .action-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05) !important;
  padding: 18px;
  display: flex; align-items: center; gap: 14px;
}
body.admin .action-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
body.admin .action-amber .action-icon { background: #FFFBEB; color: #B45309 !important; }
body.admin .action-blue .action-icon { background: #EFF6FF; color: #1D4ED8 !important; }
body.admin .action-indigo .action-icon { background: #EEF2FF; color: #4F46E5 !important; }
body.admin .action-card .action-num { font-size: 22px; font-weight: 800; color: #0F172A !important; line-height: 1.1; }
body.admin .action-card .action-label { font-size: 12px; color: #475569 !important; margin-top: 2px; }
body.admin .action-card .action-link { font-size: 11px; font-weight: 700; color: #4F46E5 !important; text-decoration: none; white-space: nowrap; }
body.admin .action-card .action-link:hover { text-decoration: underline; }

body.admin .chart-card { padding: 20px !important; }
body.admin .chart-title { font-size: 14px; font-weight: 700; color: #0F172A !important; }
body.admin .chart-sub { font-size: 11px; color: #475569 !important; margin-top: 2px; }
body.admin .chart-box { position: relative; height: 260px; width: 100%; }

body.admin .quick-action {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 10px !important;
  padding: 12px;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; text-align: left;
  color: #0F172A !important;
  cursor: pointer; transition: all .15s ease;
}
body.admin .quick-action:hover { background: #EEF2FF !important; border-color: #C7D2FE !important; color: #4F46E5 !important; }
body.admin .quick-action i { color: #4F46E5 !important; font-size: 14px; }
body.admin .section-title { font-size: 14px; font-weight: 700; color: #0F172A !important; }
body.admin .section-link { font-size: 11px; font-weight: 600; color: #4F46E5 !important; text-decoration: none; }
body.admin .section-link:hover { text-decoration: underline; }

body.admin .pending-row {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 10px;
}
body.admin .empty-state { color: #475569 !important; }

/* --------------------------------------------------------------------------
   Flash messages, toast & modal
   -------------------------------------------------------------------------- */
body.admin .flash-success { background: #ECFDF5 !important; border: 1px solid #A7F3D0 !important; color: #047857 !important; border-radius: 9px !important; }
body.admin .flash-error { background: #FEF2F2 !important; border: 1px solid #FECACA !important; color: #B91C1C !important; border-radius: 9px !important; }
body.admin #adminChatModal { background: rgba(15, 23, 42, .45) !important; }
body.admin #adminChatBox, body.admin #adminChatModal #adminChatBox { background: #F8FAFC !important; border: 1px solid #E2E8F0 !important; }
body.admin #adminChatBox .text-brand { color: #4F46E5 !important; }

/* --------------------------------------------------------------------------
   Footer on admin pages
   -------------------------------------------------------------------------- */
body.admin footer { background: #F8FAFC !important; color: #0F172A !important; border-top: 1px solid #E2E8F0; }
body.admin footer h4, body.admin footer p, body.admin footer span, body.admin footer a, body.admin footer li { color: #0F172A !important; }
body.admin footer .glass, body.admin footer .glass-strong { background: #FFFFFF !important; border-color: #E2E8F0 !important; }
body.admin footer .border-t { border-color: #E2E8F0 !important; }
body.admin footer .bg-black\/30 { background: #F1F5F9 !important; }

/* --------------------------------------------------------------------------
   Utilities / responsive
   -------------------------------------------------------------------------- */
body.admin ::-webkit-scrollbar { width: 9px; height: 9px; }
body.admin ::-webkit-scrollbar-track { background: #F1F5F9; }
body.admin ::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 6px; border: 2px solid #F1F5F9; }
body.admin ::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

body.admin button:focus-visible,
body.admin a:focus-visible,
body.admin input:focus-visible,
body.admin select:focus-visible,
body.admin textarea:focus-visible { outline: 2px solid #6366F1; outline-offset: 2px; }

body.admin .tabPanel { animation: adminFadeUp .28s ease-out both; }
@keyframes adminFadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 1023px) {
  body.admin .admin-topbar-left { min-width: 0; }
  body.admin .admin-breadcrumb { display: none; }
}
@media (max-width: 767px) {
  body.admin .admin-topbar-inner { padding: 0 12px; gap: 10px; }
  body.admin .support-btn span, body.admin .admin-profile-name { display: none; }
  body.admin .support-btn { padding: 0 10px; }
  body.admin .admin-topbar-left { flex-shrink: 0; }
  body.admin .admin-global-search kbd { display: none; }
  body.admin .kpi-card .kpi-value { font-size: 26px; }
  body.admin .notif-panel { max-width: calc(100vw - 24px); }
  body.admin .admin-search-results {
    position: fixed; top: 64px; left: 12px; right: 12px;
    width: auto; max-width: none; transform: none;
  }
}
/* P2P sub-tabs share the active styling of the main tabs */
body.admin .p2pSubBtn.active {
  background: #EEF2FF !important;
  color: #4F46E5 !important;
  border-color: #C7D2FE !important;
}
body.admin.admin-dark .p2pSubBtn.active { background: #312E81 !important; color: #E0E7FF !important; }


/* Admin dark mode (toggled from the theme switcher) */
body.admin.admin-dark {
  --admin-bg: #0B1120;
  --admin-surface: #111827;
  --admin-border: #1F2937;
  --admin-text: #F8FAFC;
  --admin-muted: #94A3B8;
  background: #0B1120 !important;
  color: #F8FAFC !important;
}
body.admin.admin-dark .admin-topbar,
body.admin.admin-dark #adminSidebar,
body.admin.admin-dark .card,
body.admin.admin-dark .glass,
body.admin.admin-dark .glass-strong,
body.admin.admin-dark .welcome-card,
body.admin.admin-dark .action-card,
body.admin.admin-dark input.input,
body.admin.admin-dark .input,
body.admin.admin-dark select,
body.admin.admin-dark textarea { background: #111827 !important; color: #F8FAFC !important; border-color: #1F2937 !important; }
body.admin.admin-dark h1, body.admin.admin-dark h2, body.admin.admin-dark h3,
body.admin.admin-dark .text-white, body.admin.admin-dark [class*="text-slate-"],
body.admin.admin-dark [class*="text-gray-"], body.admin.admin-dark tbody td { color: #F8FAFC !important; }
body.admin.admin-dark thead tr, body.admin.admin-dark tbody tr:hover td { background: #1F2937 !important; }

/* --------------------------------------------------------------------------
   Admin dark mode – legibility fixes for text that stayed light-theme coloured
   -------------------------------------------------------------------------- */
body.admin.admin-dark .chart-title,
body.admin.admin-dark .section-title,
body.admin.admin-dark .action-num,
body.admin.admin-dark .empty-state,
body.admin.admin-dark thead th { color: #F8FAFC !important; }
body.admin.admin-dark .chart-sub,
body.admin.admin-dark .welcome-subtitle,
body.admin.admin-dark .action-label,
body.admin.admin-dark .quick-action { color: #CBD5E1 !important; }
body.admin.admin-dark .section-link,
body.admin.admin-dark .action-link,
body.admin.admin-dark .kpi-foot a,
body.admin.admin-dark table a { color: #A5B4FC !important; }
body.admin.admin-dark .text-green-400 { color: #34D399 !important; }
body.admin.admin-dark .text-red-400 { color: #F87171 !important; }
body.admin.admin-dark .text-yellow-400 { color: #FBBF24 !important; }
body.admin.admin-dark .quick-action { background: #1F2937 !important; border-color: #374151 !important; }
body.admin.admin-dark .quick-action:hover { background: #312E81 !important; color: #E0E7FF !important; }
body.admin.admin-dark .pending-row { background: #1F2937 !important; border-color: #374151 !important; }
body.admin.admin-dark .notif-panel,
body.admin.admin-dark .admin-search-results,
body.admin.admin-dark .admin-profile,
body.admin.admin-dark #adminChatBox { background: #111827 !important; color: #F8FAFC !important; border-color: #1F2937 !important; }
body.admin.admin-dark .support-btn { background: #1F2937 !important; color: #F8FAFC !important; border-color: #374151 !important; }
body.admin.admin-dark .badge { background: #1F2937 !important; border-color: #374151 !important; color: #F8FAFC !important; }
body.admin.admin-dark .badge[class*="green"] { background: #064E3B !important; color: #6EE7B7 !important; border-color: #065F46 !important; }
body.admin.admin-dark .badge[class*="red"] { background: #7F1D1D !important; color: #FCA5A5 !important; border-color: #991B1B !important; }
body.admin.admin-dark .badge[class*="yellow"] { background: #78350F !important; color: #FCD34D !important; border-color: #92400E !important; }
body.admin.admin-dark .badge[class*="brand"] { background: #312E81 !important; color: #C7D2FE !important; border-color: #3730A3 !important; }
body.admin.admin-dark .flash-success { background: #064E3B !important; color: #A7F3D0 !important; border-color: #065F46 !important; }
body.admin.admin-dark .flash-error { background: #7F1D1D !important; color: #FECACA !important; border-color: #991B1B !important; }
