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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

:root {
  --bg: radial-gradient(ellipse 120% 80% at 50% 0%, #f5f3ec 0%, #efece4 50%, #e8e5dc 100%);
  --bg-glow-1: rgba(0, 162, 99, .07);
  --bg-glow-2: rgba(95, 75, 182, .04);
  --bg-glow-3: rgba(0, 100, 50, .04);

  --card-start: rgba(255, 255, 255, .97);
  --card-end: rgba(250, 248, 242, .96);
  --card-rim: rgba(255, 255, 255, .8);
  --card-border: rgba(20, 36, 27, .06);
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 8px rgba(30, 35, 40, .08), 0 12px 32px rgba(30, 35, 40, .06);
  --blur: none;

  --ink: #1b1b1a;
  --ink-mid: #4a4a48;
  --muted: #7c7c77;
  --hairline: rgba(20, 36, 27, .08);
  --hover-bg: rgba(20, 36, 27, .04);
  --active-bg: rgba(20, 36, 27, .06);

  --green: #00a263;
  --green-soft: #00c47a;
  --green-dim: rgba(0, 162, 99, .45);
  --red: #d86251;
  --amber: #e8b554;
  --violet: #5f4bb6;

  --nav-active-border: rgba(20, 36, 27, .07);
  --sidebar-w: 228px;
  --sidebar-w-collapsed: 64px;
}

body.dark {
  --bg: linear-gradient(160deg, #090e0b 0%, #0a0c14 100%);
  --bg-glow-1: rgba(0, 196, 86, .13);
  --bg-glow-2: rgba(95, 75, 182, .11);
  --bg-glow-3: rgba(0, 80, 40, .08);

  --card-start: rgba(24, 38, 30, .88);
  --card-end: rgba(16, 26, 20, .93);
  --card-rim: rgba(247, 255, 250, .06);
  --card-border: rgba(247, 255, 250, .07);
  --card-shadow: 0 1px 0 rgba(247, 255, 250, .06) inset, 0 20px 48px -20px rgba(0, 0, 0, .55);
  --blur: blur(16px) saturate(140%);

  --ink: rgba(247, 255, 250, .9);
  --ink-mid: rgba(247, 255, 250, .65);
  --muted: rgba(247, 255, 250, .55);
  --hairline: rgba(247, 255, 250, .07);
  --hover-bg: rgba(247, 255, 250, .04);
  --active-bg: rgba(247, 255, 250, .07);

  --green: #00c456;
  --green-soft: #1bda6c;
  --green-dim: rgba(0, 196, 86, .55);
  --red: #f03a47;
  --amber: #f0a028;
  --nav-active-border: rgba(247, 255, 250, .07);
}

body {
  font-family: "Geist", system-ui, sans-serif;
  background:
    radial-gradient(900px 600px at 72% -5%, var(--bg-glow-1), transparent 58%),
    radial-gradient(700px 500px at -5% 90%, var(--bg-glow-2), transparent 55%),
    radial-gradient(500px 400px at 50% 50%, var(--bg-glow-3), transparent 60%),
    var(--bg);
  color: var(--ink);
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  transition: background .35s, color .25s;
  color-scheme: light;
}

body.dark {
  color-scheme: dark;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

.card {
  background: linear-gradient(160deg, var(--card-start), var(--card-end));
  border: 1px solid var(--card-border);
  border-radius: 20px;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: background .35s, border-color .25s, box-shadow .25s;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--card-rim), transparent);
  pointer-events: none;
}

.shell {
  width: 100vw;
  height: 100vh;
  display: flex;
  padding: 14px;
  gap: 14px;
}

body.auth-mode .shell {
  grid-template-columns: 1fr;
}

body.auth-mode .sidebar,
body.auth-mode .topbar,
body.auth-mode .page-header,
body.auth-mode .status-line {
  display: none;
}

body.auth-mode .main {
  padding: 0;
  max-width: none;
  overflow-y: auto;
}

/* ─── Auth Screen ─── */

.auth-wrap {
  min-height: calc(100vh - 28px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 35, 40, .08), 0 12px 32px rgba(30, 35, 40, .06);
}

/* ─── Hero (left panel) ─── */
.auth-hero {
  background:
    radial-gradient(ellipse 600px 400px at 20% 100%, rgba(0, 196, 122, .18), transparent 60%),
    radial-gradient(ellipse 500px 350px at 80% 10%, rgba(0, 120, 60, .12), transparent 55%),
    linear-gradient(168deg, #062a18 0%, #0b3d24 35%, #0a4426 60%, #073a1e 100%);
  color: rgba(230, 255, 240, .92);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 60px,
      rgba(255, 255, 255, .015) 60px,
      rgba(255, 255, 255, .015) 61px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 60px,
      rgba(255, 255, 255, .015) 60px,
      rgba(255, 255, 255, .015) 61px
    );
  pointer-events: none;
}

.auth-hero-inner {
  position: relative;
  z-index: 1;
  padding: 48px 44px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.auth-hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-hero-brand .auth-logo {
  width: 44px;
  height: 44px;
  font-size: 16px;
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(0, 196, 86, .4), 0 0 0 1px rgba(0, 196, 86, .25);
}

.auth-hero-brand .logo-text {
  color: rgba(230, 255, 240, .95);
  font-size: 15px;
  letter-spacing: .02em;
}

.auth-hero-brand .logo-sub {
  color: rgba(200, 240, 220, .5);
  margin-top: 2px;
}

.auth-hero-copy h1 {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: #fff;
  text-wrap: balance;
}

.auth-hero-copy p {
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(200, 240, 220, .65);
  max-width: 420px;
}

/* ─── Hero metrics grid ─── */
.auth-hero-metrics {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 16px;
  padding: 18px 20px;
}

.auth-hero-metrics-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(200, 240, 220, .4);
  margin-bottom: 14px;
}

.auth-hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.auth-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-hero-stat strong {
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  font-family: "Geist Mono", monospace;
  letter-spacing: -.01em;
}

.auth-hero-stat span {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(200, 240, 220, .45);
  font-family: "Geist Mono", monospace;
}

/* ─── Trust indicators ─── */
.auth-hero-trust {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: rgba(200, 240, 220, .5);
}

.auth-trust-item svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: rgba(0, 196, 86, .6);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ─── Form panel (right) ─── */
.auth-form-panel {
  background: linear-gradient(160deg, var(--card-start), var(--card-end));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.auth-form-inner {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.auth-form-header h2 {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--ink);
}

.auth-form-header p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* ─── Auth form fields ─── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-mid);
  letter-spacing: .01em;
}

.auth-input {
  height: 48px;
  border: 1.5px solid var(--hairline);
  border-radius: 12px;
  background: var(--hover-bg);
  color: var(--ink);
  padding: 0 16px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}

.auth-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 162, 99, .1);
}

.auth-input::placeholder {
  color: var(--muted);
  opacity: .7;
}

select.auth-input {
  cursor: pointer;
  background: var(--card-end);
}

body.dark select.auth-input {
  background: #17251d;
  color: rgba(247, 255, 250, .9);
}

/* ─── Auth error ─── */
.auth-error {
  min-height: 18px;
  color: #b84432;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.auth-error:empty {
  display: none;
}

/* ─── Submit button ─── */
.auth-submit-btn {
  position: relative;
  height: 50px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--green-soft), var(--green));
  color: #041a0c;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 6px 20px -6px rgba(0, 162, 99, .45),
    0 1px 0 rgba(255, 255, 255, .25) inset;
  transition: opacity .2s, transform .15s;
}

.auth-submit-btn:hover:not(:disabled) {
  filter: brightness(1.06);
}

.auth-submit-btn:active:not(:disabled) {
  transform: scale(.985);
}

.auth-submit-btn:disabled {
  opacity: .7;
  cursor: wait;
}

.auth-submit-btn.loading .auth-submit-arrow {
  animation: auth-spin .7s linear infinite;
}

@keyframes auth-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.auth-submit-arrow {
  display: flex;
  align-items: center;
}

.auth-submit-arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── Auth footer / toggle ─── */
.auth-footer {
  text-align: center;
}

.auth-toggle-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 2px;
}

.auth-toggle-btn strong {
  color: var(--green);
  font-weight: 600;
}

.auth-toggle-btn:hover strong {
  text-decoration: underline;
}

/* ─── Demo account chips ─── */
.auth-demo-section {
  border-top: 1px solid var(--hairline);
  padding-top: 20px;
}

.auth-demo-label {
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 12px;
}

