/* Shared shell for the Aspire Johnson County client portal.
 *
 * Owns ONLY the cross-page chrome: the design tokens (light + dark), the green
 * brand header, and the nav bar. Each page keeps its own component styles inline
 * so this file can't accidentally restyle a page. Injected markup lives in
 * portal.js (one source of truth for the header + nav across every page). */

:root {
  --brand: #297843;
  --brand-dark: #1e5f33;
  --accent: #0369a1;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --pill-bg: #e9f7ee;
  --pill-text: #175c32;
}
[data-theme="dark"] {
  --bg: #0b1220;
  --card: #131c2e;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #243049;
  --pill-bg: #14331f;
  --pill-text: #8fe2ab;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ── Brand header ─────────────────────────────────────────── */
.brand {
  background: var(--brand);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand .logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; letter-spacing: -1px;
  flex-shrink: 0;
}
.brand h1 { font-size: 19px; margin: 0; font-weight: 700; }
.brand .sub { font-size: 13px; opacity: 0.9; margin-top: 2px; }
.brand .spacer { flex: 1; }
.brand .by { font-size: 12px; opacity: 0.85; text-align: right; white-space: nowrap; }
.theme-toggle {
  background: rgba(255, 255, 255, 0.16); color: #fff; border: none;
  border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 14px;
}

/* ── Nav bar ──────────────────────────────────────────────── */
.portal-nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 4px;
  padding: 0 24px;
  flex-wrap: wrap;
}
.portal-nav .tabs { display: flex; gap: 4px; }
.portal-nav a.tab {
  display: inline-block;
  padding: 13px 16px;
  font-size: 14px; font-weight: 600;
  color: var(--muted); text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.portal-nav a.tab:hover { color: var(--text); }
.portal-nav a.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.portal-nav .meta {
  margin-left: auto;
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; color: var(--muted);
}
.portal-nav .meta .greeting strong { color: var(--text); font-weight: 600; }
.portal-nav .meta a.staff-link { color: var(--accent); text-decoration: none; }
.portal-nav .meta a.staff-link:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .brand .by { display: none; }
  .portal-nav { padding: 0 12px; }
  .portal-nav a.tab { padding: 12px 10px; }
  .portal-nav .meta { width: 100%; margin: 0 0 8px; }
}