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

* { font-family: 'Inter', sans-serif; }

/* ── BRAND COLORS ── */
:root {
  --navy: #1B1F6B;
  --red:  #D01B1B;
  --sidebar-w: 224px; /* 56 * 4 = 224px = w-56 */
}

/* ── SIDEBAR GRADIENT ── */
.sidebar-gradient {
  background: linear-gradient(175deg,
    #1B1F6B 0%,
    #1e1f5e 65%,
    #3d1818 88%,
    #5c1c1c 100%
  );
}

/* ── SIDEBAR BASE ── */
#sidebar {
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

/* ── SIDEBAR OVERLAY (mobile) ── */
#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 49;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s;
}
#sidebarOverlay.active {
  display: block;
  opacity: 1;
}

/* ── HAMBURGER BUTTON ── */
#hamburgerBtn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--navy);
  border: none;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: background 0.15s;
  touch-action: manipulation;
}
#hamburgerBtn:hover { background: #141850; }
#hamburgerBtn svg { width: 20px; height: 20px; }

/* ── SIDEBAR NAV ITEMS ── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  user-select: none;
}
.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.nav-item.active {
  color: #ffffff;
  background: transparent;
  border-left-color: transparent;
  font-weight: 700;
}

/* ── SIDEBAR DROPDOWN ── */
.nav-chevron {
  margin-left: auto;
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.nav-chevron.rotated { transform: rotate(180deg); }

.nav-dropdown {
  display: none;
  flex-direction: column;
  background: rgba(0,0,0,0.12);
}
.nav-dropdown.open { display: flex; }

.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 8px 36px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.80);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  user-select: none;
}
.nav-sub-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.nav-sub-item.active {
  color: var(--navy);
  background: #ffffff;
  border-left-color: var(--navy);
  font-weight: 700;
}

/* ── TABS ── */
.tab-section { display: none; }
.tab-section.active { display: block; }

/* ── SECTION TITLE ── */
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.5px;
}

/* ── STAT CARDS ── */
.stat-card {
  background: white;
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border-top: 3px solid #e5e7eb;
  transition: transform 0.15s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-num {
  font-size: 36px;
  font-weight: 700;
  color: #111;
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
  font-weight: 500;
}

/* ── CARD ── */
.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
}
.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.card-body { padding: 24px; }