.auth-demo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--hover-bg);
  color: var(--ink-mid);
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .2s, background .15s, color .15s, box-shadow .2s;
}

.auth-demo-chip:hover:not(:disabled) {
  border-color: rgba(0, 162, 99, .3);
  color: var(--ink);
  background: rgba(0, 162, 99, .04);
}

.auth-demo-chip.active {
  border-color: var(--green);
  background: rgba(0, 162, 99, .08);
  color: var(--ink);
  box-shadow: 0 0 0 2px rgba(0, 162, 99, .12);
}

.auth-demo-chip:disabled {
  opacity: .4;
  cursor: default;
}

.auth-demo-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  opacity: .5;
  flex-shrink: 0;
}

.auth-demo-chip.active .auth-demo-chip-dot {
  opacity: 1;
  animation: pulse 1.6s infinite;
}

/* ─── Dark mode overrides for hero ─── */
body.dark .auth-hero {
  background:
    radial-gradient(ellipse 600px 400px at 20% 100%, rgba(0, 196, 122, .12), transparent 60%),
    radial-gradient(ellipse 500px 350px at 80% 10%, rgba(0, 120, 60, .08), transparent 55%),
    linear-gradient(168deg, #020e07 0%, #041a0e 35%, #062a18 60%, #041a0e 100%);
}

body.dark .auth-hero-metrics {
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .04);
}

body.dark .auth-form-panel {
  background: linear-gradient(160deg, var(--card-start), var(--card-end));
}

/* ─── Responsive: auth page ─── */
@media (max-width: 900px) {
  .auth-wrap {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-hero {
    min-height: 340px;
  }

  .auth-hero-inner {
    padding: 36px 28px;
    gap: 24px;
  }

  .auth-hero-copy h1 {
    font-size: 26px;
  }

  .auth-hero-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .auth-form-panel {
    padding: 32px 24px;
  }
}

@media (max-width: 600px) {
  .auth-wrap {
    border-radius: 12px;
  }

  .auth-hero {
    min-height: 280px;
  }

  .auth-hero-inner {
    padding: 28px 20px;
    gap: 20px;
  }

  .auth-hero-copy h1 {
    font-size: 22px;
  }

  .auth-hero-copy p {
    font-size: 13px;
  }

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

  .auth-hero-trust {
    flex-direction: column;
    gap: 10px;
  }

  .auth-form-panel {
    padding: 28px 20px;
  }

  .auth-form-inner {
    gap: 22px;
  }

  .auth-form-header h2 {
    font-size: 22px;
  }

  .auth-demo-grid {
    gap: 6px;
  }

  .auth-demo-chip {
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }
}

.role-dashboard {
  padding: 16px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.active-alert-card {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 16px;
  border-color: rgba(216, 98, 81, .25);
}

.active-alert-list {
  display: grid;
  gap: 8px;
}

.active-alert-item {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--hover-bg);
  border: 1px solid var(--hairline);
}

.active-alert-item strong,
.active-alert-item span {
  display: block;
}

.active-alert-item strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.active-alert-item span:not(.badge) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 2px;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 10px;
  gap: 2px;
  overflow: hidden;
  transition: width .28s cubic-bezier(.4, 0, .2, 1);
}

.sidebar.collapsed {
  width: var(--sidebar-w-collapsed);
  align-items: center;
  padding: 16px 10px;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 14px;
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar.collapsed .logo-row {
  width: 44px;
  height: 44px;
  justify-content: center;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

img.logo-mark {
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain;
}

.sidebar.collapsed .logo-mark {
  margin: 0 auto;
}

.logo-text-wrap {
  overflow: hidden;
  transition: opacity .2s, width .28s cubic-bezier(.4, 0, .2, 1);
  width: 140px;
}

.sidebar.collapsed .logo-text-wrap {
  display: none;
}

.logo-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  white-space: nowrap;
}

.logo-sub {
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-top: 1px;
  white-space: nowrap;
}

.hr {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline), transparent);
  margin: 6px 0;
  flex-shrink: 0;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-height: 0;
  flex: 1;
}

.sidebar.collapsed .nav {
  align-items: center;
  width: 44px;
}

.nav-bottom {
  flex: 0 0 auto;
}

.nav-section,
.nav-label {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  padding: 10px 8px 4px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .2s;
}

.sidebar.collapsed .nav-section,
.sidebar.collapsed .nav-label {
  display: none;
}

.nav-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--ink-mid);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  position: relative;
  flex-shrink: 0;
  border: 1px solid transparent;
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-align: left;
  justify-items: start;
}

.nav-item:hover {
  background: var(--hover-bg);
  color: var(--ink);
}

.nav-item.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, .7) 0%, rgba(0, 162, 99, .07) 100%);
  border-color: rgba(0, 162, 99, .22);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 4px 18px -6px rgba(0, 162, 99, .18);
}

body.dark .nav-item.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, .04) 0%, rgba(0, 196, 86, .11) 100%);
  border-color: rgba(0, 196, 86, .22);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 6px 24px -8px rgba(0, 196, 86, .28);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 162, 99, .6), transparent);
  box-shadow: 0 0 8px rgba(0, 162, 99, .3);
}

.nav-item.disabled {
  opacity: .28;
  pointer-events: none;
}

.nav-ico,
.ico {
  width: 24px;
  height: 24px;
  min-width: 24px;
  display: grid;
  place-items: center;
  opacity: .65;
  color: currentColor;
  transition: opacity .15s;
}

.nav-ico svg,
.ico svg,
.theme-btn svg,
.ibtn svg,
.collapse-icon svg,
.avatar svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item:hover .nav-ico,
.nav-item.active .nav-ico {
  opacity: 1;
  color: var(--green);
}

.nav-text,
.nav-item span:not(.nav-ico):not(.nav-badge):not(.badge) {
  overflow: hidden;
  transition: opacity .18s, width .28s cubic-bezier(.4, 0, .2, 1);
  width: auto;
  min-width: 0;
  justify-self: start;
}

.nav-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(216, 98, 81, .12);
  color: #b84432;
  margin-left: auto;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar.collapsed .nav-item {
  grid-template-columns: 44px;
  place-items: center;
  text-align: center;
  column-gap: 0;
  width: 44px;
  height: 44px;
  padding: 0;
}

.sidebar.collapsed .nav-ico {
  width: 44px;
  height: 44px;
}

.sidebar.collapsed .nav-item span:not(.nav-ico):not(.nav-badge):not(.badge),
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .phase-tag {
  width: 0;
  opacity: 0;
  padding: 0;
  border: none;
  display: none;
}

.sidebar-spacer {
  flex: 1;
  min-height: 8px;
}

.sidebar-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.sidebar.collapsed .sidebar-footer {
  align-items: center;
}

.phase-tag {
  font-size: 9px;
  background: var(--hover-bg);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .18s, width .28s cubic-bezier(.4, 0, .2, 1);
}

.collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--hover-bg);
  cursor: pointer;
  color: var(--muted);
  transition: background .15s, color .15s;
  column-gap: 8px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar.collapsed .collapse-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  column-gap: 0;
}

.collapse-btn:hover {
  background: var(--active-bg);
  color: var(--ink);
}

.collapse-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

.sidebar.collapsed .collapse-icon {
  width: 44px;
  height: 44px;
}

.sidebar.collapsed .collapse-icon {
  transform: rotate(180deg);
}

.collapse-label {
  overflow: hidden;
  transition: opacity .18s, width .28s cubic-bezier(.4, 0, .2, 1);
  width: 100px;
}

.sidebar.collapsed .collapse-label {
  width: 0;
  opacity: 0;
  display: none;
}

.sidebar.collapsed .phase-tag {
  display: none;
}

.main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  flex-shrink: 0;
  width: fit-content;
  align-self: flex-end;
  border-radius: 16px;
}

.theme-btn,
.ibtn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 99px;
  background: var(--hover-bg);
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-mid);
  transition: background .15s, color .15s, border-color .15s;
  flex-shrink: 0;
  font-weight: 600;
}

.theme-btn:hover,
.ibtn:hover {
  background: var(--active-bg);
  color: var(--ink);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 99px;
  background: linear-gradient(140deg, #5f4bb6, #3d2d8a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: rgba(247, 255, 250, .9);
  box-shadow: 0 0 0 2px var(--hairline);
  flex-shrink: 0;
}

.btn-primary,
.primary-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--green-soft), var(--green));
  color: #041a0c;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  box-shadow: 0 6px 20px -6px rgba(0, 162, 99, .45), 0 1px 0 rgba(255, 255, 255, .25) inset;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-primary:hover,
