/* ============================================================
   Elsham Seniors Golf — stylesheet
   Palette: fairway greens, warm sand, clean neutrals
   ============================================================ */
:root {
  --green-900: #0f3d2e;
  --green-700: #16624a;
  --green-600: #1c7a5c;
  --green-500: #23916d;
  --sand: #e9dcc3;
  --sand-dark: #cdb98f;
  --ink: #1c2621;
  --muted: #5f6b64;
  --line: #e2e6e3;
  --bg: #f6f8f6;
  --card: #ffffff;
  --danger: #b3341f;
  --danger-bg: #fbe9e6;
  --ok-bg: #e6f4ec;
  --ok-ink: #12603f;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 2px 8px rgba(15, 61, 46, 0.07), 0 8px 30px rgba(15, 61, 46, 0.06);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
.container { width: min(1120px, 92%); margin: 0 auto; }
.section { padding: 3.2rem 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.sr-only, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto;
  background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 200;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(160%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand-logo { border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.05rem; color: var(--green-900); }
.brand-text small { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }

.primary-nav { margin-left: auto; display: flex; align-items: center; gap: 0.35rem; }
.primary-nav a, .nav-dropdown-toggle {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem;
  padding: 0.5rem 0.7rem; border-radius: 8px; background: none; border: 0; cursor: pointer;
  font-family: inherit;
}
.primary-nav a:hover, .nav-dropdown-toggle:hover { background: var(--ok-bg); color: var(--green-900); }
.primary-nav a[aria-current="page"] { color: var(--green-700); background: var(--ok-bg); }
.nav-admin { background: var(--green-700); color: #fff !important; }
.nav-admin:hover { background: var(--green-900); }
.nav-cta { background: var(--sand); color: var(--green-900) !important; font-weight: 700; }
.nav-cta:hover { background: var(--sand-dark); }

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 0.4rem; display: none; flex-direction: column;
}
.nav-dropdown-menu a { display: block; }
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu { display: flex; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-toggle span { width: 26px; height: 3px; background: var(--green-900); border-radius: 3px; transition: 0.2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(120% 80% at 80% -10%, rgba(255,255,255,0.16), transparent 60%),
    linear-gradient(160deg, var(--green-700) 0%, var(--green-900) 70%);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 46%;
  background: linear-gradient(180deg, transparent, rgba(35,145,109,0.35)),
    repeating-linear-gradient(95deg, rgba(255,255,255,0.05) 0 22px, transparent 22px 44px);
  clip-path: polygon(0 45%, 100% 12%, 100% 100%, 0 100%);
  opacity: 0.6;
}
.hero-photo { background-size: cover; background-position: center; }
.hero-photo::after { display: none; }
.hero-content { position: relative; z-index: 2; padding: 4.6rem 0 5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.8rem; color: var(--sand); margin: 0 0 0.6rem; font-weight: 700; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 1rem; }
.hero h1 span { color: var(--sand); }
.hero-sub { font-size: 1.15rem; max-width: 46ch; color: rgba(255,255,255,0.9); }
.hero-actions { margin-top: 1.8rem; display: flex; gap: 0.8rem; flex-wrap: wrap; }
.weather { margin-top: 1.4rem; display: inline-flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); padding: 0.5rem 0.9rem; border-radius: 999px; backdrop-filter: blur(4px); }
.weather-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--sand); font-weight: 700; }
.weather-vals { display: inline-flex; gap: 0.9rem; flex-wrap: wrap; }
.weather-item { font-weight: 600; font-size: 0.98rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: 0.95rem; padding: 0.7rem 1.25rem; border-radius: 999px;
  border: 1.5px solid var(--green-700); background: #fff; color: var(--green-700);
  transition: transform 0.06s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-900); border-color: var(--green-900); }
