/* ======================================== 
   CHARITY CATALYST — WARM SANDY CHARITY THEME
   Serif body (Lora) · Sans-serif headings (DM Sans)
   Sandy / Teal / Navy palette
   ======================================== */

:root {
  /* Primary Accent — Teal */
  --accent: #2aa198;
  --accent-dark: #1a7872;
  --accent-light: #7dd3cb;
  --accent-gradient: linear-gradient(135deg, #2aa198 0%, #1a7872 100%);

  /* Secondary Accent — Navy */
  --navy: #1b365d;
  --navy-dark: #0f1f3a;
  --navy-light: #2e5090;
  --navy-gradient: linear-gradient(135deg, #1b365d 0%, #2e5090 100%);

  /* Warm Sandy Palette */
  --sand: #f5f0e6;
  --sand-dark: #e8dfd0;
  --sand-light: #faf7f1;
  --cream: #fffcf6;
  --coral: #e87461;
  --sunset-orange: #f09860;

  /* Backgrounds */
  --bg: #faf7f1;
  --bg-light: #f7f3eb;
  --bg-sand: #f5f0e6;
  --bg-wave: linear-gradient(135deg, rgba(42, 161, 152, 0.04) 0%, rgba(245, 240, 230, 0.6) 100%);

  /* Text Colors */
  --text: #3d3530;
  --text-light: #6b5e54;
  --text-dark: #1e1916;

  /* UI Elements */
  --border: #e5ddd2;
  --border-light: #f0ebe3;
  --shadow-sm: 0 2px 8px rgba(42, 161, 152, 0.07);
  --shadow-md: 0 4px 20px rgba(27, 54, 93, 0.08);
  --shadow-lg: 0 8px 36px rgba(27, 54, 93, 0.12);
  --shadow-hover: 0 14px 44px rgba(27, 54, 93, 0.16);

  /* Status Colors */
  --success: #4caf50;
  --success-light: #66bb6a;
  --error: #e53935;
  --error-light: #ef5350;
  --warning: #f59e0b;
  --info: #2196f3;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-xxl: 72px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 50px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Font stacks */
  --font-body: 'Alegreya Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Volunteer hub layout */
  --header-h: 76px;
  --sidebar-w: 244px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 18px;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 {
  font-size: 2.8em;
  font-weight: 800;
  margin-bottom: var(--spacing-lg);
  color: var(--navy);
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.2em;
  margin-bottom: var(--spacing-md);
  color: var(--navy);
}

h3 {
  font-size: 1.55em;
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
}

a {
  transition: all var(--transition-base);
}

.lead {
  font-size: 1.3em;
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
  line-height: 1.8;
  font-weight: 400;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.site-header {
  background: var(--sand-light);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 12px rgba(27, 54, 93, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-inner {
  position: relative;
  max-width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

.logo img {
  height: 48px;
  display: block;
  transition: transform var(--transition-base);
}

.logo a {
  display: block;
  line-height: 0;
}

/* "Volunteer Hub" wordmark beside the logo on hub pages */
.hub-tag {
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  padding-left: var(--spacing-sm);
  border-left: 1px solid var(--border);
  line-height: 1.2;
  white-space: nowrap;
}

.logo img:hover {
  transform: scale(1.05);
}

/* Navigation */
.main-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.nav-auth {
  display: flex;
  gap: var(--spacing-xs);
  align-items: center;
  margin-left: var(--spacing-sm);
  flex-shrink: 0;
}

/* Hamburger. Hidden on wide screens; the media queries below swap it in and
   turn .main-nav into a drop-down panel. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-base);
}

.nav-toggle i {
  margin-right: 0;
}

.nav-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: rgba(42, 161, 152, 0.06);
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: rgba(42, 161, 152, 0.1);
}

.user-info-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-left: auto;
  background: none;
  box-shadow: none;
  border: none;
  padding: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-left: var(--spacing-md);
}

.username {
  color: var(--navy);
  font-weight: 600;
  font-size: 1em;
  font-family: var(--font-heading);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.username i {
  color: var(--text-light);
  font-size: 1.15em;
  margin-right: 0;
}

/* nowrap is what stops "For Charities" breaking onto two lines and going
   ragged-left as the window narrows. */
.main-nav > a {
  color: var(--text);
  text-decoration: none;
  padding: var(--spacing-sm) 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  font-weight: 600;
  font-size: 0.95em;
  font-family: var(--font-heading);
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.main-nav > a::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--accent);
  transition: transform var(--transition-base);
}

.main-nav > a:hover {
  color: var(--accent-dark);
  background: rgba(42, 161, 152, 0.06);
}

.main-nav > a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.main-nav > a.nav-active {
  color: var(--accent-dark);
}

.main-nav > a.nav-active::after {
  transform: translateX(-50%) scaleX(1);
  background: var(--accent);
}

.btn-login,
.btn-register {
  background: var(--accent-gradient);
  color: white !important;
  padding: 10px 20px !important;
  border-radius: var(--radius-pill);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  font-size: 0.95em;
  white-space: nowrap;
  text-decoration: none;
}

.btn-login::after,
.btn-register::after {
  display: none;
}

.btn-login:hover,
.btn-register:hover {
  background: var(--accent-dark) !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-hub {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-gradient);
  color: white;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  font-size: 0.95em;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-hub i {
  margin-right: 0;
}

.btn-hub:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.logout-link {
  color: var(--text-light) !important;
  font-size: 1em;
}

/* ========================================
   PUBLIC HEADER — RESPONSIVE

   Breakpoints are measured, not guessed. Laid out at full size the six nav
   items need 864px; with the logo and the signed-in name plus Volunteer Hub
   button either side, the bar needs ~1440px to fit. Dropping the icons and
   tightening the spacing brings the nav to 593px, which fits down to ~1120px.
   Below that there is no honest way to keep six items on one line, so it
   collapses into a drop-down panel behind the hamburger.

   Getting these wrong is what made the nav wrap into a ragged second row and
   run underneath the logo, so keep them in step with the measurements above if
   nav items are ever added or renamed.
   ======================================== */

@media (max-width: 1500px) {
  .header-inner {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .main-nav > a {
    padding: var(--spacing-sm) 9px;
    font-size: 0.88em;
    gap: 5px;
  }

  .main-nav > a i {
    display: none;
  }

  .btn-login,
  .btn-register {
    padding: 9px 16px !important;
    font-size: 0.88em;
  }

  .btn-hub {
    padding: 9px 18px;
    font-size: 0.88em;
  }

  .user-info-header .username {
    font-size: 0.9em;
  }
}

@media (max-width: 1180px) {
  /* margin-left: 0 so the auto margin on .user-info-header is the only one
     claiming the free space — otherwise the two share it and the signed-in
     name floats in the middle of the bar. */
  .nav-toggle {
    display: inline-flex;
    order: 3;
    margin-left: var(--spacing-sm);
  }

  /* Drops out of the flex row and becomes a panel under the bar. */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    padding: var(--spacing-sm);
    background: var(--sand-light);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 100%);
    overflow-y: auto;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav > a {
    width: 100%;
    padding: 12px var(--spacing-sm);
    font-size: 1em;
    gap: 10px;
  }

  .main-nav > a i {
    display: inline-block;
    width: 20px;
    text-align: center;
    color: var(--accent);
  }

  /* The sliding underline reads as a stray dash in a vertical list. */
  .main-nav > a::after {
    display: none;
  }

  .main-nav > a.nav-active {
    background: rgba(42, 161, 152, 0.1);
  }

  .nav-auth {
    width: 100%;
    margin: var(--spacing-xs) 0 0;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border);
    gap: var(--spacing-xs);
  }

  .nav-auth a {
    flex: 1;
    text-align: center;
  }

  .user-info-header {
    margin-left: auto;
    gap: var(--spacing-sm);
  }
}

/* Below this the username is the first thing worth dropping — the Volunteer
   Hub button it sits beside is the actual destination. */
@media (max-width: 600px) {
  .site-header .user-info-header .username {
    display: none;
  }
}

@media (max-width: 400px) {
  .btn-hub span {
    display: none;
  }

  .btn-hub {
    padding: 9px 14px;
  }
}

/* ========================================
   PAGE LAYOUT
   ======================================== */

/* flex: 1 instead of the old `calc(100vh - 180px)`, which guessed at the header
   and footer heights. Hub pages get a real minimum below — see
   .main-content.with-sidebar. */
.page-wrapper {
  display: flex;
  align-items: stretch;
  flex: 1;
  background: var(--bg);
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sand);
  border-right: 1px solid var(--border);
  padding: var(--spacing-md) 0 var(--spacing-xl);
}

/* The rail fills the column so the sand band never stops short of the content,
   while the links themselves stay in view as the page scrolls. */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  position: sticky;
  top: calc(var(--header-h) + var(--spacing-md));
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
  font-weight: 500;
  font-family: var(--font-heading);
  border-radius: var(--radius-sm);
  font-size: 0.97em;
  line-height: 1.3;
}

/* Single accent marker, inset so its ends clear the pill's rounded corners. */
.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  transform: translateY(-50%);
  transition: height var(--transition-base);
}

.sidebar-link:hover {
  background: rgba(42, 161, 152, 0.07);
  color: var(--accent-dark);
}

.sidebar-link.active {
  background: rgba(42, 161, 152, 0.1);
  color: var(--accent-dark);
  font-weight: 700;
}

.sidebar-link.active::before {
  height: 22px;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: var(--spacing-sm) 14px;
}

.sidebar-section-title {
  font-size: 0.84em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  padding: var(--spacing-xs) 14px;
  letter-spacing: 0.1em;
  font-family: var(--font-heading);
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: var(--spacing-md) var(--spacing-xl);
  max-width: 100%;
}

/* Public pages are built from full-bleed sections that each bring their own
   inner container and padding. Giving them an unpadded column means they no
   longer have to cancel this padding with negative margins — a trick that
   silently broke, and pushed every section 8px past both screen edges, as
   soon as --spacing-xl shrank at the 768px breakpoint. */
.main-content:not(.with-sidebar) {
  padding: 0;
}

/* Fills the first screen so the footer starts just below the fold on every hub
   page. Without it a short page (an empty Pending Uploads, say) puts the footer
   halfway up the screen while a long one puts it off-screen, which is what made
   the footer look like it moved between pages. */
.main-content.with-sidebar {
  padding: var(--spacing-lg) var(--spacing-lg);
  max-width: calc(100% - var(--sidebar-w));
  min-height: calc(100vh - var(--header-h));
}

/* ========================================
   LOGOUT BUTTON
   ======================================== */

/* Beats the global `form button[type=submit]` pill so the header keeps a quiet
   secondary action instead of a second primary-looking button. */
.logout-btn,
form.plain-form button.logout-btn[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-light);
  font-size: 0.92em;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  border-radius: var(--radius-pill);
  box-shadow: none;
  transition: all var(--transition-base);
}

.logout-btn i {
  margin-right: 0;
  font-size: 1.05em;
}

.logout-btn:hover,
form.plain-form button.logout-btn[type="submit"]:hover {
  color: var(--accent-dark);
  background: rgba(42, 161, 152, 0.08);
  border-color: rgba(42, 161, 152, 0.25);
  transform: none;
  box-shadow: none;
}

/* ========================================
   COMPACT HEADER (logged-in dashboard)
   ======================================== */

.header-compact .header-inner {
  height: var(--header-h);
  padding: 0 var(--spacing-lg);
  gap: var(--spacing-md);
}

.header-compact .logo img {
  height: 46px;
}

.header-compact .username {
  font-size: 0.95em;
}

.header-compact .logout-btn {
  font-size: 0.95em;
  padding: 8px 16px;
}

/* ========================================
   FORMS
   ======================================== */

form {
  background: var(--sand-light);
  padding: var(--spacing-xl);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-width: 500px;
}

/* Forms that exist only to carry a single action (log out, mark as seen) are
   not panels — without this the global rule above draws a card around them. */
form.plain-form {
  display: inline;
  background: none;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  max-width: none;
}

form p {
  margin-bottom: var(--spacing-md);
}

form label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--navy);
  font-size: 1em;
  font-family: var(--font-heading);
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="file"],
form textarea,
form select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1em;
  font-family: var(--font-body);
  transition: all var(--transition-base);
  background: #ffffff;
  color: var(--text);
}