.primary-btn:hover {
  filter: brightness(1.05);
}

.ghost-btn {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--hover-bg);
  border: 1px solid var(--hairline);
  color: var(--ink-mid);
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s;
}

.ghost-btn:hover {
  background: var(--active-bg);
  color: var(--ink);
}

.topbar .logout-btn {
  min-height: 44px;
  border-radius: 12px;
  font-weight: 600;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
}

.page-title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--ink);
  text-wrap: balance;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #5af28e;
  animation: pulse 1.6s infinite;
  display: inline-block;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 162, 99, .08);
  border: 1px solid rgba(0, 162, 99, .2);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #047a35;
  margin-left: 10px;
  vertical-align: middle;
}

body.dark .live-pill {
  background: rgba(0, 196, 86, .10);
  border-color: rgba(0, 196, 86, .22);
  color: #22b35a;
}

.page-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

.status-line {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-family: "Geist Mono", monospace;
}

.status-line.error {
  color: #b84432;
}

.view {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 0 2px 2px 0;
}

.view > .card,
.view > section {
  flex-shrink: 0;
}

.view::-webkit-scrollbar,
.feed-body::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

.view::-webkit-scrollbar-thumb,
.feed-body::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb {
  background: var(--hairline);
  border-radius: 2px;
}

.kpi-strip,
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  flex-shrink: 0;
}

.kpi-card {
  min-height: 122px;
  padding: 18px 20px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
}

/*
.kpi-card:first-child,
.kpi-focus {
  background: linear-gradient(160deg, rgba(0, 162, 99, .06), rgba(0, 162, 99, .01));
}
*/

/*
body.dark .kpi-card:first-child,
body.dark .kpi-focus {
  background: linear-gradient(160deg, rgba(0, 196, 86, .07), rgba(0, 196, 86, .02));
}
*/  

/*
.kpi-card:first-child::after,
.kpi-focus::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  background: radial-gradient(280px 70px at 80% 0%, rgba(0, 162, 99, .1), transparent 60%);
  pointer-events: none;
}
*/


.kpi-label-sm,
.kpi-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 10px;
  text-wrap: balance;
}

.kpi-value {
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink);
}

.kpi-sub,
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  font-size: 11px;
  font-weight: 500;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--hover-bg);
  color: var(--muted);
  border: 1px solid var(--hairline);
}

.kpi-delta.up {
  background: rgba(0, 162, 99, .10);
  color: #047a35;
  border-color: rgba(0, 162, 99, .18);
}

.kpi-delta.dn {
  background: rgba(216, 98, 81, .10);
  color: #b84432;
  border-color: rgba(216, 98, 81, .18);
}

.bento,
.two-col {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 12px;
}

.dashboard-bento {
  display: grid;
  gap: 12px;
  min-height: 260px;
}

.dashboard-bento-primary {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .62fr) minmax(260px, .48fr);
}

.dashboard-bento-secondary {
  grid-template-columns: minmax(0, .95fr) minmax(340px, .9fr) minmax(260px, .58fr);
  min-height: 198px;
}

.dashboard-bento-tertiary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 190px;
}

.mini-chart-card {
  padding: 18px 20px;
}

.mini-bars {
  display: grid;
  gap: 12px;
  padding-top: 10px;
}

.mini-bar-row {
  display: grid;
  grid-template-columns: minmax(92px, .34fr) minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-mid);
}

.mini-bar-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-bar-row > div {
  height: 9px;
  border-radius: 999px;
  background: var(--hover-bg);
  overflow: hidden;
}

.mini-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.mini-bar-row i.violet {
  background: var(--violet);
}

.mini-bar-row i.amber {
  background: var(--amber);
}

.mini-bar-row strong {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--ink);
}

.bento-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.two-col {
  align-items: start;
}

.settings-grid {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
  gap: 12px;
  align-items: start;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr);
  align-items: center;
}

.settings-row > span:last-child {
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-form,
.modal-form {
  display: grid;
  gap: 12px;
  padding: 0 20px 20px;
}

.settings-form label,
.modal-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.alert-rules-list {
  max-height: 192px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 0;
}

.alert-rules-list::-webkit-scrollbar {
  width: 3px;
}

.alert-rules-list::-webkit-scrollbar-thumb {
  background: var(--hairline);
  border-radius: 2px;
}

.alert-rule-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 86px auto;
  align-items: center;
  gap: 12px;
}

.alert-rule-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-rule-value {
  justify-self: end;
  text-align: right;
}

.rule-input {
  min-width: 0;
  width: 86px;
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  text-align: right;
  font-family: "Geist Mono", monospace;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 20px 20px;
}

.toggle-row {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--hover-bg);
  padding: 0 12px;
  color: var(--ink-mid);
  font-size: 13px;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.chart-card {
  min-height: 0;
}

.delivery-card {
  min-height: 260px;
}

.delivery-mix-card .pulse-grid {
  grid-template-columns: 1fr;
  padding-top: 0;
}

.panel-header,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 10px;
  flex-shrink: 0;
}

.panel-actions,
.row-actions,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.panel > .metric-list,
.panel > .table-card {
  min-height: 0;
}

.panel-title,
.section-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--ink);
  text-wrap: balance;
}

.panel-sub,
.section-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-family: "Geist Mono", monospace;
}

.bar-chart {
  min-height: 300px;
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 18px 20px 44px;
  position: relative;
}

.bar-chart::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 44px;
  height: 1px;
  background: var(--hairline);
}

.chart-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: 0 20px 18px;
}

.delivery-card .chart-body {
  min-height: 190px;
}

.chart-left {
  width: 150px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 28px;
}

.chart-big {
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink);
}

.chart-big-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.mini-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 11px;
}

.mini-stat-row strong {
  color: var(--ink);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
}

.bars-area {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.bars-baseline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  height: 1px;
  background: var(--hairline);
}

.delivery-bars .bars-baseline {
  bottom: 0;
}

.bars-row {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 26px;
}

.delivery-bars .bars-row {
  padding-bottom: 0;
}

.bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
}

.bar-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.bar,
.bar-fill {
  width: 60%;
  min-height: 3px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, var(--green-soft), var(--green));
  box-shadow: 0 0 18px rgba(0, 162, 99, .35);
  transform-origin: bottom;
  animation: barGrow .45s cubic-bezier(.2, .7, .2, 1) both;
}

.delivery-bars .bar-fill {
  animation: none;
  transform: none;
}

.bar-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
  font-family: "Geist Mono", monospace;
}

.bars-labels {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.bar-label.hi {
  color: var(--green);
  font-weight: 600;
}

.bar-label span {
  display: block;
  opacity: .55;
}

.rate-ring-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 8px 20px 20px;
}

.rate-ring-item {
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border-radius: 16px;
  background: var(--hover-bg);
  border: 1px solid var(--hairline);
  padding: 18px 10px;
}

.rate-ring {
  --value: 0;
  width: min(138px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, var(--card-end) 0 58%, transparent 59%),
    conic-gradient(var(--green) calc(var(--value) * 1%), var(--hairline) 0);
  box-shadow: inset 0 1px 0 var(--card-rim), 0 18px 34px -28px var(--green-dim);
}

.rate-ring strong {
  font-family: "Geist Mono", monospace;
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
}

.rate-ring span {
  color: var(--muted);
  font-size: 13px;
}

.rate-ring-label {
  margin-top: 12px;
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
}

.rate-ring-sub {
  margin-top: 2px;
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
}

.progress-chart {
  display: grid;
  gap: 10px;
  padding: 6px 20px 16px;
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 14px;
  align-items: center;
}

.progress-label {
  color: var(--ink-mid);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 5px;
}

.progress-track,
.severity-track {
  height: 9px;
  border-radius: 999px;
  background: var(--hairline);
  overflow: hidden;
}

.progress-fill,
.severity-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--green-soft));
  box-shadow: 0 0 18px rgba(0, 162, 99, .22);
}

