/* ==========================================================================
   SchoolFuel — Design System
   Palette derived from the SchoolFuel logo: navy, teal, gold star accent.
   ========================================================================== */

:root {
  --navy-900: #0f2947;
  --navy-800: #16365c;
  --navy-700: #1c3f6e;
  --navy-600: #234a7f;
  --teal-600: #0f9e97;
  --teal-500: #1cb5ab;
  --teal-400: #3fd0c4;
  --teal-100: #e3f7f5;
  --gold-500: #f5a623;
  --gold-400: #ffc857;
  --gold-100: #fff4dd;
  --green-600: #2e9e5b;
  --red-600: #d64545;

  --ink-900: #12202f;
  --ink-700: #33475b;
  --ink-500: #5c7085;
  --ink-300: #93a4b5;

  --bg-page: #f5f8fa;
  --bg-card: #ffffff;
  --bg-soft: #eef3f6;
  --border: #e1e8ee;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(15, 41, 71, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 41, 71, 0.10);
  --shadow-lg: 0 20px 48px rgba(15, 41, 71, 0.16);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-900);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0; line-height: 1.6; color: var(--ink-700); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-600);
  background: var(--teal-100);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--teal-500), var(--navy-700));
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 158, 151, 0.28);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(15, 158, 151, 0.38); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--navy-900);
  box-shadow: 0 8px 20px rgba(245, 166, 35, 0.32);
}
.btn-gold:hover { box-shadow: 0 10px 26px rgba(245, 166, 35, 0.42); }

.btn-outline {
  background: #fff;
  color: var(--navy-700);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--teal-500); color: var(--teal-600); }

.btn-ghost {
  background: transparent;
  color: var(--navy-700);
}
.btn-ghost:hover { background: var(--bg-soft); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* ---------- Top nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand img { height: 40px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink-700);
}
.nav-links a:hover { color: var(--teal-600); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1100px 500px at 85% -10%, rgba(63, 208, 196, 0.18), transparent 60%),
              linear-gradient(180deg, #ffffff 0%, #f5f8fa 100%);
  padding: 72px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  margin: 18px 0 18px;
  color: var(--navy-900);
}
.hero h1 .accent { color: var(--teal-600); }
.hero-sub {
  font-size: 18px;
  max-width: 540px;
  margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-trust { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-trust span { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500); }
.hero-trust .logo-row img { height: 22px; width: auto; object-fit: contain; opacity: 0.75; }
.logo-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.hero-art {
  position: relative;
}
.hero-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  border: 1px solid var(--border);
}
.hero-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hero-card-header h4 { font-size: 15px; }
.pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.pill-live { background: var(--teal-100); color: var(--teal-600); }
.pill-live::before { content: "●"; margin-right: 5px; color: var(--teal-500); }

.mini-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.mini-stat {
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 14px;
}
.mini-stat .num { font-size: 22px; font-weight: 800; color: var(--navy-900); }
.mini-stat .lbl { font-size: 12px; color: var(--ink-500); font-weight: 600; }

.float-card {
  position: absolute;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 12px 16px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}
.float-card .ico { font-size: 18px; }
.float-1 { top: -18px; right: -10px; }
.float-2 { bottom: -16px; left: -18px; }

