/* ============================================================
   RCVFD Fire Department Theme
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --red-dark:    #8b0000;
    --red-mid:     #b71c1c;
    --red-bright:  #e53935;
    --gold:        #f9a825;
    --gold-light:  #fdd835;
    --charcoal:    #1a1a1a;
    --dark:        #212121;
    --mid-gray:    #616161;
    --light-gray:  #f5f5f5;
    --white:       #ffffff;
    --nav-height:  70px;
    --font-sans:   'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

/* ============================================================
   PAGE TRANSITIONS (View Transitions API)
   Cross-fades between same-origin navigations.
   Chrome/Edge 111+, Firefox 130+; no-op on older browsers.
   ============================================================ */
@view-transition {
    navigation: auto;
}

/* Keep the header stable across navigations — it morphs in
   place instead of fading out and back in with the page body. */
.site-header {
    view-transition-name: site-header;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
}

a { color: var(--red-mid); text-decoration: none; }
a:hover { color: var(--red-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    margin-top: 0;
    color: var(--charcoal);
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 60px 0; }
.section--gray { background: var(--light-gray); }

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
    background: var(--charcoal);
    color: #bbb;
    font-size: 13px;
    padding: 6px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.top-bar a { color: #bbb; }
.top-bar a:hover { color: var(--gold); text-decoration: none; }
.top-bar__emergency {
    font-weight: 700;
    color: var(--red-bright) !important;
    letter-spacing: .5px;
}
.top-bar__emergency::before { content: '🚨 '; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: var(--red-dark);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 3px 10px rgba(0,0,0,.4);
}
.site-header__brand-row {
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-header__fdang-img {
    height: 72px;
    width: auto;
    margin-right: 8px;
}
.site-header__nav-row {
    border-top: 1px solid rgba(255,255,255,.15);
    background: rgba(0,0,0,.15);
}
.site-header__nav-row .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Logo / Branding --- */
.site-brand {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
}
.site-brand__logo {
    height: 101px;
    width: auto;
    aspect-ratio: 425 / 352;
    display: block;
    flex-shrink: 0;
}
.site-brand__name {
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 2px;
    line-height: 1.2;
    text-transform: uppercase;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-nav > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
}
.main-nav a {
    display: block;
    padding: 8px 14px;
    color: rgba(255,255,255,.9);
    font-weight: 600;
    font-size: 14px;
    border-radius: 4px;
    transition: background .2s, color .2s;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.main-nav a:hover,
.main-nav a.nav-selected {
    background: rgba(255,255,255,.15);
    color: var(--gold-light);
    text-decoration: none;
}

/* Dropdown */
.nav-has-dropdown {
    position: relative;
}
.nav-arrow {
    font-size: 9px;
    vertical-align: middle;
    opacity: .7;
    margin-left: 2px;
}
.nav-dropdown {
    display: flex;
    flex-direction: column;
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--red-dark);
    min-width: 200px;
    border-top: 2px solid var(--gold);
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
    border-radius: 0 0 6px 6px;
    z-index: 100;
    padding: 4px 0;
}
.nav-dropdown li { list-style: none; }
.nav-dropdown a {
    display: block;
    padding: 10px 18px;
    white-space: nowrap;
    border-radius: 0;
}
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown.is-open .nav-dropdown {
    visibility: visible;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px;
}
.nav-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: .3s;
}

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero-rotator {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
    background: var(--charcoal);
}
.hero-rotator__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.hero-rotator__slide--active {
    opacity: 1;
}
.hero-rotator__prev,
.hero-rotator__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,.35);
    border: none;
    color: var(--white);
    width: 48px;
    height: 48px;
    cursor: pointer;
    border-radius: 4px;
    transition: background .2s;
}
.hero-rotator__prev::after,
.hero-rotator__next::after {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--white);
    border-right: 2px solid var(--white);
    margin: auto;
}
.hero-rotator__prev::after {
    transform: rotate(-135deg) translate(-2px, 2px);
}
.hero-rotator__next::after {
    transform: rotate(45deg) translate(-2px, 2px);
}
.hero-rotator__prev { left: 16px; }
.hero-rotator__next { right: 16px; }
.hero-rotator__prev:hover,
.hero-rotator__next:hover {
    background: rgba(0,0,0,.6);
}
.hero-rotator__dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.hero-rotator__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.7);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background .2s;
}
.hero-rotator__dot--active {
    background: var(--white);
}
.hero-rotator__caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 32px;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,.35) 35%, rgba(0,0,0,.35) 65%, rgba(0,0,0,0) 100%);
    color: var(--white);
}
.hero-rotator__caption h2 {
    color: var(--white);
    font-size: 1.8rem;
    margin: 0 0 6px;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.hero-rotator__caption p {
    margin: 0 0 20px;
    font-size: 1rem;
    color: rgba(255,255,255,.9);
    max-width: 560px;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.hero-rotator__donate {
    position: absolute;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 4px 14px !important;
    white-space: nowrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: .2s;
    text-decoration: none;
}
.btn--primary {
    background: var(--gold);
    color: var(--charcoal);
    border-color: var(--gold);
}
.btn--primary:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    color: var(--charcoal);
    text-decoration: none;
}
.btn--outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.7);
}
.btn--outline:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--white);
    color: var(--white);
    text-decoration: none;
}
.btn--red {
    background: var(--red-mid);
    color: var(--white);
    border-color: var(--red-mid);
}
.btn--red:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    color: var(--white);
    text-decoration: none;
}

/* ============================================================
   ALERT BANNER
   ============================================================ */
.alert-banner {
    background: var(--gold);
    color: var(--charcoal);
    text-align: center;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 15px;
}
.alert-banner a { color: var(--red-dark); }

