/*
 * =============================================================================
 * CBO Engage | Unified Stylesheet
 * Covers: Public landing page (index.html) and all authenticated platform pages
 * =============================================================================
 * Copyright (c) 2026 Carrington Consulting (Pty) Ltd. All rights reserved.
 * Platform sponsored by EstateIQ, a division of Carrington Consulting (Pty) Ltd.
 * Made available to Community Business Owners (Pty) Ltd under a
 * sponsored right-of-use arrangement.
 * =============================================================================
 */


/* =============================================================================
   1. VARIABLES
   ============================================================================= */

:root {
  /* Brand colours */
  --teal:   #006986;
  --teal-d: #0a4f5a;
  --blue:   #4cb5f6;
  --lime:   #b3bf1d;
  --orange: #feb339;
  --black:  #201e1e;
  --white:  #fefefe;
  --grey:   #f2f4f5;
  --mid:    #6b8a90;

  /* Typography */
  --font: 'Montserrat', sans-serif;

  /* Layout */
  --r:      10px;
  --shadow: 0 4px 24px rgba(15,107,120,0.13);

  /* Platform layout */
  --nav-height: 70px;
  --content-max: 1440px;
  --content-pad: 0 5%;
}


/* =============================================================================
   2. RESET
   ============================================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
}

ul {
  list-style: none;
}


/* =============================================================================
   3. TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.2;
  color: var(--black);
}

p {
  line-height: 1.7;
}


/* =============================================================================
   4. BUTTONS
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  padding: 13px 28px;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .02em;
}

.btn-primary {
  background: var(--orange);
  color: var(--black);
}
.btn-primary:hover {
  background: #e8a030;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254,179,58,.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--teal);
}

.btn-teal {
  background: var(--teal);
  color: var(--white);
}
.btn-teal:hover {
  background: var(--teal-d);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--black);
  color: var(--white);
}
.btn-dark:hover {
  background: #1a1919;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
}
.btn-ghost:hover {
  background: var(--teal);
  color: var(--white);
}

.btn-warning {
  background: #f5a623;
  color: #2c2a2b;
}
.btn-warning:hover {
  background: #e09510;
  transform: translateY(-2px);
}

.btn-danger {
  background: #d94f3d;
  color: var(--white);
  opacity: .45;
}
.btn-danger:hover {
  background: #b83c2c;
  opacity: 1;
  transform: translateY(-2px);
}

.btn-yellow {
  background: var(--orange);
  color: var(--black);
  opacity: .45;
}
.btn-yellow:hover {
  background: #e8a030;
  opacity: 1;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 12px;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}


/* =============================================================================
   5. FORMS
   ============================================================================= */

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mid);
  margin-bottom: 5px;
  letter-spacing: .04em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d0dfe2;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--black);
  background: var(--grey);
  transition: border-color .2s, background .2s;
  resize: none;
  outline: none;
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--teal);
  background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9ab4ba;
}

.form-group .field-hint {
  font-size: 11px;
  color: var(--mid);
  margin-top: 4px;
}

.char-count {
  float: right;
  font-size: 11px;
  color: var(--mid);
  font-weight: 600;
}

.form-group .field-error {
  font-size: 11px;
  color: #d94f3d;
  margin-top: 4px;
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
  border-color: #d94f3d;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--teal);
  flex-shrink: 0;
}

/* Reset checkboxes and radio buttons inside form-group to prevent
   the global .form-group input rule from stretching them. */
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  appearance: auto;
  accent-color: var(--teal);
  flex-shrink: 0;
}

/* Radio group — document type selector on registration */
.radio-group {
  display: flex;
  gap: 24px;
  margin-top: 4px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  cursor: pointer;
}

.radio-option input[type="radio"] {
  margin: 0;
}

/* Teal accent for pill-style checkbox labels (Services Offered, etc.) */
input[type="checkbox"] {
  accent-color: var(--teal);
}

.form-check label {
  font-size: 13px;
  color: var(--black);
  font-weight: 500;
  margin-bottom: 0;
  letter-spacing: 0;
}

.form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 24px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid #d0dfe2;
}


/* =============================================================================
   6. SECTION UTILITIES  (public and platform shared)
   ============================================================================= */

section {
  scroll-margin-top: var(--nav-height);
}

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--teal);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: #4a6a70;
  max-width: 600px;
}

.section-center {
  text-align: center;
}

.section-center .section-sub {
  margin: 0 auto;
}

.pad {
  padding: 80px 5%;
}


/* =============================================================================
   7. SCROLL ANIMATION
   ============================================================================= */

.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* =============================================================================
   8. PUBLIC NAV  (index.html)
   ============================================================================= */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 2px solid var(--blue);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  box-shadow: 0 2px 12px rgba(15,107,120,.08);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand img {
  width: 46px;
  height: 46px;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-brand-text strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: .04em;
}

.nav-brand-text span {
  font-size: 10px;
  font-weight: 500;
  color: var(--mid);
  letter-spacing: .06em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.nav-cta {
  background: var(--orange);
  color: var(--black);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--r);
  transition: background .2s, transform .15s;
  white-space: nowrap;
}

.nav-cta:hover {
  background: #e8a030;
  transform: translateY(-1px);
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
  transition: .3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--white);
  padding: 20px 5%;
  z-index: 999;
  border-bottom: 2px solid var(--blue);
  box-shadow: 0 8px 20px rgba(0,0,0,.1);
  flex-direction: column;
  gap: 16px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  padding: 8px 0;
  border-bottom: 1px solid #e8eff0;
}


/* =============================================================================
   9. PUBLIC PAGE SECTIONS
   ============================================================================= */

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--teal-d) 0%, var(--teal) 60%, #1a8a9a 100%);
  padding: 90px 5% 120px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -80px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(70,172,232,.12);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(254,179,58,.08);
  pointer-events: none;
}

.hero-inner {
  max-width: 700px;
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: .06em;
  margin-bottom: 24px;
}

.hero-tag::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.12;
  margin-bottom: 22px;
  letter-spacing: -.01em;
}

.hero h1 em {
  font-style: normal;
  color: var(--orange);
}

.hero-sub {
  font-size: 17px;
  font-weight: 400;
  color: rgba(255,255,255,.82);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  overflow: hidden;
}

