:root {
  --ink: #431407;
  --ink-2: #7c2d12;
  --cream: #f6eee5;
  --paper: #fcf7f1;
  --line: #e9c9aa;
  --coral: #f97316;
  --orange-primary: #ea580c;
  --orange-dark: #c2410c;
  --orange-light: #f6e2ca;
  --orange-soft: #f8eadb;
  --muted: #716a64;
  --shadow: 0 18px 45px rgba(108, 60, 30, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f8f1e9 0%, #f1e6da 100%);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.grain { display: none; }

/* Top Header */
.topbar {
  height: 82px;
  max-width: none;
  padding: 0 max(44px, calc((100vw - 1340px) / 2 + 44px));
  background: rgba(252, 247, 241, 0.94);
  border-bottom: 1px solid #ffedd5;
  backdrop-filter: blur(15px);
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 9px;
  line-height: 1.35;
  text-decoration: none;
  color: var(--ink);
}
.brand b { font-size: 11px; color: var(--orange-primary); }
.brand-mark.orange-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  display: grid;
  place-items: center;
  font: 700 20px "Space Grotesk";
  box-shadow: 0 7px 18px rgba(249, 115, 22, 0.35);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

/* PostgreSQL Status Pill */
.db-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange-soft);
  border: 1px solid #fed7aa;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--orange-dark);
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.05);
}
.db-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.db-pill.disconnected .db-dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: #78350f;
  transition: all 0.2s ease;
}
.nav-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.nav-link:hover, .nav-link.active {
  color: var(--orange-primary);
  background: #fff7ed;
}
.nav-link.btn-nav {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}
.nav-link.btn-nav:hover {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #ffffff;
}

/* User Badge & Logout */
.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #fed7aa;
  padding: 4px 6px 4px 12px;
  border-radius: 20px;
}
.user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange-dark);
}
.btn-logout {
  background: #ffedd5;
  color: #c2410c;
  border: 0;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-logout:hover {
  background: #ea580c;
  color: #fff;
}

/* Main Layout */
main {
  max-width: 1340px;
  margin: auto;
  padding: 36px 44px 100px;
  display: block;
}

/* Hero Section */
.hero {
  position: relative;
  padding-top: 15px;
  margin-bottom: 35px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--orange-primary);
}
.eyebrow span {
  display: inline-block;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--orange-primary);
}
.hero h1 {
  font: 700 clamp(38px, 4.5vw, 62px)/.98 "Space Grotesk";
  letter-spacing: -.04em;
  margin: 16px 0;
}
.hero h1 em {
  font-style: normal;
  color: var(--orange-primary);
}
.hero > p {
  max-width: 650px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.compact-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 25px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.3);
  transition: all 0.2s ease;
}
.btn-primary svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(234, 88, 12, 0.4);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid #fed7aa;
  background: #fff;
  color: var(--orange-dark);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  background: var(--orange-soft);
  border-color: var(--orange-primary);
}

.export-btn {
  height: 45px;
  background: #7c2d12;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 0 20px;
  font: 800 11px "Manrope";
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.export-btn:hover {
  background: #9a3412;
}

/* Form Card */
.form-card {
  background: var(--paper);
  border: 1px solid #fed7aa;
  border-radius: 18px;
  padding: 42px 48px;
  box-shadow: var(--shadow);
  max-width: 920px;
  margin: 0 auto 60px;
}
.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 25px;
  border-bottom: 1px solid #ffedd5;
}
.card-heading > div {
  display: flex;
  align-items: center;
  gap: 15px;
}
.card-heading h2 {
  font: 700 24px "Space Grotesk";
  margin: 0;
  color: var(--ink);
}
.step {
  background: #ffedd5;
  color: var(--orange-primary);
  font-size: 9px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 6px;
  letter-spacing: 0.1em;
}
.card-heading p { font-size: 11px; color: var(--muted); margin: 7px 0 0; }
.card-heading p b { color: var(--orange-primary); }

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 18px;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .15em;
}
.section-label:after {
  content: "";
  height: 1px;
  flex: 1;
  background: #fed7aa;
}

.fields { display: grid; gap: 17px; margin-bottom: 17px; }
.three-cols { grid-template-columns: repeat(3, 1fr); }
.two-cols { grid-template-columns: repeat(2, 1fr); }

label > span, legend {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 8px;
  color: #78350f;
}
label small { display: block; color: var(--muted); font-weight: 400; font-size: 9px; margin-top: 2px; }