/* ---------- Section shells ---------- */
.section { padding: 76px 0; }
.section-tight { padding: 48px 0; }
.section-head { max-width: 640px; margin-bottom: 42px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); color: var(--navy-900); margin: 12px 0 12px; }
.section-alt { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-navy { background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); }
.section-navy h2, .section-navy .eyebrow { color: #fff; }
.section-navy .eyebrow { background: rgba(255,255,255,0.12); color: var(--teal-400); }
.section-navy p { color: rgba(255,255,255,0.72); }

/* ---------- Problem grid ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.problem-card h3 { font-size: 20px; margin-bottom: 4px; color: var(--navy-900); }
.problem-card .role-tag { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-500); margin-bottom: 14px; display: block; }
.problem-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.problem-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--ink-700); }
.problem-list .dot {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  margin-top: 1px;
}
.problem-card.schools .dot { background: var(--teal-100); color: var(--teal-600); }
.problem-card.business .dot { background: var(--gold-100); color: var(--gold-500); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step-card { text-align: left; padding: 22px; }
.step-num {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--teal-500), var(--navy-700));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; margin-bottom: 16px; font-size: 16px;
}
.step-card h4 { font-size: 16px; margin-bottom: 8px; color: var(--navy-900); }
.step-card p { font-size: 14px; }

/* ---------- Stats strip ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-cell { background: rgba(255,255,255,0.04); padding: 30px 22px; text-align: center; }
.stat-cell .num { font-size: 34px; font-weight: 800; color: #fff; }
.stat-cell .lbl { font-size: 13px; color: rgba(255,255,255,0.65); font-weight: 600; margin-top: 4px; }

/* ---------- Search ---------- */
.search-bar {
  display: flex;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 8px 8px 20px;
  box-shadow: var(--shadow-sm);
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.search-bar input[type="text"] {
  flex: 1;
  min-width: 160px;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  padding: 10px 0;
  background: transparent;
}
.search-bar select {
  border: none;
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
  padding: 9px 14px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-700);
}
.search-icon { color: var(--ink-300); font-size: 16px; }

/* ---------- Initiative cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.init-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.init-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.init-photo { position: relative; height: 160px; background: var(--bg-soft); }
.init-photo img { width: 100%; height: 100%; object-fit: cover; }
.init-cat {
  position: absolute; top: 12px; left: 12px;
  background: rgba(15, 41, 71, 0.78);
  color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 5px 11px; border-radius: var(--radius-pill);
  backdrop-filter: blur(4px);
}
.init-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.init-school { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-500); }
.init-school img { height: 18px; width: 18px; object-fit: contain; border-radius: 4px; }
.init-body h4 { font-size: 16.5px; color: var(--navy-900); }
.init-body p.desc { font-size: 13.5px; }
.progress-track { height: 8px; border-radius: var(--radius-pill); background: var(--bg-soft); overflow: hidden; }
.progress-fill { height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--teal-500), var(--teal-400)); }
.progress-meta { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--ink-700); }
.progress-meta .raised { color: var(--teal-600); }
.init-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-500); font-weight: 600; }
.status-chip { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); }
.status-active { background: var(--teal-100); color: var(--teal-600); }
.status-funded { background: #e7f6ec; color: var(--green-600); }
.status-new { background: var(--gold-100); color: #a86a00; }

/* ---------- Logo marquee ---------- */
.logo-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 36px;
  padding: 8px 0;
}
.logo-strip img { height: 34px; width: auto; object-fit: contain; filter: grayscale(1); opacity: 0.55; transition: all 0.2s ease; }
.logo-strip img:hover { filter: grayscale(0); opacity: 1; }
.logo-strip.schools img { height: 46px; }

/* ---------- Idea portal teaser ---------- */
.idea-banner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  background: linear-gradient(135deg, var(--teal-100), #ffffff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  align-items: center;
}
.idea-banner h3 { font-size: 24px; color: var(--navy-900); margin-bottom: 10px; }
.idea-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.idea-tag {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy-800);
  box-shadow: var(--shadow-sm);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.7); padding: 56px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 40px; }