.hero-wave svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Stats bar ── */
.stats-bar {
  background: var(--white);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
}

.stat-item {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px;
  border-right: 1px solid #e0ecee;
  text-align: center;
}

.stat-item:last-child {
  border-right: none;
}

.stat-num {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  color: inherit;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.stat-num sup {
  font-size: 60%;
  font-weight: 700;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mid);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ── Countdown ── */
.countdown-section {
  background: linear-gradient(90deg, var(--teal-d), var(--teal));
  padding: 50px 5%;
}

.countdown-inner {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.countdown-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.countdown-grid-row:last-child {
  border-bottom: none;
}

.countdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 28px 24px;
  border-right: 1px solid rgba(255,255,255,.12);
  min-width: 0;
}

.countdown-row:last-child {
  border-right: none;
}

.countdown-text {
  color: var(--white);
  flex-shrink: 1;
  min-width: 0;
  max-width: 200px;
}

.countdown-text .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}

.countdown-text h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--white);
}

.countdown-text p {
  font-size: 13px;
  color: rgba(255,255,255,.65);
}

.countdown-tbc {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  font-style: italic;
}

.countdown-row .btn {
  font-size: 12px;
  padding: 8px 16px;
  white-space: nowrap;
  flex-shrink: 0;
}

.countdown-timer {
  display: flex;
  gap: 12px;
  align-items: center;
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,.1);
  border-radius: 6px;
  padding: 6px 8px;
  min-width: 36px;
  border: 1px solid rgba(255,255,255,.15);
}

.time-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.time-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
}

.time-sep {
  font-size: 18px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
  padding-bottom: 10px;
}

/* ── About / 3 E's ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-body {
  font-size: 15px;
  line-height: 1.75;
  color: #4a6a70;
  margin: 16px 0 28px;
}

.three-e {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.e-card {
  background: var(--white);
  border-radius: var(--r);
  padding: 20px 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--blue);
  transition: transform .2s, box-shadow .2s;
}

.e-card:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 28px rgba(15,107,120,.16);
}

.e-card:nth-child(2) { border-color: var(--lime); }
.e-card:nth-child(3) { border-color: var(--orange); }

.e-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.e-card:nth-child(1) .e-icon { background: rgba(70,172,232,.15); }
.e-card:nth-child(2) .e-icon { background: rgba(179,191,33,.15); }
.e-card:nth-child(3) .e-icon { background: rgba(254,179,58,.15); }

.e-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 4px;
}

.e-content p {
  font-size: 13px;
  line-height: 1.6;
  color: #6b8a90;
}

/* ── Events ── */
.events-section {
  background: var(--grey);
}

.events-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 40px;
}

.events-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.event-card {
  background: var(--white);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(15,107,120,.18);
}

.event-header {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.event-type-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
}

.tag-chapter { background: rgba(70,172,232,.15); color: #1a7ab0; }
.tag-annual  { background: rgba(254,179,58,.2);  color: #b07010; }
.tag-empowher { background: rgba(179,191,33,.2); color: #6a7010; }

.event-date-block {
  text-align: right;
  font-weight: 700;
}

.event-date-block .month {
  font-size: 10px;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.event-date-block .day {
  font-size: 28px;
  color: var(--teal);
  line-height: 1;
}

.event-date-block .year {
  font-size: 10px;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 2px;
}

.event-body {
  padding: 0 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.event-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.event-meta {
  font-size: 12px;
  color: var(--mid);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.event-meta::before {
  content: '📍';
  font-size: 11px;
}

.event-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #6b8a90;
  flex: 1;
  margin-bottom: 18px;
}

.event-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.event-spots {
  font-size: 12px;
  color: var(--mid);
  font-weight: 600;
}

.event-spots.low {
  color: #e05a2b;
}

/* ── Directory teaser ── */
.directory-section {
  background: var(--teal);
}

.directory-section .section-title {
  color: var(--white);
}

.directory-section .section-sub {
  color: rgba(255,255,255,.75);
}

.dir-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 60px 0 28px;
  position: relative;
}

.dir-teaser-card {
  background: rgba(255,255,255,.12);
  border-radius: var(--r);
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.18);
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

.dir-teaser-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 10px;
  background: rgba(255,255,255,.25);
}

.dir-teaser-card .name {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.dir-teaser-card .biz {
  font-size: 11px;
  color: rgba(255,255,255,.65);
  margin-bottom: 8px;
}

.dir-teaser-card .cat {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(70,172,232,.3);
  color: var(--white);
  display: inline-block;
}

.dir-unlock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(15,79,90,.55);
  border-radius: var(--r);
  backdrop-filter: blur(2px);
  z-index: 2;
}

.dir-unlock .lock {
  font-size: 32px;
  margin-top: 0px;
}

.dir-unlock p {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  text-align: center;
  line-height: 1.4;
  max-width: 340px;
}

/* ── Equip ── */
.equip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.equip-col h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.equip-col h3 .badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
}

.badge-edu { background: rgba(179,191,33,.2); color: #6a7010; }
.badge-fin { background: rgba(70,172,232,.2); color: #1a5a90; }

.equip-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.equip-card {
  background: var(--grey);
  border-radius: var(--r);
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: box-shadow .2s;
  cursor: default;
}

.equip-card:hover {
  box-shadow: var(--shadow);
  background: var(--white);
}

.equip-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.equip-icon.edu { background: rgba(179,191,33,.18); }
.equip-icon.fin { background: rgba(70,172,232,.18); }

.equip-card-body h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 3px;
}

.equip-card-body p {
  font-size: 12px;
  line-height: 1.5;
  color: #6b8a90;
}

.equip-coming {
  margin-top: 8px;
  font-size: 12px;
  color: var(--mid);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 6px;
}

.equip-coming::before {
  content: '⏳';
  font-style: normal;
}

/* ── Join CTA ── */
.join-section {
  background: linear-gradient(135deg, var(--orange) 0%, #f5a020 100%);
  text-align: center;
  padding: 80px 5%;
}

.join-section h2 {
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 800;
  color: var(--black);
  margin-bottom: 14px;
}

.join-section p {
  font-size: 17px;
  color: rgba(44,42,43,.75);
  margin-bottom: 34px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.join-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Contact ── */
.contact-section {
  background: var(--grey);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin-top: 40px;
}

.contact-item {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
  align-items: flex-start;
}

.contact-ico {
  width: 42px;
  height: 42px;
  background: var(--teal);
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.contact-item h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 3px;
}

.contact-item p {
  font-size: 14px;
  color: var(--black);
}

.contact-form {
  background: var(--white);
  border-radius: var(--r);
  padding: 32px;
  box-shadow: var(--shadow);
}

.contact-form h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 20px;
}

.contact-form a {
  color: var(--teal);
  text-decoration: underline;
}

.contact-form a:hover {
  color: var(--teal-d);
}

.contact-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 18px;
}

.contact-alert--success {
  background: rgba(179,191,33,.12);
  border: 1.5px solid rgba(179,191,33,.35);
  color: #4a5a08;
}

.contact-alert--error {
  background: rgba(217,79,61,.08);
  border: 1.5px solid rgba(217,79,61,.3);
  color: #9a2a1e;
}

/* ── Public footer ── */
footer {
  background: var(--teal-d);
  color: var(--white);
  padding: 48px 5% 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand img {
  width: 52px;
  height: 52px;
}

.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  max-width: 260px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,.7);
  margin-bottom: 8px;
  transition: color .2s;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(255,255,255,.5);
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #fefefe;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .2s;
  padding: 4px;
  box-sizing: border-box;
}

.footer-social a img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.footer-social a:hover {
  opacity: 0.8;
}

.footer-social a.social-x {
  padding: 6px;
}

.footer-sponsor img {
  height: 68px;
  width: auto;
}

/* =============================================================================
   10. PLATFORM NAV  (authenticated pages via header.php)
   ============================================================================= */

.platform-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 2px solid var(--blue);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  box-shadow: 0 2px 12px rgba(15,107,120,.08);
}

.platform-nav .nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform-nav .nav-brand img {
  width: 46px;
  height: 46px;
}

.platform-nav .nav-brand-text strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: .04em;
}

