/* Wirral Ways Volunteer Portal — CGL brand tokens + shared layout.
   Plain CSS, no framework — kept deliberately simple so this ships as
   static files with no build step (see README.md for why). */

:root {
  --blackcurrant: #5e1b6d;
  --neon: #ef5ba1;
  --saffron: #f08300;
  --black: #000000;
  --white: #ffffff;
  --grey: #e8e8e8;
  --sky: #5dc5ea;
  --ocean: #0081c1;
  --space: #004a81;
  --lavender: #d2c5e2;
  --sunshine: #fcbf00;
  --flame: #ec6907;
  --amethyst: #954b97;
  --raspberry: #b52372;
  --orchid: #f4aacc;

  --text: #26202b;
  --muted: #6b6470;
  --border: #d9d2e0;
  --bg: #faf8fb;
  --card: #ffffff;
  --danger: #b3261e;
  --success: #1e7a34;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Century Gothic", "Poppins", "Segoe UI", Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--space); }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Header ─────────────────────────────────────────────────────────── */

.topbar {
  background: var(--blackcurrant);
  color: var(--white);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar .brand {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--white);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

/* ── Nav ────────────────────────────────────────────────────────────── */

.nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 4px;
  padding: 0 16px;
  overflow-x: auto;
}

.nav a, .nav .nav-disabled {
  display: inline-block;
  padding: 12px 14px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  font-size: 0.92rem;
}

.nav a.active { border-bottom-color: var(--neon); font-weight: 600; }
.nav a:hover { background: var(--bg); }
.nav .nav-disabled { color: var(--muted); cursor: default; }

/* ── Layout ─────────────────────────────────────────────────────────── */

main { flex: 1; padding: 20px; max-width: 1100px; width: 100%; margin: 0 auto; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

h1 { font-size: 1.4rem; color: var(--blackcurrant); margin: 0 0 4px; }
h2 { font-size: 1.1rem; color: var(--blackcurrant); margin: 0 0 12px; }
.subtitle { color: var(--muted); margin: 0 0 20px; }

/* ── Forms ──────────────────────────────────────────────────────────── */

label { display: block; font-size: 0.85rem; font-weight: 600; margin: 12px 0 4px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }

input, select, textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--white);
  color: var(--text);
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--sky);
  outline-offset: 1px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4px 16px;
}

.field-full { grid-column: 1 / -1; }

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 24px;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary { background: var(--blackcurrant); color: var(--white); }
.btn-primary:hover { background: #4a1557; }
.btn-secondary { background: var(--grey); color: var(--text); }
.btn-secondary:hover { background: #dcdcdc; }
.btn-danger { background: var(--white); color: var(--danger); border: 1px solid var(--danger); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* ── Tables / lists ─────────────────────────────────────────────────── */

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }
tr:hover td { background: var(--bg); }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge-vetting { background: var(--lavender); color: var(--blackcurrant); }
.badge-active { background: #d7f2dd; color: var(--success); }
.badge-paused { background: #ffe9c2; color: #7a4c00; }
.badge-closed { background: var(--grey); color: var(--muted); }

/* ── Alerts ─────────────────────────────────────────────────────────── */

.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 0.92rem; }
.alert-error { background: #fbe9e7; color: var(--danger); border: 1px solid #f3b8b1; }
.alert-success { background: #e6f4ea; color: var(--success); border: 1px solid #b7ddc0; }
.alert-info { background: #eaf6fc; color: var(--space); border: 1px solid #bfe4f2; }

/* ── Misc ───────────────────────────────────────────────────────────── */

.muted { color: var(--muted); }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rating-row { display: flex; gap: 6px; }
.rating-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--white); font-weight: 700; cursor: pointer;
}
.rating-btn.selected { background: var(--neon); color: var(--white); border-color: var(--neon); }

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(160deg, var(--blackcurrant), var(--space));
}
.login-card { background: var(--white); border-radius: 16px; padding: 32px; width: 100%; max-width: 380px; }
.login-card h1 { text-align: center; }
.login-card .subtitle { text-align: center; }

@media (max-width: 600px) {
  main { padding: 14px; }
  .topbar { flex-direction: column; align-items: flex-start; }
}