/* ── TABLE ── */
.table-head th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9ca3af;
  background: #f9fafb;
  border-bottom: 2px solid #f3f4f6;
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}
tbody tr:hover { background: #f9fafb; }
tbody td {
  padding: 12px 16px;
  color: #4b5563;
  font-size: 13px;
  vertical-align: middle;
}
tbody td:first-child { color: #111; font-weight: 500; }

/* ── BUTTONS ── */
.btn-red {
  background: var(--red);
  color: white;
  padding: 9px 18px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  touch-action: manipulation;
  min-height: 38px;
}
.btn-red:hover { background: #a01414; }

.btn-navy {
  background: var(--navy);
  color: white;
  padding: 9px 18px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s;
  touch-action: manipulation;
  min-height: 38px;
}
.btn-navy:hover { background: #141850; }

.btn-outline {
  background: transparent;
  color: var(--navy);
  padding: 8px 16px;
  border-radius: 7px;
  border: 1.5px solid var(--navy);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.15s;
  touch-action: manipulation;
}
.btn-outline:hover { background: #e8e9f5; }

.btn-ghost {
  background: #f3f4f6;
  color: #374151;
  padding: 9px 18px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  transition: background 0.15s;
  touch-action: manipulation;
  min-height: 38px;
}
.btn-ghost:hover { background: #e5e7eb; }

/* ── FORM ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.3px;
}
.input-field {
  font-family: 'Inter', sans-serif;
  font-size: max(13px, 16px); /* prevents iOS zoom */
  padding: 9px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 7px;
  color: #111;
  background: white;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  min-height: 42px;
  -webkit-appearance: none;
  appearance: none;
}
.input-field:focus { border-color: var(--navy); }
textarea.input-field {
  resize: vertical;
  font-size: 13px;
  min-height: 80px;
}

/* ── STATUS BADGES ── */
.badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  font-family: monospace;
}
.badge-new       { background: #e8e9f5; color: var(--navy); }
.badge-generated { background: #fef3c7; color: #92400e; }
.badge-sent      { background: #dcfce7; color: #166534; }
.badge-interested{ background: #dbeafe; color: #1e40af; }
.badge-won       { background: #dcfce7; color: #166534; }
.badge-lost      { background: #fee2e2; color: #991b1b; }
.badge-default   { background: #f3f4f6; color: #374151; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--navy);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  opacity: 0;
  transition: all 0.25s;
  z-index: 9999;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show    { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: #16a34a; }
.toast.error   { background: var(--red); }

/* ── INQUIRY FILTER ACTIVE STATE ── */
.inq-filter-active {
  outline: 2.5px solid currentColor;
  outline-offset: 2px;
}

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white;
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slideUp 0.2s ease;
}
.modal-lg { max-width: 740px; }
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
  flex-wrap: wrap;
  gap: 8px;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  min-width: 0;
}
.modal-close {
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  transition: background 0.15s;
  flex-shrink: 0;
  touch-action: manipulation;
}
.modal-close:hover { background: #e5e7eb; }
.modal-body  { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* ── EMAIL PREVIEW ── */
.email-subject {
  font-weight: 700;
  color: var(--navy);
  font-size: 14px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}
.email-preview {
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  padding: 18px;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: #4b5563;
  max-height: 380px;
  overflow-y: auto;
}

/* ── UPLOAD AREA ── */
.upload-area {
  border: 2px dashed #e5e7eb;
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
}
.upload-area:hover {
  border-color: var(--navy);
  background: #e8e9f5;
}

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px 20px;
  color: #9ca3af;
}
.empty-state .icon { font-size: 40px; margin-bottom: 10px; }
.empty-state .title {
  font-size: 15px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 4px;
}
.empty-state .sub { font-size: 13px; }

/* ── DETAIL ROW (School View Modal) ── */
.detail-row {
  display: flex;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.detail-label {
  color: #9ca3af;
  font-weight: 500;
  min-width: 140px;
}
.detail-value { color: #111; word-break: break-all; }

/* ── CALENDAR ── */
.calendar-day {
  min-height: 80px;
  border: 1px solid #f3f4f6;
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  transition: background 0.15s;
  vertical-align: top;
}
.calendar-day:hover { background: #f9fafb; }
.calendar-day.empty {
  background: transparent;
  border: none;
  cursor: default;
}
.calendar-day.today { border-color: #1B1F6B; background: #e8e9f5; }
.day-number {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}
.day-number.today-number {
  background: #1B1F6B;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.meeting-dot {
  background: #D01B1B;
  color: white;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 10px;
  margin-top: 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
  transition: background 0.15s;
}
.meeting-dot:hover { background: #a01414; }

/* ── CANCELLED / RESCHEDULED MEETING DOTS ── */
.meeting-dot.cancelled  { background: #9ca3af; text-decoration: line-through; }
.meeting-dot.rescheduled{ background: #f97316; }
.meeting-dot.done       { background: #22c55e; }

/* ── LUCIDE NAV ICONS ── */
.nav-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   AI CHAT — ensure it stays above sidebar
   overlay on mobile
═══════════════════════════════════════════ */
#chatWindow,
#chatToggleBtn { z-index: 300; }


/* ═══════════════════════════════════════════
   FIXED TOPBAR
═══════════════════════════════════════════ */
header {
  position: fixed !important;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  z-index: 40;
}

/* push content below the fixed topbar (h-24 = 96px) */
main.flex-1 {
  margin-top: 96px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */

/* ── Tablet ≤ 1024px: tighten padding ── */
@media (max-width: 1024px) {

  .ml-56 { margin-left: var(--sidebar-w); }

  main.p-8 { padding: 20px 16px; }

  header.px-8 { padding-left: 16px; padding-right: 16px; }

  .form-grid { grid-template-columns: 1fr 1fr; }

}

/* ── Mobile ≤ 768px: hamburger sidebar ── */
@media (max-width: 768px) {

  /* ── Sidebar off-canvas ── */
  #sidebar {
    transform: translateX(-100%);
    z-index: 50;
    width: 260px !important; /* slightly wider for touch comfort */
  }
  #sidebar.open {
    transform: translateX(0);
  }

  /* ── Main takes full width ── */
  .ml-56 {
    margin-left: 0 !important;
  }

  /* topbar spans full width, shorter height on mobile */
  header { left: 0 !important; }
  main.flex-1 { margin-top: 64px; }

  /* ── Topbar: 3-column grid so center logo is always truly centred ── */
  header.px-8 {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 64px;
    padding: 0 12px;
  }

  /* Show hamburger */
  #hamburgerBtn { display: flex; }

  /* Left group */
  .header-left { gap: 8px; }
  .header-left img { height: 36px; }

  /* Centre logo: static in grid flow, centred within its cell */
  header .absolute {
    position: static;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Right group: flush right */
  .header-right {
    margin-left: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
  .header-right button span { display: none; }
  .header-right button { padding: 8px; }

  /* ── Main content ── */
  main.p-8 { padding: 16px 12px 80px; }

  /* ── Section title ── */
  .section-title { font-size: 18px; text-align: center; }

  /* ── Stats grid: 4 columns on tablet ── */
  .grid.grid-cols-1.md\\:grid-cols-2.xl\\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
  }

  /* stat card padding */
  .grid.grid-cols-1.md\\:grid-cols-2.xl\\:grid-cols-4 > div {
    padding: 14px !important;
  }
  .grid.grid-cols-1.md\\:grid-cols-2.xl\\:grid-cols-4 .text-3xl {
    font-size: 1.6rem !important;
  }

  /* ── Cards ── */
  .card { border-radius: 10px; }
  .card-body { padding: 16px; }
  .card-header { padding: 12px 16px; }

  /* ── Tables: horizontal scroll ── */
  .overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* ── Form grids collapse to 1 col ── */
  .form-grid { grid-template-columns: 1fr; }

  /* col-span-2 no longer does anything in 1-col grid */
  .form-group.col-span-2 { grid-column: span 1; }

  /* ── Page header rows: stack & centre ── */
  .flex.items-center.justify-between.mb-6 {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  /* h1 title: full-width so text-align center takes effect */
  .flex.items-center.justify-between.mb-6 h1,
  .flex.items-center.justify-between.mb-6 > div > h1 {
    text-align: center;
    width: 100%;
  }
  /* sub-text in headers (e.g. Inquiries description) */
  .flex.items-center.justify-between.mb-6 > div > p {
    text-align: center;
  }
  /* action groups (buttons, inputs on the right) — centre them too */
  /* exclude divs with inline styles (e.g. Analytics toggle pill) so they stay compact */
  .flex.items-center.justify-between.mb-6 > div:not(:first-child):not([style]),
  .flex.items-center.justify-between.mb-6 > button {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  /* ── Search input ── */
  #searchInput { width: 100% !important; }

  /* ── School Leads: stack search + Add School button, both same full width ── */
  #tab-schools .flex.gap-3.items-center {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  #tab-schools .flex.gap-3.items-center button {
    width: 100%;
    text-align: center;
    justify-content: center;
    order: -1;
  }
  #tab-schools .flex.gap-3.items-center input {
    order: 1;
  }

  /* ── Settings: centre the change-password card and its header ── */
  #tab-settings .card {
    margin: 0 auto;
    width: 100%;
  }
  #tab-settings .card-header {
    justify-content: center;
  }

  /* ── Calendar: centre Today/Weekly/Monthly toggle ── */
  #tab-calendar .card.mb-6 .card-header {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px;
  }

/* ── Analytics toggle: match size of Archived sub-tab buttons ── */
  #btn-weekly,
  #btn-monthly {
    padding: 9px 18px !important;
    font-size: 13px !important;
  }

  /* ── Archived sub-tab buttons: centred ── */
  #tab-archived .flex.gap-2.mb-4 {
    justify-content: center;
  }

  /* ── Inquiry filter pills: 2×2 grid so no trailing gap next to "All" ── */
  .flex.flex-wrap.gap-3.mb-5 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .flex.flex-wrap.gap-3.mb-5 button {
    font-size: 12px;
    padding: 7px 12px;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  /* ── Analytics charts: stack ── */
  div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* ── Import grid: stack ── */
  div[style*="grid-template-columns:1fr 1fr"][style*="align-items:start"] {
    grid-template-columns: 1fr !important;
  }

  /* ── Success success page cards inline style ── */
  div[style*="display:flex"][style*="gap:16px"][style*="align-items:stretch"] {
    flex-direction: column !important;
  }

  /* ── Modal ── */
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal {
    border-radius: 16px 16px 0 0;
    max-height: 95vh;
    max-height: 95dvh;
    animation: slideUpMobile 0.25s cubic-bezier(.4,0,.2,1);
  }
  .modal-lg { max-width: 100%; }
  @keyframes slideUpMobile {
    from { transform: translateY(100%); opacity: 1; }
    to   { transform: translateY(0); opacity: 1; }
  }
  .modal-body  { padding: 16px; }
  .modal-header{ padding: 14px 16px 12px; }
  .modal-footer{ padding: 12px 16px; }

  /* ── Floating clock ── */
  #floatingClock { bottom: 16px; right: 16px; font-size: 12px; padding: 8px 14px; }

  /* ── AI Chat ── */
  #chatToggleBtn { bottom: 70px; right: 16px; }
  #chatWindow {
    width: calc(100vw - 24px) !important;
    right: 12px !important;
    bottom: 130px !important;
    height: 460px !important;
  }

  /* ── Calendar day cells ── */
  .calendar-day { min-height: 48px; padding: 4px; }
  .day-number { font-size: 11px; }
  .meeting-dot { font-size: 9px; padding: 1px 3px; }

  /* ── Bulk action bar ── */
  #bulkActionBar { flex-wrap: wrap; gap: 8px; }

  /* ── Upload area ── */
  .upload-area { padding: 24px 16px; }

  /* Centre branding image size */
  header .absolute img { height: 36px; }
}

/* ── Surface Duo (481px – 540px): 4 columns, compact cards ── */
@media (min-width: 481px) and (max-width: 540px) {
  .grid.grid-cols-1.md\\:grid-cols-2.xl\\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }
  .grid.grid-cols-1.md\\:grid-cols-2.xl\\:grid-cols-4 > div {
    padding: 10px !important;
  }
  .grid.grid-cols-1.md\\:grid-cols-2.xl\\:grid-cols-4 .text-3xl {
    font-size: 1.3rem !important;
  }
}

/* ── Small phones ≤ 480px ── */
@media (max-width: 480px) {

  /* Stats: 2×2 on small phones */
  .grid.grid-cols-1.md\\:grid-cols-2.xl\\:grid-cols-4 {
    grid-template-columns: 1fr 1fr !important;
  }

  main.p-8 { padding: 12px 10px 80px; }

  .section-title { font-size: 16px; text-align: center; }

  /* Action rows */
  .flex.gap-3.items-center { flex-wrap: wrap; justify-content: center; }

  /* Filter buttons */
  .flex.flex-wrap.gap-3.mb-5 { gap: 6px; }
  .flex.flex-wrap.gap-3.mb-5 button { font-size: 11px; padding: 6px 8px; }

  /* Topbar logos */
  .header-left img { height: 28px; }
  .header-left { gap: 5px; }
  header .absolute img { display: none; } /* hide centre branding on tiny screens */

  /* Add school / back button layout */
  #tab-add > div { max-width: 100%; }
}

/* ── Landscape short viewport ── */
@media (max-height: 500px) and (max-width: 768px) {
  #sidebar { overflow-y: auto; }
  .modal { max-height: 98vh; max-height: 98dvh; }
  #chatWindow { height: 320px !important; bottom: 110px !important; }
}

/* ── Large desktop ≥ 1280px ── */
@media (min-width: 1280px) {
  main.p-8 { padding: 32px; }
}

/* ══════════════════════════════════════════════
   DARK MODE
══════════════════════════════════════════════ */
body.dark {
  background-color: #131729 !important;
  color: #e2e8f0;
}

/* Sidebar — dark SaaS gradient */
body.dark .sidebar-gradient {
  background:
    radial-gradient(
      ellipse at center,
      rgba(0, 89, 255, 0.18) 0%,
      rgba(0, 89, 255, 0.08) 35%,
      transparent 70%
    ),
    linear-gradient(
      180deg,
      #07113B 0%,
      #031033 45%,
      #010B28 75%,
      #010613 100%
    ) !important;
  border-right: 1px solid rgba(255,255,255,0.05) !important;
  box-shadow: inset 0 0 80px rgba(0, 89, 255, 0.08) !important;
}

/* Header / topbar */
body.dark header,
body.dark header.bg-white {
  background: rgba(0, 0, 0, 0.3) !important;
  border-color: rgba(255,255,255,0.06) !important;
}

/* Header logos — keep original colors and full opacity in dark mode */
body.dark header img { opacity: 1 !important; }

/* Dark mode logo swaps */
body.dark header img[alt="PATHS"]                          { content: url('/images/Path.png'); }
body.dark header img[alt="PATH Partnership And Training Hub System"] { content: url('/images/finder.png'); }


/* Notification bell */
body.dark #notifBellBtn {
  background: #252a42 !important;
  border-color: rgba(255,255,255,0.15) !important;
}
body.dark #notifBellBtn svg { stroke: #ffffff !important; }
body.dark #notifBadge { border-color: #1a1f35 !important; }

/* Notification dropdown — base */
.notif-item { border-bottom: 1px solid #f3f4f6; }

/* Notification dropdown — dark mode */
body.dark #notifDropdown {
  background: #1e2237 !important;
  border-color: rgba(255,255,255,0.08) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 1.5px 6px rgba(0,0,0,0.3) !important;
}
body.dark .notif-dropdown-arrow {
  background: #1e2237 !important;
  border-color: rgba(255,255,255,0.08) !important;
}
body.dark .notif-dropdown-header {
  border-bottom-color: rgba(255,255,255,0.08) !important;
}
body.dark .notif-dropdown-title { color: #e2e8f0 !important; }
body.dark .notif-dropdown-mark-read { color: #818cf8 !important; }
body.dark .notif-item { border-bottom-color: rgba(255,255,255,0.06) !important; }
body.dark .notif-item-title { color: #e2e8f0 !important; }
body.dark .notif-item-body  { color: #94a3b8 !important; }
body.dark .notif-item-time  { color: #64748b !important; }
body.dark .notif-section-label { color: #4b5563 !important; }
body.dark .notif-page-mark-read { color: #94a3b8 !important; }
body.dark .notif-page-mark-read:hover { background: #252a42 !important; }
body.dark #notifViewAllFooter { border-top-color: rgba(255,255,255,0.06) !important; }
body.dark #notifViewAllFooter button {
  background: #252a42 !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #818cf8 !important;
}
body.dark #notifViewAllFooter button:hover {
  background: #2e3452 !important;
  border-color: #818cf8 !important;
}

/* Chat button stays the same (already dark) */
body.dark #chatToggleBtn {
  background: linear-gradient(135deg,#1a1f50,#0d1035) !important;
}

/* Section title */
body.dark .section-title { color: #e2e8f0 !important; }

/* Stat cards */
body.dark .stat-card {
  background: #1e2237 !important;
  border-top-color: rgba(255,255,255,0.08) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4) !important;
}
body.dark .stat-num   { color: #f1f5f9 !important; }
body.dark .stat-label { color: #94a3b8 !important; }

/* Cards */
body.dark .card {
  background: #1e2237 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4) !important;
}
body.dark .card-header {
  border-color: rgba(255,255,255,0.08) !important;
}
body.dark .card-header h3,
body.dark .card-header .font-semibold { color: #e2e8f0 !important; }

/* Tables */
body.dark .table-head th {
  background: #252a42 !important;
  color: #94a3b8 !important;
  border-color: rgba(255,255,255,0.06) !important;
}
body.dark tbody tr   { border-color: rgba(255,255,255,0.06) !important; }
body.dark tbody tr:hover { background: #252a42 !important; }
body.dark tbody td   { color: #cbd5e1 !important; }
body.dark tbody td:first-child { color: #f1f5f9 !important; }

/* Inputs & selects */
body.dark .input-field {
  background: #252a42 !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #e2e8f0 !important;
}
body.dark .input-field:focus { border-color: #818cf8 !important; }
body.dark .input-field::placeholder { color: #64748b !important; }

/* Form labels */
body.dark .form-label { color: #94a3b8 !important; }

/* Buttons */
body.dark .btn-ghost {
  background: #252a42 !important;
  color: #e2e8f0 !important;
}
body.dark .btn-ghost:hover { background: #2e3452 !important; }
body.dark .btn-outline {
  border-color: #818cf8 !important;
  color: #818cf8 !important;
}
body.dark .btn-outline:hover { background: rgba(129,140,248,0.12) !important; }

/* Modal */
body.dark .modal {
  background: #1e2237 !important;
}
body.dark .modal-header {
  background: #1e2237 !important;
  border-color: rgba(255,255,255,0.08) !important;
}
body.dark .modal-footer { border-color: rgba(255,255,255,0.08) !important; }
body.dark .modal-title  { color: #e2e8f0 !important; }
body.dark .modal-close  {
  background: #252a42 !important;
  color: #e2e8f0 !important;
}
body.dark .modal-close:hover { background: #2e3452 !important; }
body.dark .modal-body p,
body.dark .modal-body label,
body.dark .modal-body span { color: #cbd5e1 !important; }

/* Text utility overrides */
body.dark .text-navy     { color: #818cf8 !important; }
body.dark .text-gray-400 { color: #64748b !important; }
body.dark .text-gray-500 { color: #94a3b8 !important; }
body.dark .text-gray-600 { color: #94a3b8 !important; }
body.dark .text-gray-700 { color: #cbd5e1 !important; }
body.dark .text-gray-800 { color: #e2e8f0 !important; }
body.dark .text-gray-900 { color: #f1f5f9 !important; }
body.dark .text-navy-600,
body.dark .text-navy-700 { color: #818cf8 !important; }

/* Stat card containers (rounded-2xl bg-white) */
body.dark .rounded-2xl.bg-white {
  background: #1e2237 !important;
  border-color: rgba(255,255,255,0.08) !important;
}
/* Stat card icon backgrounds — boost opacity so icons are visible */
body.dark .rounded-2xl .rounded-xl {
  background: rgba(255,255,255,0.08) !important;
}
/* Stat card number text */
body.dark .font-black { color: #f1f5f9 !important; }
/* General p and span text inside dark cards */
body.dark .rounded-2xl p  { color: #94a3b8 !important; }

/* Border overrides */
body.dark .border-gray-200 { border-color: rgba(255,255,255,0.08) !important; }
body.dark .border-gray-100 { border-color: rgba(255,255,255,0.06) !important; }

/* Email preview */
body.dark .email-preview {
  background: #252a42 !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: #e2e8f0 !important;
}

/* Upload area */
body.dark .upload-area {
  border-color: rgba(255,255,255,0.15) !important;
}
body.dark .upload-area:hover { background: #252a42 !important; }

/* Calendar */
body.dark .calendar-day {
  border-color: rgba(255,255,255,0.08) !important;
  color: #e2e8f0;
}
body.dark .calendar-day:hover { background: #252a42 !important; }
body.dark .calendar-day.today {
  border-color: #818cf8 !important;
  background: rgba(129,140,248,0.12) !important;
}
body.dark .day-number { color: #cbd5e1 !important; }

/* Empty state */
body.dark .empty-state .title { color: #94a3b8 !important; }

/* Bg overrides for inline Tailwind-styled whites */
body.dark .bg-white    { background: #1e2237 !important; }
body.dark .bg-gray-50  { background: #252a42 !important; }
body.dark .bg-gray-100 { background: #252a42 !important; }

/* Weekly/Monthly toggle container */
body.dark div:has(#btn-weekly) {
  background: #1e2237 !important;
  border-color: rgba(255,255,255,0.12) !important;
}
body.dark #btn-monthly { color: #94a3b8 !important; }

/* Chart card inline titles (color:#1B1F6B) */
body.dark [style*="color:#1B1F6B"] { color: #818cf8 !important; }
body.dark [style*="color: #1B1F6B"] { color: #818cf8 !important; }