.footer-brand img { height: 36px; margin-bottom: 14px; }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 13.5px; max-width: 280px; }
.site-footer h5 { color: #fff; font-size: 13.5px; margin-bottom: 16px; letter-spacing: 0.03em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.footer-links a { color: rgba(255,255,255,0.6); }
.footer-links a:hover { color: #fff; }
.demo-box {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 12.5px;
}
.demo-box b { color: #fff; }
.demo-row { display: flex; justify-content: space-between; margin-top: 8px; font-family: "SF Mono", Menlo, monospace; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 22px;
  display: flex; justify-content: space-between; font-size: 12.5px; color: rgba(255,255,255,0.45);
  flex-wrap: wrap; gap: 10px;
}

/* ==========================================================================
   Portal (login + dashboard) shared styles
   ========================================================================== */

.portal-body { min-height: 100vh; background: var(--bg-page); }

/* Login screen */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-visual {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700) 60%, var(--teal-600));
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-visual::after {
  content: "";
  position: absolute;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(63,208,196,0.35), transparent 70%);
  right: -140px; bottom: -140px;
}
.login-visual .brand { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.login-visual .brand img { height: 34px; }
/* The logo artwork has an opaque white background, so at a larger size it
   needs a card of its own rather than sitting straight on the navy panel. */
.login-visual .brand-card {
  display: inline-flex; align-self: flex-start; background: #fff; border-radius: var(--radius-md);
  padding: 16px 24px; box-shadow: var(--shadow-md);
}
.login-visual .brand-card img { height: 96px; width: auto; display: block; }
.login-visual .quote { position: relative; z-index: 1; }
.login-visual .quote-school {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border-radius: var(--radius-md); padding: 12px 18px; margin-bottom: 22px;
  box-shadow: var(--shadow-md);
}
.login-visual .quote-school img { height: 46px; width: auto; max-width: 230px; object-fit: contain; display: block; }
.login-visual .quote h2 { font-size: 28px; margin-bottom: 14px; max-width: 420px; }
.login-visual .quote p { color: rgba(255,255,255,0.75); max-width: 400px; }
.login-visual .quote-stats { display: flex; gap: 30px; margin-top: 26px; }
.login-visual .quote-stats div b { display: block; font-size: 24px; }
.login-visual .quote-stats div span { font-size: 12px; color: rgba(255,255,255,0.6); }
.login-visual .foot-note { font-size: 12.5px; color: rgba(255,255,255,0.5); position: relative; z-index: 1; }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card .back-link { font-size: 13.5px; font-weight: 700; color: var(--ink-500); display: inline-flex; align-items: center; gap: 6px; margin-bottom: 26px; }
.login-card h1 { font-size: 26px; color: var(--navy-900); margin-bottom: 6px; }
.login-card .sub { margin-bottom: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-700); margin-bottom: 7px; }
.field input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus { border-color: var(--teal-500); }
.login-error {
  display: none;
  background: #fdecec;
  color: var(--red-600);
  border: 1px solid #f6c7c7;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.login-error.show { display: block; }
.demo-hint {
  margin-top: 22px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--ink-700);
}
.demo-hint b { color: var(--navy-800); }
.demo-hint .cred { font-family: "SF Mono", Menlo, monospace; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 6px 9px; margin-top: 6px; display: inline-block; }
.demo-fill { font-size: 12px; font-weight: 700; color: var(--teal-600); cursor: pointer; margin-left: 8px; }

/* ---------- Inline SVG icons ---------- */
.ic {
  width: 1em; height: 1em;
  display: inline-block; vertical-align: middle; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.kpi-ico .ic { width: 21px; height: 21px; }
.icon-btn .ic { width: 19px; height: 19px; color: var(--navy-700); }
.search-icon .ic { width: 19px; height: 19px; color: var(--ink-300); }
.modal-close .ic { width: 15px; height: 15px; stroke-width: 2.2; }
.idea-card .ico .ic { width: 24px; height: 24px; }
.idea-card .votes .ic { width: 15px; height: 15px; margin-right: 5px; }
.empty-state .ico .ic { width: 34px; height: 34px; color: var(--ink-300); }
.btn .ic { width: 15px; height: 15px; stroke-width: 2.2; } /* .btn already sets gap */
.title-sparkle { width: 22px; height: 22px; color: var(--gold-500); margin-left: 4px; }

/* Dashboard shell */
.dash-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.dash-nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; }
.dash-brand { display: flex; align-items: center; gap: 12px; }
.dash-brand img.brand-logo { height: 30px; }
.dash-brand img.brand-logo-lg { height: 54px; }
.dash-divider { width: 1px; height: 26px; background: var(--border); }
.dash-org { display: flex; align-items: center; gap: 10px; }
.dash-org img { height: 34px; width: 34px; object-fit: contain; border-radius: 8px; background: var(--bg-soft); padding: 3px; }
.dash-org .name { font-size: 14.5px; font-weight: 800; color: var(--navy-900); }
.dash-org .role { font-size: 11.5px; color: var(--ink-500); font-weight: 600; }
/* Larger, aspect-correct school lockup in the dashboard header */
.dash-org-lg { gap: 14px; }
.dash-org-lg img {
  height: 48px; width: auto; max-width: 210px;
  object-fit: contain; border-radius: 10px;
  background: #fff; border: 1px solid var(--border); padding: 5px 9px;
}
.dash-org-lg .name { font-size: 16px; }

/* School crest beside the overview welcome heading */
.welcome-row { display: flex; align-items: center; gap: 18px; }
.org-crest {
  flex: none; min-width: 96px; height: 96px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 14px 20px;
}
/* height-driven so square crests and wide wordmarks both read at full size */
.org-crest img { height: 100%; width: auto; max-width: 230px; object-fit: contain; }
.dash-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-soft); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}