form input:focus,
form textarea:focus,
form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(42, 161, 152, 0.1);
  background: #ffffff;
}

/* :not(.btn) so a button that opts into the button system — .btn-secondary,
   .btn-reject — is not overridden back to a primary pill by this fallback. */
form button[type="submit"]:not(.btn) {
  background: var(--accent-gradient);
  color: white;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-heading);
}

form button[type="submit"]:not(.btn):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

form button[type="submit"]:not(.btn):active {
  transform: translateY(0);
}

form .helptext {
  display: block;
  font-size: 0.95em;
  color: var(--text-light);
  margin-top: 6px;
  line-height: 1.5;
}

form .errorlist {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-sm) 0;
  color: var(--error);
  font-size: 1em;
}

/* ========================================
   MESSAGES & ALERTS
   ======================================== */

.messages {
  list-style: none;
  padding: 0;
  margin-bottom: var(--spacing-lg);
}

.message {
  background: rgba(42, 161, 152, 0.08);
  box-shadow: inset 3px 0 0 var(--accent);
  padding: 12px var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.95em;
  font-weight: 500;
  color: var(--text);
}

/* ========================================
   LISTS & CONTENT
   ======================================== */

ul {
  margin: var(--spacing-md) 0;
}

li {
  margin-bottom: var(--spacing-sm);
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
  background: var(--navy-dark);
  border-top: 3px solid var(--accent);
  margin-top: 0;
  padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-md);
  color: rgba(255, 255, 255, 0.75);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1em;
  font-family: var(--font-heading);
}

.footer-section p {
  margin: var(--spacing-xs) 0;
  font-size: 0.88em;
  line-height: 1.6;
}

.footer-section a {
  color: var(--accent-light);
  text-decoration: none;
  transition: all var(--transition-base);
}

.footer-section a:hover {
  text-decoration: underline;
  color: #ffffff;
}

.footer-acnc {
  display: flex;
  align-items: center;
  justify-content: center;
}