.progress-fill.violet {
  background: linear-gradient(90deg, #5f4bb6, #8f7bea);
  box-shadow: 0 0 18px rgba(95, 75, 182, .18);
}

.progress-fill.amber {
  background: linear-gradient(90deg, #d99b20, var(--amber));
  box-shadow: 0 0 18px rgba(232, 181, 84, .2);
}

.progress-value,
.severity-count {
  color: var(--ink);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  text-align: right;
}

.severity-chart {
  display: grid;
  gap: 10px;
  padding: 6px 20px 16px;
}

.severity-row {
  display: grid;
  grid-template-columns: 8px 72px minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
}

.severity-name {
  color: var(--ink-mid);
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  font-weight: 600;
}

.severity-fill.critical,
.sev-dot.critical,
.feed-dot.is-alert {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(216, 98, 81, .12);
}

.severity-fill.warning,
.sev-dot.warning {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(232, 181, 84, .12);
}

.severity-fill.medium,
.sev-dot.medium {
  background: var(--violet);
  box-shadow: 0 0 0 4px rgba(95, 75, 182, .12);
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 6px 20px 16px;
}

.pulse-metric {
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--hover-bg);
  padding: 12px;
}

.pulse-metric span {
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.pulse-metric strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.pulse-metric.green { box-shadow: inset 0 0 0 1px rgba(0, 162, 99, .04); }
.pulse-metric.amber { box-shadow: inset 0 0 0 1px rgba(232, 181, 84, .10); }
.pulse-metric.red { box-shadow: inset 0 0 0 1px rgba(216, 98, 81, .10); }
.pulse-metric.violet { box-shadow: inset 0 0 0 1px rgba(95, 75, 182, .10); }

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  padding: 12px 20px 20px;
}

.coverage-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--green-soft);
}

.coverage-cell.level-1 { background: #dfeee6; }
.coverage-cell.level-2 { background: #bddfc9; }
.coverage-cell.level-3 { background: #8dccaa; }
.coverage-cell.level-4 { background: #4fb580; }
.coverage-cell.level-5 { background: #008751; }

body.dark .coverage-cell.level-1 { background: rgba(247, 255, 250, .07); }
body.dark .coverage-cell.level-2 { background: rgba(0, 196, 86, .18); }
body.dark .coverage-cell.level-3 { background: rgba(0, 196, 86, .28); }
body.dark .coverage-cell.level-4 { background: rgba(0, 196, 86, .42); }
body.dark .coverage-cell.level-5 { background: var(--green); }

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--hairline);
}

.field {
  min-height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--hover-bg);
  color: var(--ink-mid);
  padding: 0 14px;
  min-width: 150px;
}

select.field,
select.field option {
  background: var(--card-end);
  color: var(--ink);
}

body.dark select.field,
body.dark select.field option {
  background: #17251d;
  color: rgba(247, 255, 250, .9);
}

.compact-field {
  min-width: 140px;
}

textarea.field {
  min-height: 84px;
  padding-top: 12px;
  resize: vertical;
}

.field:disabled {
  opacity: .72;
}

.sponsor-flow {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.sponsor-card {
  padding: 18px 20px;
  gap: 12px;
}

.sponsor-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.sponsor-filter-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
}

.sponsor-school-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.school-choice {
  min-height: 58px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--hover-bg);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  text-align: left;
}

.school-choice span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.school-choice strong,
.school-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-choice small,
.school-choice i {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.school-choice.active {
  border-color: rgba(0, 162, 99, .35);
  background: rgba(0, 162, 99, .1);
}

.school-choice:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.school-choice.active i {
  color: var(--programme-green);
  font-weight: 700;
}

.field-label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.snack-choice-list {
  display: grid;
  gap: 8px;
}

.snack-choice {
  min-height: 58px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--hover-bg);
  color: var(--ink);
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.snack-choice input {
  accent-color: var(--programme-green);
}

.snack-choice span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.snack-choice strong,
.snack-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snack-choice small {
  color: var(--muted);
  font-size: 11px;
}

.snack-choice.active {
  border-color: rgba(0, 162, 99, .35);
  background: rgba(0, 162, 99, .1);
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.calendar-controls strong {
  min-width: 130px;
  text-align: center;
  font-size: 12px;
}

.calendar-weekdays,
.sponsor-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 10px;
  font-family: "Geist Mono", monospace;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day,
.calendar-pad {
  min-height: 68px;
  border-radius: 12px;
}

.calendar-day {
  border: 1px solid var(--hairline);
  background: var(--card-start);
  color: var(--ink);
  display: grid;
  align-content: space-between;
  justify-items: start;
  padding: 8px;
}

.calendar-day strong {
  font-size: 13px;
}

.calendar-day span {
  color: var(--muted);
  font-size: 10px;
}

.calendar-day.active {
  border-color: rgba(0, 162, 99, .45);
  background: rgba(0, 162, 99, .12);
}

.calendar-day.blocked {
  cursor: not-allowed;
  opacity: .48;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.week-chip {
  min-height: 58px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--hover-bg);
  color: var(--ink-mid);
  display: grid;
  align-content: center;
  justify-items: start;
  padding: 10px 12px;
  gap: 2px;
}

.week-chip.active {
  border-color: rgba(0, 162, 99, .35);
  background: rgba(0, 162, 99, .11);
  color: var(--ink);
}

.week-chip:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.week-chip span,
.week-chip strong {
  font-size: 12px;
}

.sponsor-warning,
.bank-box {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--hover-bg);
  padding: 12px;
  color: var(--ink-mid);
  font-size: 12px;
}

.bank-box {
  display: grid;
  gap: 4px;
}

.payment-bank-box {
  gap: 8px;
  padding: 16px;
}

.payment-bank-box strong {
  font-size: 15px;
  color: var(--ink);
}

.payment-bank-box span {
  font-size: 14px;
}

.payment-bank-box b {
  font-family: "Geist Mono", monospace;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
  color: var(--ink);
  letter-spacing: .03em;
}

.payment-proof-box {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--card-start);
  padding: 12px;
  display: grid;
  gap: 10px;
}

/* ── Geography bento grid ──────────────────────────── */

.geo-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 12px;
}

.geo-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Hero card — state rankings */
.geo-hero-card {
  grid-area: hero;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  gap: 12px;
}

.geo-stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 20px;
}

.geo-stat-tile {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--hover-bg);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.geo-stat-tile strong {
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}

.geo-stat-tile small {
  color: var(--muted);
  font-size: 11px;
}

.geo-state-list {
  display: flex;
  flex-direction: column;
  padding: 0 20px 20px;
  flex: 1;
  min-height: 0;
}

.geo-state-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(0, 90px) 56px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--hairline);
  padding: 9px 0;
}

.geo-state-row:last-child {
  border-bottom: none;
}

.geo-state-row > span {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: rgba(0, 162, 99, .1);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.geo-state-row strong {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.geo-state-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--hover-bg);
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.geo-state-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
  min-width: 4%;
}

.geo-state-row > b {
  color: var(--ink);
  font-weight: 700;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  text-align: right;
}

/* Zone distribution card */
.geo-zones-card {
  grid-area: zones;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.geo-donut {
  width: 200px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  margin: 0 auto;
}

.geo-donut span {
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: var(--ink);
  background: var(--card-start);
  border: 1px solid var(--hairline);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
}

.geo-donut small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.geo-zone-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding: 0 20px;
}

.geo-zone-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.geo-zone-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.geo-zone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px 20px;
  flex: 1;
  min-height: 0;
}

.geo-zone-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border: 1px solid var(--hairline);
  border-left-width: 3px;
  border-radius: 8px;
  background: var(--card-start);
  padding: 10px 14px;
}

.geo-zone-row strong {
  display: block;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-zone-row small {
  color: var(--muted);
  font-size: 11px;
}

.geo-zone-row > span {
  color: var(--ink);
  font-weight: 700;
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  white-space: nowrap;
}

/* LGA footer card */
.geo-lga-card {
  grid-area: lgas;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.geo-lga-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 20px 20px;
}

.geo-lga-tile {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--hover-bg);
  padding: 12px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 10px;
  row-gap: 2px;
}