input {
  width: 100%;
  height: 49px;
  border: 1px solid #fed7aa;
  background: #fffcf8;
  padding: 0 16px;
  color: var(--ink);
  font: 600 13px "Manrope";
  outline: 0;
  border-radius: 9px;
  transition: all 0.2s ease;
}
input::placeholder { color: #d6d3d1; font-weight: 400; }
input:focus {
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
  background: #ffffff;
}
input.invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

fieldset { margin: 0; border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

.segmented {
  display: flex;
  height: 49px;
  border: 1px solid #fed7aa;
  border-radius: 9px;
  overflow: hidden;
  background: #faf4ed;
}
.segmented label { flex: 1; cursor: pointer; margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  background: #faf4ed;
  color: #78350f;
  transition: background-color 0.2s ease, color 0.2s ease;
  user-select: none;
}
.segmented label + label span { border-left: 1px solid #fed7aa; }
.segmented label:hover input:not(:checked) + span {
  background-color: #f3e6d8;
}
.segmented input:checked + span {
  background: var(--orange-primary) !important;
  background-color: var(--orange-primary) !important;
  color: #ffffff !important;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 31px;
}
.submit-btn {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  border: 0;
  font: 800 11px "Manrope";
  text-transform: uppercase;
  letter-spacing: .14em;
  height: 51px;
  padding: 0 28px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 9px 22px rgba(234, 88, 12, 0.3);
  transition: all 0.2s ease;
}
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.4);
}
.submit-btn svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.cancel-btn {
  background: #ffedd5;
  color: #7c2d12;
  border: 0;
  font: 700 11px "Manrope";
  text-transform: uppercase;
  letter-spacing: .1em;
  height: 51px;
  padding: 0 22px;
  border-radius: 10px;
  cursor: pointer;
}

.form-message {
  min-height: 17px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: #dc2626;
  margin: 10px 0 -12px;
}

/* Dashboard Metrics & Insights */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 15px;
  margin: 29px 0 15px;
}
.stat-card {
  background: var(--paper);
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 22px;
  position: relative;
  min-height: 165px;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.04);
}
.stat-card.featured {
  background: linear-gradient(145deg, #ea580c, #9a3412);
  color: #fff;
}
.stat-card > span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-weight: 800;
  margin-bottom: 18px;
  color: #78350f;
}
.stat-card.featured > span { color: #ffedd5; }
.stat-card strong {
  font: 700 48px/1 "Space Grotesk";
  display: block;
}
.stat-card small { font-size: 10px; color: var(--muted); display: block; margin-top: 10px; }
.stat-card.featured small { color: #fed7aa; }

.stat-icon {
  position: absolute;
  right: 17px;
  top: 17px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 15px;
}
.stat-icon.coral { background: #ffedd5; color: var(--orange-primary); }
.stat-icon.sand { background: #fef3c7; color: #d97706; }
.stat-icon.mint { background: #dcfce7; color: #15803d; }
.stat-icon.group { background: #dcfce7; color: #15803d; }
.group-stat-card { border-color: #bbf7d0; }
.stat-icon.left-group-icon { background: #fee2e2; color: #b91c1c; }
.combined-group-stat {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
  overflow: hidden;
}
.group-stat-half { position: relative; padding: 22px; min-width: 0; }
.group-stat-half > span {
  display: block;
  padding-right: 42px;
  margin-bottom: 18px;
  color: #78350f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.group-stat-half strong { display: block; font: 700 48px/1 "Space Grotesk"; }
.group-stat-half small { display: block; margin-top: 10px; color: var(--muted); font-size: 10px; }
.left-group-half { border-left: 1px solid #fecaca; }

.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 54px;
}
.insight-card {
  background: var(--paper);
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 25px 27px;
  min-height: 250px;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.04);
}
.insight-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
}
.insight-heading span, .directory-heading > div > span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--orange-dark);
  font-weight: 800;
}
.insight-heading h3, .directory-heading h3 {
  font: 700 22px "Space Grotesk";
  margin: 5px 0 0;
}

.donut {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: conic-gradient(var(--orange-primary) 0 var(--fanar), #fdba74 var(--fanar) 100%);
  position: relative;
  display: grid;
  place-content: center;
  text-align: center;
}
.donut:before {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--paper);
  border-radius: 50%;
}
.donut b, .donut small { position: relative; z-index: 1; }
.donut b { font: 700 18px "Space Grotesk"; }
.donut small { font-size: 7px; text-transform: uppercase; color: var(--muted); }

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  margin: 11px 0 7px;
}
.metric-row > div { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange-primary); }
.dot.amshit { background: #fdba74; }

.progress {
  height: 6px;
  background: #ffedd5;
  border-radius: 6px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--orange-primary);
  transition: .5s;
}
.amshit-progress i { background: #fdba74; }

.insight-badge {
  background: #ffedd5;
  color: var(--orange-dark) !important;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
}

.language-split {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 25px;
  align-items: center;
  text-align: center;
  margin: 34px 0 27px;
}
.language-split strong { display: block; font: 700 36px "Space Grotesk"; }
.language-split span { display: block; font-size: 11px; font-weight: 800; margin: 4px; color: #78350f; }
.language-split small { font-size: 9px; color: var(--muted); }
.split-line { width: 1px; height: 68px; background: #fed7aa; }

.stacked-bar { display: flex; height: 8px; background: #ffedd5; border-radius: 4px; overflow: hidden; }
.stacked-bar i { display: block; transition: .5s; }
.stacked-bar i:first-child { background: #7c2d12; }
.stacked-bar i:last-child { background: var(--orange-primary); }

.directory-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}
.directory-heading h3 { font-size: 28px; }
.directory-heading > small { font-size: 11px; color: var(--muted); font-weight: 600; }

.search-wrap { position: relative; margin-bottom: 20px; }
.search-wrap svg {
  position: absolute;
  left: 17px;
  top: 16px;
  width: 18px;
  fill: none;
  stroke: var(--orange-primary);
  stroke-width: 2;
}
.search-wrap input {
  padding-left: 49px;
  background: #ffffff;
  border-radius: 12px;
}

.student-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin: -8px 0 24px;
  padding: 16px 20px;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(120, 53, 15, 0.05);
}
.student-filters label {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.student-filters label > span {
  margin: 0 0 7px 2px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #78350f;
}
.student-filters select {
  height: 42px;
  padding: 0 32px 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background-position: right 10px center;
  background-size: 14px 14px;
}
.student-filters .custom-select-trigger {
  height: 42px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: #fffcf8;
  border: 1px solid #fed7aa;
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(120, 53, 15, 0.04);
}
.student-filters .custom-select-trigger:hover {
  border-color: var(--orange-primary);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.08);
}
.student-filters .custom-select.has-value .custom-select-trigger {
  border-color: var(--orange-primary);
  background: #fff8f0;
  color: var(--orange-dark);
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.12);
}
.student-filters .custom-select-dropdown {
  max-height: 250px;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(120, 53, 15, 0.16), 0 2px 8px rgba(0, 0, 0, 0.04);
}
.student-filters label:has(.custom-select.is-open) {
  position: relative;
  z-index: 95;
}
.clear-filters {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 1px solid #fed7aa;
  border-radius: 9px;
  background: #fff8f0;
  color: var(--orange-dark);
  font: 800 11px "Manrope", sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.clear-filters svg {
  color: var(--orange-primary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.clear-filters:hover {
  border-color: var(--orange-primary);
  background: var(--orange-primary);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.22);
}
.clear-filters:hover svg {
  color: #ffffff;
  transform: rotate(90deg);
}
.clear-filters:active {
  transform: scale(0.98);
}

/* Student Cards Grid */
.records-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}
.student-card {
  background: var(--paper);
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 24px;
  position: relative;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.04);
  min-width: 0;
}
.student-top { display: flex; gap: 13px; align-items: center; }
.student-top > div:not(.avatar) { min-width: 0; padding-right: 48px; }
.avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border-radius: 12px;
  background: #ffedd5;
  color: var(--orange-dark);
  display: grid;
  place-items: center;
  font: 700 18px "Space Grotesk";
}
.student-top h3 {
  font: 700 17px/1.25 "Space Grotesk";
  margin: 0 0 4px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.student-top p { margin: 0; color: var(--orange-primary); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.tag {
  position: absolute;
  right: 18px;
  top: 18px;
  background: #ffedd5;
  color: var(--orange-dark);
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.student-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin: 21px 0;
  padding: 18px 0;
  border-top: 1px solid #ffedd5;
  border-bottom: 1px solid #ffedd5;
}
.detail small {
  display: block;
  color: #9a3412;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 4px;
}
.detail span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.detail span.highlight-orange {
  color: var(--orange-primary);
  font-weight: 700;
}
.political-detail { grid-column: 1 / -1; }
.political-detail .political-value { min-height: 18px; }
.reveal-affiliation {
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--orange-primary);
  font: 700 10px "Manrope", sans-serif;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reveal-affiliation:hover { color: var(--orange-dark); }
.reveal-affiliation:focus-visible {
  outline: 2px solid var(--orange-primary);
  outline-offset: 3px;
  border-radius: 2px;
}
.sensitive-field-control { margin: 4px 0 18px; }
.sensitive-field-toggle {
  padding: 9px 14px;
  border: 1px solid #fdba74;
  border-radius: 9px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font: 700 11px "Manrope", sans-serif;
  cursor: pointer;
}
.sensitive-field-toggle:hover { border-color: var(--orange-primary); }
[hidden] { display: none !important; }

.political-stats-card {
  margin: 24px 0 34px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.political-stats-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.political-stats-heading span { color: var(--orange-primary); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.political-stats-heading h3 { margin: 5px 0 0; font: 700 21px "Space Grotesk"; }
.political-stats-panel { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.political-stats-note { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.political-stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 28px; }
.political-stat-copy { display: flex; justify-content: space-between; gap: 15px; font-size: 12px; }
.political-stat-copy span { font-weight: 700; }
.political-stat-copy b { white-space: nowrap; color: var(--orange-dark); }
.political-stat-copy small { color: var(--muted); font-weight: 600; }
.political-stat-progress { height: 6px; margin-top: 7px; overflow: hidden; border-radius: 10px; background: var(--orange-light); }
.political-stat-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), var(--orange-primary)); }
.political-stats-empty { color: var(--muted); font-size: 12px; }

@media(max-width: 650px) {
  .political-stats-heading { align-items: flex-start; flex-direction: column; }
  .political-stats-grid { grid-template-columns: 1fr; }
}

/* Political Group Selector & By-Group Breakdown */
.political-group-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}
.political-group-tab {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: 700 11px "Manrope", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}
.political-group-tab:hover {
  border-color: var(--orange-primary);
  color: var(--orange-dark);
}
.political-group-tab.is-active {
  background: var(--orange-primary);
  border-color: var(--orange-primary);
  color: #ffffff;
}
.political-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.political-group-header h4 {
  font: 700 16px "Space Grotesk", sans-serif;
  margin: 0;
  color: var(--ink);
}
.political-group-header span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.political-breakdown-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
}
.political-breakdown-section > h4 {
  font: 700 16px "Space Grotesk", sans-serif;
  margin: 0 0 16px;
  color: var(--ink);
}
.political-by-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.political-group-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.political-group-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.political-group-card-head strong {
  font: 700 14px "Space Grotesk", sans-serif;
  color: var(--ink);
}
.political-group-card-head span {
  font-size: 11px;
  font-weight: 700;
  color: var(--orange-primary);
  white-space: nowrap;
}
.political-group-card-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.political-group-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.political-group-card-row span {
  color: var(--ink);
  font-weight: 500;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.political-group-card-row b {
  color: var(--orange-dark);
  font-weight: 700;
}
.political-group-empty {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

.card-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.btn-action.edit {
  background: #ffedd5;
  color: var(--orange-dark);
  border-color: #fed7aa;
}
.btn-action.edit:hover {
  background: var(--orange-primary);
  color: #ffffff;
}
.btn-action.delete {
  background: #fff0f0;
  color: #dc2626;
  border-color: #fecaca;
  margin-left: auto;
}
.btn-action.delete:hover {
  background: #dc2626;
  color: #ffffff;
}
.btn-action.group-toggle {
  flex: 1 1 220px;
  background: #fff;
  color: var(--orange-dark);
  border-color: #fdba74;
}
.btn-action.group-toggle:hover {
  background: var(--orange-soft);
  border-color: var(--orange-primary);
}
.btn-action.group-toggle.is-in-group {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
.btn-action.group-toggle.is-in-group:hover {
  background: #bbf7d0;
}
.btn-action.left-group {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fdba74;
}
.btn-action.left-group:hover { background: #ffedd5; }
.left-group-status {
  padding: 7px 12px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
}
.btn-action:disabled { cursor: not-allowed; opacity: .55; }

.btn-action.save-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff7ed;
  color: var(--orange-dark);
  border-color: #fdba74;
}
.btn-action.save-contact-btn:hover {
  background: var(--orange-primary);
  color: #ffffff;
  border-color: var(--orange-primary);
}

.student-top-info {
  min-width: 0;
  padding-right: 48px;
  flex: 1;
}

.student-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-save-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: var(--orange-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}
.btn-save-contact-icon:hover {
  background: var(--orange-primary);
  color: #ffffff;
  border-color: var(--orange-primary);
  transform: translateY(-1px);
}

.phone-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.phone-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}
.phone-link:hover {
  color: var(--orange-primary);
  text-decoration: underline;
}
.btn-contact-quick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: var(--orange-primary);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}
.btn-contact-quick:hover {
  background: var(--orange-primary);
  color: #ffffff;
  border-color: var(--orange-primary);
}

.kazaa-student-name-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-kazaa-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: var(--orange-primary);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}
.btn-kazaa-contact:hover {
  background: var(--orange-primary);
  color: #ffffff;
  border-color: var(--orange-primary);
}
.group-section-actions {
  display: flex;
  gap: 6px;
  width: 100%;
}
.btn-action.group-section-btn {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  color: var(--orange-dark);
  border-color: #fdba74;
  justify-content: center;
  padding: 7px 6px;
  font-size: 11px;
  font-weight: 800;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-action.group-section-btn:hover:not(:disabled) {
  background: var(--orange-soft);
  border-color: var(--orange-primary);
}
.btn-action.group-section-btn.is-active {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
.btn-action.group-section-btn.is-active:hover:not(:disabled) {
  background: #bbf7d0;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 70px 20px;
  border: 2px dashed #fed7aa;
  border-radius: 16px;
  background: #ffffff;
}
.empty-state .empty-icon { font-size: 44px; margin-bottom: 12px; }
.empty-state h3 { font: 700 22px "Space Grotesk"; margin: 16px 0 5px; }
.empty-state p { font-size: 13px; color: var(--muted); }
.inline-btn { margin-top: 16px; display: inline-flex; }

/* Toast Popup */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #7c2d12;
  color: #fff;
  padding: 16px 22px;
  border-radius: 12px;
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: 280px;
  transform: translateY(120px);
  opacity: 0;
  transition: .35s;
  z-index: 30;
  box-shadow: 0 15px 40px rgba(124, 45, 18, 0.35);
}
.toast.show { transform: none; opacity: 1; }
.toast > span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--orange-primary);
  font-weight: 800;
}
.toast p { margin: 0; font-size: 12px; }
.toast small { display: block; color: #fed7aa; margin-top: 3px; }

/* LOGIN PAGE STYLES */
.login-page {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fef3c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.login-container {
  width: 100%;
  max-width: 440px;
}
.login-header {
  text-align: center;
  margin-bottom: 30px;
}
.login-header .brand-mark {
  margin: 0 auto 16px;
  width: 54px;
  height: 54px;
  font-size: 26px;
}
.login-header h2 {
  font: 700 28px "Space Grotesk";
  margin: 0 0 6px;
  color: var(--ink);
}
.login-header h2 span { color: var(--orange-primary); }
.login-header p { font-size: 13px; color: var(--muted); margin: 0; }

.login-card {
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(234, 88, 12, 0.15);
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #78350f;
  margin-bottom: 8px;
}
.input-icon-wrap {
  position: relative;
}
.input-icon-wrap svg {
  position: absolute;
  left: 15px;
  top: 15px;
  width: 18px;
  height: 18px;
  stroke: var(--orange-primary);
  fill: none;
  stroke-width: 2;
}
.input-icon-wrap input {
  padding-left: 46px;
}

.btn-orange-submit {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  border: 0;
  border-radius: 12px;
  font: 800 13px "Manrope";
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.35);
  transition: all 0.2s ease;
  margin-top: 10px;
}
.btn-orange-submit svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn-orange-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(234, 88, 12, 0.45);
}

.login-error {
  min-height: 18px;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  margin: 14px 0 0;
}
.login-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--orange-soft);
  border: 1px solid #fed7aa;
  padding: 12px 14px;
  border-radius: 10px;
  margin-top: 22px;
  font-size: 11px;
  color: #78350f;
  line-height: 1.4;
}
.login-hint svg {
  width: 18px;
  height: 18px;
  stroke: var(--orange-primary);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}
.login-secondary-link { display: block; margin-top: 18px; text-align: center; color: var(--orange-primary); font-size: 12px; font-weight: 800; text-decoration: none; }
.login-secondary-link:hover { text-decoration: underline; }
.success-message { color: #15803d; }
.signup-container { max-width: 500px; }
.approval-card { margin-top: -25px; }
.pending-users { display: grid; gap: 11px; margin-top: 24px; }
.pending-user { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--orange-soft); }
.pending-user strong, .pending-user span, .pending-user small { display: block; }
.pending-user strong { font: 700 16px "Space Grotesk"; }
.pending-user span { margin-top: 3px; color: var(--orange-primary); font-size: 11px; font-weight: 800; }
.pending-user small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.pending-actions { display: flex; gap: 8px; }
.pending-actions button { min-height: 38px; padding: 0 15px; border-radius: 8px; font: 800 10px "Manrope"; cursor: pointer; }
.approve-user { border: 1px solid #22c55e; background: #dcfce7; color: #15803d; }
.reject-user { border: 1px solid #fca5a5; background: #fff1f2; color: #dc2626; }
.no-pending { margin: 0; padding: 25px; text-align: center; color: var(--muted); }
.error-text { color: #dc2626; }
.user-directory-card { margin-top: -25px; }
.all-users-list { display: grid; gap: 9px; margin-top: 24px; }
.system-user { display: grid; grid-template-columns: 42px minmax(150px, 1fr) auto auto auto auto; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--orange-soft); }
.system-user-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--orange-light); color: var(--orange-primary); font: 800 16px "Space Grotesk"; }
.system-user-identity { min-width: 0; }
.system-user-identity strong, .system-user-identity span { display: block; overflow-wrap: anywhere; }
.system-user-identity strong { font: 700 14px "Space Grotesk"; }
.system-user-identity span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.user-role, .user-status { padding: 5px 9px; border-radius: 15px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.user-role { background: var(--orange-light); color: var(--orange-dark); }
.user-role.role-superadmin { background: #fdf2f8; color: #9d174d; border: 1px solid #fbcfe8; }
.user-role.role-admin { background: var(--orange-light); color: var(--orange-dark); border: 1px solid #fed7aa; }
.user-role.role-deleg, .user-role.role-staff { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }
.user-status.approved { background: #dcfce7; color: #15803d; }
.user-status.pending { background: #fef3c7; color: #a16207; }
.system-user > small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.system-user-actions { display: flex; gap: 6px; }
.system-user-actions button { height: 34px; padding: 0 11px; border-radius: 7px; font: 800 9px "Manrope"; cursor: pointer; }
.edit-user { border: 1px solid var(--line); background: var(--orange-light); color: var(--orange-dark); }
.delete-user { border: 1px solid #fca5a5; background: #fff1f2; color: #dc2626; }
.user-editor-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(30, 15, 10, .55); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: .2s; }
.user-editor-overlay.show { opacity: 1; visibility: visible; }
.user-editor { width: min(680px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.editor-close { width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; background: var(--orange-soft); color: var(--ink); font-size: 22px; cursor: pointer; }
.editor-fields { margin-top: 25px; }
.editor-password { grid-column: 1 / -1; }
html[data-theme="dark"] .pending-user { background: #170e0b; }
html[data-theme="dark"] .system-user { background: #170e0b; }
html[data-theme="dark"] .user-role.role-superadmin { background: #4a044e; color: #f472b6; border-color: #701a75; }
html[data-theme="dark"] .user-role.role-admin { background: #3b2014; color: #fdba74; border-color: #7c2d12; }
html[data-theme="dark"] .user-role.role-deleg, html[data-theme="dark"] .user-role.role-staff { background: #083344; color: #67e8f9; border-color: #155e75; }
html[data-theme="dark"] .user-status.approved { background: #12351f; color: #86efac; }
html[data-theme="dark"] .user-status.pending { background: #3b2d0d; color: #fde68a; }
html[data-theme="dark"] .approve-user { background: #12351f; color: #86efac; border-color: #267044; }
html[data-theme="dark"] .reject-user { background: #351416; color: #fca5a5; border-color: #6b2529; }
html[data-theme="dark"] .delete-user { background: #351416; color: #fca5a5; border-color: #6b2529; }
html[data-theme="dark"] .user-editor { background: var(--paper); }

@media(max-width: 520px) {
  .pending-user { align-items: flex-start; flex-direction: column; }
  .pending-actions, .pending-actions button { width: 100%; }
  .system-user { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .system-user > small { grid-column: 2; }
  .user-role { grid-column: 3; grid-row: 1; }
  .user-status { grid-column: 3; grid-row: 2; }
  .system-user-actions { grid-column: 1 / -1; width: 100%; }
  .system-user-actions button { flex: 1; }
  .user-editor { padding: 24px 18px; }
}

@media(max-width: 1100px) {
  .topbar {
    height: auto;
    min-height: 82px;
    padding: 12px 24px;
    gap: 12px;
  }
  .header-center { margin-left: auto; }
  .header-right { gap: 10px; }
  .nav-links { gap: 3px; }
  .nav-link { padding: 8px 10px; }
  main { padding: 30px 28px 80px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .records-grid { grid-template-columns: repeat(2, 1fr); }
  .compact-hero { flex-direction: column; align-items: flex-start; gap: 20px; }
}

@media(max-width: 850px) {
  .topbar { flex-wrap: wrap; }
  .header-center { display: none; }
  .header-right {
    flex: 1 1 auto;
    justify-content: flex-end;
  }
  .user-name { display: none; }
  .user-badge { padding-left: 6px; }
  .insights-grid { grid-template-columns: 1fr; }
  .three-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-card { padding: 34px 30px; }
  .student-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clear-filters { grid-column: 1 / -1; }
}

@media(max-width: 650px) {
  .topbar {
    position: relative;
    padding: 11px 16px 0;
    gap: 9px;
  }
  .brand { flex: 1 1 auto; }
  .brand-mark.orange-mark { width: 38px; height: 38px; }
  .header-right { flex: 0 0 auto; }
  .header-right .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -48px;
    height: 48px;
    padding: 5px 12px;
    justify-content: center;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--orange-light);
  }
  .nav-link { min-height: 36px; padding: 7px 9px; font-size: 11px; gap: 5px; }
  .nav-link svg { display: block; width: 14px; height: 14px; flex: 0 0 14px; }
  main { padding: 74px 16px 60px; }
  .hero h1 { font-size: 34px; }
  .hero > p, .hero-content > p { font-size: 13px; line-height: 1.65; }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 12px;
    isolation: isolate;
  }
  .hero-actions > * {
    box-sizing: border-box;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    position: relative;
    touch-action: manipulation;
  }
  .form-card { padding: 28px 20px; border-radius: 14px; }
  .records-grid { grid-template-columns: 1fr; }
  .fields, .three-cols, .two-cols { grid-template-columns: 1fr; }
  .card-heading { flex-direction: column; gap: 12px; }
  .card-heading > div { align-items: flex-start; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions > * { width: 100%; justify-content: center; }
  .directory-heading { align-items: flex-start; gap: 8px; flex-direction: column; }
  .directory-heading h3 { font-size: 24px; }
  .major-insight-card { margin-top: -24px; }
  .toast { left: 14px; right: 14px; bottom: 14px; min-width: 0; }
  .student-card { padding: 20px; }
  .student-details { gap: 12px 20px; margin: 18px 0; padding: 16px 0; }
  .card-actions .btn-action { min-height: 36px; }
}

@media(max-width: 380px) {
  .brand > span:last-child { display: none; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 145px; }
  .insight-card { padding: 21px 18px; }
  .language-split { gap: 13px; }
  .student-card { padding: 18px 15px; }
  .student-details { grid-template-columns: 1fr; }
  .login-page { align-items: flex-start; padding: 28px 14px; }
  .login-header { margin-bottom: 20px; }
  .login-header h2 { font-size: 24px; }
  .login-card { padding: 28px 20px; }
  .login-hint { align-items: flex-start; }
}

@media(max-width: 420px) {
  .student-filters { grid-template-columns: 1fr; }
  .clear-filters { grid-column: auto; }
}

@media(min-width: 381px) and (max-width: 650px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

select {
  width: 100%;
  height: 49px;
  border: 1px solid #fed7aa;
  background-color: #fffcf8;
  color: var(--ink);
  padding: 0 42px 0 16px;
  font: 600 13px "Manrope", sans-serif;
  outline: 0;
  border-radius: 9px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ea580c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-size: 16px 16px;
  background-repeat: no-repeat;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 1px 3px rgba(120, 53, 15, 0.04);
}
select:hover {
  border-color: var(--orange-primary);
  background-color: #ffffff;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.08);
}
select:focus {
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
  background-color: #ffffff;
}
select:invalid,
select:has(option[value=""]:disabled:checked) {
  color: #a8a29e;
  font-weight: 500;
}
select:not(:invalid) {
  color: var(--ink);
}
select.invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
select option {
  padding: 12px 16px;
  font: 500 13px "Manrope", sans-serif;
  background-color: #ffffff;
  color: #431407;
}
select option:disabled {
  color: #a8a29e;
  font-style: italic;
}
select option:checked {
  background-color: #ffedd5;
  color: var(--orange-dark);
  font-weight: 700;
}

/* Custom Select Component (Modern Animated Dropdown) */
.custom-select {
  position: relative;
  width: 100%;
  user-select: none;
}
.custom-select.is-open {
  z-index: 90;
}
.custom-select .sr-only-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.custom-select-trigger {
  width: 100%;
  height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: #fffcf8;
  border: 1px solid #fed7aa;
  border-radius: 9px;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  outline: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(120, 53, 15, 0.04);
  text-align: left;
}
.custom-select-trigger:hover {
  border-color: var(--orange-primary);
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.08);
}
.custom-select-trigger:focus-visible,
.custom-select.is-open .custom-select-trigger {
  border-color: var(--orange-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}
.custom-select-trigger.invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}
.custom-select-value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 8px;
}
.custom-select-value.is-placeholder {
  color: #a8a29e;
  font-weight: 500;
}
.custom-select-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--orange-primary);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}
.custom-select.is-open .custom-select-chevron {
  transform: rotate(180deg);
}
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 100;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(120, 53, 15, 0.16), 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 6px;
  max-height: 275px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top center;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.2s;
  pointer-events: none;
}
.custom-select.is-open .custom-select-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}
.custom-select-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: #fed7aa;
  border-radius: 99px;
}
.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--orange-primary);
}
.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
  line-height: 1.4;
}
.custom-select-option .option-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-select-option:hover {
  background: #fff7ed;
  color: var(--orange-dark);
}
.custom-select-option.is-selected {
  background: #ffedd5;
  color: var(--orange-primary);
  font-weight: 700;
}
.custom-select-option.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  font-style: italic;
}
.custom-select-option.is-disabled:hover {
  background: transparent;
  color: #a8a29e;
}
.custom-select-option .option-check {
  display: none;
  color: var(--orange-primary);
  flex-shrink: 0;
  margin-left: 8px;
}
.custom-select-option.is-selected:not(.is-placeholder) .option-check {
  display: flex;
  align-items: center;
}
html[data-theme="dark"] .custom-select-trigger {
  background: #170e0b;
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}
html[data-theme="dark"] .custom-select-trigger:hover {
  background: #1f1410;
  border-color: var(--orange-primary);
}
html[data-theme="dark"] .custom-select-trigger:focus-visible,
html[data-theme="dark"] .custom-select.is-open .custom-select-trigger {
  background: #1b110d;
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
}
html[data-theme="dark"] .custom-select-chevron {
  color: #fb923c;
}
html[data-theme="dark"] .custom-select-value.is-placeholder {
  color: #80675e;
}
html[data-theme="dark"] .custom-select-dropdown {
  background: #211713;
  border-color: var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .custom-select-dropdown::-webkit-scrollbar-thumb {
  background: #3a2118;
}
html[data-theme="dark"] .custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--orange-primary);
}
html[data-theme="dark"] .custom-select-option {
  color: #f6d4c4;
}
html[data-theme="dark"] .custom-select-option:hover {
  background: #2b1b15;
  color: #fdba74;
}
html[data-theme="dark"] .custom-select-option.is-selected {
  background: #3a2118;
  color: #fb923c;
}
html[data-theme="dark"] .custom-select-option .option-check {
  color: #fb923c;
}

.major-insight-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  margin: -39px 0 48px;
  box-shadow: 0 8px 28px rgba(124, 45, 18, .06);
}
.major-insight-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}
.major-insight-heading > div > span {
  color: var(--orange-primary);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.major-insight-heading h3 {
  font: 700 23px "Space Grotesk", sans-serif;
  margin: 5px 0 0;
}
.major-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px 24px;
}
.major-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.major-stat-top span { font-size: 11px; font-weight: 700; color: var(--ink); }
.major-stat-top b { font: 700 20px "Space Grotesk", sans-serif; color: var(--orange-primary); }
.major-progress { height: 7px; overflow: hidden; border-radius: 6px; background: var(--orange-soft); }
.major-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange-dark), var(--orange-primary)); transition: width .5s ease; }
.major-stat small { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }
@media(max-width: 800px) { .major-stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 500px) { .major-insight-card { padding: 21px; } .major-stats-grid { grid-template-columns: 1fr; gap: 18px; } }

/* Class / Section distribution card */
.class-insight-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  margin: -24px 0 44px;
  box-shadow: 0 8px 28px rgba(124, 45, 18, .06);
}
.class-insight-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}
.class-insight-heading > div > span {
  color: var(--orange-primary);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.class-insight-heading h3 {
  font: 700 23px "Space Grotesk", sans-serif;
  margin: 5px 0 0;
}
.class-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px 20px;
}
.class-stat {
  padding: 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.class-stat:hover {
  border-color: var(--orange-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, .12);
}
.class-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.class-stat-top span { font-size: 11px; font-weight: 700; color: var(--ink); }
.class-stat-top b { font: 700 20px "Space Grotesk", sans-serif; color: var(--orange-primary); }
.class-progress { height: 7px; overflow: hidden; border-radius: 6px; background: var(--orange-soft); }
.class-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange-dark), var(--orange-primary)); transition: width .5s ease; }
.class-stat small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; font-weight: 600; }
@media(max-width: 500px) { .class-insight-card { padding: 21px; } .class-stats-grid { grid-template-columns: 1fr; gap: 14px; } }