.acnc-logo {
  max-width: 128px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.88em;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  padding: var(--spacing-xl) var(--spacing-xl);
  background: linear-gradient(160deg, #0d4f4a 0%, #1a7872 40%, #0f3d3a 100%);
  border-radius: 0;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xxl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.hero-right {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: var(--spacing-xxl);
  padding-top: var(--spacing-xl);
  align-self: end;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(125, 211, 203, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 153, 102, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero h1 {
  font-size: 4.2em;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  color: white;
  -webkit-text-fill-color: white;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
  line-height: 1.05;
}

.hero .lead {
  font-size: 1.55em;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  color: white;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--accent-light);
  border-radius: 0;
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
}

.hero p {
  margin-bottom: var(--spacing-sm);
  position: relative;
  z-index: 1;
  font-size: 1.3em;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  text-align: left;
}

.hero ul {
  text-align: left;
  margin: var(--spacing-xs) 0;
  position: relative;
  z-index: 1;
  font-size: 1.1em;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
  padding-left: var(--spacing-md);
}

.hero .cta-buttons {
  position: relative;
  z-index: 1;
  justify-content: flex-start;
  margin-top: var(--spacing-sm);
}

.hero li {
  margin-bottom: 6px;
}

/* ========================================
   PAGE HEADER (light variant for inner pages)
   ======================================== */

.page-header {
  padding: var(--spacing-lg) var(--spacing-xl);
  background: var(--sand);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.page-header h1 {
  font-size: 2.8em;
  margin-bottom: var(--spacing-sm);
  color: var(--navy);
  line-height: 1.1;
}

.page-header .lead {
  font-size: 1.25em;
  color: var(--text);
  line-height: 1.7;
  max-width: 900px;
  border-left: 4px solid var(--accent);
  background: rgba(42, 161, 152, 0.06);
  padding: var(--spacing-sm) var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.page-header p {
  font-size: 1.1em;
  color: var(--text-light);
  line-height: 1.75;
  max-width: 800px;
  margin-bottom: var(--spacing-xs);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-block;
  padding: 16px 36px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
  transition: all var(--transition-base);
  border: none;
  cursor: pointer;
  font-size: 1.05em;
  font-family: var(--font-heading);
  box-shadow: var(--shadow-md);
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 3px solid var(--accent);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-md);
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  margin-top: var(--spacing-md);
}

/* ========================================
   FEATURE CARDS
   ======================================== */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xxl);
}

.feature-card {
  background: var(--cream);
  padding: var(--spacing-xl) var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  border-left: 3px solid var(--accent);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card h3 {
  color: var(--accent-dark);
  margin-top: 0;
  margin-bottom: var(--spacing-md);
  font-size: 1.5em;
}

.feature-card p {
  margin-bottom: var(--spacing-md);
  color: var(--text);
  line-height: 1.85;
  font-size: 1.05em;
}

.feature-card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-base);
  padding: var(--spacing-xs) 0;
  font-size: 1.05em;
}

.feature-card a:hover {
  color: var(--accent-dark);
  gap: 14px;
}

/* ========================================
   CONTENT PAGES
   ======================================== */

.content-page {
  max-width: 1800px;
  width: 95%;
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--cream);
  border-radius: var(--radius-md);
}

.content-wide {
  max-width: 1800px;
  width: 95%;
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--cream);
  border-radius: var(--radius-md);
}

/* Inside the hub the shell already sits in a padded column, so it uses the
   full width rather than a second 5% inset. */
.main-content.with-sidebar .content-wide,
.main-content.with-sidebar .content-page {
  width: 100%;
  max-width: 1280px;
  margin: 0;
  box-shadow: var(--shadow-sm);
}

/* Dashboard header */
.dash-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--sand-light);
  border-bottom: 1px solid var(--border);
}

.dash-header-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(42, 161, 152, 0.12);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05em;
  flex-shrink: 0;
}

.dash-header-icon i {
  margin-right: 0;
}

.dash-header h1 {
  margin: 0;
  font-size: 1.3em;
  letter-spacing: -0.01em;
}

.dash-header .lead {
  margin: 2px 0 0;
  font-size: 0.95em;
  line-height: 1.5;
}

.dash-body {
  padding: var(--spacing-lg);
}

/* Headings inside a hub page are subordinate to the dash-header title, so they
   step down from it rather than using the marketing-page display sizes. */
.dash-body h2 {
  font-size: 1.15em;
  margin-bottom: var(--spacing-sm);
}

.dash-body h3 {
  font-size: 1.05em;
}

/* Panels inside a dash-body are already on a card; a second frame just adds
   another nested box, so they get plain spacing instead. */
.dash-body > :first-child {
  margin-top: 0;
}

.dash-body > :last-child {
  margin-bottom: 0;
}

/* Constrains prose and forms to a readable measure inside the wide shell. */
.dash-narrow {
  max-width: 680px;
}

.content-wide > h1,
.content-page > h1 {
  background: var(--sand);
  padding: var(--spacing-lg) var(--spacing-xl);
  margin: 0 0 var(--spacing-lg);
  border-bottom: 1px solid var(--border);
  font-size: 2em;
}

.content-wide > .lead,
.content-page > .lead {
  padding: 0 var(--spacing-xl);
  margin-top: calc(-1 * var(--spacing-md));
}

.form-container {
  max-width: 600px;
}

.content-section {
  margin-bottom: 0;
  padding: var(--spacing-xl);
  background: var(--cream);
  border-radius: 0;
  box-shadow: none;
  border-top: 1px solid var(--border);
}

.content-section:first-of-type {
  margin-top: var(--spacing-lg);
  border-top: none;
}

.content-section h2 {
  color: var(--navy);
  margin-top: 0;
  padding-bottom: var(--spacing-sm);
  border-bottom: 3px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  font-size: 1.9em;
  font-weight: 700;
}

.content-section ul,
.content-section ol {
  padding-left: var(--spacing-lg);
  margin: var(--spacing-md) 0;
}

.content-section li {
  margin-bottom: var(--spacing-sm);
  color: var(--text);
  line-height: 1.85;
  font-size: 1.05em;
}

/* ========================================
   CTA BOX
   ======================================== */

.cta-box {
  background: linear-gradient(160deg, rgba(42, 161, 152, 0.07) 0%, rgba(255, 153, 102, 0.05) 50%, rgba(255, 138, 107, 0.07) 100%);
  border: none;
  border-radius: 0;
  border-top: 3px solid var(--accent);
  padding: var(--spacing-xxl);
  text-align: center;
  margin-top: 0;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(42, 161, 152, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-box h3 {
  margin-top: 0;
  color: var(--accent-dark);
  font-size: 2.2em;
  margin-bottom: var(--spacing-md);
}

.cta-box p {
  font-size: 1.15em;
  color: var(--text);
  margin-bottom: var(--spacing-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ======================================== 
   FORM PAGES
   ======================================== */

.form-page {
  max-width: 500px;
  margin: 0 auto;
}

.form-page h1 {
  text-align: center;
}

.form-page > p {
  text-align: center;
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
}

/* The hub shell is already a card, so these forms sit flat on it rather than
   drawing a third nested panel. */
.upload-form-container,
.notice-form-container {
  max-width: 620px;
}

.upload-form-container h1,
.notice-form-container h1 {
  margin-top: 0;
}

.upload-form,
.notice-form {
  background: none;
  padding: 0;
  border: none;
  box-shadow: none;
  max-width: none;
}

.upload-form .form-group,
.notice-form .form-group {
  margin-bottom: var(--spacing-md);
}

.upload-form label,
.notice-form label {
  font-size: 0.92em;
  margin-bottom: 6px;
}

.upload-form textarea,
.notice-form textarea {
  min-height: 120px;
  max-height: 320px;
  resize: vertical;
}

/* Custom File Upload */
.custom-file-upload {
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-lg);
  background: var(--sand-light);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition-base);
}

.custom-file-upload:hover {
  border-color: var(--accent);
  background: rgba(42, 161, 152, 0.05);
}

.file-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  background: var(--cream);
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92em;
  transition: all var(--transition-base);
  font-family: var(--font-heading);
}

.file-label:hover {
  background: var(--accent);
  color: #ffffff;
}

.custom-file-upload input[type="file"] {
  display: none;
}

.file-name {
  display: block;
  color: var(--text-light);
  font-size: 0.88em;
  margin-top: 10px;
}

.btn-large {
  padding: 13px 36px;
  font-size: 1em;
  width: 100%;
  margin-top: var(--spacing-sm);
}

.form-footer {
  text-align: center;
  margin-top: var(--spacing-lg);
  color: var(--text-light);
}

.form-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* Info Box — inset accent rather than a border-left, which reads as an uneven
   stripe against the rounded corners. */
.info-box {
  background: rgba(42, 161, 152, 0.06);
  box-shadow: inset 3px 0 0 var(--accent);
  padding: var(--spacing-sm) var(--spacing-md);
  margin-top: var(--spacing-md);
  border-radius: var(--radius-sm);
}

.info-box p {
  margin: 0;
  font-size: 0.9em;
  line-height: 1.6;
  color: var(--text);
}

/* ========================================
   SUCCESS PAGE
   ======================================== */

.success-page {
  text-align: center;
  padding: var(--spacing-xxl) var(--spacing-lg);
  background: var(--cream);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  max-width: 600px;
  margin: var(--spacing-xl) auto;
}

.success-page h1 {
  font-size: 2.5em;
  color: var(--success);
  margin-bottom: var(--spacing-md);
}

.success-page p {
  color: var(--text);
  font-size: 1.15em;
  margin-bottom: var(--spacing-lg);
}

.success-page .cta-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   NOTICE CARDS
   ======================================== */

.notices-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.notice-card {
  background: var(--sand-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-lg);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.notice-card:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-sm);
}