.geo-lga-tile > span {
  grid-row: 1 / 4;
  align-self: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: rgba(0, 162, 99, .1);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.geo-lga-tile strong {
  display: block;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.geo-lga-tile b {
  display: block;
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
}

.geo-lga-tile small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-cell {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.receipt-cell small {
  color: var(--muted);
  font-size: 11px;
}

.receipt-link {
  color: var(--programme-green);
  font-weight: 600;
  text-decoration: none;
}

.bank-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.bank-account-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 4px;
}

.bank-account-number {
  padding: 0 20px;
  font-family: "Geist Mono", monospace;
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bank-account-name {
  padding: 0 20px;
  color: var(--ink-mid);
  font-size: 13px;
}

.file-upload-control {
  min-height: 58px;
  border: 1px solid rgba(0, 162, 99, .24);
  border-radius: 12px;
  background: rgba(0, 162, 99, .07);
  color: var(--ink);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.file-upload-control:hover {
  background: rgba(0, 162, 99, .11);
  border-color: rgba(0, 162, 99, .38);
}

.file-upload-control input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-upload-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--card-start);
  color: var(--programme-green);
  border: 1px solid rgba(0, 162, 99, .18);
}

.file-upload-icon svg {
  width: 18px;
  height: 18px;
}

.file-upload-control span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.file-upload-control strong,
.file-upload-control small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-upload-control small {
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
}

.summary-amount {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.search {
  margin-left: auto;
  min-width: min(380px, 100%);
}

.table-card {
  overflow: hidden;
}

.table-card:not(.card) {
  border-radius: 0;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 13px 20px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}

.table th {
  font-family: "Geist Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(0, 162, 99, .05);
}

.table td {
  color: var(--ink-mid);
  font-size: 13px;
}

.table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.click-row {
  cursor: pointer;
  transition: background .15s;
}

.click-row:hover {
  background: var(--hover-bg);
}

.users-table th:last-child,
.users-table td:last-child {
  width: 96px;
  text-align: right;
}

.row-btn {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.muted-action {
  color: var(--muted);
  font-size: 12px;
}

.mono,
.table td.mono {
  font-family: "Geist Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(0, 162, 99, .04);
}

.table-footer > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid transparent;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge.green,
.badge.positive {
  color: #047a35;
  background: rgba(0, 162, 99, .12);
  border-color: rgba(0, 162, 99, .18);
}

.badge.red,
.badge.critical {
  color: #b84432;
  background: rgba(216, 98, 81, .12);
  border-color: rgba(216, 98, 81, .22);
}

.badge.amber,
.badge.warning {
  color: #8a5c04;
  background: rgba(232, 181, 84, .15);
  border-color: rgba(232, 181, 84, .24);
}

.badge.medium {
  color: var(--violet);
  background: rgba(95, 75, 182, .12);
  border-color: rgba(95, 75, 182, .2);
}

.badge.neutral {
  color: var(--muted);
  background: var(--hover-bg);
  border-color: var(--hairline);
}

body.dark .badge.green,
body.dark .badge.positive {
  background: rgba(0, 196, 86, .15);
  color: #28a85a;
}

body.dark .badge.red,
body.dark .badge.critical {
  background: rgba(240, 58, 71, .18);
  color: #e03040;
}

body.dark .badge.amber,
body.dark .badge.warning {
  background: rgba(240, 160, 40, .15);
  color: #c47d10;
}

.activity-list,
.metric-list,
.feed-body {
  display: grid;
  gap: 0;
  padding-bottom: 10px;
}

.activity-item,
.metric-row,
.feed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--hairline);
  transition: background .15s;
}

.metric-row {
  min-height: 48px;
}

.activity-item:hover,
.metric-row:hover,
.feed-row:hover {
  background: var(--hover-bg);
}

.activity-item:last-child,
.metric-row:last-child,
.feed-row:last-child {
  border-bottom: none;
}

.dot,
.feed-dot,
.sev-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 162, 99, .10);
  flex: 0 0 auto;
}

.dot.coral {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(216, 98, 81, .12);
}

.feed-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.feed-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.feed-who,
.alert-title,
.state-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.feed-what,
.alert-meta {
  font-size: 13px;
  color: var(--muted);
}

.feed-where {
  font-size: 13px;
  color: var(--ink-mid);
}

.feed-time {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
  font-family: "Geist Mono", monospace;
}

.state-row {
  display: grid;
  grid-template-columns: 90px 1fr 62px 54px;
  gap: 12px;
  align-items: center;
  padding: 8px 20px;
}

.state-row.alt {
  background: var(--hover-bg);
}

.state-track {
  height: 7px;
  border-radius: 99px;
  background: var(--hairline);
  overflow: hidden;
}

.state-fill {
  height: 100%;
  border-radius: 99px;
}

.state-num {
  font-size: 12px;
  text-align: right;
  font-family: "Geist Mono", monospace;
  color: var(--ink-mid);
}

.alert-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid var(--hairline);
}

.alert-row:last-child {
  border-bottom: none;
}

.alert-row:hover {
  background: var(--hover-bg);
}

.sev-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.loading {
  min-height: 260px;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--muted);
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--hairline);
  border-top-color: var(--green);
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 18, 14, .28);
  backdrop-filter: blur(8px);
}

.modal {
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
}