.platform-nav .nav-brand-text span {
  font-size: 10px;
  font-weight: 500;
  color: var(--mid);
  letter-spacing: .06em;
}

/* Platform nav: centre links */
.platform-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.platform-nav-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}

.platform-nav-links a:hover {
  background: var(--grey);
  color: var(--teal);
}

.platform-nav-links a.active {
  background: rgba(15,107,120,.08);
  color: var(--teal);
  font-weight: 700;
}

/* Platform nav: right-hand user area */
.nav-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.nav-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
}

.nav-user-role {
  font-size: 10px;
  font-weight: 600;
  color: var(--mid);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.nav-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blue);
  flex-shrink: 0;
  background: var(--grey);
}

.nav-avatar-svg {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  flex-shrink: 0;
  background: var(--grey);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mid);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background .2s;
}

.nav-dropdown-toggle:hover {
  background: var(--grey);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--white);
  border: 1.5px solid #d0dfe2;
  border-radius: var(--r);
  box-shadow: 0 8px 28px rgba(15,107,120,.13);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
}

.nav-dropdown-menu.open {
  display: block;
}

.nav-dropdown-menu a,
.nav-dropdown-menu button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  transition: background .15s, color .15s;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu button:hover {
  background: var(--grey);
  color: var(--teal);
}

.nav-dropdown-menu .menu-divider {
  height: 1px;
  background: #e0ecee;
  margin: 4px 0;
}

.nav-dropdown-menu .menu-logout {
  color: #d94f3d;
}

.nav-dropdown-menu .menu-logout:hover {
  background: rgba(217,79,61,.06);
  color: #d94f3d;
}

/* Hide nav buttons on mobile — they move into the burger menu */
.nav-desktop-only {
  display: inline-flex;
}

@media (max-width: 900px) {
  .nav-desktop-only { display: none !important; }
}

/* Platform mobile hamburger */
.platform-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.platform-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
  transition: .3s;
}

.platform-mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--white);
  padding: 20px 5%;
  z-index: 999;
  border-bottom: 2px solid var(--blue);
  box-shadow: 0 8px 20px rgba(0,0,0,.1);
  flex-direction: column;
  gap: 0;
}

.platform-mobile-menu.open {
  display: flex;
}

.platform-mobile-menu a {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  padding: 12px 0;
  border-bottom: 1px solid #e8eff0;
  text-decoration: none;
}

.platform-mobile-menu a:last-child {
  border-bottom: none;
}

.platform-mobile-menu__logout {
  color: #c0392b !important;
}

.platform-mobile-menu__user {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 14px;
  border-bottom: 2px solid #e8eff0;
  margin-bottom: 4px;
}

.platform-mobile-menu__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--charcoal);
}

.platform-mobile-menu__role {
  font-size: 10px;
  font-weight: 600;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: .04em;
}


/* =============================================================================
   11. PLATFORM LAYOUT SHELL
   ============================================================================= */

.platform-body {
  background: var(--grey);
  min-height: calc(100vh - var(--nav-height));
}

.platform-main {
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  padding: 32px 40px 60px;
  min-height: calc(100vh - var(--nav-height));
}

/* Page header: title + optional action button */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-header-text h1 {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 800;
  color: var(--black);
  line-height: 1.2;
}

.page-header-text p {
  font-size: 14px;
  color: var(--mid);
  margin-top: 4px;
}

.page-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--mid);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--teal);
  font-weight: 600;
  transition: color .2s;
}

.breadcrumb a:hover {
  color: var(--teal-d);
}

.breadcrumb-sep {
  color: #c0d4d8;
}

.breadcrumb-current {
  font-weight: 600;
  color: var(--black);
}

/* Platform footer */
.platform-footer {
  background: var(--teal-d);
  color: rgba(255,255,255,.55);
  padding: 20px 5%;
  text-align: center;
  font-size: 12px;
  position: relative;
}

.platform-footer__eiq {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  height: 50px;
  width: auto;
  opacity: 1;
}

@media (max-width: 900px) {
  .platform-footer {
    padding: 20px 16px 16px;
    font-size: 10px;
  }
  .platform-footer__eiq {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    display: block;
    margin: 12px auto 0;
    height: 28px;
  }
}