.notice-card h3 {
  margin-top: 0;
  color: var(--navy);
  margin-bottom: var(--spacing-xs);
  font-size: 1.15em;
}

.notice-card p {
  margin-bottom: 0;
  line-height: 1.65;
  font-size: 0.98em;
  color: var(--text);
}

.notice-card .attachment-link {
  margin-top: var(--spacing-sm);
}

.notice-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-xs) var(--spacing-md);
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: var(--spacing-sm);
}

.notice-meta small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
  font-size: 0.88em;
}

.notice-meta i {
  margin-right: 0;
  font-size: 0.95em;
}

.attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88em;
  font-family: var(--font-heading);
}

.attachment-link i {
  margin-right: 0;
}

.attachment-link:hover {
  border-color: var(--accent);
  background: rgba(42, 161, 152, 0.08);
  color: var(--accent-dark);
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  color: var(--text-light);
  background: var(--sand-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.empty-state i {
  display: block;
  margin: 0 0 var(--spacing-sm);
  font-size: 1.9em;
  color: var(--accent);
  opacity: 0.4;
}

.empty-state p {
  margin: 0;
  font-size: 0.98em;
}

/* ========================================
   WALK TRACKER
   ======================================== */

.track-wrap {
  max-width: 460px;
  margin: 0 auto;
}

.track-panel {
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  background: var(--sand-light);
  border: 1px solid var(--border);
  transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base);
}

/* While a walk is running the panel goes black. On the OLED screens most
   phones have, black pixels are switched off, which meaningfully extends
   how long the screen can stay awake. */
.track-panel.is-tracking {
  background: #000;
  border-color: #000;
  color: #fff;
}

.track-status {
  font-family: var(--font-heading);
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
}

.track-panel.is-tracking .track-status {
  color: var(--accent-light);
}

.track-timer {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 6px 0 var(--spacing-md);
  color: var(--navy);
}

.track-panel.is-tracking .track-timer {
  color: #fff;
}

.track-stats {
  display: flex;
  justify-content: center;
  gap: var(--spacing-xl);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border);
}

.track-panel.is-tracking .track-stats {
  border-top-color: rgba(255, 255, 255, 0.15);
}

.track-stat-value {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.track-stat-label {
  font-size: 0.84rem;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 2px;
}

.track-panel.is-tracking .track-stat-label {
  color: rgba(255, 255, 255, 0.6);
}

.track-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: var(--spacing-lg);
  padding: 15px;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: filter var(--transition-base), transform var(--transition-base);
}

.track-btn i {
  margin-right: 0;
  font-size: 1.2em;
}

.track-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.track-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.track-btn-start { background: #1f9d55; }
.track-btn-stop { background: #d64545; }

.track-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.track-alert {
  margin-top: var(--spacing-md);
  padding: 12px var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.55;
  display: none;
}

.track-alert.show {
  display: block;
}

.track-alert-warn {
  background: rgba(245, 158, 11, 0.1);
  color: #7a5200;
  box-shadow: inset 3px 0 0 var(--warning);
}

.track-alert-error {
  background: rgba(229, 57, 53, 0.08);
  color: #a8231f;
  box-shadow: inset 3px 0 0 var(--error);
}

.track-hint {
  margin: var(--spacing-md) 0 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-light);
}

.track-notice {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-light);
}

.track-notice h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--navy);
}

.track-notice h3 i {
  color: var(--accent);
  margin-right: 0;
}

.track-notice p {
  margin-bottom: var(--spacing-sm);
}

.track-notice p:last-child {
  margin-bottom: 0;
}

/* ========================================
   WALK DETAIL (map view)
   ======================================== */

#map {
  height: 440px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 0 0 var(--spacing-sm);
}

.walk-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--spacing-md);
  font-size: 0.92em;
  color: var(--text-light);
}

.walk-flag {
  background: rgba(245, 158, 11, 0.1);
  box-shadow: inset 3px 0 0 var(--warning);
  color: #7a5200;
  padding: 12px var(--spacing-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-md);
  font-size: 0.92em;
}

.walk-flag strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.walk-flag i {
  margin-right: 0;
}

.walk-flag ul {
  margin: 6px 0 0;
  padding-left: 26px;
}

.walk-flag li {
  margin-bottom: 2px;
}

.walk-legend {
  font-size: 0.88em;
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
}

.walk-legend span {
  display: inline-block;
  margin-right: var(--spacing-md);
}

.walk-legend i {
  display: inline-block;
  width: 22px;
  height: 3px;
  vertical-align: middle;
  margin-right: 6px;
}

.dash-back {
  margin: 0;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border);
}

/* ========================================
   PHONE APP SETUP
   ======================================== */

.setup-qr {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  width: 240px;
  margin: 0 0 var(--spacing-md);
}

.setup-qr svg {
  width: 100%;
  height: auto;
  display: block;
}

.setup-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-lg);
}

.setup-steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 var(--spacing-md) 42px;
  font-size: 0.95em;
  line-height: 1.6;
  margin-bottom: 0;
}

.setup-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(42, 161, 152, 0.14);
  color: var(--accent-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.setup-warn {
  background: rgba(245, 158, 11, 0.1);
  box-shadow: inset 3px 0 0 var(--warning);
  color: #7a5200;
  padding: 12px var(--spacing-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-md);
  font-size: 0.9em;
  line-height: 1.6;
}

.setup-meta {
  font-size: 0.88em;
  line-height: 1.6;
  color: var(--text-light);
}

.setup-rotate {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border);
}

.btn-rotate,
form.plain-form button.btn-rotate[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--cream);
  border: 1px solid var(--error);
  color: var(--error);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: all var(--transition-base);
}

.btn-rotate i {
  margin-right: 0;
}

.btn-rotate:hover,
form.plain-form button.btn-rotate[type="submit"]:hover {
  background: var(--error);
  color: #fff;
  transform: none;
  box-shadow: none;
}