.dash-tabs { display: flex; gap: 6px; padding: 0 28px; border-top: 1px solid var(--border); }
.dash-tab {
  padding: 13px 16px; font-size: 13.5px; font-weight: 700; color: var(--ink-500);
  border-bottom: 2.5px solid transparent; cursor: pointer;
}
.dash-tab.active { color: var(--navy-900); border-color: var(--teal-500); }

.dash-main { padding: 30px 28px 70px; max-width: 1280px; margin: 0 auto; }
.dash-title-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; flex-wrap: wrap; gap: 14px; }
.dash-title-row h1 { font-size: 24px; color: var(--navy-900); }
.dash-title-row p { font-size: 13.5px; margin-top: 4px; }
.period-select { display: flex; align-items: center; gap: 8px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 6px; }
.period-opt { padding: 7px 14px; font-size: 12.5px; font-weight: 700; border-radius: var(--radius-pill); cursor: pointer; color: var(--ink-500); }
.period-opt.active { background: var(--navy-800); color: #fff; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kpi-ico { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.kpi-trend { font-size: 12px; font-weight: 800; color: var(--green-600); background: #e7f6ec; padding: 3px 8px; border-radius: var(--radius-pill); }
.kpi-trend.down { color: var(--red-600); background: #fdecec; }
.kpi-trend.flat { color: var(--ink-500); background: var(--bg-soft); }
.kpi-num { font-size: 27px; font-weight: 800; color: var(--navy-900); }
.kpi-lbl { font-size: 12.5px; color: var(--ink-500); font-weight: 600; margin-top: 3px; }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel-head h3 { font-size: 16.5px; color: var(--navy-900); }
.panel-head .see-all { font-size: 12.5px; font-weight: 700; color: var(--teal-600); }

/* Initiative progress rows (school portal) */
.init-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.init-row:last-child { border-bottom: none; }
.init-row-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.init-row-thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; }
.init-row-title { flex: 1; }
.init-row-title h4 { font-size: 14.5px; color: var(--navy-900); }
.init-row-title span { font-size: 12px; color: var(--ink-500); }
.init-row-amt { text-align: right; font-size: 13px; font-weight: 800; color: var(--navy-900); }
.init-row-amt small { display: block; font-size: 11px; font-weight: 600; color: var(--ink-500); }

/* Impact ring */
.impact-ring-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 10px; }
.impact-ring { position: relative; display: flex; align-items: center; justify-content: center; }
.impact-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 34px; pointer-events: none;
}
.impact-num { font-size: 34px; font-weight: 800; line-height: 1.05; color: var(--navy-900); }
.impact-sub { font-size: 11.5px; line-height: 1.35; color: var(--ink-500); font-weight: 600; margin-top: 5px; }
.ring-arc { transition: opacity 0.2s ease; cursor: default; }
.impact-ring:hover .ring-arc { opacity: 0.45; }
.impact-ring .ring-arc:hover { opacity: 1; }
.impact-legend { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 22px; }
.impact-legend-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.impact-legend-row .dot { width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; display: inline-block; }
.impact-note {
  width: 100%; margin-top: 16px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg-soft); font-size: 12px; font-weight: 600; color: var(--ink-700); text-align: left;
}
.panel-period {
  font-size: 11.5px; font-weight: 700; color: var(--ink-500);
  background: var(--bg-soft); border-radius: var(--radius-pill); padding: 4px 10px; text-transform: capitalize;
}
.init-row-delta { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 800; color: var(--teal-600); }

/* Sponsor / school chip list */
.chip-list { display: flex; flex-direction: column; gap: 4px; }
.chip-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: var(--radius-sm); }
.chip-row:hover { background: var(--bg-soft); }
.chip-row img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; background: var(--bg-soft); padding: 4px; flex: none; }
.chip-row .info { flex: 1; }
.chip-row .info b { font-size: 13.5px; color: var(--navy-900); display: block; }
.chip-row .info span { font-size: 11.5px; color: var(--ink-500); }
.chip-row .amt { font-size: 13px; font-weight: 800; color: var(--teal-600); }

/* Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-500); padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.data-table td { padding: 13px 12px; font-size: 13.5px; border-bottom: 1px solid var(--border); color: var(--ink-700); }
.data-table tr:last-child td { border-bottom: none; }
.dept-tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--navy-900); }
.dept-swatch { width: 10px; height: 10px; border-radius: 3px; }
.bar-cell { display: flex; align-items: center; gap: 10px; }
.bar-cell .track { flex: 1; height: 6px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; }
.bar-cell .fill { height: 100%; border-radius: 4px; }

/* Report / certificate */
.report-modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,41,71,0.55);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 24px;
}
.report-modal-backdrop.show { display: flex; }
.report-modal { background: #fff; border-radius: var(--radius-lg); max-width: 720px; width: 100%; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.report-modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); }

/* ---------- Initiative Assistant (chat + generated proposal) ---------- */
.modal-bot { max-width: 620px; display: flex; flex-direction: column; max-height: 92vh; }
.bot-head { align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.bot-id { display: flex; align-items: center; gap: 13px; }
.bot-avatar {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--teal-500), var(--navy-700)); color: #fff;
}
.bot-avatar .ic { width: 22px; height: 22px; }
.bot-avatar.sm { width: 30px; height: 30px; border-radius: 10px; }
.bot-avatar.sm .ic { width: 16px; height: 16px; }

.bot-thread { flex: 1; overflow-y: auto; padding: 20px 22px; background: var(--bg-page); }
.bot-msg { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-start; }
.bot-msg.from-user { justify-content: flex-end; }
.bot-bubble {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 15px; font-size: 13.5px; line-height: 1.55; color: var(--ink-700);
  max-width: 86%; box-shadow: var(--shadow-sm);
}
.bot-bubble p + p { margin-top: 8px; }
.bot-bubble b { color: var(--navy-900); }
.bot-hint { color: var(--ink-500); font-size: 12.5px; }
.bot-msg.from-user .bot-bubble {
  background: var(--navy-800); border-color: var(--navy-800); color: #fff; border-bottom-right-radius: 5px;
}
.bot-msg.from-bot .bot-bubble { border-bottom-left-radius: 5px; }

.bot-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.bot-chip {
  background: var(--teal-100); color: var(--teal-600); border: none; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 700;
  padding: 7px 12px; border-radius: var(--radius-pill); text-align: left;
}
.bot-chip:hover { background: var(--teal-500); color: #fff; }

.bot-typing { display: inline-flex; gap: 4px; padding: 2px 0; }
.bot-typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-300);
  animation: botBlink 1.1s infinite ease-in-out;
}
.bot-typing i:nth-child(2) { animation-delay: 0.16s; }
.bot-typing i:nth-child(3) { animation-delay: 0.32s; }
@keyframes botBlink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.bot-composer {
  display: flex; gap: 10px; align-items: center;
  padding: 14px 22px; border-top: 1px solid var(--border); background: var(--bg-card);
}
.bot-composer input {
  flex: 1; border: 1.5px solid var(--border); border-radius: var(--radius-pill);
  padding: 12px 18px; font-family: inherit; font-size: 14px; outline: none;
  transition: border-color 0.15s ease;
}
.bot-composer input:focus { border-color: var(--teal-500); }

/* Generated proposal */
.proposal-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm); margin: 0 0 16px 40px;
  animation: propIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes propIn { from { opacity: 0; transform: translateY(10px); } }
.proposal-cover { position: relative; height: 132px; background: var(--bg-soft); }
.proposal-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proposal-dept, .proposal-type {
  position: absolute; top: 12px; font-size: 11px; font-weight: 700; color: #fff;
  padding: 5px 11px; border-radius: var(--radius-pill);
}
.proposal-dept { left: 12px; }
.proposal-type {
  right: 12px; background: rgba(15, 41, 71, 0.78); display: inline-flex; align-items: center; gap: 5px;
}
.proposal-type .ic { width: 13px; height: 13px; }

.proposal-body { padding: 18px; }
.proposal-label {
  display: block; font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink-500); margin: 16px 0 7px;
}
.proposal-label:first-child { margin-top: 0; }
.proposal-title, .proposal-desc {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-family: inherit; outline: none; resize: vertical;
  transition: border-color 0.15s ease; color: var(--ink-900);
}
.proposal-title { font-size: 15.5px; font-weight: 800; color: var(--navy-900); }
.proposal-desc { font-size: 13px; line-height: 1.5; }
.proposal-title:focus, .proposal-desc:focus { border-color: var(--teal-500); }