/* ============================================================
   ABOUT BLURB
   ============================================================ */
.about-blurb {
    padding: 48px 0;
    background: var(--white);
}
.about-blurb .container {
    display: flex;
    gap: 48px;
    align-items: center;
}
.about-blurb__text {
    flex: 1;
}
.about-blurb__text p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--charcoal);
    margin-bottom: 16px;
}
.about-blurb__text p:last-child {
    margin-bottom: 0;
}
.about-blurb__newsletter {
    flex: 0 0 260px;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--red-mid);
    padding: 24px;
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.about-blurb__newsletter:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}
.about-blurb__newsletter h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--red-mid);
    margin: 0 0 8px;
}
.about-blurb__newsletter h3 {
    font-size: 1.1rem;
    margin: 0 0 10px;
    line-height: 1.3;
}
.about-blurb__newsletter p {
    font-size: 0.9rem;
    color: var(--mid-gray);
    margin: 0;
    line-height: 1.6;
}
@media (max-width: 768px) {
    .about-blurb .container { flex-direction: column; }
    .about-blurb__newsletter { flex: none; width: 100%; }
}

/* ============================================================
   VOLUNTEER CTA
   ============================================================ */
.volunteer-cta {
    background: var(--light-gray);
    padding: 60px 0;
}
.volunteer-cta .container {
    display: flex;
    gap: 48px;
    align-items: center;
}
.volunteer-cta__image {
    flex: 0 0 380px;
}
.volunteer-cta__image img {
    width: 100%;
    border-radius: 8px;
    display: block;
    object-fit: cover;
}
.volunteer-cta__content h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}
.volunteer-cta__content p {
    color: var(--mid-gray);
    margin-bottom: 14px;
    line-height: 1.7;
}
@media (max-width: 768px) {
    .volunteer-cta .container { flex-direction: column; }
    .volunteer-cta__image { flex: none; width: 100%; }
}

/* ============================================================
   DONATION BAR
   ============================================================ */
.donation-bar {
    background: var(--charcoal);
    color: var(--white);
    padding: 24px 0;
}
.donation-bar .container {
    display: flex;
    align-items: center;
    gap: 24px;
}
.donation-bar__inner {
    flex: 1;
}
.donation-bar__labels {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.donation-bar__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
}
.donation-bar__amounts {
    font-size: 0.9rem;
    color: rgba(255,255,255,.75);
}
.donation-bar__amounts strong {
    color: var(--gold);
}
.donation-bar__track {
    height: 14px;
    background: rgba(255,255,255,.15);
    border-radius: 7px;
    overflow: hidden;
}
.donation-bar__fill {
    height: 100%;
    width: 0;
    background: var(--red-mid);
    border-radius: 7px;
}

/* ============================================================
   CARDS
   ============================================================ */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0,0,0,.18);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
}
.card:hover {
    transform: translateX(-4px);
    box-shadow: 6px 2px 28px rgba(0,0,0,.25);
    text-decoration: none;
}
.card:hover .card__title { color: var(--red-dark); }
.card__header {
    padding: 20px 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.card__icon { font-size: 28px; }
.card__title { font-size: 18px; font-weight: 700; color: #000; margin: 0; }
.card__title a { color: #000; text-decoration: none; }
.card__title a:hover { text-decoration: underline; }
.card__body { padding: 20px; flex: 1; }
.card__body p { margin: 0 0 14px; color: var(--mid-gray); }
.card__body a { color: var(--red-mid); font-weight: 600; }
.card__footer { padding: 0 20px 20px; }
.card__footer a { color: var(--red-mid); font-weight: 600; text-decoration: none; }
.card__footer a:hover { text-decoration: underline; }

/* ============================================================
   NEWS / INCIDENTS
   ============================================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.news-item {
    border-left: 4px solid var(--red-mid);
    padding: 16px 20px;
    background: var(--white);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.news-item__date {
    font-size: 12px;
    font-weight: 700;
    color: var(--mid-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.news-item h3 { font-size: 17px; margin: 6px 0 8px; }
.news-item p { font-size: 14px; color: var(--mid-gray); margin: 0 0 10px; }
.news-item a { font-size: 14px; font-weight: 600; }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-heading {
    text-align: center;
    margin-bottom: 44px;
}
.section-heading h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--charcoal);
    margin-bottom: 10px;
}
.section-heading p {
    color: var(--mid-gray);
    max-width: 560px;
    margin: 0 auto;
}
.section-heading .divider {
    width: 60px;
    height: 4px;
    background: var(--red-mid);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* ============================================================
   CALLOUT / CTA
   ============================================================ */
.callout {
    background: var(--red-dark);
    color: var(--white);
    text-align: center;
    padding: 60px 20px;
}
.callout h2 { color: var(--white); font-size: 2rem; margin-bottom: 12px; }
.callout p { color: rgba(255,255,255,.85); max-width: 560px; margin: 0 auto 28px; }

/* ============================================================
   CONTACT / INFO SECTION
   ============================================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.info-block {
    text-align: left;
    padding: 24px 20px;
    background: var(--white);
    border-radius: 8px;
    border-left: 4px solid var(--red-mid);
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.info-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}
.info-block:hover h3 { color: var(--red-dark); }
.info-block h3 { font-size: 16px; margin-bottom: 8px; }
.info-block p { font-size: 15px; color: var(--mid-gray); margin: 0; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
    background: var(--light-gray);
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.82rem;
}
.breadcrumb__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 7px 0;
    gap: 0;
}
.breadcrumb__item {
    display: flex;
    align-items: center;
    color: var(--mid-gray);
}
.breadcrumb__item + .breadcrumb__item::before {
    content: '›';
    margin: 0 7px;
    color: #bbb;
}
.breadcrumb__item a {
    color: var(--red-mid);
    text-decoration: none;
}
.breadcrumb__item a:hover { text-decoration: underline; }
.breadcrumb__item--current {
    color: var(--charcoal);
    font-weight: 500;
}

/* ============================================================
   PAGE CONTENT (inner pages)
   ============================================================ */
.page-banner {
    background: linear-gradient(135deg, var(--red-dark), #3d0000);
    color: var(--white);
    padding: 50px 20px;
    text-align: center;
}
.page-banner h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0; }
.page-banner p { color: rgba(255,255,255,.8); margin: 10px 0 0; }

.page-hero {
    position: relative;
    width: 100%;
    height: 420px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.page-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 100%);
    display: flex;
    align-items: flex-end;
    padding: 40px;
}
.page-hero__title {
    color: var(--white);
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.page-hero--color-only {
    background-color: var(--charcoal);
}

.content-area { padding: 50px 0; }
.content-area:has(.members-layout) { padding: 0 !important; }
.content-area .prose { max-width: 800px; margin: 0 auto; }

.fleet-section { margin-bottom: 50px; }
.fleet-section h2 { margin-bottom: 8px; }

.fleet-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: .95rem; }
.fleet-table th { background: var(--charcoal); color: var(--white); text-align: left; padding: 10px 14px; }
.fleet-table td { padding: 10px 14px; border-bottom: 1px solid #e0e0e0; vertical-align: top; }
.fleet-table tbody tr:last-child td { border-bottom: none; }
.fleet-table tbody tr:nth-child(even) td { background: #f7f7f7; }
.fleet-table__unit { white-space: nowrap; font-weight: 600; width: 100px; }

/* ============================================================
   SIDEBAR LAYOUT
   ============================================================ */
.with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}
.sidebar { position: sticky; top: 90px; }
.sidebar-widget {
    background: var(--light-gray);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}
.sidebar-widget h4 {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--mid-gray);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--red-mid);
}
.sidebar-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar-widget ul li {
    padding: 6px 0;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a { color: var(--charcoal); }
.sidebar-widget ul li a:hover { color: var(--red-mid); }

/* ============================================================
   MEMBERS AREA
   ============================================================ */

/* Header strip showing name, badges, logout */
.member-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--white);
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    margin-bottom: 36px;
}
.member-header__info { flex: 1; min-width: 160px; }
.member-header__roles { display: flex; flex-wrap: wrap; gap: 8px; }