/* ========================================
   VOLUNTEER HUB — SHARED COMPONENTS
   Tables, stat blocks and status pills used across the walk and log pages so
   they share one palette instead of each page inventing its own greys.
   ======================================== */

/* Buttons in the hub are working controls, not marketing CTAs, so they lose the
   display padding, drop shadow and hover lift used on the public pages. */
.dash-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  font-size: 0.95em;
  font-weight: 600;
  box-shadow: none;
}

.dash-body .btn-large {
  padding: 13px 26px;
}

.dash-body .btn:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.dash-body .btn i,
.dash-body .btn:hover i {
  margin-right: 0;
  transform: none;
}

.dash-body .btn-secondary {
  border-width: 2px;
}

.hub-section {
  margin-bottom: var(--spacing-xl);
}

.hub-section:last-child {
  margin-bottom: 0;
}

.hub-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 var(--spacing-sm);
  font-size: 1.05em;
  font-weight: 700;
  color: var(--navy);
  font-family: var(--font-heading);
}

.hub-section-title .count {
  font-weight: 500;
  color: var(--text-light);
}

.hub-section-title i {
  margin-right: 0;
  color: var(--accent);
}

.hub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
}

.hub-table th {
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.82em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.hub-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.hub-table tbody tr:last-child td {
  border-bottom: none;
}

.hub-table tbody tr {
  transition: background var(--transition-fast);
}

.hub-table tbody tr:hover {
  background: var(--sand-light);
}

.hub-table .num {
  font-variant-numeric: tabular-nums;
}

.hub-table .row-action {
  text-align: right;
  white-space: nowrap;
}

.hub-table .row-action a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.95em;
}

.hub-table .row-action a:hover {
  text-decoration: underline;
}

/* Horizontal scroll for narrow screens, without the page itself scrolling. */
.hub-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Status pills */
.hub-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
}

.hub-pill-live {
  background: rgba(42, 161, 152, 0.14);
  color: var(--accent-dark);
}

.hub-pill-done {
  background: var(--sand-dark);
  color: var(--text-light);
}

.hub-pill-flag {
  background: rgba(245, 158, 11, 0.16);
  color: #8a5a00;
}

/* Stat blocks */
.hub-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--spacing-sm);
  max-width: 480px;
  margin-bottom: var(--spacing-lg);
}

.hub-stat {
  background: var(--sand-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  text-align: center;
}

.hub-stat-value {
  font-family: var(--font-heading);
  font-size: 2em;
  font-weight: 800;
  line-height: 1.1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.hub-stat-label {
  margin-top: 4px;
  font-size: 0.87em;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
}

.hub-stat.is-approved .hub-stat-value { color: #2e7d32; }
.hub-stat.is-rejected .hub-stat-value { color: #c62828; }
.hub-stat.is-accent .hub-stat-value { color: var(--accent-dark); }

.hub-empty {
  color: var(--text-light);
  font-size: 0.95em;
  padding: var(--spacing-md) 0;
  margin: 0;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: animPulse 2s ease-in-out infinite;
}

/* ========================================
   ADMIN SECTION
   ======================================== */

.admin-section {
  margin-bottom: var(--spacing-xxl);
}

.admin-section h2 {
  color: var(--accent-dark);
  margin-bottom: var(--spacing-md);
}

.uploads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--spacing-md);
  margin-top: 0;
}

.user-uploads-card {
  background: var(--sand-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0;
  box-shadow: none;
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.user-uploads-card:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-sm);
}

.user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-sm);
  background: var(--sand);
  padding: 10px var(--spacing-lg);
  border-bottom: 1px solid var(--border);
}

.user-header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05em;
}

.upload-count {
  background: rgba(42, 161, 152, 0.14);
  color: var(--accent-dark);
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
}

.upload-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.upload-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: 0;
  padding: 10px var(--spacing-lg);
  font-size: 0.94em;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-base);
}

.upload-list li:hover {
  background: var(--cream);
}

.upload-list li:last-child {
  border-bottom: none;
}

.file-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  transition: all var(--transition-base);
}

.file-icon {
  font-size: 1.15em;
  margin-right: 0;
  color: var(--accent);
  flex-shrink: 0;
}

.file-name {
  word-break: break-word;
}

.file-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.upload-date {
  color: var(--text-light);
  font-size: 0.95em;
  white-space: nowrap;
  margin-left: var(--spacing-md);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 992px) {
  .sidebar {
    width: 240px;
  }
  
  .main-content.with-sidebar {
    max-width: calc(100% - 240px);
  }
  
  .hero h1 {
    font-size: 2.5em;
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
  }

  /* Mobile type scale. Almost every size on the site is expressed in em, so
     stepping the root down scales headings, body copy and the spacing that
     hangs off them together — rather than needing a per-component override.
     Without this the body stayed at desktop's 18px/1.85 on a 390px screen,
     which is what pushed simple list items onto three lines each. */
  body {
    font-size: 16px;
    line-height: 1.65;
  }

  p {
    line-height: 1.65;
  }
  
  /* The header stays a single row at every width — the nav lives behind the
     hamburger from 1180px down, so it no longer needs to stack here. */
  .header-inner {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .logo img {
    height: 40px;
  }

  .user-info {
    width: 100%;
    margin-left: 0;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border);
  }

  .page-wrapper {
    flex-direction: column;
  }

  /* The rail becomes a scrolling tab strip so the nav costs one row rather
     than a full screen of links above the content. */
  .sidebar {
    width: 100%;
    height: auto;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-nav {
    position: static;
    flex-direction: row;
    gap: 4px;
    padding: 8px var(--spacing-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-link {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.9em;
    white-space: nowrap;
  }

  .sidebar-link::before {
    display: none;
  }

  .sidebar-link.active {
    background: var(--accent);
    color: #ffffff;
  }

  .sidebar-link.active i {
    color: #ffffff;
  }

  .sidebar-divider {
    width: 1px;
    height: auto;
    margin: 4px 6px;
    flex-shrink: 0;
  }

  .sidebar-section-title {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 6px;
  }

  .main-content,
  .main-content.with-sidebar {
    max-width: 100%;
    padding: var(--spacing-md);
  }

  .main-content.with-sidebar .content-wide,
  .main-content.with-sidebar .content-page {
    max-width: 100%;
  }

  .dash-header,
  .dash-body {
    padding: var(--spacing-md);
  }

  .header-compact .header-inner {
    flex-direction: row;
    align-items: center;
    height: auto;
    min-height: var(--header-h);
    padding: 8px var(--spacing-md);
    gap: var(--spacing-sm);
  }

  .header-compact .hub-tag {
    display: none;
  }

  .header-compact .username {
    font-size: 0.88em;
  }

  .header-compact .user-info-header {
    width: auto;
    gap: var(--spacing-xs);
    padding-top: 0;
    border-top: none;
  }
  
  .hero {
    padding: var(--spacing-xl) var(--spacing-md);
  }
  
  .hero h1 {
    font-size: 2em;
  }
  
  .lead {
    font-size: 1.15em;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .upload-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }
  
  .upload-date {
    margin-left: 0;
  }
  
  .detail-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .detail-row strong {
    color: var(--accent);
  }
  
  .application-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .content-section {
    padding: var(--spacing-lg);
  }
  
  h1 {
    font-size: 2.2em;
  }
  
  h2 {
    font-size: 1.7em;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75em;
  }
  
  .stat-number {
    font-size: 2.5em;
  }
  
  .partners-track {
    gap: var(--spacing-lg);
  }
  
  .partner-logo {
    min-width: 140px;
    height: 90px;
  }
}

/* ========================================
   UPLOAD DETAIL PAGE
   ======================================== */

.upload-detail-header {
  margin-bottom: var(--spacing-lg);
}

.back-link {
  color: var(--accent-dark);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.9em;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition-base);
}

.back-link i {
  margin-right: 0;
  transition: transform var(--transition-base);
}

.back-link:hover {
  color: var(--accent);
}

.back-link:hover i {
  transform: translateX(-3px);
}

.upload-detail-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-xl);
  box-shadow: none;
}