.modal-form {
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-form .field {
  width: 100%;
  max-width: 100%;
}

.modal-error {
  min-height: 18px;
  color: #b84432;
  font-size: 12px;
}

svg {
  display: block;
}

@media (max-width: 900px) {
  .shell {
    padding: 10px;
    gap: 10px;
  }

  .sidebar {
    width: var(--sidebar-w-collapsed);
  }

  .logo-text-wrap,
  .nav-item span:not(.nav-ico):not(.nav-badge):not(.badge),
  .nav-badge,
  .phase-tag,
  .nav-section,
  .nav-label,
  .collapse-label {
    width: 0 !important;
    opacity: 0 !important;
  }

  .bento,
  .two-col,
  .settings-grid,
  .dashboard-bento,
  .dashboard-bento-secondary,
  .dashboard-bento-tertiary,
  .bank-account-grid {
    grid-template-columns: 1fr;
  }

  .geo-layout {
    grid-template-columns: 1fr;
  }
  .geo-map-card {
    display: none;
  }

  .geo-stat-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .geo-lga-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sponsor-flow {
    grid-template-columns: 1fr;
  }

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

  .sponsor-filter-grid {
    grid-template-columns: 1fr;
  }

  .search {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  html,
  body {
    overflow: auto;
  }

  .shell {
    min-height: 100vh;
    height: auto;
    padding: 8px 8px 84px;
    gap: 8px;
  }

  .sidebar {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    top: auto;
    z-index: 50;
    width: auto;
    height: 64px;
    min-height: 64px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 8px;
    overflow-x: auto;
  }

  .sidebar .logo-row,
  .sidebar .hr,
  .sidebar-spacer,
  .collapse-btn {
    display: none;
  }

  .sidebar-footer {
    width: auto;
    flex-direction: row;
    flex-shrink: 0;
  }

  .sidebar .nav,
  .sidebar .nav-bottom {
    flex: 0 0 auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  .sidebar .nav-item {
    grid-template-columns: 44px;
    place-items: center;
    text-align: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 12px;
  }

  .sidebar .nav-ico {
    width: 44px;
    height: 44px;
  }

  .main {
    min-height: calc(100vh - 16px);
  }

  .topbar {
    width: 100%;
    align-self: auto;
    border-radius: 12px;
    justify-content: flex-end;
  }

  .page-title {
    font-size: 22px;
  }

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

  .kpi-card {
    padding: 14px;
  }

  .kpi-value {
    font-size: 30px;
  }

  .table-card {
    overflow-x: auto;
  }

  .table {
    min-width: 760px;
  }

  .dashboard-bento,
  .settings-grid,
  .dashboard-bento-secondary,
  .dashboard-bento-tertiary,
  .bank-account-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .sponsor-flow {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .alert-rules-list {
    max-height: none;
  }

  .chart-body {
    flex-direction: column;
  }

  .chart-left {
    width: auto;
    padding-bottom: 0;
  }

  .rate-ring-grid {
    grid-template-columns: 1fr;
  }

  .geo-zone-legend {
    grid-template-columns: 1fr;
  }

  .geo-stat-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .geo-lga-grid {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays,
  .sponsor-calendar {
    gap: 4px;
  }

  .calendar-day,
  .calendar-pad {
    min-height: 54px;
  }

  .calendar-day {
    padding: 6px;
  }

  .toolbar {
    padding: 12px;
  }

  .field,
  .primary-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot,
  .bar,
  .bar-fill,
  .spinner,
  * {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

/* ─── Landing Page ─── */
.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: 
    radial-gradient(circle at 100% 150px, rgba(0, 162, 99, 0.04) 0%, transparent 60%),
    radial-gradient(circle at 0% 600px, rgba(81, 64, 160, 0.03) 0%, transparent 50%),
    linear-gradient(rgba(27, 27, 26, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 27, 26, 0.012) 1px, transparent 1px),
    radial-gradient(rgba(27, 27, 26, 0.02) 1.5px, transparent 1.5px),
    var(--bg);
  background-size: 
    100% 100%,
    100% 100%,
    40px 40px,
    40px 40px,
    20px 20px,
    100% 100%;
  background-position: 
    0 0,
    0 0,
    0 0,
    0 0,
    0 0,
    0 0;
}

/* Landing Nav */
.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: var(--card-start);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-brand-text {
  display: flex;
  flex-direction: column;
}

.landing-brand-text .logo-text {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.landing-brand-text .logo-sub {
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Landing Hero */
.landing-hero-section {
  padding: 120px 40px 140px;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)),
    url('../assets/kids-eating.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.landing-hero-content h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.03em;
  text-wrap: balance;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.landing-hero-content p {
  font-size: 20px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 650px;
  text-wrap: balance;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.landing-hero-actions {
  margin-top: 16px;
}

.landing-cta-btn {
  height: 56px;
  padding: 0 32px;
  font-size: 16px;
  border-radius: 16px;
}

/* Landing Stats */
.landing-stats-section {
  max-width: 1100px;
  margin: -70px auto 70px;
  background: var(--card-start);
  border: 1px solid var(--card-border);
  border-radius: 32px;
  padding: 32px;
  box-shadow: var(--card-shadow);
  position: relative;
  z-index: 10;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.landing-stats-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--green);
  text-align: center;
  margin-bottom: 28px;
}

.landing-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.landing-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.landing-stat-card:hover {
  transform: translateY(-6px) scale(1.02);
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--card-border, rgba(255, 255, 255, 0.4));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.landing-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.landing-stat-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  fill: none;
  stroke: currentColor;
}

.landing-stat-icon.blue {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

body.dark .landing-stat-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.landing-stat-icon.green {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

body.dark .landing-stat-icon.green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.landing-stat-icon.red {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

body.dark .landing-stat-icon.red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.landing-stat-icon.purple {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

body.dark .landing-stat-icon.purple {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.landing-stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.landing-stat-val {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  font-family: "Geist Mono", monospace;
  letter-spacing: -0.03em;
}

.landing-stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* Landing Features */
.landing-features {
  padding: 60px 40px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-features-header {
  text-align: center;
  margin-bottom: 60px;
}

.landing-features-header h2 {
  font-size: 36px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.landing-features-header p {
  font-size: 18px;
  color: var(--muted);
}

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.landing-feature-card {
  background: var(--card-start);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(30, 35, 40, .04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.landing-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(30, 35, 40, .08);
}

.landing-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(0, 162, 99, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.landing-feature-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--green);
  stroke-width: 1.5;
  fill: none;
}

body.dark .landing-feature-icon {
  background: rgba(0, 196, 86, .15);
}

.landing-feature-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.landing-feature-card p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* Landing Remark Section */
.landing-remark-section {
  padding: 80px 40px;
  max-width: 1200px;
  margin: 0 auto 60px;
  background: var(--card-start);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 60px;
  box-shadow: var(--card-shadow);
}

.landing-remark-image {
  flex: 0 0 350px;
  display: flex;
  justify-content: center;
}

.landing-remark-image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  object-fit: cover;
  border: 4px solid var(--bg);
}

.landing-remark-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.landing-remark-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
}

.landing-remark-quote {
  font-size: 28px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-style: italic;
  position: relative;
}

.landing-remark-quote::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: -20px;
  font-size: 60px;
  color: var(--hairline);
  font-family: serif;
  z-index: -1;
}

.landing-remark-author {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 10px;
}

.landing-remark-author span {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
}

/* Landing Footer */
.landing-footer {
  border-top: 1px solid var(--hairline);
  background: var(--card-end);
  padding: 40px;
  margin-top: auto;
}

.landing-footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.landing-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.landing-footer-links {
  font-size: 13px;
  color: var(--muted);
}

/* Landing Responsive */
@media (max-width: 900px) {
  .landing-hero-content h1 {
    font-size: 42px;
  }
  .landing-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .landing-features-grid {
    grid-template-columns: 1fr;
  }
  .landing-remark-section {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }
  .landing-remark-image {
    flex: 0 0 auto;
    width: 250px;
  }
  .landing-remark-quote::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 600px) {
  .landing-nav {
    padding: 16px 20px;
  }
  .landing-hero-section {
    padding: 60px 20px 80px;
  }
  .landing-hero-content h1 {
    font-size: 32px;
  }
  .landing-hero-content p {
    font-size: 16px;
  }
  .landing-stats-section {
    margin: -40px 16px 40px;
    padding: 24px;
    border-radius: 16px;
  }
  .landing-stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .landing-stat strong {
    font-size: 32px;
  }
  .landing-features {
    padding: 40px 20px 60px;
  }
  .landing-features-header h2 {
    font-size: 28px;
  }
  .landing-footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ─── Landing Step-by-Step How It Works ─── */
.landing-steps-section {
  padding: 100px 40px 120px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}


.landing-steps-container {
  position: relative;
  z-index: 10;
}

.landing-steps-header {
  text-align: center;
  margin-bottom: 80px;
}

.landing-steps-tag {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--green);
  margin-bottom: 16px;
}

.landing-steps-header h2 {
  font-size: 44px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.landing-steps-header h2 span.text-blue {
  color: #2563eb;
}

body.dark .landing-steps-header h2 span.text-blue {
  color: #3b82f6;
}

.landing-steps-header p {
  font-size: 18px;
  color: var(--muted);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

.landing-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  position: relative;
}

.landing-step-card-wrapper {
  position: relative;
}

@media (min-width: 901px) {
  .landing-step-card-wrapper:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 35%;
    right: -24px;
    width: 20px;
    height: 2px;
    background: var(--hairline);
    z-index: 2;
  }
}

.landing-step-card {
  background: var(--card-start);
  border: 1px solid var(--card-border);
  border-radius: 32px;
  padding: 40px;
  height: 100%;
  box-shadow: var(--card-shadow);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.landing-step-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 48px rgba(30, 35, 40, .08);
}

body.dark .landing-step-card:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, .45);
}

.landing-step-number {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.landing-step-card:hover .landing-step-number {
  transform: rotate(6deg) scale(1.05);
}

.landing-step-number.blue {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.landing-step-number.green {
  background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}

.landing-step-number.purple {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.25);
}

.landing-step-card h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
}

.landing-step-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  font-weight: 500;
}

/* ─── Scroll-triggered Animation system ─── */
.animate-on-scroll {
  opacity: 0;
  transform: translate(var(--x-start, 0px), var(--y-start, 50px));
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0s);
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translate(0, 0);
}

@media (max-width: 900px) {
  .landing-steps-section {
    padding: 60px 20px 80px;
  }
  .landing-steps-header h2 {
    font-size: 32px;
  }
  .landing-steps-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .landing-step-card {
    padding: 32px;
    border-radius: 24px;
  }
}

/* ─── Presidential Section ─── */
.landing-presidential-section {
  padding: 100px 40px 120px;
  max-width: 1200px;
  margin: 0 auto 80px;
  position: relative;
  overflow: hidden;
  background: var(--card-start);
  border: 1px solid var(--card-border);
  border-radius: 32px;
  box-shadow: var(--card-shadow);
}

.landing-presidential-bg-glow-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 35%;
  height: 100%;
  background: rgba(0, 162, 99, 0.04);
  transform: skewX(-12deg) translateX(30%);
  pointer-events: none;
}

body.dark .landing-presidential-bg-glow-right {
  background: rgba(0, 196, 86, 0.06);
}

.landing-presidential-bg-glow-left {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 25%;
  height: 50%;
  background: rgba(59, 130, 246, 0.03);
  transform: skewX(12deg) translateX(-20%);
  pointer-events: none;
}

body.dark .landing-presidential-bg-glow-left {
  background: rgba(59, 130, 246, 0.05);
}

.landing-presidential-container {
  position: relative;
  z-index: 10;
}

.landing-presidential-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
  align-items: center;
}

/* Image frame */
.landing-presidential-frame-wrapper {
  position: relative;
}

.landing-presidential-image-frame {
  position: relative;
  z-index: 10;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(30, 35, 40, .12);
  border: 8px solid var(--card-start);
  background: var(--card-start);
}

.landing-presidential-img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(20%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  object-fit: cover;
}

.landing-presidential-image-frame:hover .landing-presidential-img {
  filter: grayscale(0%);
  transform: scale(1.04);
}

.landing-presidential-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 60%);
  opacity: 0.8;
  transition: opacity 0.5s;
  pointer-events: none;
}

.landing-presidential-img-caption {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  z-index: 20;
  color: #fff;
  pointer-events: none;
}

.landing-presidential-img-caption h4 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Decorative background shapes around image */
.landing-presidential-deco-circle {
  position: absolute;
  top: -24px;
  right: -24px;
  width: 120px;
  height: 120px;
  background: var(--green);
  border-radius: 50%;
  opacity: 0.08;
  animation: pulse-glow 3s infinite alternate;
  pointer-events: none;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); opacity: 0.06; }
  100% { transform: scale(1.05); opacity: 0.12; }
}

.landing-presidential-deco-border {
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 180px;
  height: 180px;
  border: 4px dashed var(--green-dim);
  border-radius: 24px;
  transform: rotate(12deg);
  z-index: -1;
  pointer-events: none;
}

/* Content block styling */
.landing-presidential-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 162, 99, 0.08);
  color: var(--green);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
}