/* Role badges */
.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    white-space: nowrap;
}
.role-badge--recruit     { background: #e3f2fd; color: #1565c0; }
.role-badge--responder   { background: #fce4ec; color: #b71c1c; }
.role-badge--boardmember { background: #f3e5f5; color: #6a1b9a; }
.role-badge--superuser   { background: #1a1a1a; color: #fdd835; }

/* Section dividers between role areas */
.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--mid-gray);
    margin: 8px 0 20px;
}
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

/* Profile definition list */
.member-profile-dl { margin: 0; }
.member-profile-dl__row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 4px 16px;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 15px;
}
.member-profile-dl__row:last-child { border-bottom: none; }
.member-profile-dl__row dt { font-weight: 600; color: var(--mid-gray); }
.member-profile-dl__row dd { margin: 0; color: var(--charcoal); }

/* Access denied state */
.member-denied {
    text-align: center;
    padding: 80px 20px;
    max-width: 480px;
    margin: 0 auto;
}
.member-denied__icon { font-size: 56px; margin-bottom: 16px; }
.member-denied h2    { margin-bottom: 12px; }
.member-denied p     { color: var(--mid-gray); margin-bottom: 24px; }

/* ── Members layout: sidebar + content ── */
.members-layout {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
}

/* Wrapper is a full-height column; sidebar content sticks inside it */
.members-sidebar-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    align-self: stretch;
    position: relative;
    overflow: visible;
    margin-right: 24px;
}