.type-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.type-opt {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 11px 6px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1.5px solid var(--border); background: var(--bg-card);
  font-family: inherit; font-size: 11.5px; font-weight: 700; color: var(--ink-500);
  transition: all 0.15s ease;
}
.type-opt .ic { width: 19px; height: 19px; }
.type-opt:hover { border-color: var(--teal-400); color: var(--teal-600); }
.type-opt.active { border-color: var(--teal-500); background: var(--teal-100); color: var(--teal-600); }

.ask-block {
  margin-top: 14px; padding: 15px; border-radius: var(--radius-sm);
  background: var(--bg-soft); border: 1px solid var(--border);
}
.ask-figure { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; }
.ask-prefix { font-size: 24px; font-weight: 800; color: var(--navy-900); }
.ask-input {
  width: 130px; border: none; background: transparent; border-bottom: 2px solid var(--border);
  font-family: inherit; font-size: 27px; font-weight: 800; color: var(--navy-900);
  padding: 0 0 2px; outline: none;
}
.ask-input:focus { border-color: var(--teal-500); }
.ask-unit { font-size: 12.5px; font-weight: 700; color: var(--ink-500); }
.ask-note { font-size: 12px; color: var(--ink-500); font-weight: 600; margin-top: 8px; }
.ask-total { font-size: 13px; color: var(--ink-700); margin-top: 12px; }
.ask-total b { color: var(--navy-900); }

.role-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.role-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--bg-card); color: var(--ink-500);
  font-family: inherit; font-size: 12px; font-weight: 700;
  padding: 7px 12px; border-radius: var(--radius-pill);
}
.role-chip .ic { width: 12px; height: 12px; opacity: 0; }
.role-chip.active { border-color: #5b4fd6; background: #eef0ff; color: #5b4fd6; }
.role-chip.active .ic { opacity: 1; }

.item-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.item-row {
  display: flex; align-items: center; gap: 11px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px;
}
.item-qty {
  width: 74px; flex: none; border: 1.5px solid var(--border); border-radius: 6px;
  padding: 6px 8px; font-family: inherit; font-size: 14px; font-weight: 800;
  color: var(--navy-900); outline: none; text-align: center;
}
.item-qty:focus { border-color: var(--gold-500); }
.item-name { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--ink-700); }
.item-remove {
  border: none; background: transparent; color: var(--ink-300); cursor: pointer;
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.item-remove .ic { width: 13px; height: 13px; }
.item-remove:hover { background: #fdecec; color: var(--red-600); }

.match-list { display: flex; flex-direction: column; gap: 6px; }
.match-row { display: flex; align-items: center; gap: 11px; padding: 7px 0; }
.match-row img {
  width: 34px; height: 34px; flex: none; object-fit: contain;
  background: var(--bg-soft); border-radius: 8px; padding: 4px;
}
.match-row .info b { display: block; font-size: 13px; color: var(--navy-900); }
.match-row .info span { font-size: 11.5px; color: var(--ink-500); }

.proposal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--border);
}
.proposal-meta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--green-600);
}
.proposal-meta .ic { width: 14px; height: 14px; }
.proposal-actions { display: flex; gap: 8px; }

/* Ask-type badge on initiative cards */
.init-type {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: #fff;
  padding: 5px 11px; border-radius: var(--radius-pill);
}
.init-type .ic { width: 13px; height: 13px; }

/* Form modal (new initiative) */
.modal-sm { max-width: 560px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 0; }
.modal-head h3 { font-size: 19px; color: var(--navy-900); }
.modal-head p { font-size: 13px; margin-top: 4px; }
.modal-close {
  flex: none; width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--bg-soft); color: var(--ink-500); font-size: 13px;
}
.modal-close:hover { background: var(--border); color: var(--navy-900); }
.modal-body { padding: 22px 24px 0; }
.modal-body .report-modal-actions { margin: 8px -24px 0; padding: 16px 24px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field select, .field textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink-900);
  background: #fff;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s ease;
}
.field select:focus, .field textarea:focus { border-color: var(--teal-500); }
.field input.invalid, .field select.invalid, .field textarea.invalid { border-color: var(--red-600); }
.photo-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.photo-picker img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm);
  border: 2.5px solid transparent; cursor: pointer; opacity: 0.6; transition: all 0.15s ease;
}
.photo-picker img:hover { opacity: 1; }
.photo-picker img.selected { border-color: var(--teal-500); opacity: 1; }