@media (max-width: 600px) {
  .platform-footer {
    font-size: 8px;
  }
}

.platform-footer a {
  color: rgba(255,255,255,.7);
  transition: color .2s;
}

.platform-footer a:hover {
  color: var(--white);
}

.platform-footer .sponsor-credit {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255,255,255,.4);

}


/* =============================================================================
   12. FLASH MESSAGES
   ============================================================================= */

.flash {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.flash-success {
  background: rgba(179,191,33,.12);
  border: 1.5px solid rgba(179,191,33,.35);
  color: #4a5a08;
}

.flash-error {
  background: rgba(217,79,61,.08);
  border: 1.5px solid rgba(217,79,61,.3);
  color: #9a2a1e;
}

.flash-warning {
  background: rgba(254,179,58,.1);
  border: 1.5px solid rgba(254,179,58,.4);
  color: #7a5008;
}

.flash-info {
  background: rgba(70,172,232,.1);
  border: 1.5px solid rgba(70,172,232,.35);
  color: #0a4a70;
}

/* =============================================================================
   FLASH TOAST (fixed position, auto-dismiss)
   ============================================================================= */

@keyframes flash-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 480px) {
  @keyframes flash-toast-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

.flash-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  width: calc(100% - 48px);
  max-width: 420px;
  background: var(--white);
  border-radius: var(--r);
  box-shadow: 0 8px 32px rgba(0,0,0,.16);
  padding: 18px 44px 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: flash-toast-in .25s ease both;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.flash-toast--success { border-left: 4px solid #b3bf21; color: #4a5a08; }
.flash-toast--error   { border-left: 4px solid #d94f3d; color: #9a2a1e; }
.flash-toast--warning { border-left: 4px solid #feb33a; color: #7a5008; }
.flash-toast--info    { border-left: 4px solid #46ace8; color: #0a4a70; }

.flash-toast__icon {
  flex-shrink: 0;
  font-size: 18px;
  margin-top: 1px;
}

.flash-toast__body {
  flex: 1;
}

.flash-toast__title {
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 3px;
  color: var(--black);
}

.flash-toast__message {
  margin: 0;
  font-size: 13px;
}

.flash-toast__close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--mid);
  font-family: var(--font);
  padding: 2px 4px;
}

.flash-toast__close:hover {
  color: var(--black);
}

.flash-toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 var(--r) var(--r);
  animation: flash-toast-progress 4s linear forwards;
}

.flash-toast--success .flash-toast__progress { background: #b3bf21; }
.flash-toast--error   .flash-toast__progress { background: #d94f3d; }
.flash-toast--warning .flash-toast__progress { background: #feb33a; }
.flash-toast--info    .flash-toast__progress { background: #46ace8; }

@keyframes flash-toast-progress {
  from { width: 100%; }
  to   { width: 0%; }
}

@media (max-width: 480px) {
  .flash-toast {
    bottom: 16px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    transform: none;
    padding: 14px 36px 14px 16px;
    font-size: 13px;
  }

  .flash-toast__title {
    font-size: 13px;
  }

  .flash-toast__message {
    font-size: 12px;
  }

  .flash-toast__icon {
    font-size: 15px;
  }
}


/* =============================================================================
   13. CARDS
   ============================================================================= */

.card {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1.5px solid #e8eff0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h2,
.card-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--teal);
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 14px 24px;
  border-top: 1.5px solid #e8eff0;
  background: var(--grey);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Stat card: dashboard summary tiles */
.stat-card {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-card-icon.teal    { background: rgba(15,107,120,.1); }
.stat-card-icon.blue    { background: rgba(70,172,232,.12); }
.stat-card-icon.lime    { background: rgba(179,191,33,.12); }
.stat-card-icon.orange  { background: rgba(254,179,58,.12); }

.stat-card-body {
  flex: 1;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}

.stat-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 4px;
}

.stat-card-sub {
  font-size: 12px;
  color: var(--mid);
  margin-top: 6px;
}

/* Dashboard grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.dashboard-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.dashboard-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}


/* =============================================================================
   14. TABLES
   ============================================================================= */

/* ── Sort links ───────────────────────────────────────────── */
.sort-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.sort-link:hover {
    color: #fff;
    text-decoration: underline;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 13px;
}

thead {
  background: var(--teal);
  color: var(--white);
}

thead th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  text-align: left;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid #e8eff0;
  transition: background .15s;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: #f0f7f8;
}

tbody td {
  padding: 12px 16px;
  color: var(--black);
  vertical-align: middle;
}

tfoot td {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--mid);
  border-top: 2px solid #e0ecee;
  background: var(--grey);
}

.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

tbody td a {
  color: var(--teal);
  text-decoration: none;
}
tbody td a:hover {
  text-decoration: underline;
}


/* =============================================================================
   15. BADGES AND STATUS
   ============================================================================= */

.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

/* Role badges */
.badge-system-admin { background: rgba(15,107,120,.15);  color: var(--teal-d); }
.badge-admin        { background: rgba(15,107,120,.1);   color: var(--teal); }
.badge-aa           { background: rgba(70,172,232,.15);  color: #1a5a90; }
.badge-ca           { background: rgba(179,191,33,.15);  color: #5a6a08; }
.badge-caa          { background: rgba(254,179,58,.15);  color: #8a6000; }
.badge-paid          { background: rgba(179,191,33,.18);  color: #4a5a08; }
.badge-complimentary { background: rgba(70,172,232,.15);  color: #1a5a90; }
.badge-free          { background: rgba(107,138,144,.12); color: var(--mid); }

/* Status badges */
.badge-active    { background: rgba(179,191,33,.15);  color: #4a5a08; }
.badge-inactive  { background: rgba(107,138,144,.12); color: var(--mid); }
.badge-pending   { background: rgba(254,179,58,.15);  color: #8a6000; }
.badge-approved  { background: rgba(179,191,33,.15);  color: #4a5a08; }
.badge-rejected  { background: rgba(217,79,61,.1);    color: #9a2a1e; }
.badge-draft     { background: rgba(107,138,144,.12); color: var(--mid); }
.badge-published { background: rgba(70,172,232,.15);  color: #1a5a90; }


/* =============================================================================
   16. MEMBER PROFILE
   ============================================================================= */

.profile-header {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--blue);
  flex-shrink: 0;
  background: var(--grey);
}

.profile-avatar-svg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid var(--blue);
  flex-shrink: 0;
  background: var(--grey);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--mid);
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: 2px;
}

.profile-business {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 8px;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--mid);
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.profile-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Directory card */
.member-card {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(15,107,120,.16);
}

.member-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blue);
  margin: 0 auto 10px;
  background: var(--grey);
  display: block;
}

.member-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 2px;
}

.member-card-biz {
  font-size: 12px;
  color: var(--mid);
  margin-bottom: 8px;
}

.member-card-cat {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(70,172,232,.12);
  color: #1a5a90;
  display: inline-block;
  margin-bottom: 12px;
}

/* Directory grid */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}


/* =============================================================================
   17. EVENTS (platform)
   ============================================================================= */

.platform-events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* Event detail page */
.event-detail-header {
  background: linear-gradient(135deg, var(--teal-d), var(--teal));
  border-radius: var(--r);
  padding: 32px;
  color: var(--white);
  margin-bottom: 20px;
}

.event-detail-header h1 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
}

.event-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: rgba(255,255,255,.8);
}

.event-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}


/* =============================================================================
   18. PAGINATION
   ============================================================================= */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  transition: background .15s, color .15s;
}

.pagination a:hover {
  background: var(--grey);
  color: var(--teal);
}

.pagination .active {
  background: var(--teal);
  color: var(--white);
}

.pagination .disabled {
  opacity: .4;
  pointer-events: none;
}


/* =============================================================================
   19. SEARCH AND FILTER BAR
   ============================================================================= */

.filter-bar {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar .search-input-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.filter-bar .search-input-wrap input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1.5px solid #d0dfe2;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  background: var(--grey);
  color: var(--black);
  outline: none;
  transition: border-color .2s, background .2s;
}

.filter-bar .search-input-wrap input:focus {
  border-color: var(--teal);
  background: var(--white);
}

.filter-bar .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--mid);
  pointer-events: none;
}

.filter-bar select {
  padding: 9px 14px;
  border: 1.5px solid #d0dfe2;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  background: var(--grey);
  color: var(--black);
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
  appearance: none;
}

.filter-bar select:focus {
  border-color: var(--teal);
}


/* =============================================================================
   20. EMPTY STATE
   ============================================================================= */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--mid);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--mid);
  max-width: 400px;
  margin: 0 auto 20px;
}