@media (max-width: 860px) {
    .members-layout { flex-direction: column; align-items: stretch; }
    .members-sidebar-wrap { position: static; margin-right: 0; margin-bottom: 16px; width: 100%; }
    .members-sidebar { width: 100% !important; position: static !important; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
    .sidebar-toggle { display: none; }
}

/* Sidebar — sticky within its full-height column, collapses to 0 width */
.members-sidebar {
    order: 1;
    width: 240px;
    overflow: hidden;
    background: var(--white);
    transition: width 0.25s ease;
    position: sticky;
    top: 150px;
    align-self: flex-start;
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 0 8px rgba(0,0,0,.08);
}
.members-sidebar-wrap.is-collapsed .members-sidebar {
    width: 0;
}

/* Toggle strip — sticky within the sidebar-wrap column, centered in viewport while visible */
.sidebar-toggle {
    order: 2;
    flex-shrink: 0;
    position: sticky;
    top: calc(50vh - 24px);
    align-self: flex-start;
    width: 22px;
    height: 48px;
    background: var(--light-gray);
    border: 1px solid #999;
    box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--charcoal);
    padding: 0;
    transition: background 0.15s, color 0.15s;
}
.sidebar-toggle:hover {
    background: var(--white);
    color: var(--red-dark);
}
.sidebar-toggle__icon {
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
}
.members-sidebar__profile {
    background: var(--charcoal);
    color: var(--white);
    padding: 20px;
}
.members-sidebar__name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--white);
}
.members-sidebar__email {
    font-size: 12px;
    color: rgba(255,255,255,.6);
    margin: 0 0 10px;
    word-break: break-all;
}
.members-sidebar__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.members-sidebar__profile-fields {
    font-size: 12px;
    color: rgba(255,255,255,.75);
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.members-sidebar__profile-fields span { display: block; }
.members-sidebar__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.members-sidebar__actions .btn {
    text-align: center;
    font-size: 12px;
    padding: 7px 12px;
}

/* Sidebar nav tree */
.members-sidebar__nav {
    padding: 12px 0;
}
.members-sidebar__section {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 20px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--mid-gray);
    text-decoration: none;
}
.members-sidebar__section::before {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mid-gray);
}
.members-sidebar__section--charcoal::before { background: var(--charcoal); }
.members-sidebar__section--blue::before     { background: #1e6fa5; }
.members-sidebar__section--red::before      { background: var(--red-mid); }
.members-sidebar__section--gold::before     { background: var(--gold); }
.members-sidebar__section:hover {
    color: var(--red-dark);
    text-decoration: none;
}
.members-sidebar__links {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}
.members-sidebar__link a {
    display: block;
    padding: 5px 20px 5px 30px;
    font-size: 13px;
    color: var(--charcoal);
    text-decoration: none;
    border-left: 3px solid transparent;
}
.members-sidebar__link--active a {
    font-weight: 700;
    color: var(--dark);
    border-left-color: var(--red-mid);
}
.members-sidebar__link a:hover {
    color: var(--red-dark);
    background: var(--light-gray);
    border-left-color: var(--red-mid);
    text-decoration: none;
}

/* Content area */
.members-content { flex: 1; min-width: 0; padding: 20px 24px 50px 0; max-width: 2000px; }
.members-content .container { max-width: none; margin: 0; }

.members-section {
    margin-bottom: 40px;
    scroll-margin-top: 160px;
}
.members-section__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--mid-gray);
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}
.members-section__heading::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Accent colors — heading bar and card top border */
.members-section--general  .members-section__heading::before { background: var(--charcoal); }
.members-section--recruit  .members-section__heading::before { background: #1e6fa5; }
.members-section--responder .members-section__heading::before { background: var(--red-mid); }
.members-section--admin    .members-section__heading::before { background: var(--gold); }

.card--accent-charcoal { border-left: 4px solid var(--charcoal); }
.card--accent-blue     { border-left: 4px solid #1e6fa5; }
.card--accent-red      { border-left: 4px solid var(--red-mid); }
.card--accent-gold     { border-left: 4px solid var(--gold); }

/* Sidebar drawer is already full-height fixed — no mobile overrides needed */

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--charcoal);
    color: rgba(255,255,255,.75);
    padding: 50px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand .site-brand__name { font-size: 18px; color: var(--white); display: block; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.7; }
.footer-col h4 {
    color: var(--white);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--red-mid);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,.7); font-size: 14px; transition: color .2s; }
.footer-col ul li a:hover { color: var(--gold); text-decoration: none; }
.footer-col p { font-size: 14px; }
.footer-col p strong { color: var(--white); display: block; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
}
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: var(--white); }

/* ============================================================
   CONTACT MANAGEMENT TABLE
   ============================================================ */
.mgmt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.mgmt-table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--charcoal);
    color: var(--white);
    font-weight: 600;
    white-space: nowrap;
}
.mgmt-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}
.mgmt-table tr:hover td { background: var(--light-gray); }
.mgmt-table__actions { white-space: nowrap; }
.mgmt-table__actions button {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid;
    margin-left: 6px;
}
.btn-edit   { background: transparent; color: var(--red-dark); border-color: var(--red-dark); }
.btn-edit:hover { background: var(--red-dark); color: var(--white); }
.btn-delete { background: transparent; color: var(--mid-gray); border-color: var(--mid-gray); }
.btn-delete:hover { background: var(--mid-gray); color: var(--white); }

/* ============================================================
   RESPONDER LIST TABLE
   ============================================================ */
.responder-table th.sortable { cursor: pointer; user-select: none; }
.responder-table th.sortable:hover { background: #555; }
.responder-table th.sort-asc,
.responder-table th.sort-desc { background: var(--red-mid); }
.responder-table .sort-ind { margin-left: 6px; font-size: 0.7rem; opacity: 0.85; }
.responder-table td a { color: var(--red-mid); text-decoration: none; }
.responder-table td a:hover { text-decoration: underline; }
/* Role column: shrink to content width */
.responder-table th:first-child,
.responder-table td:first-child { width: 1%; white-space: nowrap; }
.responder-table td:first-child .role-badge { font-size: 10px; padding: 2px 7px; }

/* ============================================================
   PURCHASE ORDER FORM
   ============================================================ */
.po-form { max-width: 860px; }

.po-fieldset {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 24px;
}
.po-fieldset legend {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--charcoal);
    padding: 0 8px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.po-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.po-field { display: flex; flex-direction: column; gap: 5px; }
.po-field label { font-weight: 600; font-size: 0.875rem; color: var(--charcoal); }
.po-field input[type="text"],
.po-field input[type="date"],
.po-field input[type="number"],
.po-field select,
.po-field textarea {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--charcoal);
    background: var(--white);
}
.po-field textarea { resize: vertical; }
.po-field input[type="file"] { font-size: 0.875rem; }
.po-field--checkbox { flex-direction: row; align-items: center; gap: 8px; padding-top: 24px; }
.po-field--checkbox label { font-weight: 400; display: flex; align-items: center; gap: 8px; cursor: pointer; }

.po-readonly { background: var(--light-gray) !important; color: var(--mid-gray) !important; cursor: default; }
.po-form input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.po-form input[type="number"]::-webkit-inner-spin-button,
.po-form input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.po-required { color: var(--red-mid); }

.po-actions { display: flex; gap: 12px; margin-top: 8px; align-items: center; }