.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(67, 20, 7, .38);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.popup-overlay.show { opacity: 1; visibility: visible; }
.popup-dialog {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  text-align: center;
  box-shadow: 0 28px 80px rgba(67, 20, 7, .24);
  transform: translateY(12px) scale(.97);
  transition: transform .22s ease;
}
.popup-overlay.show .popup-dialog { transform: none; }
.popup-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 15px;
  background: var(--orange-soft);
  color: var(--orange-primary);
  font: 800 22px "Space Grotesk", sans-serif;
}
.popup-dialog.is-danger .popup-icon { background: #fff1f2; color: #dc2626; }
.popup-dialog h2 { margin: 0 0 10px; color: var(--ink); font: 700 24px "Space Grotesk", sans-serif; }
.popup-dialog p { margin: 0 auto; max-width: 340px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.popup-actions { display: flex; justify-content: center; gap: 10px; margin-top: 27px; }
.popup-actions button { min-width: 125px; height: 45px; border-radius: 9px; padding: 0 18px; font: 800 10px "Manrope", sans-serif; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.popup-cancel { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.popup-confirm { border: 1px solid var(--orange-primary); background: var(--orange-primary); color: #fff; }
.popup-confirm.danger { border-color: #dc2626; background: #dc2626; }
.popup-actions button:focus-visible { outline: 3px solid rgba(234, 88, 12, .2); outline-offset: 2px; }
@media(max-width: 500px) { .popup-dialog { padding: 28px 21px; } .popup-actions { flex-direction: column-reverse; } .popup-actions button { width: 100%; } }

.user-form-card { max-width: 900px; width: 100%; margin: 0 auto; }
.backup-card { max-width: 850px; }
.backup-status { padding: 7px 11px; border-radius: 16px; background: #fef3c7; color: #a16207; font-size: 10px; font-weight: 800; }
.backup-status.connected { background: #dcfce7; color: #15803d; }
.backup-details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 25px 0; }
.backup-details > div { padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--orange-soft); }
.backup-details small, .backup-details strong { display: block; }
.backup-details small { margin-bottom: 7px; color: var(--orange-primary); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.backup-details strong { font-size: 12px; overflow-wrap: anywhere; }
.backup-actions { flex-wrap: wrap; }
.backup-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 4px;
  padding: 15px 17px;
  border: 1px solid #fdba74;
  border-radius: 11px;
  background: var(--orange-soft);
  color: var(--ink);
}
.backup-progress strong, .backup-progress small { display: block; }
.backup-progress strong { margin-bottom: 3px; font-size: 12px; }
.backup-progress small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.backup-spinner, .button-spinner {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(234, 88, 12, .22);
  border-top-color: var(--orange-primary);
  border-radius: 50%;
  animation: backup-spin .75s linear infinite;
}
.button-spinner { display: none; width: 15px; height: 15px; border-width: 2px; border-color: rgba(255, 255, 255, .38); border-top-color: #fff; }
.submit-btn.is-loading .button-spinner { display: inline-block; }
@keyframes backup-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .backup-spinner, .button-spinner { animation-duration: 1.8s; } }
html[data-theme="dark"] .backup-details > div { background: #170e0b; }
html[data-theme="dark"] .backup-status.connected { background: #12351f; color: #86efac; }
@media(max-width: 600px) { .backup-details { grid-template-columns: 1fr; } .backup-actions > * { width: 100%; justify-content: center; } }

/* Light / dark appearance */
.theme-toggle {
  height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font: 700 10px "Manrope", sans-serif;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.theme-toggle:hover { border-color: var(--orange-primary); transform: translateY(-1px); }
.theme-toggle span { color: var(--orange-primary); font-size: 16px; line-height: 1; }
.login-page > .theme-toggle { position: fixed; top: 18px; right: 18px; z-index: 20; }

/* Low-glare light appearance */
html:not([data-theme="dark"]) .user-badge,
html:not([data-theme="dark"]) .btn-secondary,
html:not([data-theme="dark"]) .search-wrap input,
html:not([data-theme="dark"]) .empty-state,
html:not([data-theme="dark"]) .login-card,
html:not([data-theme="dark"]) .popup-cancel,
html:not([data-theme="dark"]) .btn-action.group-toggle {
  background: var(--paper);
}
html:not([data-theme="dark"]) input,
html:not([data-theme="dark"]) select,
html:not([data-theme="dark"]) .segmented input:not(:checked) + span {
  background-color: #faf4ed;
}
html:not([data-theme="dark"]) .segmented input:checked + span {
  background: var(--orange-primary) !important;
  background-color: var(--orange-primary) !important;
  color: #ffffff !important;
}
select option {
  background-color: #fffcf8;
  color: #431407;
}
html:not([data-theme="dark"]) select option {
  background-color: #faf4ed;
  color: #431407;
}
html:not([data-theme="dark"]) input:focus,
html:not([data-theme="dark"]) select:focus { background-color: #fffaf4; }
html:not([data-theme="dark"]) .student-filters { background: rgba(252, 247, 241, .84); }

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #fff7ed;
  --ink-2: #fed7aa;
  --cream: #120b08;
  --paper: #211713;
  --line: #563225;
  --orange-light: #3a2118;
  --orange-soft: #2b1b15;
  --muted: #c4aaa0;
  --shadow: 0 20px 50px rgba(0, 0, 0, .32);
}
html[data-theme="dark"] body { background: linear-gradient(180deg, #120b08 0%, #1a100c 100%); }
html[data-theme="dark"] .login-page { background: radial-gradient(circle at 50% 10%, #3b2115 0%, #1b100c 48%, #100907 100%); }
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .header-right .nav-links { background: rgba(26, 16, 12, .95); border-color: var(--line); }
html[data-theme="dark"] .brand,
html[data-theme="dark"] .card-heading h2,
html[data-theme="dark"] .student-top h3,
html[data-theme="dark"] .major-stat-top span,
html[data-theme="dark"] .popup-dialog h2 { color: var(--ink); }
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] label > span,
html[data-theme="dark"] legend,
html[data-theme="dark"] .detail span,
html[data-theme="dark"] .metric-row,
html[data-theme="dark"] .language-split span,
html[data-theme="dark"] .form-group label { color: #f6d4c4; }
html[data-theme="dark"] .nav-link { color: #f6d4c4; }
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.active {
  color: #fb923c;
  background: #3a2118;
}
html[data-theme="dark"] .nav-link.btn-nav,
html[data-theme="dark"] .nav-link.btn-nav:hover,
html[data-theme="dark"] .nav-link.btn-nav.active {
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ea580c);
}
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .insight-card,
html[data-theme="dark"] .major-insight-card,
html[data-theme="dark"] .class-insight-card,
html[data-theme="dark"] .student-card,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .popup-dialog,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .student-filters,
html[data-theme="dark"] .user-badge { background: var(--paper); border-color: var(--line); }
html[data-theme="dark"] .class-stat,
html[data-theme="dark"] .political-group-card { background: #170e0b; border-color: var(--line); }
html[data-theme="dark"] .class-stat:hover { background: #231510; border-color: var(--orange-primary); }
html[data-theme="dark"] .political-group-tab { background: #241611; border-color: var(--line); color: #fdba74; }
html[data-theme="dark"] .political-group-tab:hover { background: #351e15; border-color: var(--orange-primary); }
html[data-theme="dark"] .political-group-tab.is-active { background: var(--orange-primary); color: #ffffff; }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] .segmented input:not(:checked) + span {
  background-color: #170e0b;
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .segmented {
  border-color: var(--line);
  background: #170e0b;
}
html[data-theme="dark"] .segmented label + label span {
  border-left-color: var(--line);
}
html[data-theme="dark"] .segmented label:hover input:not(:checked) + span {
  background-color: #231510;
}
html[data-theme="dark"] .segmented input:checked + span {
  background: var(--orange-primary) !important;
  background-color: var(--orange-primary) !important;
  color: #ffffff !important;
}
html[data-theme="dark"] select option {
  background-color: #211713;
  color: #fff7ed;
}
html[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fb923c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-size: 16px 16px;
  background-repeat: no-repeat;
  box-shadow: none;
}
html[data-theme="dark"] select:hover {
  border-color: var(--orange-primary);
  background-color: #1f1410;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
html[data-theme="dark"] select:invalid,
html[data-theme="dark"] select:has(option[value=""]:disabled:checked) {
  color: #80675e;
}
html[data-theme="dark"] .student-filters label > span {
  color: #f6d4c4;
}
html[data-theme="dark"] .student-filters .custom-select-trigger {
  background: #170e0b;
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .student-filters .custom-select-trigger:hover {
  border-color: var(--orange-primary);
  background: #1f1410;
}
html[data-theme="dark"] .student-filters .custom-select.has-value .custom-select-trigger {
  border-color: var(--orange-primary);
  background: #2a1811;
  color: #fdba74;
}
html[data-theme="dark"] .clear-filters {
  background: #211713;
  border-color: var(--line);
  color: #f6d4c4;
}
html[data-theme="dark"] .clear-filters svg {
  color: #fdba74;
}
html[data-theme="dark"] .clear-filters:hover {
  background: var(--orange-primary);
  border-color: var(--orange-primary);
  color: #ffffff;
}
html[data-theme="dark"] .clear-filters:hover svg {
  color: #ffffff;
}
.segmented input:focus-visible + span {
  outline: 3px solid rgba(249, 115, 22, .35);
  outline-offset: -3px;
}
html[data-theme="dark"] input::placeholder { color: #80675e; }
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus {
  background-color: #1b110d;
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
}
html[data-theme="dark"] .search-wrap input { background: #170e0b; }
html[data-theme="dark"] .popup-cancel,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .theme-toggle { background: #291912; color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .tag,
html[data-theme="dark"] .step,
html[data-theme="dark"] .btn-action.edit,
html[data-theme="dark"] .clear-filters,
html[data-theme="dark"] .login-hint { background: #392117; border-color: var(--line); color: #fdba74; }
html[data-theme="dark"] .student-details,
html[data-theme="dark"] .card-heading { border-color: var(--line); }
html[data-theme="dark"] .avatar { background: #402318; color: #fb923c; }
html[data-theme="dark"] .donut:before { background: var(--paper); }
html[data-theme="dark"] .btn-action.group-toggle,
html[data-theme="dark"] .btn-action.group-section-btn { background: #28170f; color: #fdba74; border-color: #7c2d12; }
html[data-theme="dark"] .btn-action.save-contact-btn { background: #28170f; color: #fdba74; border-color: #7c2d12; }
html[data-theme="dark"] .btn-action.save-contact-btn:hover { background: var(--orange-primary); color: #ffffff; border-color: var(--orange-primary); }
html[data-theme="dark"] .btn-save-contact-icon,
html[data-theme="dark"] .btn-contact-quick,
html[data-theme="dark"] .btn-kazaa-contact { background: #28170f; color: #fdba74; border-color: #7c2d12; }
html[data-theme="dark"] .btn-save-contact-icon:hover,
html[data-theme="dark"] .btn-contact-quick:hover,
html[data-theme="dark"] .btn-kazaa-contact:hover { background: var(--orange-primary); color: #ffffff; border-color: var(--orange-primary); }
html[data-theme="dark"] .btn-action.group-section-btn:hover:not(:disabled) { background: #3d2216; border-color: #ea580c; }
html[data-theme="dark"] .btn-action.group-toggle.is-in-group,
html[data-theme="dark"] .btn-action.group-section-btn.is-active { background: #12351f; color: #86efac; border-color: #267044; }
html[data-theme="dark"] .btn-action.group-section-btn.is-active:hover:not(:disabled) { background: #194a2b; }
html[data-theme="dark"] .btn-action.delete { background: #351416; color: #fca5a5; border-color: #6b2529; }
html[data-theme="dark"] .popup-dialog.is-danger .popup-icon { background: #351416; color: #fca5a5; }
html[data-theme="dark"] .db-pill { background: #2d1a12; border-color: var(--line); }

@media(max-width: 650px) {
  .theme-toggle b { display: none; }
  .theme-toggle { width: 34px; padding: 0; }
}

/* Student notes */
.student-note { margin: 0 20px 16px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); }
.student-note strong { font-size: 11px; color: var(--muted); }
.student-note p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.note-dialog { width: min(480px, calc(100% - 32px)); max-height: 90vh; overflow: auto; box-sizing: border-box; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); }
.note-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.note-dialog h2 { margin: 0 0 20px; font-family: "Space Grotesk", sans-serif; }
.note-dialog label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.note-dialog textarea { box-sizing: border-box; width: 100%; resize: vertical; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); font: inherit; }
.note-dialog textarea:focus-visible { outline: 2px solid var(--orange-primary); outline-offset: 2px; }
#noteError { color: var(--ink); font-size: 12px; line-height: 1.5; }

/* Keep record editing actions together on their own row. */
.record-edit-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}
.record-edit-actions .btn-action {
  min-width: 0;
  padding: 7px 4px;
  white-space: nowrap;
}
.record-edit-actions .btn-action.delete { margin-left: 0; }

/* Students by place of origin */
.kazaa-info { margin-bottom: 24px; }
.kazaa-info p { color: var(--muted); font-size: 13px; line-height: 1.7; }
#kazaaStatus { color: var(--ink); font-weight: 700; }
#kazaaSummary { margin: 24px 0; color: var(--ink); font-weight: 700; }
.kazaa-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; margin: 22px 0; }
.kazaa-count { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); cursor: pointer; }
.kazaa-count span { font-size: 12px; text-align: left; }
.kazaa-count strong { font-size: 22px; color: var(--orange-primary); }
.kazaa-count[aria-pressed="true"] { border-color: var(--orange-primary); outline: 1px solid var(--orange-primary); }
.kazaa-students { display: grid; gap: 12px; }
.kazaa-student { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.kazaa-student a { color: var(--ink); font-weight: 800; }
.kazaa-student p { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.kazaa-student small, .kazaa-empty { color: var(--muted); }
.kazaa-student label span { display: block; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.kazaa-student select, #kazaaSearch { padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--paper); max-width: 100%; }
.kazaa-student > div { min-width: 0; }
.kazaa-student label { flex-shrink: 0; }
#classifyBtn:disabled, #saveAllBtn:disabled { opacity: .6; cursor: not-allowed; }
@media (max-width: 500px) { .kazaa-student { align-items: stretch; flex-direction: column; } .kazaa-student select { width: 100%; } }
@media (max-width: 650px) {
  .header-right .nav-links { justify-content: flex-start; overflow-x: auto; }
  .header-right .nav-link { flex-shrink: 0; white-space: nowrap; }
}

/* Kazaa Export Modal & Controls */
.export-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: 700 12px "Manrope", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.export-filter-btn:hover {
  border-color: var(--orange-primary);
  color: var(--orange-primary);
}
.kazaa-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 12px;
}
.kazaa-count .count-export-icon {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.kazaa-count:hover .count-export-icon {
  opacity: 1;
}

.export-dialog {
  width: min(540px, calc(100% - 32px));
  padding: 32px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}
.export-dialog .card-heading {
  margin-bottom: 16px;
}
.export-dialog .export-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 20px;
}
.export-stats-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0 24px;
}
.export-stat-item {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.export-stat-item small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.export-stat-item strong {
  font: 700 18px "Space Grotesk", sans-serif;
  color: var(--orange-primary);
}
.export-action-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.export-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  padding: 14px 20px;
}

/* Superadmin vCard Export Modal & Triggers */
.card-heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.card-heading-actions p {
  margin: 0;
}

.btn-action.export-vcard-trigger-btn {
  background: var(--orange-primary);
  color: #ffffff;
  border-color: var(--orange-primary);
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.25);
}
.btn-action.export-vcard-trigger-btn:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

.hero-actions .export-vcard-trigger-btn {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

.export-field-group {
  margin-bottom: 20px;
}
.export-field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
}

.vcard-scope-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vcard-scope-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--cream);
  cursor: pointer;
  transition: all 0.2s ease;
}
.vcard-scope-item:hover {
  border-color: var(--orange-primary);
}
.vcard-scope-item input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--orange-primary);
  cursor: pointer;
}
.vcard-scope-info strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  font-weight: 700;
}
.vcard-scope-info small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.vcard-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.2);
  margin: 20px 0 10px;
}
.vcard-summary-main span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.vcard-summary-main strong {
  display: block;
  font: 700 20px "Space Grotesk", sans-serif;
  color: var(--orange-primary);
}
.vcard-summary-meta {
  text-align: right;
  font-size: 12px;
}
.vcard-summary-meta #vcardStatusBreakdown {
  font-weight: 600;
  color: var(--ink);
}
.vcard-summary-meta small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.vcard-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.vcard-action-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vcard-reset-btn {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line);
  padding: 8px 12px;
  font-size: 11px;
}
.vcard-reset-btn:hover {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fff1f2;
}

/* Dark theme overrides for vCard export */
html[data-theme="dark"] .btn-action.export-vcard-trigger-btn {
  background: var(--orange-primary);
  color: #ffffff;
  border-color: var(--orange-primary);
}
html[data-theme="dark"] .btn-action.export-vcard-trigger-btn:hover {
  background: #ea580c;
  border-color: #ea580c;
}
html[data-theme="dark"] .vcard-scope-item {
  background: #1e130c;
  border-color: var(--line);
}
html[data-theme="dark"] .vcard-scope-item:hover {
  border-color: var(--orange-primary);
}
html[data-theme="dark"] .vcard-summary-card {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.3);
}
html[data-theme="dark"] .vcard-reset-btn:hover {
  background: #351416;
  color: #fca5a5;
  border-color: #7f1d1d;
}


/* Professional Report Page (kazaa-export.html) */
.report-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 32px 60px;
}
.report-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 24px;
}
.report-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.report-topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.report-district-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: 600 13px "Manrope", sans-serif;
  cursor: pointer;
}
.report-hero {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.report-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.report-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 11px "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--orange-primary);
  margin-bottom: 6px;
}
.report-eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange-primary);
}
.report-hero h1 {
  font: 700 32px "Space Grotesk", sans-serif;
  color: var(--ink);
  margin: 0 0 6px;
}
.report-hero h1 em {
  font-style: normal;
  color: var(--orange-primary);
}
.report-hero p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.report-timestamp {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.report-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.report-stat-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}
.report-stat-card small {
  display: block;
  font: 700 11px "Space Grotesk", sans-serif;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.report-stat-card strong {
  font: 700 24px "Space Grotesk", sans-serif;
  color: var(--ink);
}
.report-stat-card .stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.report-table-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.report-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
}
.report-table-header h2 {
  font: 700 18px "Space Grotesk", sans-serif;
  margin: 0;
  color: var(--ink);
}
.report-table-header span {
  font-size: 12px;
  color: var(--muted);
}
.report-table-wrapper {
  overflow-x: auto;
  width: 100%;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--ink);
}
.report-table th {
  background: var(--cream);
  padding: 12px 14px;
  text-align: left;
  font: 700 11px "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.report-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.report-table tbody tr:nth-child(even) {
  background: rgba(246, 238, 229, 0.4);
}
.report-table tbody tr:hover {
  background: var(--orange-soft);
}
.report-student-name {
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 2px;
}
.report-student-id {
  font-size: 10px;
  color: var(--muted);
  font-family: monospace;
}
.report-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.report-tag.tag-orange {
  background: #ffedd5;
  color: var(--orange-dark);
  border: 1px solid #fed7aa;
}
.report-tag.tag-green {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.report-tag.tag-gray {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}
.report-tag.tag-red {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.report-contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  font-size: 11px;
}
.report-contact-item a {
  color: var(--ink);
  text-decoration: none;
}
.report-contact-item a:hover {
  text-decoration: underline;
  color: var(--orange-primary);
}
.report-note-cell {
  max-width: 220px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Print Optimization */
@media print {
  @page {
    size: landscape;
    margin: 8mm 10mm;
  }
  body {
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 10pt;
  }
  .no-print,
  .topbar,
  .report-topbar,
  .report-topbar-actions,
  .header-right,
  .btn-logout {
    display: none !important;
  }
  .report-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .report-hero {
    box-shadow: none !important;
    border: 1px solid #d1d5db !important;
    background: #f9fafb !important;
    padding: 16px 20px !important;
    margin-bottom: 14px !important;
  }
  .report-hero h1 {
    font-size: 20pt !important;
  }
  .report-stats-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    padding-top: 10px !important;
  }
  .report-stat-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    padding: 8px 12px !important;
  }
  .report-stat-card strong {
    font-size: 16pt !important;
  }
  .report-table-card {
    box-shadow: none !important;
    border: 1px solid #d1d5db !important;
    background: #ffffff !important;
  }
  .report-table {
    font-size: 8.5pt !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .report-table th {
    background: #f3f4f6 !important;
    color: #111827 !important;
    padding: 6px 8px !important;
    font-size: 8pt !important;
  }
  .report-table td {
    padding: 6px 8px !important;
    border-bottom: 1px solid #e5e7eb !important;
  }
  .report-table tbody tr {
    page-break-inside: avoid !important;
  }
  .report-table tbody tr:nth-child(even) {
    background: #f9fafb !important;
  }
}

/* Deleg Role Access Restrictions */
body.role-deleg .class-insight-card,
body.role-deleg .political-stats-card,
body.role-deleg #exportBtn,
body.role-deleg .nav-links a[href="kazaa.html"],
body.role-deleg .nav-links a[href="users.html"],
body.role-deleg .political-detail,
body.role-deleg .student-note,
body.role-deleg .record-edit-actions,
body.role-deleg #noteDialog,
body.role-deleg .sensitive-field-control,
body.role-deleg #politicalField,
body.role-deleg #sectionSwitchTabs,
body.role-deleg .hero-section-switch {
  display: none !important;
}

/* Superadmin Academic Section Switcher (integrated into Hero Actions) */
.hero-section-switch {
  display: inline-flex;
  align-items: center;
  height: 45px;
  background: var(--paper, #ffffff);
  border: 1.5px solid var(--line, #fed7aa);
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(124, 45, 18, 0.06);
  box-sizing: border-box;
}
.hero-section-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 35px;
  padding: 0 16px;
  border-radius: 7px;
  font: 800 12px/1 "Manrope", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #78350f);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.hero-section-btn:hover {
  color: var(--orange-primary, #ea580c);
  background: var(--orange-soft, #fffaf5);
}
.hero-section-btn.is-active {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.3);
}
html[data-theme="dark"] .hero-section-switch {
  background: #170e0b;
  border-color: #38241d;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
html[data-theme="dark"] .hero-section-btn {
  color: #a8a29e;
}
html[data-theme="dark"] .hero-section-btn:hover {
  background: #241712;
  color: #fb923c;
}
html[data-theme="dark"] .hero-section-btn.is-active {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
}

/* Form group select styling for login / signup cards */
.form-group select {
  width: 100%;
  height: 49px;
  border: 1px solid #fed7aa;
  background-color: #fffaf5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' width='16' height='16' fill='none' stroke='%23ea580c' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding: 0 40px 0 16px;
  color: var(--ink);
  font: 600 13px "Manrope";
  outline: 0;
  border-radius: 9px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.form-group select:focus {
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
  background-color: #ffffff;
}
html[data-theme="dark"] .form-group select {
  background-color: #1c1917;
  border-color: #44403c;
  color: #f5f5f4;
}

/* Pagination Navigation */
.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
  padding: 14px 20px;
  background: var(--paper, #ffffff);
  border: 1.5px solid var(--line, #fed7aa);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(124, 45, 18, 0.04);
}
.pagination-info {
  font: 700 13px/1.4 "Manrope", sans-serif;
  color: var(--muted, #78350f);
}
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line, #fed7aa);
  background: var(--paper, #ffffff);
  color: var(--ink, #292524);
  font: 700 13px/1 "Manrope", sans-serif;
  cursor: pointer;
  transition: all 0.18s ease;
  gap: 4px;
}
.pagination-btn:hover:not(:disabled) {
  background: var(--orange-soft, #fffaf5);
  border-color: var(--orange-primary, #ea580c);
  color: var(--orange-primary, #ea580c);
  transform: translateY(-1px);
}
.pagination-btn.is-active {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-color: var(--orange-primary, #ea580c);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.28);
}
.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--line, #e7e5e4);
}
.pagination-ellipsis {
  padding: 0 6px;
  color: var(--muted, #a8a29e);
  font-weight: 700;
}
html[data-theme="dark"] .pagination-nav {
  background: #170e0b;
  border-color: #38241d;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
html[data-theme="dark"] .pagination-btn {
  background: #1c1917;
  border-color: #38241d;
  color: #f5f5f4;
}
html[data-theme="dark"] .pagination-btn:hover:not(:disabled) {
  background: #241712;
  border-color: var(--orange-primary, #ea580c);
  color: #fb923c;
}
html[data-theme="dark"] .pagination-btn.is-active {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-color: var(--orange-primary, #ea580c);
  color: #ffffff;
}