/* =============================================================================
   21. MODAL
   ============================================================================= */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,47,50,.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: 0 20px 60px rgba(15,107,120,.2);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1.5px solid #e8eff0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--teal);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--mid);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background .15s, color .15s;
}

.modal-close:hover {
  background: var(--grey);
  color: var(--black);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1.5px solid #e8eff0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}


/* =============================================================================
   22. UPGRADE PROMPT  (shown to Free members on restricted areas)
   ============================================================================= */

.upgrade-prompt {
  background: linear-gradient(135deg, var(--teal-d), var(--teal));
  border-radius: var(--r);
  padding: 40px 32px;
  text-align: center;
  color: var(--white);
}

.upgrade-prompt .lock-icon {
  font-size: 40px;
  margin-bottom: 14px;
}

.upgrade-prompt h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
}

.upgrade-prompt p {
  font-size: 14px;
  color: rgba(255,255,255,.8);
  max-width: 400px;
  margin: 0 auto 22px;
  line-height: 1.6;
}


/* =============================================================================
   23. RESPONSIVE
   ============================================================================= */

/* ── 900px and below ── */
@media (max-width: 900px) {

  /* Public nav */
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  /* Public sections */
  .about-grid,
  .equip-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .events-grid-row { grid-template-columns: 1fr; }
  .dir-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }

  /* Platform nav */
  .platform-nav-links { display: none; }
  .platform-hamburger { display: flex; }
  .nav-user-info { display: none; }
  .platform-nav {
    position: relative;
    top: auto;
    padding: 0 16px;
    height: 56px;
    min-height: 56px;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .platform-nav .nav-brand { min-width: 0; flex-shrink: 1; }
  .platform-nav .nav-brand img { width: 32px; height: 32px; flex-shrink: 0; }
  .platform-nav .nav-brand-text { min-width: 0; }
  .platform-nav .nav-brand-text strong { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .platform-nav .nav-brand-text span { display: none; }
  .nav-user { gap: 8px; flex-shrink: 0; }
  .nav-avatar, .nav-avatar-svg { width: 28px; height: 28px; }

  /* Platform layout */
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid-3 { grid-template-columns: 1fr 1fr; }
  .directory-grid { grid-template-columns: repeat(3, 1fr); }
  .platform-events-grid { grid-template-columns: 1fr 1fr; }
}

/* ── 1100px and below — countdown responsive ── */
@media (max-width: 1100px) {

  .countdown-row {
    gap: 10px 12px;
    padding: 20px 16px;
  }

  .countdown-text h3 {
    font-size: 17px;
  }

  .countdown-timer {
    gap: 6px;
  }

  .time-block {
    min-width: 30px;
    padding: 5px 6px;
  }

  .time-num {
    font-size: 14px;
  }

  .time-label {
    font-size: 9px;
  }

  .time-sep {
    font-size: 14px;
  }

  .countdown-row .btn {
    font-size: 11px;
    padding: 7px 12px;
  }
}

/* ── 600px and below ── */
@media (max-width: 600px) {

  /* Public sections */
  .events-grid-row { grid-template-columns: 1fr; }
  .dir-grid { grid-template-columns: 1fr 1fr; }
  .countdown-grid-row { grid-template-columns: 1fr; border-bottom: none; }
  .countdown-row { border-right: none; border-bottom: 1px solid rgba(255,255,255,.12); flex-direction: column; align-items: flex-start; }
  .countdown-row:last-child { border-bottom: none; }
  .countdown-timer { flex-wrap: wrap; }
  .countdown-row .btn { align-self: flex-start; }
  .footer-top { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  /* Platform layout */
  .platform-main { padding: 20px 20px 40px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid-2 { grid-template-columns: 1fr; }
  .dashboard-grid-3 { grid-template-columns: 1fr; }
  .directory-grid { grid-template-columns: 1fr 1fr; }
  .platform-events-grid { grid-template-columns: 1fr; }

  /* Page header */
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header-actions { width: 100%; }

  /* Profile header */
  .profile-header { flex-direction: column; align-items: center; text-align: center; }
  .profile-meta { justify-content: center; }
  .profile-actions { justify-content: center; }

  /* Filter bar */
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .search-input-wrap { min-width: unset; }

  /* Table */
  thead { display: none; }
  tbody tr { display: block; padding: 12px 16px; }
  tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
  }
  tbody td:last-child { border-bottom: none; }
  tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 11px;
    color: var(--mid);
    text-transform: uppercase;
    letter-spacing: .06em;
    flex-shrink: 0;
    margin-right: 10px;
  }
}

/* ── password toggle ────────────────────────────────────────────────────── */
.pw-wrapper {
  position: relative;
}
.pw-wrapper input {
  padding-right: 42px;
}
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--mid);
  display: flex;
  align-items: center;
}
.pw-toggle:hover {
  color: var(--teal);
}
.pw-toggle svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}


