/* MapMap — shared base styles for the secondary pages (everything except
 * the Map Viewer, which has its own mapmap.css).
 *
 * Loaded via <link> before each page's own <style> block, so a page can
 * still override anything here just by redeclaring the property — later
 * rules of equal specificity win. Only rules verified byte-identical (or
 * safely groupable) across multiple pages live here; anything with
 * per-page color/z-index differences (e.g. .toast) stays in the page.
 */

:root, [data-theme="dark"] {
  --bg: #0f1117; --surface: #1a1d27; --surface2: #232736;
  --border: #2e3345; --text: #e4e6f0; --text-dim: #8b8fa3;
  --text-muted: #5c6078; --accent: #f97316;
  --accent-dim: rgba(249,115,22,0.15);
  --radius: 8px; --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --green: #34d399; --green-dim: rgba(52,211,153,0.12);
  --red: #f87171; --red-dim: rgba(248,113,113,0.12);
  --yellow: #fbbf24; --yellow-dim: rgba(251,191,36,0.12);
  --blue: #60a5fa; --blue-dim: rgba(96,165,250,0.12);
  --rose: #FF5978; --rose-dim: rgba(255,89,120,0.12);
  --course: #CC00FF; --course-dim: rgba(204,0,255,0.15);
}
[data-theme="light"] {
  --bg: #f5f5f7; --surface: #ffffff; --surface2: #ecedf0;
  --border: #d5d7de; --text: #1a1d27; --text-dim: #555a6e;
  --text-muted: #8b8fa3; --accent: #e86305;
  --accent-dim: rgba(232,99,5,0.10);
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --green: #059669; --green-dim: rgba(5,150,105,0.10);
  --red: #dc2626; --red-dim: rgba(220,38,38,0.10);
  --yellow: #d97706; --yellow-dim: rgba(217,119,6,0.10);
  --blue: #2563eb; --blue-dim: rgba(37,99,235,0.10);
  --rose: #e11d48; --rose-dim: rgba(225,29,72,0.10);
  --course: #a21caf; --course-dim: rgba(162,28,175,0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); }

/* Header / logo — identical on every page. Layout-affecting properties
 * (position, z-index, min-height/height/overflow) are left for each page
 * to set on top of this, since full-viewport apps (course designer/viewer)
 * differ from scrolling pages (issues/admin/programs) here. */
header { height: 52px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 20px; gap: 16px; }
.logo { font-weight: 700; font-size: 18px; letter-spacing: -.5px; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.logo-icon { width: 28px; height: 28px; background: var(--accent); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* Nav family #1: issues.html, admin.html, programs.html */
.nav-links { display: flex; gap: 8px; margin-left: auto; }
.nav-btn { background: var(--surface2); border: 1px solid var(--border); color: var(--text-dim); padding: 6px 14px; border-radius: var(--radius); font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; text-decoration: none; }
.nav-btn:hover { border-color: var(--text-dim); color: var(--text); }
.nav-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* Nav family #2: add_map.html, course_designer.html, course_viewer.html.
 * The bare .header-nav rule (gap/margin-left) differs slightly per page
 * (course_designer shares its header with a stats readout), so it stays
 * in each page; only the identical link styling lives here. .active is
 * also left to each page — course pages tint it --course (purple)
 * instead of --accent. */
.header-nav a { color: var(--text-dim); text-decoration: none; font-size: 13px; padding: 6px 12px; border-radius: var(--radius); transition: all .15s; }
.header-nav a:hover { color: var(--text); background: var(--surface2); }

/* Small uppercase-mono pill badges: status-badge/sev-badge/role-badge share
 * one recipe; type-badge/action-badge share a plainer one (no bold/uppercase). */
.status-badge, .sev-badge, .role-badge {
  font-size: 10px; padding: 2px 7px; border-radius: 3px; font-weight: 600;
  font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .3px;
}
.type-badge, .action-badge {
  font-size: 10px; padding: 2px 7px; border-radius: 3px;
  font-family: 'JetBrains Mono', monospace; background: var(--surface2); color: var(--text-dim); white-space: nowrap;
}

/* Empty state placeholder */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .big { font-size: 36px; margin-bottom: 8px; }
.empty-state p { font-size: 14px; }
