:root {
  --ink: #16233f;
  --ink-soft: #2c3a5e;
  --gold: #c98a2c;
  --gold-soft: #e9c98a;
  --paper: #f7f4ec;
  --paper-dim: #efe9d9;
  --green: #2f7a4b;
  --green-bg: #e6f2ea;
  --ember: #b23a34;
  --ember-bg: #fbe9e8;
  --mist: #e4e7ee;
  --slate: #5b6478;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", sans-serif;
}

.font-display {
  font-family: "Fraunces", serif;
}

.font-mono {
  font-family: "JetBrains Mono", monospace;
}

/* ---------- Signature element: the Funding Meter ---------- */
.funding-meter {
  border: 1px solid var(--mist);
  background: #fff;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

.funding-meter .fm-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: var(--paper-dim);
  overflow: hidden;
  border: 1px solid var(--mist);
}

.funding-meter .fm-allocated {
  position: absolute;
  inset: 0;
  height: 100%;
  background: var(--gold-soft);
  border-radius: 999px;
}

.funding-meter .fm-disbursed {
  position: absolute;
  inset: 0;
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.6s ease;
}

.fm-legend {
  display: flex;
  gap: 1.5rem;
  font-size: 0.78rem;
  color: var(--slate);
  margin-top: 0.6rem;
}

.fm-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-right: 5px;
}

/* ---------- Status pills (shared public + admin) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
}
.pill-submitted { background: #eef0f6; color: var(--ink-soft); }
.pill-under_review { background: #fdf2df; color: #8a5a10; }
.pill-approved { background: var(--green-bg); color: var(--green); }
.pill-rejected { background: var(--ember-bg); color: var(--ember); }
.pill-disbursed { background: #e3edf7; color: #235a8a; }
.pill-completed { background: #e3edf7; color: #235a8a; }
.pill-flagged { background: var(--ember-bg); color: var(--ember); }

/* ---------- Admin shell ---------- */
.admin-sidebar {
  background: var(--ink);
  color: #cfd6e6;
}
.admin-sidebar a.nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  color: #cfd6e6;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}
.admin-sidebar a.nav-link:hover,
.admin-sidebar a.nav-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--mist);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
}

.ledger-row {
  border-bottom: 1px solid var(--mist);
}
.ledger-row:hover {
  background: #fbfaf6;
}

table.dataTable thead th {
  border-bottom: 2px solid var(--ink) !important;
  color: var(--ink);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-gold {
  background: var(--gold);
  color: #fff;
}
.btn-gold:hover { background: #b57b23; }

.btn-ink {
  background: var(--ink);
  color: #fff;
}
.btn-ink:hover { background: var(--ink-soft); }

::selection { background: var(--gold-soft); }

.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  z-index: 100;
}