[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 260px;
    background: var(--charcoal);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,.25);
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
    white-space: normal;
    z-index: 100;
}
[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 14px;
    border: 6px solid transparent;
    border-top-color: var(--charcoal);
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
    z-index: 100;
}
[data-tooltip]:hover::after,
[data-tooltip]:hover::before { opacity: 1; }

.po-errors {
    background: #fff3f3;
    border: 1px solid #f5c6c6;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #c0392b;
    font-size: 0.9rem;
}
.po-errors ul { margin: 8px 0 0 16px; padding: 0; }
.po-errors li { margin-bottom: 4px; }

.po-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
    color: #166534;
    font-size: 1rem;
}
.po-success p { margin: 0 0 16px; font-weight: 600; }

@media (max-width: 600px) {
    .po-grid { grid-template-columns: 1fr; }
    .po-field--checkbox { padding-top: 0; }
}

/* ============================================================
   RECRUIT APPLICATION FORM  (/apply)
   ============================================================ */

.apply-form { max-width: 860px; margin-top: 24px; }

.apply-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
}
.apply-field label { font-weight: 600; font-size: 0.875rem; color: var(--charcoal); }
.apply-field input[type="text"],
.apply-field input[type="email"],
.apply-field input[type="tel"],
.apply-field input[type="date"],
.apply-field input[type="number"],
.apply-field select,
.apply-field textarea {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    color: var(--charcoal);
}
.apply-field input:focus,
.apply-field select:focus,
.apply-field textarea:focus { outline: 2px solid var(--red-mid); border-color: var(--red-mid); }

.apply-field--full  { width: 100%; }
.apply-field--half  { width: calc(50% - 10px); }
.apply-field--grow  { flex: 1; min-width: 160px; }

.apply-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 0;
}
.apply-row .apply-field { margin-bottom: 20px; }

.apply-fieldset {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px 20px 4px;
    margin-bottom: 20px;
}
.apply-fieldset legend {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--charcoal);
    padding: 0 8px;
}

.apply-required { color: var(--red-mid); }

.apply-input--error { border-color: var(--red-mid) !important; outline-color: var(--red-mid) !important; }
.apply-field__error { color: var(--red-mid); font-size: 0.8rem; margin-top: 3px; }
.apply-optional { font-weight: 400; font-style: italic; color: var(--mid-gray); font-size: 0.8rem; }

.apply-field--checkbox-middle { justify-content: flex-start; padding-top: 32px; padding-right: 24px; flex: 0 0 auto; }
.apply-field--checkbox-middle label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.875rem; color: var(--charcoal); cursor: pointer; }

.apply-radios { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.apply-radio { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 0.95rem; color: var(--charcoal); cursor: pointer; }

.apply-actions { display: flex; gap: 12px; margin-top: 8px; align-items: center; }

.apply-errors {
    background: #fff3f3;
    border: 1px solid #f5c6c6;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #c0392b;
    font-size: 0.9rem;
}
.apply-errors ul { margin: 8px 0 0 16px; padding: 0; }
.apply-errors li { margin-bottom: 4px; }

.apply-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
    color: #166534;
    font-size: 1rem;
}
.apply-success p { margin: 0 0 16px; font-weight: 600; }

@media (max-width: 600px) {
    .apply-field--half { width: 100%; }
}

/* ============================================================
   VIEW PURCHASE ORDERS LIST & DETAIL
   ============================================================ */

/* Filter bar */
.vpos-filter-form { margin-bottom: 16px; }
.vpos-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    align-items: end;
}
.vpos-filter-group { display: flex; flex-direction: column; gap: 4px; }
.vpos-filter-group label { font-size: 0.8rem; font-weight: 600; color: var(--charcoal); }
.vpos-filter-group input[type="text"],
.vpos-filter-group input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.875rem;
    background: var(--white);
    color: var(--charcoal);
}
.vpos-filter-group--actions { justify-content: flex-end; }

