/* ==========================================================================
   Parish Council Booking System — shared styles
   Design language: parish noticeboard / clerk's ledger.
   Forest green + brass on warm paper, serif headings, sans body.
   ========================================================================== */

:root {
  --bg: #F6F5F0;
  --surface: #FFFFFF;
  --surface-recessed: #EFEDE4;
  --ink: #1B2430;
  --ink-soft: #566072;
  --ink-faint: #8A93A1;
  --forest: #1F3D2B;
  --forest-dark: #14291D;
  --forest-tint: #E4EBE3;
  --brass: #A9822C;
  --brass-tint: #F1E7CE;
  --alert: #A23B2E;
  --alert-tint: #F5DED9;
  --border: #D8D3C4;
  --border-strong: #B9B3A0;

  --font-head: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 3px;
  --shadow-card: 0 1px 0 var(--border);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

body {
  background-image:
    linear-gradient(var(--bg) 0%, var(--bg) 100%);
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--forest-dark);
  margin: 0 0 0.4em 0;
  line-height: 1.2;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1em 0; color: var(--ink-soft); }

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

/* Layout shell -------------------------------------------------------- */

.masthead {
  background: var(--forest-dark);
  color: #EFEAD9;
  padding: 22px 24px;
  border-bottom: 3px solid var(--brass);
}

.masthead__inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.masthead__title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  color: #F7F4E9;
  letter-spacing: 0.01em;
}

.masthead__meta {
  font-size: 0.85rem;
  color: #C9CFC1;
}

.masthead__meta a { color: #E9D9A6; text-decoration: none; }
.masthead__meta a:hover { text-decoration: underline; }

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 80px 24px;
}

.page--wide { max-width: 920px; }

/* Stepper (genuinely sequential: request -> approval -> details) ------ */

.stepper {
  display: flex;
  gap: 0;
  margin: 0 0 40px 0;
  border: 1px solid var(--border);
  background: var(--surface);
}

.stepper__step {
  flex: 1;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.stepper__step:last-child { border-right: none; }

.stepper__num {
  display: block;
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--ink-faint);
  margin-bottom: 2px;
}

.stepper__step.is-active {
  background: var(--forest-tint);
  color: var(--forest-dark);
}
.stepper__step.is-active .stepper__num { color: var(--forest); }

.stepper__step.is-done {
  color: var(--forest);
}
.stepper__step.is-done .stepper__num::after { content: " ✓"; }

/* Cards / sections ------------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 20px;
}

.card + .card { margin-top: -1px; }

.section-label {
  font-size: 0.78rem;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

/* Forms ------------------------------------------------------------------ */

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.field .hint {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 4px;
}

.field-row {
  display: flex;
  gap: 16px;
}
.field-row > .field { flex: 1; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

textarea { resize: vertical; min-height: 90px; }

input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.checkbox-row input { width: auto; margin-top: 3px; }
.checkbox-row label { font-weight: 400; margin: 0; }

.file-input {
  border: 1px dashed var(--border-strong);
  padding: 12px;
  background: var(--surface-recessed);
  font-size: 0.85rem;
}

/* Buttons ------------------------------------------------------------- */

button, .btn {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background: var(--forest);
  color: #fff;
}
.btn-primary:hover { background: var(--forest-dark); }
.btn-primary:disabled { background: var(--ink-faint); cursor: not-allowed; }

.btn-secondary {
  background: transparent;
  color: var(--forest);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--forest-tint); }

.btn-alert {
  background: transparent;
  color: var(--alert);
  border-color: var(--alert);
}
.btn-alert:hover { background: var(--alert-tint); }

.btn-small { padding: 6px 12px; font-size: 0.82rem; }

/* Badges / status -------------------------------------------------------- */

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 999px;
}

.badge--pending { background: var(--brass-tint); color: #7A5D1D; }
.badge--approved { background: var(--forest-tint); color: var(--forest-dark); }
.badge--rejected { background: var(--alert-tint); color: var(--alert); }

/* Notices ------------------------------------------------------------ */

.notice {
  padding: 14px 16px;
  border-left: 3px solid var(--forest);
  background: var(--forest-tint);
  color: var(--forest-dark);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.notice--warn {
  border-left-color: var(--brass);
  background: var(--brass-tint);
  color: #6B4E15;
}

.notice--error {
  border-left-color: var(--alert);
  background: var(--alert-tint);
  color: var(--alert);
}

/* Tables / lists -------------------------------------------------------- */

.request-item {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 20px;
  margin-bottom: 12px;
}

.request-item__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.request-item__title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--forest-dark);
}

.request-item__meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 2px 0 12px 0;
}

.request-item__meta div { margin-bottom: 2px; }

.request-item__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-faint);
  border: 1px dashed var(--border-strong);
  font-size: 0.9rem;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.tab {
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-faint);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab.is-active {
  color: var(--forest-dark);
  border-bottom-color: var(--brass);
}

.capacity-line {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

.capacity-bar {
  height: 4px;
  background: var(--surface-recessed);
  margin-top: 6px;
  overflow: hidden;
}
.capacity-bar__fill {
  height: 100%;
  background: var(--forest);
}
.capacity-bar__fill.is-full { background: var(--alert); }

.link-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--surface-recessed);
  border: 1px solid var(--border);
  padding: 10px 12px;
  font-size: 0.85rem;
  word-break: break-all;
}

.spinner-text {
  color: var(--ink-faint);
  font-size: 0.85rem;
  padding: 20px 0;
}

@media (max-width: 520px) {
  .field-row { flex-direction: column; gap: 0; }
  .request-item__top { flex-direction: column; }
}