/* Default ghost button suits light backgrounds (sections, admin). */
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { background: var(--ok-bg); }
/* On the dark hero it needs to be a light outline so it stays readable. */
.hero .btn-ghost { border-color: rgba(255,255,255,0.7); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255,255,255,0.14); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-small { padding: 0.4rem 0.8rem; font-size: 0.82rem; }
.btn-danger { border-color: var(--danger); color: var(--danger); background: #fff; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* ---------- Sections / cards ---------- */
.section-head, .page-head { margin-bottom: 1.6rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 0.3rem; color: var(--green-900); }
.link-more { font-weight: 700; text-decoration: none; }
.prose { max-width: 70ch; }
.prose p { margin: 0 0 1rem; }
.welcome { font-size: 1.08rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.1s ease; }
.card:hover { transform: translateY(-3px); }
.card-media { display: block; aspect-ratio: 16/10; background: var(--ok-bg); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 3rem; }
.card-body { padding: 1rem 1.15rem 1.3rem; }
.card-body h3 { margin: 0.2rem 0 0.3rem; font-size: 1.12rem; }
.card-body h3 a { text-decoration: none; color: var(--green-900); }
.card-date { color: var(--muted); font-size: 0.82rem; margin: 0; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- News list ---------- */
.news-list { display: flex; flex-direction: column; gap: 1.4rem; max-width: 860px; }
.news-row { display: grid; grid-template-columns: 220px 1fr; gap: 1.3rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.news-row:only-child, .news-row { align-items: stretch; }
.news-row-media { display: block; }
.news-row-media img { width: 100%; height: 100%; object-fit: cover; min-height: 150px; }
.news-row-body { padding: 1.2rem 1.4rem; }
.news-row-body h2 { margin: 0.2rem 0 0.5rem; font-size: 1.3rem; }
.news-row-body h2 a { text-decoration: none; color: var(--green-900); }
.news-excerpt { color: var(--muted); margin: 0 0 0.7rem; }

/* ---------- Article ---------- */
.article { max-width: 780px; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--green-900); margin: 0.3rem 0 1rem; }
.article-figure { margin: 0 0 1.6rem; border-radius: var(--radius); overflow: hidden; }
.article-body { font-size: 1.08rem; white-space: pre-wrap; }
.back-link { margin-top: 2rem; }

/* ---------- Documents ---------- */
.doc-group-head { font-size: 1.05rem; color: var(--green-900); margin: 1.6rem 0 0.6rem; padding-bottom: 0.3rem; border-bottom: 2px solid var(--ok-bg); max-width: 780px; }
.doc-list { list-style: none; padding: 0; margin: 0; max-width: 780px; display: flex; flex-direction: column; gap: 0.6rem; }
.tag-form { gap: 0.4rem; align-items: center; }
.tag-form select { width: auto; padding: 0.3rem 0.5rem; }
.doc-item { display: flex; align-items: center; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.85rem 1.1rem; }
.doc-icon { font-size: 1.5rem; }
.doc-meta { display: flex; flex-direction: column; margin-right: auto; }
.doc-title { font-weight: 700; text-decoration: none; }
.doc-date { color: var(--muted); font-size: 0.8rem; }

/* ---------- Fixtures / diary ---------- */
.fixtures-subscribe { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; background: var(--ok-bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.8rem 1rem; margin-bottom: 1.4rem; max-width: 780px; }
.fixtures-subscribe .field-hint { margin: 0; }
.fixtures-subscribe code { background: #fff; padding: 0.1rem 0.35rem; border-radius: 5px; font-size: 0.82rem; word-break: break-all; }
.fixtures { max-width: 780px; margin-bottom: 1.5rem; }
.fixtures-month { font-size: 1.05rem; color: var(--green-900); margin: 1.4rem 0 0.5rem; padding-bottom: 0.3rem; border-bottom: 2px solid var(--ok-bg); }
.fixture-row { display: flex; align-items: center; gap: 1rem; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); }
.fixture-highlight { background: var(--ok-bg); border-radius: var(--radius-sm); padding-left: 0.7rem; padding-right: 0.7rem; }
.fixture-date { display: inline-flex; align-items: baseline; gap: 0.35rem; min-width: 92px; color: var(--green-700); font-weight: 700; }
.fixture-dow { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; }
.fixture-day { font-size: 1.15rem; }
.fixture-mon { font-size: 0.85rem; text-transform: uppercase; }
.fixture-title { flex: 1; }
.fixture-cal { text-decoration: none; font-size: 1rem; opacity: 0.55; padding: 0 0.2rem; }
.fixture-cal:hover { opacity: 1; }
.fixture-loc { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.2rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.loc-home { background: var(--ok-bg); color: var(--ok-ink); }
.loc-away { background: #eef2f7; color: #3a5573; }
.loc-homeaway { background: #f3edff; color: #5b3a86; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gallery-item { margin: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.gallery-item img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.gallery-item figcaption { padding: 0.6rem 0.8rem; font-size: 0.9rem; color: var(--muted); }
.gallery-item img.zoomable { cursor: zoom-in; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(15,26,21,0.9); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.lightbox figcaption { color: #fff; margin-top: 0.8rem; text-align: center; font-size: 0.95rem; }
.lightbox-close { position: absolute; top: 1rem; right: 1.2rem; background: rgba(255,255,255,0.15); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; }
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* ---------- Contacts (public) ---------- */
.unlock-card { max-width: 440px; margin: 1rem auto 2rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.2rem; text-align: center; box-shadow: var(--shadow); }
.unlock-icon { font-size: 2.4rem; }
.unlock-form { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1rem; }
.contacts-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: 1rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table thead th { background: var(--green-900); color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; }
.data-table tbody tr:last-child td, .data-table tbody tr:last-child td { border-bottom: 0; }
.data-table a { color: var(--green-700); }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.92rem; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=file], textarea, select {
  width: 100%; font-family: inherit; font-size: 1rem; padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--green-500); outline-offset: 1px; border-color: var(--green-500); }
textarea { resize: vertical; }
.field-hint { font-size: 0.85rem; color: var(--muted); margin: 0.35rem 0 0.2rem; }
.checkbox { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.checkbox input { width: auto; }
.form-actions { display: flex; gap: 0.7rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.inline { display: inline; }
.inline-form { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }
.preview-img { margin-top: 0.6rem; max-height: 240px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.preview-hidden { display: none; }

/* ---------- Alerts ---------- */
.alert { padding: 0.8rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; font-weight: 600; }
.alert-success { background: var(--ok-bg); color: var(--ok-ink); }
.alert-error { background: var(--danger-bg); color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: #cfe3d9; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; padding: 2.6rem 0 1.6rem; }
.site-footer a { color: #fff; }
.site-footer strong { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding: 1rem 0; color: #9fbcae; }

/* ============================================================
   Admin
   ============================================================ */
.admin { background: #eef1ee; }
.admin-topbar { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 1rem; background: var(--green-900); color: #fff; padding: 0.7rem 1.2rem; }
.admin-brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; }
.admin-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 1.2rem; }
.admin-topbar-right a { color: #cfe3d9; text-decoration: none; font-size: 0.9rem; }
.linkbtn { background: none; border: 0; color: #cfe3d9; cursor: pointer; font: inherit; font-size: 0.9rem; }
.linkbtn:hover, .admin-topbar-right a:hover { color: #fff; }

.admin-shell { display: grid; grid-template-columns: 220px 1fr; align-items: start; min-height: calc(100vh - 56px); }
.admin-nav { position: sticky; top: 56px; display: flex; flex-direction: column; padding: 1.2rem 0.8rem; gap: 0.2rem; background: #fff; border-right: 1px solid var(--line); min-height: calc(100vh - 56px); }
.admin-nav a { text-decoration: none; color: var(--ink); padding: 0.6rem 0.9rem; border-radius: var(--radius-sm); font-weight: 600; }
.admin-nav a:hover { background: var(--ok-bg); }
.admin-nav a.active { background: var(--green-700); color: #fff; }
.admin-main { padding: 1.8rem clamp(1rem, 3vw, 2.4rem); max-width: 1000px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.admin-head h1 { margin: 0; color: var(--green-900); font-size: 1.7rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.2rem; }
.stat-card:hover { border-color: var(--green-500); }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--green-700); }
.stat-label { color: var(--muted); font-size: 0.9rem; }
.quick-actions h2, .list-heading { font-size: 1.15rem; color: var(--green-900); margin: 1.6rem 0 0.8rem; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.6rem; }
.form-card h2 { margin-top: 0; font-size: 1.2rem; color: var(--green-900); }
.form-card label { margin-top: 0.8rem; }
.form-card > label:first-of-type { margin-top: 0; }
.stack-form label { margin-top: 0.8rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem 1rem; }
.contact-grid .span-2 { grid-column: 1 / -1; }
.contact-grid label { margin: 0 0 0.25rem; }

.admin-table td { vertical-align: middle; }
.thumb-cell { width: 64px; }
.thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.thumb-empty { display: flex; align-items: center; justify-content: center; background: var(--ok-bg); font-size: 1.4rem; }
.actions-col, .actions-cell { white-space: nowrap; text-align: right; }
.actions-cell form { margin-left: 0.3rem; }
.badge { font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; }
.badge-on { background: var(--ok-bg); color: var(--ok-ink); }
.badge-off { background: #efe4e2; color: var(--danger); }

.contact-cards { display: flex; flex-direction: column; gap: 1rem; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.6rem; }
.contact-card .contact-grid { margin: 0; }

.disclosure { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.4rem 1.2rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.disclosure summary { cursor: pointer; font-weight: 700; padding: 0.7rem 0; color: var(--green-900); }
.disclosure-body { padding-bottom: 1rem; }

.admin-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.admin-gallery-item { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.admin-gallery-item img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.admin-gallery-item figcaption { padding: 0.4rem 0.6rem; font-size: 0.82rem; color: var(--muted); }
.admin-gallery-item form { padding: 0.5rem 0.6rem 0.7rem; }

.current-photo { margin-bottom: 0.6rem; }
.toggle-published { margin-top: 1rem; }
.link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.link-list li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.link-list a { font-weight: 700; text-decoration: none; }

/* ---------- Login page ---------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--green-700), var(--green-900)); padding: 1.5rem; }
.login-card { background: #fff; border-radius: var(--radius); padding: 2.4rem; width: min(400px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,0.25); text-align: center; }
.login-logo { font-size: 2.6rem; }
.login-card h1 { margin: 0.4rem 0 0; color: var(--green-900); }
.login-card form { text-align: left; margin-top: 1.4rem; }
.login-card label { margin-top: 0.8rem; }
.login-card .btn { margin-top: 1.2rem; }
.login-back { margin-top: 1.2rem; font-size: 0.9rem; }
.login-back a { text-decoration: none; }

/* ---------- Members / applications (admin) ---------- */
.pending-banner { display: block; background: #fff4d6; border: 1px solid #e8c766; color: #7a5a00; padding: 0.9rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.4rem; text-decoration: none; font-weight: 600; }
.pending-banner:hover { background: #ffedb8; }
.stat-alert { border-color: #e8c766; background: #fff8e6; }
.stat-alert .stat-num { color: #b3341f; }
.badge-pending { background: #fff4d6; color: #7a5a00; }
.pending-card { border-left: 4px solid #e8c766; }
.applicant-details h3 { margin: 0 0 0.6rem; font-size: 1.1rem; display: flex; align-items: center; gap: 0.6rem; }
.applicant-dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0 0 0.8rem; font-size: 0.92rem; }
.applicant-dl dt { color: var(--muted); font-weight: 600; }
.applicant-dl dd { margin: 0; }
.pending-actions { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 0.9rem; }
.approve-form { display: flex; align-items: flex-end; gap: 0.6rem; flex-wrap: wrap; }
.inline-label { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.inline-label input { display: block; margin-top: 0.2rem; }
.card-actions-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.2rem; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }

/* ---------- Apply form (public) ---------- */
.apply-section { max-width: 780px; }
.apply-form .contact-grid { margin-top: 0.3rem; }
.apply-fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; margin: 1rem 0; }
.apply-fieldset legend { font-weight: 600; padding: 0 0.4rem; }
.apply-fieldset .checkbox { margin: 0.3rem 0; }
.apply-thankyou { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.4rem; text-align: center; box-shadow: var(--shadow); max-width: 560px; }
.apply-thankyou-icon { font-size: 2.6rem; }
/* Honeypot: hidden from people */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 0.6rem; gap: 0.15rem;
    display: none; box-shadow: var(--shadow);
  }
  .primary-nav.open { display: flex; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: 0; padding-left: 1rem; }
  .nav-dropdown-toggle { text-align: left; width: 100%; }

  .news-row { grid-template-columns: 1fr; }
  .news-row-media img { min-height: 180px; }

  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav {
    position: static; min-height: 0; flex-direction: row; overflow-x: auto; border-right: 0;
    border-bottom: 1px solid var(--line); display: none;
  }
  .admin-nav.open { display: flex; }
  .admin-nav-toggle { display: flex; }
  .admin-nav-toggle span { background: #fff; }

  /* Stacked responsive tables */
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { border-bottom: 2px solid var(--line); padding: 0.4rem 0; }
  .data-table td { border: 0; padding: 0.35rem 1rem; }
  .data-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; color: var(--muted); }
  .actions-cell { text-align: left; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (min-width: 861px) { .admin-nav-toggle { display: none; } }