.vpos-btn {
    padding: 7px 16px;
    background: var(--red-mid);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.vpos-btn:hover { background: var(--red-dark); color: var(--white); }
.vpos-btn--outline {
    background: transparent;
    color: var(--charcoal);
    border: 1px solid #aaa;
}
.vpos-btn--outline:hover { background: #f0f0f0; color: var(--charcoal); }

/* Pagination bar (top) */
.vpos-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.875rem;
    color: var(--mid-gray);
}
.vpos-pagination-bar__info { flex: 1; }
.vpos-pagination-bar__size { display: flex; align-items: center; gap: 6px; }
.vpos-per-page-select {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.875rem;
    background: var(--white);
}

/* Table */
.vpos-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.vpos-table th {
    background: var(--charcoal);
    color: var(--white);
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
}
.vpos-table td { padding: 9px 12px; border-bottom: 1px solid #e8e8e8; vertical-align: top; }
.vpos-table tbody tr:hover { background: #f9f9f9; }

.vpos-table th:has(.vpos-sort-link):hover { background: #555; }
.vpos-table th:has(.vpos-sort-link--active) { background: var(--red-mid); }

.vpos-sort-link { color: var(--white); text-decoration: none; white-space: nowrap; }
.vpos-sort-link:hover { color: #f5b0b0; }
.vpos-sort-link--active { color: var(--white); }
.vpos-sort-idle { opacity: 0.45; font-size: 0.7rem; margin-left: 4px; }

.vpos-vendor { max-width: 220px; word-break: break-word; }
.vpos-cost { white-space: nowrap; font-variant-numeric: tabular-nums; }
.vpos-detail-link { color: var(--red-mid); text-decoration: none; font-weight: 600; white-space: nowrap; }
.vpos-detail-link:hover { text-decoration: underline; }
.vpos-empty { text-align: center; color: var(--mid-gray); font-style: italic; padding: 24px; }

/* Pagination nav (bottom) */
.vpos-pagination-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 16px;
    align-items: center;
}
.vpos-pg-btn {
    min-width: 36px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: var(--white);
    color: var(--charcoal);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}
.vpos-pg-btn:hover:not([disabled]) { background: var(--light-gray); }
.vpos-pg-btn--active { background: var(--red-mid); color: var(--white); border-color: var(--red-mid); font-weight: 700; }
.vpos-pg-btn[disabled] { opacity: 0.45; cursor: default; }
.vpos-pg-ellipsis { padding: 5px 4px; color: var(--mid-gray); font-size: 0.85rem; }

/* Loading overlay */
.vpos-loading { opacity: 0.45; pointer-events: none; transition: opacity .15s; }

/* Detail page */
.vpos-detail { max-width: 860px; }
.vpos-detail-actions { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; align-items: center; }
.vpos-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.vpos-detail-section {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 18px 20px;
}
.vpos-detail-section h3 {
    margin: 0 0 12px;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--mid-gray);
}
.vpos-detail-section--full { grid-column: 1 / -1; }
.vpos-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 0.9rem; }
.vpos-dl dt { font-weight: 600; color: var(--charcoal); white-space: nowrap; }
.vpos-dl dd { margin: 0; color: #444; }
.vpos-detail-text { font-size: 0.9rem; line-height: 1.6; white-space: pre-wrap; color: #333; }
.vpos-detail-total {
    margin-top: 12px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--charcoal);
}

@media (max-width: 640px) {
    .vpos-filter-grid { grid-template-columns: 1fr 1fr; }
    .vpos-detail-grid { grid-template-columns: 1fr; }
    .vpos-detail-section--full { grid-column: 1; }
}
@media (max-width: 420px) {
    .vpos-filter-grid { grid-template-columns: 1fr; }
}

.mgmt-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.photo-picker { display: flex; flex-direction: column; gap: 8px; }
.photo-picker__preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: var(--light-gray);
    border-radius: 4px;
    font-size: 0.85rem;
}
.photo-picker__preview img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}
.photo-picker__buttons { display: flex; gap: 8px; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.section-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--red-dark);
    border-bottom: 2px solid var(--red-dark);
    padding-bottom: 8px;
    margin: 40px 0 20px;
}
.section-heading:first-child { margin-top: 0; }

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 16px;
}

.contact-card {
    display: flex;
    gap: 24px;
    align-items: center;
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 20px;
}

.contact-card__photo {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-card__identity {
    flex-shrink: 0;
    width: 180px;
}
.contact-card__name {
    margin: 0 0 2px;
    font-size: 1rem;
    font-weight: 700;
}
.contact-card__title {
    margin: 0;
    color: var(--mid-gray);
    font-size: 0.875rem;
    font-weight: 600;
}

.contact-card__desc {
    flex: 1;
    font-size: 0.925rem;
    color: var(--dark);
    margin: 0;
}

.contact-card__action {
    flex-shrink: 0;
}
.contact-card__email-btn {
    font-size: 0.85rem;
    padding: 7px 16px;
    cursor: pointer;
    background: transparent;
    color: var(--red-dark);
    border: 1px solid var(--red-dark);
    border-radius: 4px;
    white-space: nowrap;
}
.contact-card__email-btn:hover {
    background: var(--red-dark);
    color: var(--white);
}

/* Contact modal */
.contact-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.contact-modal.is-open { display: flex; }

.contact-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
}
.contact-modal__dialog {
    position: relative;
    background: var(--white);
    border-radius: 10px;
    padding: 36px 40px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 8px 40px rgba(0,0,0,.25);
    z-index: 1;
}
.contact-modal__close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--mid-gray);
}
.contact-modal__close:hover { color: var(--dark); }
.contact-modal__title { margin: 0 0 4px; font-size: 1.3rem; }
.contact-modal__recipient { margin: 0 0 12px; color: var(--mid-gray); font-size: 0.9rem; }
.contact-modal__intro {
    margin: 0 0 20px;
    font-size: 0.9rem;
    color: var(--dark);
    line-height: 1.55;
    padding: 12px 14px;
    background: var(--light-gray);
    border-radius: 6px;
}

.contact-modal__field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
}
.contact-modal__field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
}
.contact-modal__field input,
.contact-modal__field textarea {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    width: 100%;
}
.contact-modal__field input:focus,
.contact-modal__field textarea:focus {
    outline: none;
    border-color: var(--red-dark);
    box-shadow: 0 0 0 2px rgba(139,0,0,.15);
}
.contact-modal__field textarea { resize: vertical; }
.contact-modal__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}
.contact-modal__cancel {
    margin-right: auto;
    color: var(--mid-gray) !important;
    border-color: var(--mid-gray) !important;
}
.contact-modal__cancel:hover {
    background: var(--light-gray) !important;
    color: var(--dark) !important;
}
.contact-modal__status { font-size: 0.875rem; }
.contact-modal__status--ok  { color: #2e7d32; }
.contact-modal__status--err { color: var(--red-bright); }

@media (max-width: 600px) {
    .contact-card { flex-wrap: wrap; }
    .contact-card__identity { width: auto; flex: 1; }
    .contact-card__desc { width: 100%; }
    .contact-card__action { width: 100%; text-align: center; }
    .contact-modal__dialog { padding: 28px 20px; margin: 16px; }
}

/* ============================================================
   CONCRETE CMS EDITOR TOOLBAR OVERRIDE
   ============================================================ */
#ccm-toolbar { position: fixed !important; }

/* When CMS toolbar is visible, take the header out of sticky/stacking
   so CMS panels can render above it unobstructed.
   Note: ConcreteCMS adds ccm-toolbar-visible to <html>, not <body>. */

html.ccm-toolbar-visible .site-header {
    margin-top: 48px;
    position: relative;
    top: auto;
    z-index: 500; /* below CMS panels (900) and toolbar (1000), but creates a stacking context so nav dropdowns render above page content */
}

/* Header not sticky for admins — wrapper needs smaller top offset */
html.ccm-toolbar-visible .members-sidebar { top: 16px; }

/* In edit mode, ConcreteCMS wraps each Area in a block-level div.
   Inside .card__header (a flex row), those divs become oversized flex items.
   display:contents removes the wrapper box from layout so the actual
   content (icon/title) participates in the flex row directly. */

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .with-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}