.benefit-report { padding: 46px; }
.br-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--navy-900); padding-bottom: 22px; margin-bottom: 26px; }
.br-head img { height: 40px; }
.br-head .tag { text-align: right; }
.br-head .tag .year { font-size: 12px; color: var(--ink-500); font-weight: 700; }
.br-head .tag h2 { font-size: 20px; color: var(--navy-900); }
.br-hero { text-align: center; margin: 30px 0 36px; }
.br-hero .label { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-500); font-weight: 700; }
.br-hero .amount { font-size: 46px; font-weight: 800; color: var(--teal-600); margin: 8px 0; }
.br-hero .sub { font-size: 14.5px; color: var(--ink-700); }
.br-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 30px; }
.br-stat { background: var(--bg-soft); border-radius: var(--radius-md); padding: 16px; text-align: center; }
.br-stat .n { font-size: 22px; font-weight: 800; color: var(--navy-900); }
.br-stat .l { font-size: 11.5px; color: var(--ink-500); font-weight: 700; margin-top: 2px; }
.br-schools { margin-bottom: 30px; }
.br-schools h4 { font-size: 13.5px; color: var(--navy-900); margin-bottom: 12px; }
.br-school-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.br-school-row img { height: 30px; width: 30px; object-fit: contain; border-radius: 6px; }
.br-school-row .n1 { flex: 1; font-size: 13.5px; font-weight: 700; color: var(--navy-900); }
.br-school-row .n2 { font-size: 13px; font-weight: 800; color: var(--teal-600); }
.br-foot { text-align: center; padding-top: 20px; border-top: 1px solid var(--border); }
.br-foot .sig { font-size: 13px; color: var(--ink-500); margin-bottom: 4px; }
.br-foot .thanks { font-size: 15px; font-weight: 700; color: var(--navy-900); }

/* Toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy-900); color: #fff; padding: 13px 22px; border-radius: var(--radius-pill);
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: all 0.25s ease; z-index: 300; display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Idea portal (nice-to-have) modal-ish page section */
.idea-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.idea-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; }
.idea-card .ico {
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-100); color: var(--teal-600);
  font-size: 22px;
}
/* rotate the badge tint so the grid reads as six distinct ideas */
.idea-card:nth-child(6n+2) .ico { background: var(--gold-100); color: #a86a00; }
.idea-card:nth-child(6n+3) .ico { background: #eef0ff; color: #5b4fd6; }
.idea-card:nth-child(6n+4) .ico { background: #fdecec; color: var(--red-600); }
.idea-card:nth-child(6n+5) .ico { background: #e7f6ec; color: var(--green-600); }
.idea-card:nth-child(6n+6) .ico { background: #e8f1fb; color: var(--navy-700); }
.idea-card h4 { font-size: 14.5px; color: var(--navy-900); margin-bottom: 6px; }
.idea-card p { font-size: 12.5px; }
.idea-card .votes { margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--teal-600); }

/* Empty state */
.empty-state { text-align: center; padding: 50px 20px; color: var(--ink-500); }
.empty-state .ico { font-size: 34px; margin-bottom: 10px; }

/* Utility */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.flex { display: flex; }
.gap-8 { gap: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .two-col { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .idea-banner { grid-template-columns: 1fr; }
  .br-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .dash-nav { flex-wrap: wrap; gap: 12px; }
  .idea-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .photo-picker { grid-template-columns: repeat(3, 1fr); }
  .proposal-card { margin-left: 0; }
  .bot-bubble { max-width: 100%; }
  .welcome-row { gap: 14px; }
  .org-crest { width: 66px; height: 66px; padding: 8px; }
  .dash-org-lg img { height: 40px; max-width: 150px; }
  .br-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .site-footer, .dash-header, .report-modal-actions, .report-modal-backdrop > .report-modal { box-shadow: none; }
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea { position: absolute; top: 0; left: 0; width: 100%; }
}
