:root {
  --bg: #f6f8fc;           /* cool white */
  --card: #ffffff;
  --ink: #22252b;          /* charcoal */
  --muted: #6b7280;
  --brand: #1e40af;        /* royal blue */
  --brand-dark: #16308a;
  --accent: #93b0f5;       /* light royal (focus) */
  --line: #e2e7f0;
  --good: #2e7d32;
  --warn: #c77700;
  --bad: #b3261e;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(30,64,175,.07);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181c;         /* charcoal */
    --card: #212329;
    --ink: #eef1f7;
    --muted: #9aa2b1;
    --line: #33363f;
    --shadow: 0 2px 10px rgba(0,0,0,.45);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--brand); }
.wrap { max-width: 960px; margin: 0 auto; padding: 16px; }
.narrow { max-width: 560px; }

header.site {
  background: var(--brand); color: #fff; padding: 8px 0;
}
header.site .wrap { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
header.site .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.02rem; color: #fff; text-decoration: none; }
header.site .logo img { height: 30px; border-radius: 8px; background:#fff; }
header.site nav a { color: #dbe4ff; text-decoration: none; margin-left: 14px; font-size: .95rem; }
header.site nav a:hover { color: #fff; }

.hero {
  background: linear-gradient(rgba(16,22,40,.6), rgba(16,22,40,.6)) center/cover no-repeat, var(--brand-dark);
  color: #fff; padding: 22px 0; text-align: center;
}
.hero h1 { margin: 0 0 6px; font-size: clamp(1.25rem, 2.6vw, 1.7rem); }
.hero p { margin: 0 auto; max-width: 620px; color: #dde5f7; font-size: .92rem; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin: 14px 0;
}
.card h2, .card h3 { margin-top: 0; }
.grid { display: grid; gap: 14px; }
@media (min-width: 720px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

label { display: block; font-weight: 600; font-size: .9rem; margin: 10px 0 4px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }

button, .btn {
  display: inline-block; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--brand); color: #fff; font: inherit; font-weight: 700;
  padding: 11px 18px; text-decoration: none; text-align: center;
}
button:hover, .btn:hover { background: var(--brand-dark); }
button.secondary, .btn.secondary { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
button.ghost, .btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.small, .btn.small { padding: 6px 10px; font-size: .85rem; font-weight: 600; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:hover td { background: rgba(30,64,175,.06); }
.table-scroll { overflow-x: auto; }

.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.pill.green { background: rgba(46,125,50,.14); color: var(--good); }
.pill.amber { background: rgba(199,119,0,.14); color: var(--warn); }
.pill.red   { background: rgba(179,38,30,.12); color: var(--bad); }
.pill.gray  { background: rgba(122,112,103,.15); color: var(--muted); }

.stat { text-align: center; padding: 14px; }
.stat .num { font-size: 1.7rem; font-weight: 800; }
.stat .label { color: var(--muted); font-size: .85rem; }

.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qty-row:last-child { border-bottom: 0; }
.qty-row .info { flex: 1; }
.qty-row .price { font-weight: 700; white-space: nowrap; }
.qty-controls { display: flex; align-items: center; gap: 8px; }
.qty-controls button { width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 1.1rem; }
.qty-controls .qty { min-width: 24px; text-align: center; font-weight: 700; }

.notice { padding: 12px 14px; border-radius: 8px; margin: 12px 0; font-size: .95rem; }
.notice.ok { background: rgba(46,125,50,.12); color: var(--good); }
.notice.err { background: rgba(179,38,30,.1); color: var(--bad); }
.muted { color: var(--muted); }
.right { text-align: right; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.hidden { display: none !important; }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 14px 0; flex-wrap: wrap; }
.tabs button {
  background: transparent; color: var(--muted); border-radius: 8px 8px 0 0;
  padding: 9px 14px; font-weight: 600;
}
.tabs button.active { background: var(--card); color: var(--brand); border-bottom: 2px solid var(--brand); margin-bottom: -2px; }

footer.site { color: var(--muted); text-align: center; padding: 28px 0; font-size: .85rem; }

/* ---- Fundraiser Dashboard (sheet-style stat boxes) ---- */
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 6px 0 18px; }
@media (max-width: 920px) { .dash-grid { grid-template-columns: repeat(2, 1fr); } }
.dash-box {
  display: flex; align-items: stretch; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow);
}
.dash-box .lbl {
  flex: 1; padding: 10px 12px; color: #fff; font-weight: 800; font-size: .72rem;
  letter-spacing: .05em; text-transform: uppercase; display: flex; align-items: center;
}
.dash-box .val {
  flex: 1; min-width: 0; padding: 10px 12px; font-weight: 800; font-size: 1.12rem;
  display: flex; align-items: center; justify-content: flex-end;
}
.dash-green .lbl    { background: #2e7d32; }
.dash-red .lbl      { background: #9a1b1b; }
.dash-navy .lbl     { background: #1e3a5f; }
.dash-blue .lbl     { background: var(--brand); }
.dash-charcoal .lbl { background: #3a3d45; }

table thead tr.blue-head th  { background: var(--brand); color: #fff; }
table thead tr.steel-head th { background: #5b7fa6; color: #fff; }
tr.totals-row td { border-top: 2px solid var(--brand); background: rgba(30,64,175,.07); font-weight: 700; }
tbody tr.zebra:nth-child(odd) td { background: rgba(30,64,175,.04); }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
thead tr.blue-head th.sortable:hover { background: var(--brand-dark); }