/* =============================================================================
   24. MY PROFILE  (members/my-profile.php)
   ============================================================================= */

/* ── Tab bar ── */
.profile-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid #d0dfe2;
}

.profile-tab {
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mid);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: 0;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font);
  letter-spacing: .02em;
  transition: color .2s, border-color .2s;
}

.profile-tab:hover {
  color: var(--teal);
}

.profile-tab.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.profile-tab-panel {
  display: none;
}

.profile-tab-panel.active {
  display: block;
}

/* ── Profile section card ── */
.profile-section {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.profile-section-header {
  padding: 16px 24px;
  border-bottom: 1.5px solid #e8eff0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-section-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--teal);
}

.profile-section-body {
  padding: 24px;
}

.profile-section-footer {
  padding: 14px 24px;
  border-top: 1.5px solid #e8eff0;
  background: var(--grey);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Social link rows ── */
.social-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.social-link-row {
  display: grid;
  grid-template-columns: 180px 1fr 36px;
  gap: 10px;
  align-items: start;
}

.social-link-row select,
.social-link-row input[type="url"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d0dfe2;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--black);
  background: var(--grey);
  transition: border-color .2s, background .2s;
  outline: none;
  appearance: none;
}

.social-link-row select:focus,
.social-link-row input[type="url"]:focus {
  border-color: var(--teal);
  background: var(--white);
}

.social-link-row input[type="url"].error {
  border-color: #d94f3d;
}

.social-link-remove {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(217,79,61,.08);
  color: #d94f3d;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
  font-family: var(--font);
}

.social-link-remove:hover {
  background: rgba(217,79,61,.16);
}

.social-link-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  background: none;
  border: 1.5px dashed var(--teal);
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-family: var(--font);
  transition: background .15s, color .15s;
}

.social-link-add:hover {
  background: rgba(15,107,120,.06);
}

/* ── Chapter change history ── */
.chapter-history {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--grey);
  border-radius: 8px;
  font-size: 13px;
}

.chapter-history-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}

.chapter-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #e0ecee;
  font-size: 12px;
  color: var(--black);
}

.chapter-history-row:last-child {
  border-bottom: none;
}

.chapter-quota {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.chapter-quota-item {
  font-size: 12px;
  color: var(--mid);
}

.chapter-quota-item strong {
  color: var(--black);
  font-weight: 700;
}

.chapter-quota-item.warn strong {
  color: #d94f3d;
}

/* ── Business cards ── */
.business-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.business-card {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.business-card-banner {
  width: 100%;
  height: 80px;
  object-fit: contain;
  background: var(--grey);
  display: block;
}

.business-card-banner-placeholder {
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, var(--teal-d), var(--teal));
  flex-shrink: 0;
}

.business-card-body {
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex: 1;
}

.business-card-logo {
  width: 48px;
  height: 48px;
  border-radius: 9px;
  object-fit: cover;
  border: 1.5px solid #d0dfe2;
  flex-shrink: 0;
  background: var(--grey);
}

.business-card-logo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 9px;
  border: 1.5px solid #d0dfe2;
  flex-shrink: 0;
  background: var(--grey);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--mid);
}

.business-card-info {
  flex: 1;
  min-width: 0;
}

.business-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.business-card-meta {
  font-size: 12px;
  color: var(--mid);
  margin-bottom: 8px;
}