.upload-info {
  background: var(--sand-light);
  border: 1px solid var(--border);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  margin: 0 0 var(--spacing-lg);
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-md);
  padding: 9px 0;
  font-size: 0.95em;
  border-bottom: 1px solid var(--border-light);
}

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

.info-row .label {
  color: var(--text-light);
  font-weight: 600;
}

.info-row .value {
  color: var(--text);
  font-weight: 500;
}

/* Scoped to the value cell — unscoped, these also match .log-card.status-* and
   tint every line of text inside the card. */
.info-row .value.status-pending {
  color: #8a5a00;
  font-weight: 600;
}

.info-row .value.status-approved {
  color: #2e7d32;
  font-weight: 600;
}

.info-row .value.status-rejected {
  color: #c62828;
  font-weight: 600;
}

.file-preview {
  margin: 0 0 var(--spacing-lg);
}

.file-preview h2 {
  margin-top: 0;
  margin-bottom: var(--spacing-sm);
}

.preview-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: var(--spacing-md);
  display: block;
  box-shadow: var(--shadow-sm);
}

.file-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--sand-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

.file-info .file-icon {
  font-size: 1.5em;
  color: var(--accent);
  margin-right: 0;
}

.file-info .file-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.file-info .file-link:hover {
  text-decoration: underline;
  color: var(--accent-dark);
}

.action-buttons {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border);
}

.action-buttons h2 {
  margin-top: 0;
  margin-bottom: var(--spacing-sm);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: 0;
}

.btn-approve {
  background: var(--success);
  color: white;
}

.btn-approve:hover {
  background: #43a047;
  color: white;
}

.btn-reject {
  background: var(--error);
  color: white;
}

.btn-reject:hover {
  background: #d32f2f;
  color: white;
}

#reject-form {
  background: var(--sand-light);
  border: 1px solid var(--border);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-md);
  max-width: 620px;
  box-shadow: none;
}

#reject-form .form-group {
  margin-bottom: var(--spacing-md);
}

#reject-form label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

#reject-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  font-size: 1em;
  resize: vertical;
  transition: all var(--transition-base);
}

#reject-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(42, 161, 152, 0.08);
}

/* ========================================
   LOG PAGES
   ======================================== */

.log-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--spacing-sm);
  max-width: 620px;
  margin-bottom: var(--spacing-lg);
}

.stat-card {
  background: var(--sand-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  text-align: center;
  box-shadow: none;
  transition: all var(--transition-base);
}

.stat-card:hover {
  box-shadow: var(--shadow-sm);
}

.stat-card.approved {
  border-color: rgba(76, 175, 80, 0.3);
  background: rgba(76, 175, 80, 0.07);
}

.stat-card.rejected {
  border-color: rgba(244, 67, 54, 0.28);
  background: rgba(244, 67, 54, 0.06);
}

.stat-number {
  font-size: 2em;
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent-dark);
  margin-bottom: 4px;
  font-family: var(--font-heading);
  font-variant-numeric: tabular-nums;
}

.stat-card.approved .stat-number {
  color: var(--success);
}

.stat-card.rejected .stat-number {
  color: var(--error);
}

.stat-label {
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.86em;
  letter-spacing: 0.06em;
  font-family: var(--font-heading);
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* The status stripe is an inset shadow rather than a border-left: a border
   thickens around the corner radius, which reads as a wonky edge. */
.log-card {
  background: var(--sand-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-lg);
  box-shadow: inset 3px 0 0 var(--border);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.log-card:hover {
  border-color: var(--accent-light);
}

.log-card.status-pending {
  box-shadow: inset 3px 0 0 var(--warning);
}

.log-card.status-approved {
  box-shadow: inset 3px 0 0 var(--success);
}

.log-card.status-rejected {
  box-shadow: inset 3px 0 0 var(--error);
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border);
}

.log-file {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex: 1;
}

.log-file .file-name {
  font-weight: 600;
  color: var(--text);
}

.status-badge {
  padding: 4px 13px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 0.84em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.status-badge.status-approved {
  background: rgba(76, 175, 80, 0.15);
  color: #2e7d32;
}

.status-badge.status-rejected {
  background: rgba(229, 57, 53, 0.12);
  color: #c62828;
}

.status-badge.status-pending {
  background: rgba(245, 158, 11, 0.16);
  color: #8a5a00;
}

.log-details {
  display: flex;
  gap: var(--spacing-xs) var(--spacing-lg);
  flex-wrap: wrap;
  margin-bottom: 0;
  font-size: 0.9em;
}

.detail-item {
  display: flex;
  gap: 6px;
}

.detail-label {
  color: var(--text-light);
  font-weight: 600;
}

.log-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px var(--spacing-md);
  border-radius: var(--radius-sm);
  margin-top: var(--spacing-sm);
  font-size: 0.92em;
  font-weight: 600;
  line-height: 1.55;
}

.log-message i {
  margin-right: 0;
  line-height: 1.55;
}

/* Scoped to .log-message so these do not collide with the inline field errors
   on the registration form, which also use .error-message. */
.log-message.success-message {
  background: rgba(76, 175, 80, 0.08);
  color: #2e7d32;
  box-shadow: inset 3px 0 0 var(--success);
}

.log-message.error-message {
  background: rgba(229, 57, 53, 0.06);
  color: #c62828;
  box-shadow: inset 3px 0 0 var(--error);
}

.log-message.pending-message {
  background: rgba(245, 158, 11, 0.1);
  color: #8a5a00;
  box-shadow: inset 3px 0 0 var(--warning);
}

.rejection-reason {
  margin-top: var(--spacing-xs);
  padding-top: var(--spacing-xs);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: normal;
}

.view-file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--spacing-sm);
  color: var(--accent-dark);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.9em;
  font-weight: 600;
}

.view-file-link i {
  margin-right: 0;
}

.view-file-link:hover {
  text-decoration: underline;
  color: var(--accent-dark);
}

/* ======================================== 
   PARTNER SLIDER (SCROLLING GALLERY)
   ======================================== */

.partners-section {
  margin-top: var(--spacing-xxl);
  padding: var(--spacing-xxl) var(--spacing-lg);
  border-top: 3px solid var(--accent);
  background: linear-gradient(180deg, rgba(42, 161, 152, 0.03) 0%, transparent 100%);
}

.partners-section h2 {
  text-align: center;
  color: var(--accent-dark);
  margin-bottom: var(--spacing-xl);
  font-size: 2.4em;
  position: relative;
}

.partners-section h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--coral) 100%);
  margin: var(--spacing-md) auto 0;
  border-radius: 2px;
}

.partners-slider {
  overflow: hidden;
  padding: var(--spacing-xl) 0;
  background: var(--sand-light);
  border-radius: var(--radius-xl);
  position: relative;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.partners-slider::before,
.partners-slider::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.partners-slider::before {
  left: 0;
  background: linear-gradient(90deg, var(--sand-light) 0%, transparent 100%);
}

.partners-slider::after {
  right: 0;
  background: linear-gradient(270deg, var(--sand-light) 0%, transparent 100%);
}

.partners-track {
  display: flex;
  gap: var(--spacing-xxl);
  animation: slide 30s linear infinite;
}

.partner-logo {
  min-width: 200px;
  height: 130px;
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  font-size: 1.1em;
}

.partner-logo:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
  color: var(--accent);
}