/* ============================================================
   ASSESSMENT FORM
   ============================================================ */
.assessment-form { max-width: 560px; margin-top: 32px; }
.assessment-form__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.assessment-form__field label { font-weight: 600; font-size: 14px; color: var(--dark); }
.assessment-form__field input { padding: 10px 12px; font-size: 15px; border: 1px solid #ccc; border-radius: 4px; }
.assessment-form__field input:focus { outline: none; border-color: var(--red-mid); box-shadow: 0 0 0 2px rgba(180,30,30,.15); }
.assessment-form__actions { margin-top: 8px; }
.assessment-success { background: #eafbe7; border: 1px solid #7bc67a; border-radius: 6px; padding: 16px 20px; margin-top: 24px; color: #2a6b28; }
.assessment-success__note { font-size: 13px; opacity: .7; margin-top: 8px; }
.form-errors { background: #fdf0f0; border: 1px solid #e8a0a0; border-radius: 6px; padding: 12px 20px; margin-bottom: 20px; color: #8b1a1a; }
.form-errors ul { margin: 0; padding-left: 20px; }
.required { color: var(--red-dark); }
.signup-form { max-width: 560px; margin-top: 32px; }
.signup-form__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.signup-form__field label { font-weight: 600; font-size: 14px; color: var(--dark); }
.signup-form__field input { padding: 10px 12px; font-size: 15px; border: 1px solid #ccc; border-radius: 4px; }
.signup-form__field input:focus { outline: none; border-color: var(--red-mid); box-shadow: 0 0 0 2px rgba(180,30,30,.15); }
.signup-form__actions { margin-top: 8px; }
.signup-success { background: #eafbe7; border: 1px solid #7bc67a; border-radius: 6px; padding: 16px 20px; margin-top: 24px; color: #2a6b28; }

/* ============================================================
   PUBLISH COMMUNITY ALERT FORM
   ============================================================ */
.pubca-form { margin-top: 32px; }
.pubca-form__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.pubca-form__field label { font-weight: 600; font-size: 14px; color: var(--dark); }
.pubca-form__field input,
.pubca-form__field select { padding: 10px 12px; font-size: 15px; border: 1px solid #ccc; border-radius: 4px; background: var(--white); }
.pubca-form__field input:focus,
.pubca-form__field select:focus { outline: none; border-color: var(--red-mid); box-shadow: 0 0 0 2px rgba(180,30,30,.15); }
.pubca-radio-group { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.pubca-radio { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 15px; cursor: pointer; }
.pubca-radio input[type="radio"] { width: 16px; height: 16px; accent-color: var(--red-mid); cursor: pointer; }
.pubca-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pubca-form__actions { margin-top: 16px; }
.pubca-confirm { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 6px; padding: 24px; margin-top: 8px; }
.pubca-confirm__note { color: #555; margin-bottom: 20px; }
.pubca-confirm__actions { display: flex; gap: 12px; margin-top: 20px; }
.pubca-success { background: #eafbe7; border: 1px solid #7bc67a; border-radius: 6px; padding: 20px 24px; margin-top: 24px; color: #2a6b28; }
.prw-info { background: var(--light-gray); border-left: 4px solid var(--red-mid); border-radius: 4px; padding: 16px 20px; margin-bottom: 28px; font-size: 14px; }
.prw-info p { margin: 0 0 10px; }
.prw-info p:last-child { margin-bottom: 0; }
.prw-info__cmd-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin: 10px 0; }
.prw-info__cmd { width: 100%; background: #1a1a1a; color: #e8e8e8; border-radius: 4px; padding: 12px 16px; font-size: 13px; white-space: pre-wrap; word-break: break-all; margin: 0; }
.prw-info__copy { background: #444; color: #e8e8e8; border: none; border-radius: 3px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.prw-info__copy:hover { background: #666; }
@media (max-width: 640px) { .pubca-form__row { grid-template-columns: 1fr; } }

/* ============================================================
   COMMUNITY ALERT PREFERENCES
   ============================================================ */
.prefs-form { max-width: 480px; margin-top: 24px; }
.prefs-form__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.prefs-form__field label { font-weight: 600; font-size: 14px; color: var(--dark); }
.prefs-form__field input { padding: 10px 12px; font-size: 15px; border: 1px solid #ccc; border-radius: 4px; }
.prefs-form__field input:focus { outline: none; border-color: var(--red-mid); box-shadow: 0 0 0 2px rgba(180,30,30,.15); }
.prefs-form__actions { margin-top: 8px; }

.prefs-modal { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; }
.prefs-modal.is-open { display: flex; }
.prefs-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.prefs-modal__dialog { position: relative; background: var(--white); border-radius: 8px; padding: 32px 36px; max-width: 520px; width: calc(100% - 40px); max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,.25); }
.prefs-modal__close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--mid-gray); padding: 4px 8px; }
.prefs-modal__close:hover { color: var(--dark); }
.prefs-modal__title { margin: 0 0 16px; font-size: 1.25rem; color: var(--dark); }
.prefs-modal__body p { margin: 0 0 12px; }
.prefs-modal__body p:last-child { margin-bottom: 0; }
.prefs-modal__list { margin: 0 0 16px; padding-left: 20px; }
.prefs-modal__list li { margin-bottom: 8px; line-height: 1.5; }
.prefs-modal__list li:last-child { margin-bottom: 0; }
.prefs-modal__rule { border: none; border-top: 1px solid #e0e0e0; margin: 20px 0; }

/* ============================================================
   RISTWATCH PAPER DELIVERY PREFERENCES
   ============================================================ */
.rwprefs-form { max-width: 560px; margin-top: 24px; }
.rwprefs-form__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.rwprefs-form__field label { font-weight: 600; font-size: 14px; color: var(--dark); }
.rwprefs-form__field input[type="text"],
.rwprefs-form__field input[type="email"] { padding: 10px 12px; font-size: 15px; border: 1px solid #ccc; border-radius: 4px; }
.rwprefs-form__field input[type="text"]:focus,
.rwprefs-form__field input[type="email"]:focus { outline: none; border-color: var(--red-mid); box-shadow: 0 0 0 2px rgba(180,30,30,.15); }
.rwprefs-form__row { display: grid; grid-template-columns: 1fr 60px 90px; gap: 12px; }
.rwprefs-radio-group { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.rwprefs-radio { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; font-size: 15px; cursor: pointer; line-height: 1.4; }
.rwprefs-radio input[type="radio"] { width: 16px; height: 16px; accent-color: var(--red-mid); cursor: pointer; flex-shrink: 0; margin-top: 2px; }
.rwprefs-form__actions { margin-top: 8px; }
.field-error { display: block; margin-top: -10px; margin-bottom: 16px; font-size: 13px; color: #8b1a1a; }
@media (max-width: 480px) { .rwprefs-form__row { grid-template-columns: 1fr; } }

/* ============================================================
   COMMUNITY ALERTS
   ============================================================ */
.ca-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.ca-controls input[type=search] { flex: 1; min-width: 200px; padding: 8px 12px; font-size: 15px; border: 1px solid #ccc; border-radius: 4px; }
.ca-controls input[type=search]:focus { outline: none; border-color: var(--red-mid); box-shadow: 0 0 0 2px rgba(180,30,30,.15); }
.ca-controls select { padding: 8px 12px; font-size: 15px; border: 1px solid #ccc; border-radius: 4px; background: var(--white); }

.ca-list { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.9rem; }
.ca-list th { text-align: left; padding: 10px 12px; background: var(--charcoal); color: var(--white); font-weight: 600; white-space: nowrap; }
.ca-list td { padding: 9px 12px; border-bottom: 1px solid #e0e0e0; vertical-align: middle; }
.ca-list tr:hover td { background: var(--light-gray); }
.ca-list td:first-child { white-space: nowrap; }
.ca-list td:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-list__link { color: var(--red-mid); text-decoration: none; cursor: pointer; background: none; border: none; padding: 0; font: inherit; text-align: left; }
.ca-list__link:hover { text-decoration: underline; }
.ca-list__sortable { cursor: pointer; user-select: none; }
.ca-list__sortable:hover { background: #555; }
.ca-list th.ca-list__sorted-asc, .ca-list th.ca-list__sorted-desc { background: var(--red-mid); }
.ca-sort-arrow { margin-left: 6px; font-size: 0.7rem; opacity: 0.85; }
.ca-list--loading tbody { opacity: .4; pointer-events: none; }

.ca-type { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 12px; white-space: nowrap; }
.ca-type--safety { background: #fde8e8; color: var(--red-dark); }
.ca-type--info   { background: #e8f0fe; color: #1a56a0; }

.ca-pagination { display: flex; gap: 4px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.ca-pagination__btn { padding: 6px 12px; border: 1px solid #ccc; border-radius: 4px; background: var(--white); cursor: pointer; font-size: 14px; }
.ca-pagination__btn:hover:not(:disabled) { background: var(--light-gray); }
.ca-pagination__btn.is-active { background: var(--red-mid); color: var(--white); border-color: var(--red-mid); }
.ca-pagination__btn:disabled { opacity: .4; cursor: default; }

.ca-modal { display: none; position: fixed; inset: 0; z-index: 2000; align-items: center; justify-content: center; }
.ca-modal.is-open { display: flex; }
.ca-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.ca-modal__dialog { position: relative; background: var(--white); border-radius: 10px; padding: 36px 40px; width: 100%; max-width: 720px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 8px 40px rgba(0,0,0,.25); z-index: 1; }
.ca-modal__close { position: absolute; top: 14px; right: 18px; background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--mid-gray); }
.ca-modal__close:hover { color: var(--dark); }
.ca-modal__meta { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 14px; color: var(--mid-gray); }
.ca-modal__subject { margin: 0 0 16px; font-size: 1.25rem; }
.ca-modal__body { overflow-y: auto; flex: 1; }
.ca-modal__body img { max-width: 100%; height: auto; }

@media (max-width: 680px) {
    .ca-modal__dialog { padding: 24px 20px; max-height: 95vh; }
    .ca-controls input[type=search] { min-width: 0; }
}

@media (max-width: 680px) {
    .main-nav { display: none; }
    .main-nav.is-open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--red-dark);
        padding: 12px 20px 20px;
        box-shadow: 0 6px 20px rgba(0,0,0,.3);
    }
    .main-nav.is-open ul { flex-direction: column; gap: 2px; }
    .nav-toggle { display: flex; }
    .site-header { position: relative; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-rotator { height: 260px; }
    .donation-bar .container { flex-direction: column; align-items: stretch; }
}