body.dark .landing-presidential-badge {
  background: rgba(0, 196, 86, 0.12);
}

.landing-star-ico {
  width: 12px;
  height: 12px;
  fill: currentColor;
  stroke: none;
}

.landing-presidential-content h2 {
  font-size: 40px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.landing-presidential-content h2 .text-green-italic {
  color: var(--green);
  font-style: italic;
  font-weight: 800;
}

.landing-presidential-content h2 .text-blue-underline {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-color: #fbbf24;
  text-decoration-thickness: 4px;
  text-underline-offset: 8px;
}

body.dark .landing-presidential-content h2 .text-blue-underline {
  color: #3b82f6;
}

.landing-presidential-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-mid);
  margin-bottom: 36px;
}

.landing-presidential-quote {
  font-style: italic;
  font-weight: 500;
  border-left: 4px solid var(--green);
  padding: 16px 0 16px 24px;
  background: rgba(0, 162, 99, 0.03);
  border-radius: 0 12px 12px 0;
  color: var(--ink);
}

body.dark .landing-presidential-quote {
  background: rgba(0, 196, 86, 0.04);
}

.landing-presidential-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.landing-presidential-feat-item {
  display: flex;
  align-items: start;
  gap: 16px;
}

.landing-presidential-feat-item .feat-icon {
  padding: 12px;
  border-radius: 12px;
  flex-shrink: 0;
}

.landing-presidential-feat-item .feat-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  fill: none;
  stroke: currentColor;
}

.landing-presidential-feat-item .feat-icon.blue {
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
}

body.dark .landing-presidential-feat-item .feat-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.landing-presidential-feat-item .feat-icon.green {
  background: rgba(0, 162, 99, 0.08);
  color: var(--green);
}

body.dark .landing-presidential-feat-item .feat-icon.green {
  background: rgba(0, 196, 86, 0.15);
}

.landing-presidential-feat-item h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.landing-presidential-feat-item p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 900px) {
  .landing-presidential-section {
    padding: 60px 24px 80px;
    margin-bottom: 40px;
  }
  .landing-presidential-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .landing-presidential-content h2 {
    font-size: 32px;
  }
  .landing-presidential-frame-wrapper {
    max-width: 450px;
    margin: 0 auto;
  }
}

/* ─── School Cards View ─── */
.school-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 20px;
}

.school-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, var(--card-start), var(--card-end));
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  overflow: hidden;
  position: relative;
}

.school-card.clickable {
  cursor: pointer;
}

.school-card.clickable:hover {
  transform: translateY(-4px);
  border-color: var(--green);
}

.school-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
}

.school-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 40px;
}

.school-card-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.school-card-status-dot.active {
  background-color: var(--green);
  box-shadow: 0 0 0 3px var(--bg-glow-1);
}

.school-card-status-dot.inactive {
  background-color: var(--red);
  box-shadow: 0 0 0 3px rgba(216, 98, 81, 0.15);
}

.school-card-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 16px;
}

.school-card-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.school-card-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.2;
}

.school-card-meta-item svg {
  color: var(--muted);
  opacity: 0.7;
  flex-shrink: 0;
}

.school-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}

.school-card-pupils {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.school-card-pupils strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.school-card-pupils span {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.school-card-status-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.school-card-status-badge.active {
  background-color: rgba(0, 162, 99, 0.08);
  color: var(--green);
}

.school-card-status-badge.inactive {
  background-color: rgba(216, 98, 81, 0.08);
  color: var(--red);
}

/* ─── Premium Toggle Switch ─── */
.status-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--hairline);
  border: 1px solid var(--card-border);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .slider {
  background-color: var(--green);
  border-color: var(--green-soft);
}

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

.toggle-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  min-width: 60px;
}

/* ─── Modal Form Enhancements ─── */
.school-edit-modal-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 10px 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ─── Springy Modal Entry Animations ─── */
@keyframes modal-backdrop-fade-in {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to { opacity: 1; backdrop-filter: blur(8px); }
}

@keyframes modal-scale-up {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-backdrop {
  animation: modal-backdrop-fade-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal {
  animation: modal-scale-up 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.form-label-group {
  display: grid;
  gap: 6px;
}

.form-label-text {
  color: var(--muted);
  font-family: "Geist", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ─── Premium Searchable Select ─── */
.searchable-select {
  position: relative;
  width: 100%;
}

.searchable-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--hover-bg);
  color: var(--ink);
  padding: 0 14px;
  cursor: pointer;
  font-size: 13.5px;
  transition: border-color 0.2s, background 0.2s;
}

.searchable-select-trigger:hover {
  border-color: var(--muted);
  background: var(--active-bg);
}

.searchable-select-trigger svg {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.searchable-select.open .searchable-select-trigger svg {
  transform: rotate(180deg);
}

.searchable-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--card-start);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  backdrop-filter: var(--blur);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.dark .searchable-select-dropdown {
  background: #17251d;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.searchable-select-search-wrapper {
  padding: 10px;
  border-bottom: 1px solid var(--hairline);
}

.searchable-select-input {
  width: 100% !important;
  min-height: 36px !important;
  font-size: 13px !important;
}

.searchable-select-options {
  max-height: 200px;
  overflow-y: auto;
}

.searchable-select-option {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.15s, color 0.15s;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
}

.searchable-select-option:hover {
  background: var(--hover-bg);
}

.searchable-select-option.selected {
  background: var(--active-bg);
  color: var(--green);
  font-weight: 600;
}

.searchable-select-option strong {
  font-size: 13px;
  color: var(--ink);
}

.searchable-select-option small {
  font-size: 11px;
  color: var(--muted);
}

/* ── Interactive Nigeria Map Styles ────────────────── */

.geo-map-card {
  display: flex;
  flex-direction: column;
  height: 460px;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.geo-map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 0;
}

.geo-map-svg-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px 10px;
  height: calc(100% - 50px);
  min-height: 0;
  position: relative;
}

.nigeria-map {
  width: 100%;
  height: 100%;
  max-height: 380px;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.04));
}

.nigeria-map path {
  transition: fill 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              stroke 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              filter 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  stroke: var(--hairline);
  stroke-width: 1.0;
  cursor: pointer;
}

.nigeria-map path:hover {
  stroke: var(--ink);
  stroke-width: 1.8;
  filter: brightness(1.04) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.12));
}