@keyframes slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.partners-slider:hover .partners-track {
  animation-play-state: paused;
}

/* ========================================
   CONTACT PAGE
   ======================================== */

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.contact-item h3 {
  color: var(--accent-dark);
  margin-top: 0;
  margin-bottom: var(--spacing-sm);
  font-size: 1.2em;
}

.contact-item p {
  margin: 4px 0;
  line-height: 1.7;
}

.contact-item a {
  color: var(--accent);
  text-decoration: none;
  transition: all var(--transition-base);
}

.contact-item a:hover {
  text-decoration: underline;
  color: var(--accent-dark);
}

.contact-form {
  max-width: 600px;
}

.form-note {
  margin-top: var(--spacing-md);
  color: var(--text-light);
  font-size: 0.9em;
  font-style: italic;
}

/* ========================================
   VOLUNTEER REGISTRATION FORM
   ======================================== */

.volunteer-form {
  max-width: 700px;
}

.form-section {
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-lg);
  background: var(--sand-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.form-section h3 {
  margin-top: 0;
  margin-bottom: var(--spacing-lg);
  color: var(--accent-dark);
  font-size: 1.3em;
  border-bottom: 2px solid var(--accent);
  padding-bottom: var(--spacing-sm);
}

.volunteer-reason-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.volunteer-reason-group li {
  margin-bottom: var(--spacing-sm);
}

.volunteer-reason-group input[type="radio"] {
  margin-right: var(--spacing-sm);
  cursor: pointer;
}

.volunteer-reason-group label {
  cursor: pointer;
  font-weight: normal;
  color: var(--text);
}

.error-message {
  color: var(--error);
  font-size: 0.9em;
  margin-top: 6px;
  display: block;
  font-weight: 500;
}

/* ========================================
   APPLICATIONS PAGE
   ======================================== */

.applications-section {
  margin-bottom: var(--spacing-xl);
}

.applications-section:last-child {
  margin-bottom: 0;
}

.applications-section h2 {
  color: var(--navy);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}

.applications-section .badge {
  background: rgba(42, 161, 152, 0.14);
  color: var(--accent-dark);
  padding: 2px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.86em;
  font-weight: 700;
  box-shadow: none;
}

.applications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: var(--spacing-md);
}

.application-card {
  background: var(--sand-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-lg);
  box-shadow: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.unseen-card {
  border-color: var(--accent-light);
  background: rgba(42, 161, 152, 0.04);
}

.seen-card {
  color: var(--text-light);
}

.application-card:hover {
  box-shadow: var(--shadow-sm);
}

.application-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border);
}

.application-header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.1em;
}

.status-badge {
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.unseen-badge {
  background: var(--accent);
  color: white;
  box-shadow: none;
}

.seen-badge {
  background: var(--sand-dark);
  color: var(--text-light);
}

.application-details {
  margin-bottom: var(--spacing-md);
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(120px, 40%) 1fr;
  gap: var(--spacing-sm);
  margin-bottom: 0;
  padding: 7px 0;
  font-size: 0.94em;
  border-bottom: 1px solid var(--border-light);
}

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

.detail-row strong {
  color: var(--text-light);
  font-weight: 600;
}

.detail-row span,
.detail-row a {
  color: var(--text);
}

.detail-row a {
  text-decoration: none;
  color: var(--accent);
  font-weight: 500;
}

.detail-row a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.other-reason {
  grid-template-columns: 1fr;
  background: var(--sand-light);
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
}

.other-reason strong {
  display: block;
  margin-bottom: var(--spacing-sm);
  color: var(--accent-dark);
}

.other-reason p {
  margin: 0;
  line-height: 1.85;
  color: var(--text);
}

.application-action {
  margin-top: 0;
}

.application-action button {
  padding: 9px 24px;
  font-size: 0.92em;
}

.seen-section {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border);
}

.empty-message {
  color: var(--text-light);
  padding: var(--spacing-md) 0;
  margin: 0;
  font-size: 0.95em;
}

/* ========================================
   BOOTSTRAP ICONS STYLING
   ======================================== */

.bi {
  vertical-align: middle;
  margin-right: 4px;
}

.feature-card h3 i,
.content-section h2 i {
  color: var(--accent);
  margin-right: var(--spacing-sm);
  font-size: 1.1em;
}

/* Fixed width keeps every label on the same left edge, even if a glyph is
   missing from the icon font. */
.sidebar-link i {
  flex: 0 0 20px;
  font-size: 1.05em;
  margin-right: 0;
  text-align: center;
  color: var(--accent);
  opacity: 0.75;
  transition: opacity var(--transition-base), color var(--transition-base);
}

.sidebar-link:hover i,
.sidebar-link.active i {
  color: var(--accent-dark);
  opacity: 1;
}

.btn i {
  margin-right: 6px;
}

.main-nav > a i {
  font-size: 1.1em;
}

/* ========================================
   ALTERNATING SECTIONS & IMAGE LAYOUTS
   ======================================== */

.section-split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--spacing-lg);
  align-items: center;
  margin-bottom: 0;
  padding: var(--spacing-md) 0;
}

.section-split.reverse {
  direction: rtl;
}

.section-split.reverse > * {
  direction: ltr;
}

.section-content {
  padding: var(--spacing-md);
}

.section-content h2 {
  margin-top: 0;
  color: var(--accent-dark);
  font-size: 2.5em;
  margin-bottom: var(--spacing-lg);
  line-height: 1.15;
  position: relative;
}

.section-content h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
  margin-top: var(--spacing-sm);
}

.section-content p {
  font-size: 1.3em;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: var(--spacing-sm);
}

.section-content ul {
  list-style: none;
  padding: 0;
  margin: var(--spacing-sm) 0;
}