.business-card-actions {
  padding: 10px 16px;
  border-top: 1.5px solid #e8eff0;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Business form ── */
.business-form-wrap {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

.business-form-header {
  padding: 16px 24px;
  border-bottom: 1.5px solid #e8eff0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.business-form-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--teal);
}

.business-form-body {
  padding: 24px;
}

.business-form-footer {
  padding: 14px 24px;
  border-top: 1.5px solid #e8eff0;
  background: var(--grey);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Image upload preview ── */
.img-upload-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}

.img-preview {
  width: 64px;
  height: 64px;
  border-radius: 9px;
  object-fit: cover;
  border: 1.5px solid #d0dfe2;
  background: var(--grey);
  flex-shrink: 0;
}

.img-preview-banner {
  width: 120px;
  height: 48px;
  border-radius: 9px;
  object-fit: cover;
  border: 1.5px solid #d0dfe2;
  background: var(--grey);
  flex-shrink: 0;
}

.img-upload-wrap input[type="file"] {
  font-size: 12px;
  color: var(--mid);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .business-card-grid { grid-template-columns: 1fr 1fr; }
  .social-link-row { grid-template-columns: 150px 1fr 36px; }
}

@media (max-width: 600px) {
  .business-card-grid { grid-template-columns: 1fr; }
  .social-link-row { grid-template-columns: 1fr 36px; grid-template-rows: auto auto; }
  .social-link-row select { grid-column: 1; }
  .social-link-row input[type="url"] { grid-column: 1; }
  .social-link-row .social-link-remove { grid-column: 2; grid-row: 1; }
  .chapter-quota { flex-direction: column; gap: 8px; }
}


/* =============================================================================
   CHAPTER MANAGEMENT CARDS
   admin/manage-chapters.php
   ============================================================================= */

.chapter-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.chapter-card {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow .2s;
}

.chapter-card:hover {
  box-shadow: 0 6px 30px rgba(15,107,120,.18);
}

.chapter-card--inactive {
  opacity: .75;
}

.chapter-card__header {
  padding: 18px 20px 14px;
  border-bottom: 1.5px solid #e8eff0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chapter-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 2px;
}

.chapter-card__location {
  font-size: 12px;
  color: var(--mid);
}

.chapter-card__body {
  padding: 14px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}

.chapter-card__label {
  color: var(--mid);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.chapter-card__value {
  color: var(--black);
  text-align: right;
  font-size: 13px;
}

.chapter-card__footer {
  padding: 12px 20px;
  border-top: 1.5px solid #e8eff0;
  background: var(--grey);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .chapter-card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .chapter-card-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Events module
   ========================================================================== */

/* Two-column form layout used on create-event and edit-event */
.form-layout-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.form-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Two equal fields side by side within a card */
.form-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Slug input prefix label */
.slug-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  height: 42px;
  background: #f2f4f5;
  border: 1px solid #c8d8db;
  border-right: none;
  border-radius: 6px 0 0 6px;
  font-size: 13px;
  color: #6b8a90;
  white-space: nowrap;
}

/* Form action bar at the bottom of create/edit forms */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #d0dfe2;
}

/* Status badges for event lifecycle */
.badge-draft        { background: #e9ecef; color: #6b8a90; }
.badge-pending      { background: #fff3cd; color: #856404; }
.badge-approved     { background: #e6f4ee; color: #1a7a4a; }
.badge-published    { background: #d1e7dd; color: #0a5c36; }
.badge-rejected     { background: #f8d7da; color: #842029; }
.badge-closed       { background: #e2e3e5; color: #41464b; }
.badge-archived     { background: #dee2e6; color: #495057; }
.badge-cancelled    { background: #f8d7da; color: #842029; }

/* Attendance view toggles */
.attendance-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.attendance-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  cursor: pointer;
}

/* Attendance table name cell — prevent email overflow on mobile */
#attendance-table td:first-child div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 55vw;
}

/* Attendance toggle — enlarged touch target for mobile */
.attendance-toggle {
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

/* Inline confirmation strip */
.att-confirm-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.att-confirm-msg {
  font-size: 13px;
  color: var(--charcoal);
  font-weight: 600;
}

/* Meal summary — two equal columns on narrow screens */
@media (max-width: 600px) {
  .meal-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .meal-summary-item {
    min-width: unset;
  }
}

/* Meal count summary strip */
.meal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.meal-summary-item {
  background: #f2f4f5;
  border: 1px solid #d0dfe2;
  border-radius: 8px;
  padding: 10px 18px;
  text-align: center;
  min-width: 100px;
}

.meal-summary-item .meal-count {
  font-size: 28px;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}

.meal-summary-item .meal-label {
  font-size: 12px;
  color: #6b8a90;
  margin-top: 4px;
}

/* RSVP public pages */
.rsvp-page {
  min-height: 100vh;
  background: #f2f4f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 16px;
}

.rsvp-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(15,107,120,0.10);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
}

.rsvp-card__header {
  background: var(--teal);
  padding: 28px 32px;
  text-align: center;
}

.rsvp-card__header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.rsvp-card__header p {
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rsvp-card__body {
  padding: 32px;
}

.rsvp-card__footer {
  padding: 20px 32px;
  border-top: 1px solid #d0dfe2;
  background: #f8f9fa;
  text-align: center;
  font-size: 13px;
  color: #6b8a90;
}

.rsvp-card__footer a {
  color: var(--teal);
  font-weight: 600;
}

.rsvp-event-meta {
  background: #f2f4f5;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #2c2a2b;
  line-height: 1.6;
}

.rsvp-event-meta strong {
  display: block;
  font-size: 16px;
  color: var(--teal);
  margin-bottom: 4px;
}

.rsvp-path-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.rsvp-path-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  border: 2px solid #d0dfe2;
  border-radius: 10px;
  text-decoration: none;
  color: #2c2a2b;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  gap: 8px;
}

.rsvp-path-btn:hover {
  border-color: var(--teal);
  background: #f0f8f9;
  color: var(--teal);
}

.rsvp-path-btn.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.rsvp-path-btn.primary:hover {
  background: #0a5560;
  border-color: #0a5560;
  color: #ffffff;
}

.rsvp-path-btn .rsvp-path-icon {
  font-size: 28px;
}

.rsvp-nudge {
  text-align: center;
  font-size: 13px;
  color: #6b8a90;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e8eef0;
}

.rsvp-nudge a {
  color: var(--teal);
  font-weight: 600;
}

@media (max-width: 900px) {
  .form-layout-two-col {
    grid-template-columns: 1fr;
  }
  .rsvp-path-choice {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .form-row-two {
    grid-template-columns: 1fr;
  }
  .form-actions {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .form-actions > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .rsvp-card__body {
    padding: 24px 20px;
  }
}


/* =============================================================================
   MEMBER DIRECTORY
   members/directory.php
   ============================================================================= */

/* ── Filter bar ── */
.dir-filters {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.dir-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.dir-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 180px;
}

.dir-filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dir-filter-group input[type="search"],
.dir-filter-group select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  color: var(--dark);
  background: var(--bg);
  width: 100%;
}

.dir-filter-actions {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
}

/* ── Toolbar (result count + view toggle) ── */
.dir-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.dir-result-count {
  font-size: 0.875rem;
  color: var(--mid);
  margin: 0;
}

.dir-view-toggle {
  display: flex;
  gap: 4px;
}

.dir-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--mid);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dir-view-btn:hover {
  background: var(--teal-light);
  color: var(--teal);
  border-color: var(--teal);
}

.dir-view-btn[aria-pressed="true"] {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

/* ── Cards grid ── */
.dir-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.dir-card {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.dir-card:hover {
  box-shadow: 0 4px 16px rgba(15,107,120,0.13);
}

.dir-card-avatar {
  display: flex;
  justify-content: center;
  padding: 24px 16px 12px;
  background: var(--bg);
}

.dir-card-body {
  padding: 0 16px 12px;
  flex: 1;
  text-align: center;
}

.dir-card-name {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 6px;
  line-height: 1.3;
}

.dir-card-meta {
  font-size: 0.8rem;
  color: var(--mid);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.dir-card-category {
  font-size: 0.78rem;
  color: var(--teal);
  margin: 4px 0 0;
  font-weight: 500;
}

.dir-card-bizcount {
  font-size: 0.78rem;
  color: var(--mid);
  margin: 4px 0 0;
}

.dir-card-footer {
  padding: 12px 16px 16px;
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--border);
}

/* ── Avatars ── */
.dir-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.dir-avatar--photo {
  width: 72px;
  height: 72px;
}

.dir-avatar--initials {
  width: 72px;
  height: 72px;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dir-avatar--lg {
  width: 88px;
  height: 88px;
  font-size: 1.8rem;
}

.dir-avatar--sm {
  width: 36px;
  height: 36px;
  font-size: 0.8rem;
}

.dir-avatar--xs {
  width: 28px;
  height: 28px;
  font-size: 0.7rem;
}

/* ── Business logos ── */
.dir-biz-logo {
  border-radius: var(--r-sm);
  object-fit: contain;
  flex-shrink: 0;
}

.dir-biz-logo--img {
  width: 72px;
  height: 72px;
  background: var(--bg);
  padding: 4px;
  border: 1px solid var(--border);
}

.dir-biz-logo--initial {
  width: 72px;
  height: 72px;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  border-radius: var(--r-sm);
}

.dir-biz-logo--lg {
  width: 88px;
  height: 88px;
  font-size: 2rem;
}

.dir-biz-logo--sm {
  width: 36px;
  height: 36px;
  font-size: 0.9rem;
}

.dir-biz-logo--xs {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
  border-radius: 4px;
}

/* ── List view ── */
.dir-list-wrap {
  margin-bottom: 24px;
  overflow-x: auto;
}

.dir-list-avatar-cell {
  width: 44px;
  padding-right: 8px !important;
}

/* ── Empty state ── */
.dir-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--mid);
  font-size: 0.9rem;
}

/* ── Pagination ── */
.dir-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 24px 0 8px;
  flex-wrap: wrap;
}

.dir-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--dark);
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dir-page-btn:hover {
  background: var(--teal-light);
  color: var(--teal);
  border-color: var(--teal);
}

.dir-page-btn--active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  font-weight: 700;
  cursor: default;
}

.dir-page-btn--disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.dir-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 36px;
  color: var(--mid);
  font-size: 0.875rem;
}

/* Directory sort indicators */
.dir-sort-th {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.dir-sort-th:hover {
  color: rgba(255, 255, 255, 0.75);
}

.dir-sort-indicator {
  font-size: 11px;
  color: var(--orange);
}

.dir-sort-indicator--inactive {
  opacity: 0.5;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Modal ── */
.dir-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dir-modal[hidden] {
  display: none;
}

.dir-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 107, 120, 0.25);
  cursor: pointer;
}

.dir-modal-panel {
  position: relative;
  background: var(--white);
  border-radius: var(--r);
  box-shadow: 0 8px 40px rgba(15,107,120,0.18);
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 16px;
}

.dir-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.dir-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
  line-height: 1.3;
  flex: 1;
  padding-right: 12px;
}

.dir-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--mid);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.dir-modal-close:hover {
  background: var(--teal-light);
  color: var(--teal);
}

.dir-modal-body {
  overflow-y: auto;
  padding: 24px;
  flex: 1;
}

.dir-modal-loading {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.dir-modal-error {
  color: var(--error, #c0392b);
  font-size: 0.9rem;
  text-align: center;
  padding: 24px 0;
}

/* ── Modal profile layout ── */
.dir-modal-profile {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.dir-modal-avatar {
  flex-shrink: 0;
}

.dir-modal-details {
  flex: 1;
  min-width: 0;
}

.dir-modal-meta {
  font-size: 0.875rem;
  color: var(--mid);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  word-break: break-word;
}

.dir-modal-meta a {
  color: var(--teal);
  text-decoration: none;
  word-break: break-all;
}

.dir-modal-meta a:hover {
  text-decoration: underline;
}

.dir-modal-registered {
  font-size: 0.8rem;
  color: var(--mid);
  margin: 0 0 10px;
  font-style: italic;
}

.dir-modal-bio {
  margin: 12px 0;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--r-sm);
  border-left: 3px solid var(--teal);
}

.dir-modal-bio p {
  font-size: 0.875rem;
  color: var(--dark);
  margin: 0;
  line-height: 1.65;
  word-break: break-word;
}

/* ── Modal social links ── */
.dir-modal-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.dir-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--mid);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dir-social-link:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

/* ── Modal linked items ── */
.dir-modal-linked {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.dir-modal-linked-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

.dir-modal-linked-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dir-linked-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--dark);
  font-weight: 500;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  width: 100%;
}

.dir-linked-btn:hover {
  background: var(--teal-light);
  border-color: var(--teal);
  color: var(--teal);
}

/* ── Screen-reader only ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Directory responsive ── */
@media (max-width: 900px) {
  .dir-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  .dir-modal-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .dir-modal-meta {
    justify-content: center;
  }
  .dir-modal-social {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .dir-filter-row {
    flex-direction: column;
  }
  .dir-filter-group {
    flex: 1 1 100%;
  }
  .dir-filter-actions {
    width: 100%;
  }
  .dir-filter-actions .btn {
    flex: 1;
    text-align: center;
  }
  .dir-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dir-modal-panel {
    max-height: 95vh;
    margin: 8px;
  }
}

@media (max-width: 400px) {
  .dir-cards-grid {
    grid-template-columns: 1fr;
  }
}
/* =============================================================================
   PRINT — Member Directory
   ============================================================================= */

@media print {
  #panel-people,
  #panel-businesses {
    display: none !important;
  }

  .dir-modal {
    display: none !important;
  }
}

/* =============================================================================
   SYSTEM LOCK BADGE — System Admin nav indicator
   ============================================================================= */

.nav-lock-badge {
  display: inline-block;
  background: #c0392b;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
  margin-right: 4px;
}