.nigeria-map path.selected {
  stroke: var(--ink) !important;
  stroke-width: 2.8 !important;
  filter: brightness(1.08) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

/* Subtle transparent defaults */
.nigeria-map path.zone-nw { fill: rgba(243, 182, 66, 0.12); }
.nigeria-map path.zone-ne { fill: rgba(15, 122, 138, 0.12); }
.nigeria-map path.zone-nc { fill: rgba(81, 64, 160, 0.12); }
.nigeria-map path.zone-sw { fill: rgba(0, 162, 99, 0.12); }
.nigeria-map path.zone-se { fill: rgba(216, 98, 81, 0.12); }
.nigeria-map path.zone-ss { fill: rgba(236, 72, 153, 0.12); }

/* Hover fills */
.nigeria-map path.zone-nw:hover { fill: rgba(243, 182, 66, 0.4); }
.nigeria-map path.zone-ne:hover { fill: rgba(15, 122, 138, 0.4); }
.nigeria-map path.zone-nc:hover { fill: rgba(81, 64, 160, 0.4); }
.nigeria-map path.zone-sw:hover { fill: rgba(0, 162, 99, 0.4); }
.nigeria-map path.zone-se:hover { fill: rgba(216, 98, 81, 0.4); }
.nigeria-map path.zone-ss:hover { fill: rgba(236, 72, 153, 0.4); }

/* Selection fills */
.nigeria-map path.zone-nw.selected { fill: rgba(243, 182, 66, 0.85); }
.nigeria-map path.zone-ne.selected { fill: rgba(15, 122, 138, 0.85); }
.nigeria-map path.zone-nc.selected { fill: rgba(81, 64, 160, 0.85); }
.nigeria-map path.zone-sw.selected { fill: rgba(0, 162, 99, 0.85); }
.nigeria-map path.zone-se.selected { fill: rgba(216, 98, 81, 0.85); }
.nigeria-map path.zone-ss.selected { fill: rgba(236, 72, 153, 0.85); }

/* Permanent labels on map */
.state-label {
  font-family: "Geist", system-ui, sans-serif;
  font-weight: 600;
  fill: #475569;
  pointer-events: none;
  user-select: none;
  transition: font-weight 0.2s, fill 0.2s;
}

body.dark .state-label {
  fill: #cbd5e1;
}

.state-label.selected {
  font-weight: 800;
  fill: #000000;
}

body.dark .state-label.selected {
  fill: #ffffff;
}

/* Floating Tooltip */
.map-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--card-start);
  border: 1px solid var(--hairline);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--ink);
  display: none;
  z-index: 1000;
  backdrop-filter: var(--blur);
  flex-direction: column;
  gap: 3px;
}

body.dark .map-tooltip {
  background: rgba(15, 23, 42, 0.9);
}

.map-tooltip strong {
  font-weight: 700;
  font-size: 13px;
}

.map-tooltip span {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.map-tooltip small {
  color: var(--muted);
}

.map-clear-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.geo-hero-card {
  grid-area: hero;
  display: flex;
  flex-direction: column;
  height: auto;
  gap: 12px;
}

.geo-zones-card {
  grid-area: zones;
  display: flex;
  flex-direction: column;
  height: auto;
  gap: 12px;
}

.geo-lga-card {
  grid-area: lgas;
  display: flex;
  flex-direction: column;
  height: auto;
  gap: 12px;
}

/* ── Reports Canvas and Dashboard Styles ───────────── */

.reports-canvas-container {
  position: relative;
  width: 100%;
  height: 230px;
  margin-top: 5px;
  padding: 0 16px 16px;
}

.dashboard-bento-secondary {
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: auto auto auto;
}

.dashboard-bento-secondary .chart-card {
  min-height: 330px;
}

.reports-trend-card {
  grid-column: span 2;
  min-height: 360px !important;
}

.pdf-hidden-logo {
  display: none;
}

/* ── Table Cell Color Classes ──────────────────────── */

.text-positive { color: #047a35 !important; font-weight: 600; }
.text-warning { color: #b45309 !important; font-weight: 600; }
.text-critical { color: #b84432 !important; font-weight: 600; }
.text-info { color: #5140a0 !important; font-weight: 600; }

body.dark .text-positive { color: #28a85a !important; }
body.dark .text-warning { color: #d97706 !important; }
body.dark .text-critical { color: #f05252 !important; }
body.dark .text-info { color: #818cf8 !important; }

.badge.blue {
  color: #0369a1;
  background: rgba(14, 165, 233, .12);
  border-color: rgba(14, 165, 233, .2);
}
.badge.purple {
  color: #6d28d9;
  background: rgba(139, 92, 246, .12);
  border-color: rgba(139, 92, 246, .2);
}
.badge.pink {
  color: #be185d;
  background: rgba(236, 72, 153, .12);
  border-color: rgba(236, 72, 153, .2);
}

body.dark .badge.blue { background: rgba(56, 189, 248, .15); color: #38bdf8; }
body.dark .badge.purple { background: rgba(167, 139, 250, .15); color: #a78bfa; }
body.dark .badge.pink { background: rgba(244, 114, 182, .15); color: #f474b6; }

/* ── Sponsor School Multi-Step Wizard Styles ───────── */

.wizard-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  padding: 0 10px;
}
.wizard-step {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--hover-bg);
  border: 1px solid var(--hairline);
  transition: all 0.25s ease;
}
.wizard-step.active {
  color: var(--green);
  background: rgba(0, 162, 99, 0.1);
  border-color: var(--green);
}
.wizard-step-line {
  flex: 1;
  height: 2px;
  background: var(--hairline);
  margin: 0 8px;
}
.wizard-step-line.active {
  background: var(--green);
}
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid var(--hairline);
}
.school-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.school-card {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px;
  background: var(--card-start);
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}
.school-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(0,0,0,0.1);
  border-color: var(--green-hover);
}
.school-card.selected {
  border-color: var(--green);
  background: rgba(0, 162, 99, 0.03);
  box-shadow: 0 0 0 1px var(--green), 0 10px 20px -10px rgba(0, 162, 99, 0.1);
}
.school-card strong {
  font-size: 15px;
  color: var(--ink);
  padding-right: 60px;
}
.school-card small {
  color: var(--muted);
  font-size: 12px;
}
.school-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  font-size: 12px;
}
.school-card-select-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 9px;
  font-weight: 700;
  color: var(--green);
  background: rgba(0, 162, 99, 0.1);
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  display: none;
}
.school-card.selected .school-card-select-badge {
  display: block;
}

.snack-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.snack-card {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px;
  background: var(--card-start);
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 16px;
}
.snack-card:hover {
  transform: translateY(-2px);
  border-color: var(--green-hover);
}
.snack-card.selected {
  border-color: var(--green);
  background: rgba(0, 162, 99, 0.03);
  box-shadow: 0 0 0 1px var(--green);
}
.snack-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.snack-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.snack-card-info strong {
  font-size: 14px;
  color: var(--ink);
}
.snack-card-info p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.snack-card-cost {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  font-family: "Geist Mono", monospace;
  white-space: nowrap;
}

/* Holiday styling in calendar */
.calendar-day.holiday {
  background: rgba(217, 119, 6, 0.08) !important;
  border: 1px dashed rgba(217, 119, 6, 0.4) !important;
  color: #d97706 !important;
  cursor: not-allowed !important;
}
.calendar-day.holiday:hover {
  background: rgba(217, 119, 6, 0.12) !important;
}
.calendar-day.holiday small {
  color: #b45309;
  font-size: 9px;
  font-weight: 600;
}
body.dark .calendar-day.holiday {
  background: rgba(217, 119, 6, 0.15) !important;
  color: #fbbf24 !important;
}
body.dark .calendar-day.holiday small {
  color: #f59e0b;
}

/* Calendar adjacent month styling */
.calendar-day.adjacent-month {
  opacity: 0.55;
}
.calendar-day.adjacent-month:hover {
  opacity: 0.85;
}
.calendar-day.adjacent-month.active {
  opacity: 1;
}

/* Donor bento layout cols */
.dashboard-bento-tertiary.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Selected state highlight on map */
.nigeria-map path.selected {
  stroke: var(--ink) !important;
  stroke-width: 3px !important;
  filter: brightness(1.08) drop-shadow(0 6px 16px rgba(0, 0, 0, 0.25)) !important;
}

/* Map selection fading behavior */
.nigeria-map.has-selection path:not(.selected) {
  opacity: 0.35;
}
.nigeria-map.has-selection path.selected {
  opacity: 1;
}
.nigeria-map.has-selection .state-label:not(.selected) {
  opacity: 0.3;
}
.nigeria-map.has-selection .state-label.selected {
  opacity: 1;
  font-weight: 800;
  fill: var(--ink);
}

/* Premium Toast Notifications */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  width: 320px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
  opacity: 0;
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}
.toast.success .toast-icon {
  background: rgba(0, 162, 99, 0.1);
  color: var(--green);
}
.toast.error .toast-icon {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}
.toast.info .toast-icon {
  background: rgba(14, 165, 233, 0.1);
  color: #0ea5e9;
}
.toast-content {
  flex: 1;
}
.toast-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 2px;
}
.toast-message {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Portal Bento Grid Layout */
.portal-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.portal-bento-grid .kpi-card {
  grid-column: span 1;
}

.portal-bento-grid .bento-chart-wide {
  grid-column: span 2;
}

.portal-bento-grid .bento-chart-narrow {
  grid-column: span 1;
}

@media (max-width: 900px) {
  .portal-bento-grid {
    grid-template-columns: 1fr;
  }
  .portal-bento-grid .kpi-card,
  .portal-bento-grid .bento-chart-wide,
  .portal-bento-grid .bento-chart-narrow {
    grid-column: span 1;
  }
}