.section-content ul li {
  padding: 8px var(--spacing-md);
  padding-left: calc(var(--spacing-lg) + var(--spacing-md));
  position: relative;
  font-size: 1.2em;
  line-height: 1.65;
  margin-bottom: 4px;
  background: linear-gradient(90deg, rgba(42, 161, 152, 0.04) 0%, transparent 100%);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.section-content ul li:hover {
  background: linear-gradient(90deg, rgba(42, 161, 152, 0.08) 0%, transparent 100%);
  transform: translateX(4px);
}

.section-content ul li::before {
  content: "✓";
  position: absolute;
  left: var(--spacing-sm);
  top: var(--spacing-sm);
  color: white;
  font-weight: bold;
  font-size: 0.88em;
  background: var(--accent-gradient);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-image {
  border-radius: 0;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 2px solid var(--border);
  max-width: 510px;
  margin-left: auto;
}

.section-image:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.section-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 330px;
  max-height: 420px;
}

.section-bg-light {
  background: var(--sand-light);
  padding: var(--spacing-lg) var(--spacing-xl);
  border-radius: 0;
  margin: 0;
  border: none;
  border-top: 1px solid var(--border);
}

.section-bg-white {
  background: var(--cream);
  padding: var(--spacing-lg) var(--spacing-xl);
  border-radius: 0;
  margin: 0;
  border: none;
  border-top: 1px solid var(--border);
}

.section-bg-gradient {
  background: var(--sand);
  padding: var(--spacing-lg) var(--spacing-xl);
  border-radius: 0;
  margin: 0;
  border: none;
  border-top: 1px solid var(--border);
}

.full-width-section {
  padding: var(--spacing-xl) var(--spacing-xl);
  margin: 0;
  border-top: 1px solid var(--border);
}

.full-width-section.dark {
  background: linear-gradient(135deg, var(--text-dark) 0%, #1a3a4a 100%);
  color: white;
  border-top: none;
}

.full-width-section.dark h2 {
  color: white;
}

.full-width-section.dark p {
  color: rgba(255, 255, 255, 0.9);
}

.content-wrapper {
  max-width: 1600px;
  width: 95%;
  margin: 0 auto;
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .hero-right {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 0;
    padding-top: var(--spacing-lg);
  }

  .section-split {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .section-split.reverse {
    direction: ltr;
  }
  
  .section-image {
    max-width: 100%;
  }
}

/* ========================================
   SITEWIDE ANIMATIONS & MICRO-INTERACTIONS
   ======================================== */

/* --- Scroll Reveal --- */
.anim-fade-up {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.anim-fade-up.anim-visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.anim-fade-left.anim-visible {
  opacity: 1;
  transform: translateX(0);
}

.anim-fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.anim-fade-right.anim-visible {
  opacity: 1;
  transform: translateX(0);
}

.anim-scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.anim-scale-in.anim-visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for children */
.anim-delay-1 { transition-delay: 0.1s; }
.anim-delay-2 { transition-delay: 0.2s; }
.anim-delay-3 { transition-delay: 0.3s; }
.anim-delay-4 { transition-delay: 0.4s; }
.anim-delay-5 { transition-delay: 0.5s; }

/* --- Hover lift for interactive items --- */
.hover-lift {
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s ease;
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(27, 54, 93, 0.1);
}

/* --- Gentle tilt on hover --- */
.hover-tilt {
  transition: transform 0.4s ease;
}

.hover-tilt:hover {
  transform: perspective(600px) rotateY(-3deg) rotateX(2deg);
}

/* --- Underline grow on links --- */
.link-underline-grow {
  position: relative;
  text-decoration: none;
}

.link-underline-grow::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s ease;
}

.link-underline-grow:hover::after {
  width: 100%;
}

/* --- Pulsing dot (for labels, badges) --- */
@keyframes animPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.pulse-dot::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: animPulse 2.5s ease-in-out infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* --- Floating keyframes --- */
@keyframes animFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes animFloatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}

.float-gentle {
  animation: animFloat 5s ease-in-out infinite;
}

.float-slow {
  animation: animFloatSlow 7s ease-in-out infinite;
}

/* --- Shimmer / loading effect --- */
@keyframes animShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer-bg {
  background: linear-gradient(
    90deg,
    var(--sand-light) 25%,
    var(--sand) 50%,
    var(--sand-light) 75%
  );
  background-size: 200% 100%;
  animation: animShimmer 3s ease-in-out infinite;
}

/* --- Icon spin on hover --- */
.icon-spin-hover i {
  transition: transform 0.4s ease;
}

.icon-spin-hover:hover i {
  transform: rotate(15deg) scale(1.1);
}

/* --- Counter animation helper (used via JS) --- */
.count-up {
  font-variant-numeric: tabular-nums;
}

/* --- Smooth section transitions for page scroll --- */
html {
  scroll-behavior: smooth;
}

/* Nav underline animation is handled in the original .main-nav > a::after rule */

/* --- Page header subtle gradient animation --- */
@keyframes pgHeaderShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Footer link hover --- */
.site-footer a {
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.site-footer a:hover {
  padding-left: 4px;
}

/* --- Card ribbon shimmer on hover --- */
.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

.feature-card:hover::after {
  left: 100%;
}

/* --- Button icon nudge on hover --- */
.btn i,
.v2-btn i {
  transition: transform 0.3s ease;
}

.btn:hover i,
.v2-btn:hover i {
  transform: translateX(3px);
}

/* ========================================
   LIVE MAP
   ======================================== */

.live-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-sm);
  font-size: 0.95em;
  font-weight: 600;
  color: var(--text);
}

.live-updated {
  margin-left: auto;
  font-weight: 400;
  font-size: 0.88em;
  color: var(--text-light);
}

.live-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--spacing-sm);
  align-items: start;
}

.live-layout #map {
  height: 560px;
  margin: 0;
}

.live-panel {
  max-height: 560px;
  overflow-y: auto;
  padding-right: 4px;
}

.live-panel .hub-section-title {
  margin-top: 0;
}

.live-title-warn {
  color: #7a5200;
  margin-top: var(--spacing-md);
}

.live-note {
  font-size: 0.86em;
  color: var(--text-light);
  margin: 0 0 10px;
}

.live-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.live-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}

.live-item:hover {
  border-color: var(--accent);
}

.live-item.is-warn {
  background: rgba(245, 158, 11, 0.1);
  box-shadow: inset 3px 0 0 var(--warning);
  border-color: transparent;
  cursor: default;
}

.live-item a {
  text-decoration: none;
  color: inherit;
}

.live-meta {
  font-size: 0.84em;
  color: var(--text-light);
}

.live-empty {
  padding: 10px 0;
  font-size: 0.92em;
  color: var(--text-light);
}

@media (max-width: 900px) {
  .live-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-layout #map {
    height: 380px;
  }

  .live-panel {
    max-height: none;
    overflow-y: visible;
  }
}

.live-tip {
  font-size: 0.82em;
  font-weight: 600;
  color: var(--text);
}

/* ---- device setup: app cards and typed-in values ---- */

.setup-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  background: #fff;
}

.setup-card.is-muted {
  background: var(--bg-light);
}

.setup-card .hub-section-title {
  margin-top: 0;
}

.setup-card .setup-steps:last-child {
  margin-bottom: 0;
}

.setup-lead {
  font-size: 0.92em;
  color: var(--text-light);
  margin: 0 0 var(--spacing-md);
}

.setup-values {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px var(--spacing-md);
  align-items: baseline;
  margin: 12px 0 0;
  padding: 12px var(--spacing-sm);
  background: var(--bg-sand);
  border-radius: var(--radius-sm);
}

.setup-values dt {
  font-weight: 600;
  font-size: 0.88em;
  color: var(--text-light);
}

.setup-values dd {
  margin: 0;
  font-size: 0.95em;
  min-width: 0;
}

.setup-code,
.setup-url {
  display: inline-block;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.setup-code {
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.setup-url {
  font-size: 0.85em;
}

@media (max-width: 560px) {
  .setup-values {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .setup-values dd {
    margin-bottom: 10px;
  }
}

.setup-manual {
  margin-top: 12px;
  font-size: 0.95em;
}

.setup-manual summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 600;
  padding: 6px 0;
}

.setup-manual .setup-meta {
  margin: 6px 0 0;
}

/* ---- device setup: live connection status ---- */

.phone-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px var(--spacing-sm);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-md);
  font-size: 0.93em;
  line-height: 1.45;
  background: var(--bg-sand);
  color: var(--text-light);
}

.phone-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-light);
}

.phone-status[data-state="ok"] {
  background: rgba(42, 161, 152, 0.12);
  color: var(--accent-dark);
  font-weight: 600;
}

.phone-status[data-state="ok"] .phone-status-dot {
  background: var(--accent);
  animation: animPulse 2s ease-in-out infinite;
}

.phone-status[data-state="stale"] {
  background: rgba(245, 158, 11, 0.12);
  color: #7a5200;
}

.phone-status[data-state="stale"] .phone-status-dot {
  background: var(--warning);
}
