/* ============================================================
   YCAF Trans Nzoia — Design System v2
   Mobile-first, PWA-native patterns.
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Brand palette */
  --forest-950: #0c1710;
  --forest-900: #132119;
  --forest-800: #1d3327;
  --forest-700: #284738;
  --canopy-600: #2d6b4e;
  --canopy-500: #3a8260;
  --canopy-400: #55a07a;
  --canopy-300: #80c09d;
  --sun-600:    #c98a1e;
  --sun-500:    #e8a63c;
  --sun-400:    #f0bc5e;
  --sun-100:    #fdf0d8;
  --sun-50:     #fffaf0;
  --soil-700:   #7a4e2a;
  --soil-600:   #8a5a35;
  --soil-100:   #f1e4d5;
  --sky-600:    #3a7d9a;
  --sky-500:    #4c8fac;
  --sky-100:    #e0eef4;
  --coral-700:  #a8402a;
  --coral-600:  #c1502f;
  --coral-100:  #fbe6df;

  /* Neutrals */
  --paper:       #f6f4ed;
  --paper-warm:  #f0ede4;
  --paper-raised:#ffffff;
  --ink-950:     #0f1a13;
  --ink-900:     #16231b;
  --ink-800:     #253328;
  --ink-700:     #3a4a3e;
  --ink-500:     #68796e;
  --ink-400:     #8a9a8e;
  --ink-200:     #c8d2ca;
  --ink-100:     #e4e9e5;
  --ink-50:      #f2f5f3;
  --ink-border:  #dbd5c6;

  /* Radii */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-full: 999px;
  --r-leaf: 20px 5px 20px 5px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(12,23,16,.07);
  --shadow-sm: 0 1px 3px rgba(12,23,16,.10), 0 1px 2px rgba(12,23,16,.06);
  --shadow-md: 0 4px 16px -4px rgba(12,23,16,.18), 0 2px 6px -2px rgba(12,23,16,.10);
  --shadow-lg: 0 20px 50px -16px rgba(12,23,16,.30);
  --shadow-xl: 0 32px 80px -24px rgba(12,23,16,.38);

  /* Typography */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", "Fira Code", ui-monospace, monospace;

  /* Spacing (8-pt scale) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Sidebar */
  --sidebar-w: 260px;
  --sidebar-collapsed-w: 64px;

  /* Mobile PWA chrome */
  --mobile-appbar-h: 56px;
  --mobile-nav-h: 58px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 150ms;
  --t-base: 220ms;
  --t-slow: 360ms;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 15px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .display-font {
  font-family: var(--font-display);
  color: var(--forest-900);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

a { color: var(--canopy-600); text-decoration: none; }
a:hover { color: var(--forest-800); }

::selection { background: var(--sun-100); color: var(--forest-900); }

:focus-visible {
  outline: 2.5px solid var(--sun-500);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Typography ─────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--canopy-500);
  font-weight: 600;
}

.display-1 { font-size: clamp(2.4rem, 5vw, 4rem); }
.display-2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.font-mono  { font-family: var(--font-mono) !important; }
.font-monospace { font-family: var(--font-mono) !important; }
.req { color: var(--coral-600); }

/* ── Brand Mark / Logo ──────────────────────────────────────── */
.brand-mark {
  width: 36px; height: 36px;
  border-radius: var(--r-leaf);
  background: var(--sun-500);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--forest-950); font-weight: 800; font-size: 0.95rem;
  font-family: var(--font-display);
  flex-shrink: 0;
  transition: transform var(--t-base) var(--ease-out);
}
.brand-mark:hover { transform: rotate(-4deg) scale(1.05); }
.brand-logo {
  height: 40px;
  width: 40px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
  background: #0a0a0a;
}
.brand-logo-sm {
  height: 28px;
  width: 28px;
}
.ycaf-nav .brand-logo {
  height: 38px;
  width: 38px;
}
.hero-support-badge {
  background: #fff;
  border-radius: var(--r-md);
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-support-badge img {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.56rem 1.1rem;
  border-radius: var(--r-sm);
  transition: background var(--t-fast) var(--ease-in-out),
              border-color var(--t-fast) var(--ease-in-out),
              box-shadow var(--t-fast) var(--ease-in-out),
              transform var(--t-fast) var(--ease-in-out);
}
.btn:active { transform: scale(0.97); }

.btn-sun  { background: var(--sun-500); border-color: var(--sun-500); color: var(--forest-950); }
.btn-sun:hover { background: var(--sun-600); border-color: var(--sun-600); color: var(--forest-950); box-shadow: 0 4px 12px rgba(232,166,60,.4); }

.btn-forest { background: var(--forest-800); border-color: var(--forest-800); color: #fff; }
.btn-forest:hover { background: var(--forest-900); border-color: var(--forest-900); color: #fff; box-shadow: 0 4px 12px rgba(19,33,25,.35); }

.btn-outline-forest { border-color: var(--forest-800); color: var(--forest-800); background: transparent; }
.btn-outline-forest:hover { background: var(--forest-800); color: #fff; }

.btn-ghost-light { color: rgba(255,255,255,.9); border: 1.5px solid rgba(255,255,255,.28); background: transparent; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); }

.btn-icon {
  width: 38px; height: 38px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
}
.btn-icon-lg { width: 46px; height: 46px; border-radius: var(--r-md); }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--ink-border);
  border-radius: var(--r-md);
  background: var(--paper-raised);
  overflow: hidden;
}
.card-soft { box-shadow: var(--shadow-sm); }
.card-lifted { box-shadow: var(--shadow-md); }
.card-hover { transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ── Stat Cards ──────────────────────────────────────────────── */
.stat-card {
  border-radius: var(--r-2xl);
  padding: 1.4rem 1.5rem 1.2rem;
  background: #ffffff;
  border: 1px solid rgba(17, 40, 34, 0.08);
  box-shadow: 0 18px 40px rgba(17, 40, 34, 0.06);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out);
}
.stat-card:hover {
  box-shadow: 0 24px 50px rgba(17, 40, 34, 0.08);
  transform: translateY(-4px);
  border-color: rgba(17, 40, 34, 0.12);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--canopy-500), var(--sun-400));
  opacity: 1;
}
.stat-card-alt {
  background: #f8faf7;
  border-color: rgba(17, 40, 34, 0.06);
}
.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}
.stat-card .stat-label {
  color: var(--ink-600);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}
.stat-card .stat-value {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--forest-900);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 0.79rem;
  color: var(--ink-500);
  margin-top: 0.35rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.stat-icon {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 40px; height: 40px;
  border-radius: var(--r-leaf);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.stat-trend {
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 0.25rem;
}
.stat-trend.up   { color: var(--canopy-500); }
.stat-trend.down { color: var(--coral-600);  }

/* ── Leaf Tags / Chips ───────────────────────────────────────── */
.leaf-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-leaf);
  font-size: 0.78rem; font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.leaf-energy   { background: var(--sun-100);  color: var(--sun-600);    border-color: #f5d89a; }
.leaf-green    { background: #e0f0e6;          color: var(--canopy-600); border-color: #bde0cc; }
.leaf-waste    { background: var(--sky-100);   color: var(--sky-600);    border-color: #b0d4e2; }
.leaf-advocacy { background: var(--soil-100);  color: var(--soil-700);   border-color: #d8bfa0; }

/* ── Status Pills ────────────────────────────────────────────── */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0.26rem 0.65rem;
  border-radius: var(--r-full);
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap;
}
.status-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-submitted    { background: var(--sky-100);   color: #2a6880; }
.status-under_review { background: var(--sun-100);   color: var(--sun-600); }
.status-approved     { background: #dff2e6;           color: var(--canopy-600); }
.status-rejected     { background: var(--coral-100); color: var(--coral-700); }
.status-funded       { background: #d6f0e4;           color: #1f6641; }
.status-draft        { background: var(--ink-100);   color: var(--ink-500); }

/* ── Public Navbar ───────────────────────────────────────────── */
.ycaf-nav {
  background: var(--forest-900);
  border-bottom: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ycaf-nav .navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff !important;
  display: flex; align-items: center; gap: 0.55rem;
  font-size: 1.05rem;
}
.ycaf-nav .nav-link {
  color: rgba(255,255,255,.72) !important;
  font-weight: 500; font-size: 0.9rem;
  padding: 0.45rem 0.7rem !important;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.ycaf-nav .nav-link:hover, .ycaf-nav .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.08);
}

/* ── Hero ────────────────────────────────────────────────────── */
.topo-field {
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse 900px 500px at 15% -10%, rgba(232,166,60,.14), transparent 60%),
              var(--forest-900);
}
.topo-field svg.topo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0.28; pointer-events: none;
}
.hero { padding: 6rem 0 4.5rem; color: #fff; }
.hero .eyebrow { color: var(--sun-400); }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.4rem); }
.hero p.lead { color: rgba(255,255,255,.76); font-size: 1.1rem; max-width: 600px; }

.deadline-strip {
  display: inline-flex; align-items: center; gap: 1rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-md);
  padding: 0.8rem 1.15rem;
  backdrop-filter: blur(8px);
}
.deadline-strip .countdown-num {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 1.2rem; color: var(--sun-400);
}
.deadline-strip .countdown-label {
  font-size: 0.66rem; color: rgba(255,255,255,.56);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.topo-divider { height: 44px; background: var(--paper); position: relative; }
.topo-divider svg { position: absolute; top: -1px; left: 0; width: 100%; height: 45px; display: block; }

/* ── Page Hero (light) ───────────────────────────────────────── */
.page-hero {
  background: linear-gradient(180deg, var(--paper) 0%, rgba(246,244,237,0.95) 100%);
  border-bottom: 1px solid var(--ink-border);
  padding: 3.25rem 0 1.5rem;
}
.page-hero .hero-card {
  background: var(--paper-raised);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  margin-top: 0.5rem;
}
.page-hero .eyebrow { font-weight:700; }
.page-hero h1 { color: var(--forest-900); font-size: clamp(1.6rem,3vw,2.2rem); margin-bottom: 0.5rem; }
.page-hero p.lead { color: var(--ink-700); }

/* ── Public app-bar chip (shown only on phones via media query) ── */
.public-appbar-actions { display: none; align-items: center; gap: 0.5rem; }
.appbar-chip {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); color: #fff; text-decoration: none;
  border: 1px solid rgba(255,255,255,.16);
}
.appbar-chip-sun { background: var(--sun-500); color: var(--forest-950); border-color: transparent; }
.appbar-chip .bi { font-size: 1.05rem; line-height: 1; }
.mobile-action-bar { display: none; }

@media(min-width:992px){
  .page-hero { padding: 4rem 0 2rem; }
  .page-hero .hero-card { padding: 2.5rem 3rem; }
}

/* Compact topo hero variant for minimal homepage/contact use */
.topo-field.hero--mini {
  padding: 2.25rem 0 1.25rem;
  background: radial-gradient(ellipse 700px 360px at 15% -10%, rgba(232,166,60,.11), transparent 60%), var(--forest-900);
}
.topo-field.hero--mini .topo { opacity: 0.18; }
.topo-field.hero--mini h1 { color: #fff; font-size: clamp(1.4rem,3.2vw,2.0rem); line-height:1.08; }
.topo-field.hero--mini p.lead { color: rgba(255,255,255,.78); max-width: 680px; }
.topo-field.hero--mini .eyebrow { color: var(--sun-400); font-weight:700; }

@media(min-width:992px){
  .topo-field.hero--mini { padding: 3.25rem 0 2rem; }
}

/* Smaller section title variant for legal pages */
.section-title--sm { font-size: clamp(1.05rem,2.2vw,1.25rem); color: var(--ink-700); margin-bottom: 0.5rem; }

/* Minimal divider between section title and content */
.section-divider { width: 100%; height: 1px; background: var(--ink-border); border-radius: 2px; margin: 0.5rem 0 1rem; }

/* Section */
.section-pad { padding: 4rem 0; }
.section-title { font-size: clamp(1.55rem, 2.5vw, 2.1rem); margin-bottom: 0.5rem; }
.section-sub { color: var(--ink-500); max-width: 600px; }

/* Priority cards */
.priority-card {
  border-radius: var(--r-md); padding: 1.5rem; height: 100%;
  border: 1px solid var(--ink-border); background: var(--paper-raised);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.priority-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--ink-100); }
.priority-icon {
  width: 50px; height: 50px; border-radius: var(--r-leaf);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; margin-bottom: 1rem;
}
.step-num {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
  background: var(--forest-800); color: #fff;
  font-family: var(--font-mono); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD SHELL
   ═══════════════════════════════════════════════════════════════ */

/* Shell grid: sidebar + main */
.dash-shell {
  display: flex;
  min-height: 100dvh;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.dash-sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--forest-900);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
  z-index: 200;
  transition: width var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
}
.dash-sidebar:hover { overflow-y: auto; }

/* Brand area */
.dash-sidebar .brand {
  padding: 1.3rem 1.2rem 1.1rem;
  display: flex; align-items: center; gap: 0.7rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.dash-sidebar .brand-mark { width: 34px; height: 34px; font-size: 0.9rem; }
.brand-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.98rem; color: #fff; line-height: 1.2;
}
.brand-sub { font-size: 0.64rem; color: rgba(255,255,255,.45); font-weight: 400; }

/* Nav section label */
.nav-section-label {
  font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: rgba(255,255,255,.32);
  padding: 0.9rem 1.2rem 0.3rem;
}

/* Nav links */
.dash-nav { padding: 0.5rem 0.75rem; flex: 1; }
.dash-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.62rem 0.85rem;
  border-radius: var(--r-sm);
  color: rgba(255,255,255,.65);
  font-size: 0.875rem; font-weight: 500;
  margin-bottom: 2px;
  cursor: pointer; border: none;
  background: none; width: 100%; text-align: left;
  transition: background var(--t-fast), color var(--t-fast);
  position: relative;
  text-decoration: none;
}
.dash-link .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.dash-link .nav-label { flex: 1; }
.dash-link .nav-badge {
  font-size: 0.65rem; font-weight: 700;
  background: var(--sun-500); color: var(--forest-950);
  border-radius: var(--r-full);
  padding: 1px 6px; min-width: 18px; text-align: center;
}
.dash-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.dash-link.active {
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 600;
}
.dash-link.active::before {
  content: '';
  position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 0 2px 2px 0;
  background: var(--sun-500);
}
.dash-link.danger { color: rgba(255,160,130,.8); }
.dash-link.danger:hover { background: rgba(193,80,47,.18); color: #ffb09a; }

/* Sidebar countdown widget */
.sidebar-countdown {
  margin: 0.5rem 0.75rem 0;
  padding: 0.9rem 1rem;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.sidebar-countdown .label { font-size: 0.68rem; color: rgba(255,255,255,.45); margin-bottom: 0.25rem; }
.sidebar-countdown .value {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 1.15rem; color: var(--sun-400);
  letter-spacing: -0.02em;
}

/* Sidebar bottom actions */
.sidebar-bottom {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}

/* Sidebar user pill */
.sidebar-user {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast);
}
.sidebar-user:hover { background: rgba(255,255,255,.07); }
.sidebar-user .avatar { flex-shrink: 0; }
.sidebar-user .user-name  { font-size: 0.82rem; font-weight: 600; color: #fff; line-height: 1.3; }
.sidebar-user .user-role  { font-size: 0.67rem; color: rgba(255,255,255,.45); }

/* ── Main content area ───────────────────────────────────────── */
.dash-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ── Topbar ──────────────────────────────────────────────────── */
.dash-topbar {
  background: var(--paper-raised);
  border-bottom: 1px solid var(--ink-border);
  padding: 0 1.5rem;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-xs);
  gap: 1rem;
}
.topbar-title { font-size: 1rem; font-weight: 700; color: var(--ink-900); line-height: 1.2; }
.topbar-sub   { font-size: 0.74rem; color: var(--ink-500); }
.topbar-actions { display: flex; align-items: center; gap: 0.5rem; }

/* Hamburger for mobile */
.sidebar-toggle {
  width: 38px; height: 38px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-sm);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-700);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.sidebar-toggle:hover { background: var(--ink-50); border-color: var(--ink-200); }

/* Notification bell */
.notif-bell {
  position: relative;
  width: 38px; height: 38px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-sm);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-700);
  transition: background var(--t-fast);
}
.notif-bell:hover { background: var(--ink-50); }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 9px; height: 9px;
  background: var(--sun-500); border-radius: 50%;
  border: 2px solid var(--paper-raised);
}

/* Avatar chip */
.avatar-chip {
  width: 34px; height: 34px;
  border-radius: var(--r-leaf);
  background: linear-gradient(135deg, var(--canopy-600), var(--canopy-400));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.78rem;
  font-family: var(--font-display);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(45,107,78,.35);
}

/* ── Content ──────────────────────────────────────────────────── */
.dash-content {
  flex: 1;
  padding: 1.5rem;
  width: 100%;
  max-width: none;
}
@media (min-width: 1600px) { .dash-content { padding: 2rem 2.5rem; } }

/* Page header */
.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap;
  gap: 0.75rem; margin-bottom: 1.5rem;
}
.page-header h4, .page-header h5 { margin-bottom: 0; }

/* ── Dash footer ─────────────────────────────────────────────── */
.dash-footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--ink-border);
  background: var(--paper-raised);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.76rem; color: var(--ink-400); gap: 1rem; flex-wrap: wrap;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE — PWA NATIVE PATTERNS
   ═══════════════════════════════════════════════════════════════ */

/* Backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.52);
  z-index: 190;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-backdrop.show { display: block; }

/* ── Bottom nav (shared structure; shown only on mobile via media queries) ── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1050;
  min-height: var(--mobile-nav-h);
  padding: 0.35rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  background: var(--forest-900);
  border-top: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 -10px 28px rgba(12,23,16,.22);
}
.mobile-bottom-nav .mnav-items {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 48px;
  gap: 2px;
}
.mnav-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0.3rem 0.15rem;
  color: rgba(255,255,255,.55);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-decoration: none;
  border-radius: 10px;
  border: none;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}
.mnav-item span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mnav-item .mnav-icon {
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
}
.mnav-item .mnav-icon .bi { font-size: inherit; line-height: 1; display: block; }
.mnav-item.active { color: var(--sun-400); background: rgba(255,255,255,.06); }
.mnav-item:active { color: #fff; }
.mnav-item-primary {
  color: var(--forest-950);
}
.mnav-item-primary .mnav-icon {
  width: 34px; height: 34px;
  border-radius: 999px;
  background: var(--sun-500);
  color: var(--forest-950);
  box-shadow: 0 4px 12px rgba(232,166,60,.4);
}
.mnav-item-primary span:last-child { color: var(--sun-400); }
.mnav-item-primary.active { background: transparent; }
.mnav-dot {
  position: absolute;
  top: 2px; right: 2px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sun-500);
  border: 1.5px solid var(--forest-900);
}
.mobile-fab { display: none !important; }

@media (max-width: 991.98px) {
  .ycaf-dashboard .dash-sidebar {
    position: fixed; left: 0; top: 0; height: 100dvh;
    z-index: 200; transform: translateX(-100%);
  }
  .ycaf-dashboard .dash-sidebar.show { transform: translateX(0); }
  .ycaf-dashboard .dash-shell { display: block; }
  .ycaf-dashboard .dash-main {
    min-height: 100dvh;
    padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 8px);
  }
  .ycaf-dashboard .dash-content { padding: 0.85rem 0.85rem 1.25rem; }
  .ycaf-dashboard .dash-topbar {
    height: 54px;
    padding: 0 0.75rem;
    position: sticky;
    top: 0;
  }
  .ycaf-dashboard .topbar-title { font-size: 0.95rem; }
  .ycaf-dashboard .topbar-sub { display: none; }
  .ycaf-dashboard .dash-footer { display: none; }
  .ycaf-dashboard .mobile-bottom-nav { display: flex; }
  .ycaf-dashboard .stat-card { padding: 0.9rem; }
  .ycaf-dashboard .table { font-size: 0.84rem; }
  .ycaf-dashboard .card-soft { border-radius: 14px; }
}

@media (min-width: 992px) {
  .dash-sidebar { transform: none !important; }
  .sidebar-toggle { display: none; }
  .public-appbar-actions { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   PHONE PWA SHELL — public + dashboard refinements (< 768px only)
   Desktop / tablet layouts above this breakpoint stay unchanged.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
  .ycaf-public {
    padding-top: calc(var(--mobile-appbar-h) + env(safe-area-inset-top, 0px));
    padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 10px);
  }

  /* Compact fixed app bar */
  .ycaf-public .ycaf-nav {
    position: fixed !important;
    top: 0; left: 0; right: 0;
    z-index: 1060;
    min-height: calc(var(--mobile-appbar-h) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    display: flex;
    align-items: center;
    background: rgba(19, 33, 25, 0.97);
    box-shadow: 0 4px 16px rgba(12,23,16,.2);
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .ycaf-public .ycaf-nav .container {
    max-width: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.45rem 0.85rem;
  }
  .ycaf-public .ycaf-nav .navbar-brand {
    font-size: 0.95rem;
    gap: 0.45rem;
    margin: 0;
  }
  .ycaf-public .ycaf-nav .brand-mark { width: 32px; height: 32px; font-size: 0.85rem; }
  .ycaf-public .ycaf-nav .brand-logo { height: 32px; width: 32px; }
  .ycaf-public .ycaf-nav .brand-sub { display: none; }
  .ycaf-public .ycaf-nav .navbar-toggler,
  .ycaf-public .ycaf-nav .collapse { display: none !important; }
  .ycaf-public .public-appbar-actions { display: inline-flex; }

  .ycaf-public .mobile-bottom-nav {
    display: flex;
    background: #fff;
    border-top: 1px solid var(--ink-100);
    box-shadow: 0 -8px 24px rgba(12,23,16,.08);
  }
  .ycaf-public .mnav-item { color: var(--ink-500); }
  .ycaf-public .mnav-item.active {
    color: var(--canopy-600);
    background: rgba(45,107,78,.08);
  }
  .ycaf-public .mnav-item-primary .mnav-icon {
    background: var(--sun-500);
    color: var(--forest-950);
  }
  .ycaf-public .mnav-item-primary span:last-child { color: var(--canopy-600); }

  /* Compact public content */
  .ycaf-public .container { padding-left: 0.85rem; padding-right: 0.85rem; }
  .ycaf-public .hero,
  .ycaf-public .topo-field.hero {
    padding: 1.15rem 0 1.35rem !important;
  }
  .ycaf-public .hero h1,
  .ycaf-public .topo-field.hero h1 {
    font-size: 1.55rem !important;
    line-height: 1.15 !important;
    margin-bottom: 0.55rem !important;
  }
  .ycaf-public .hero .lead,
  .ycaf-public .topo-field.hero .lead {
    font-size: 0.92rem !important;
    margin-bottom: 1rem !important;
  }
  .ycaf-public .deadline-strip {
    flex-wrap: wrap;
    gap: 0.75rem !important;
    padding: 0.85rem !important;
  }
  .ycaf-public .deadline-strip > div[style*="width:1px"] { display: none; }
  .ycaf-public .partner-strip { gap: 0.55rem; }
  .ycaf-public .partner-chip { height: 34px; padding: 0.3rem 0.65rem; }
  .ycaf-public .partner-chip img { height: 16px; }
  .ycaf-public .section-pad { padding: 1.75rem 0; }
  .ycaf-public .card-soft { border-radius: 14px; box-shadow: 0 8px 20px rgba(12,23,16,.08); }
  .ycaf-public .btn-lg { padding: 0.75rem 1.1rem; font-size: 0.95rem; }
  .ycaf-public .row.g-5 { --bs-gutter-y: 1.25rem; }
  .ycaf-public footer.site-footer { padding: 1.5rem 0 0.5rem; }
  .ycaf-public footer.site-footer .footer-partners-card { display: none; }
  .ycaf-public footer.site-footer .footer-columns { padding: 0.5rem 0 1rem !important; gap: 1rem; }
  .ycaf-public footer.site-footer .footer-heading { margin-bottom: 0.55rem; }
  .ycaf-public .list-group-item { padding: 0.85rem 0.7rem; }

  /* Form controls: larger taps without forcing every button full-width */
  .ycaf-public .form-control,
  .ycaf-dashboard .form-control {
    font-size: 16px; /* prevents iOS zoom */
    min-height: 44px;
    border-radius: 12px;
  }
  .ycaf-public .form-select,
  .ycaf-dashboard .form-select {
    font-size: 16px;
    min-height: 44px;
    border-radius: 12px;
    appearance: auto;
    -webkit-appearance: menulist;
    background-image: none;
  }
  .ycaf-public .form-shell .btn-forest,
  .ycaf-public form .btn-forest:not(.btn-sm),
  .ycaf-public form .btn-sun:not(.btn-sm) {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
  }

  .mobile-action-bar:not(:empty) {
    display: flex;
    position: fixed;
    left: 0; right: 0;
    bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px));
    z-index: 1040;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    background: rgba(255,255,255,.96);
    border-top: 1px solid var(--ink-100);
    box-shadow: 0 -6px 18px rgba(12,23,16,.06);
  }
  .mobile-action-bar .btn { flex: 1; width: auto; min-height: 42px; }
}

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */
.form-shell {
  background: var(--paper-raised);
  border: 1px solid var(--ink-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  overflow: visible;
}
.form-label    { font-weight: 600; color: var(--forest-900); font-size: 0.875rem; }
.form-hint     { font-size: 0.78rem; color: var(--ink-500); }
.form-control {
  border-radius: var(--r-sm);
  border-color: var(--ink-200);
  padding: 0.6rem 0.85rem;
  font-size: 0.92rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
select.form-select,
.form-select {
  border-radius: var(--r-sm);
  border-color: var(--ink-200);
  padding: 0.55rem 0.85rem;
  font-size: 0.92rem;
  max-width: 100%;
  line-height: 1.4;
  /* Use the OS picker — custom caret/background overrides were clipping clicks. */
  appearance: auto;
  -webkit-appearance: menulist;
  background-image: none;
  background-color: var(--paper-raised);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-control:focus, .form-select:focus {
  border-color: var(--canopy-500);
  box-shadow: 0 0 0 3px rgba(58,130,96,.14);
  outline: none;
}
.form-control::placeholder { color: var(--ink-400); }
.form-control.is-invalid, .form-select.is-invalid {
  border-color: var(--coral-600);
  box-shadow: 0 0 0 3px rgba(193,80,47,.12);
}
.form-control.is-valid, .form-select.is-valid {
  border-color: var(--canopy-500);
  box-shadow: 0 0 0 3px rgba(58,130,96,.12);
}

.word-counter { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-400); }
.word-counter.warn { color: var(--sun-600); font-weight: 700; }
.word-counter.over { color: var(--coral-600); font-weight: 700; }

/* Multi-step form progress */
.progress-steps { display: flex; gap: 5px; margin-bottom: 2rem; }
.progress-steps .seg {
  flex: 1; height: 4px; border-radius: 99px;
  background: var(--ink-200);
  transition: background var(--t-base);
}
.progress-steps .seg.active { background: var(--sun-500); }
.progress-steps .seg.done   { background: var(--canopy-500); }

.step-pane { display: none; }
.step-pane.active { display: block; animation: slideUp 0.22s var(--ease-out); }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* Input group */
.input-group-text {
  border-color: var(--ink-200);
  background: var(--ink-50);
  color: var(--ink-700);
}

/* ── Field validation helpers ─────────────────────────────────── */
.field-error {
  font-size: 0.78rem; color: var(--coral-600);
  display: flex; align-items: center; gap: 4px; margin-top: 3px;
}
.field-error::before { content: "\F335"; font-family: "bootstrap-icons"; flex-shrink: 0; }

/* ── System alert ─────────────────────────────────────────────── */
.system-alert {
  border-radius: var(--r-md); border: none;
  padding: 0.8rem 1rem;
  display: flex; align-items: flex-start; gap: 0.65rem;
  font-size: 0.875rem;
}
.system-alert-icon  { font-size: 1.05rem; flex-shrink: 0; margin-top: 0.05rem; }
.system-alert.alert-success { background: #dff2e6; color: var(--canopy-600); }
.system-alert.alert-danger,
.system-alert.alert-error   { background: var(--coral-100); color: var(--coral-700); }
.system-alert.alert-warning { background: var(--sun-100);   color: var(--sun-600); }
.system-alert.alert-info    { background: var(--sky-100);   color: var(--sky-600); }
.alert-error { --bs-alert-color:#842029; --bs-alert-bg:#f8d7da; --bs-alert-border-color:#f5c2c7; }

/* ═══════════════════════════════════════════════════════════════
   DATA DISPLAY
   ═══════════════════════════════════════════════════════════════ */

/* Tables */
.table thead th {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-500); border-bottom: 1px solid var(--ink-border);
  font-weight: 700; padding: 0.6rem 0.75rem; background: var(--ink-50);
  white-space: nowrap;
}
.table td {
  vertical-align: middle; padding: 0.82rem 0.75rem;
  font-size: 0.875rem; color: var(--ink-900);
}
.table tbody tr { border-bottom: 1px solid var(--ink-border); transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--sun-50); }
.table td.wrap, .table th.wrap { white-space: normal; }

/* Filter pills */
.filter-pill {
  border: 1px solid var(--ink-200);
  background: var(--paper-raised);
  border-radius: var(--r-full);
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem; font-weight: 600; color: var(--ink-700);
  cursor: pointer; transition: all var(--t-fast);
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
.filter-pill:hover  { background: var(--ink-50); border-color: var(--ink-300, #bbb); }
.filter-pill.active { background: var(--forest-800); color: #fff; border-color: var(--forest-800); }

/* Detail label/value */
.detail-label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--ink-500); font-weight: 700; margin-bottom: 0.2rem;
}
.detail-value { font-size: 0.9rem; color: var(--ink-900); margin-bottom: 1rem; }
.detail-missing {
  color: #9b2226 !important;
  font-style: italic;
}

/* Application detail page */
.app-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  color: var(--ink-500);
  margin-bottom: 1rem;
}
.app-detail-back:hover { color: var(--forest-800); }

.app-detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--ink-border);
  background:
    linear-gradient(135deg, rgba(61, 130, 96, 0.08), transparent 55%),
    linear-gradient(180deg, var(--paper-raised), var(--paper-warm));
}
.app-detail-hero__ref {
  font-size: 0.76rem;
  color: var(--ink-500);
  margin: 0 0 0.35rem;
}
.app-detail-hero__title {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 800;
  color: var(--forest-900);
  margin: 0 0 0.35rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.app-detail-hero__org {
  font-size: 0.92rem;
  color: var(--ink-700);
  margin: 0 0 0.75rem;
}
.app-detail-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}
.app-detail-hero__date {
  font-size: 0.78rem;
  color: var(--ink-500);
}
.app-detail-hero__aside {
  text-align: right;
  flex-shrink: 0;
}
.app-detail-hero__exports {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.app-detail-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.3rem;
  margin-bottom: 1.35rem;
  border-radius: 12px;
  background: var(--ink-50);
  border: 1px solid var(--ink-100);
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}
.app-detail-tabs__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-700);
  transition: background 0.15s ease, color 0.15s ease;
}
.app-detail-tabs__link:hover { color: var(--forest-900); background: rgba(255,255,255,0.65); }
.app-detail-tabs__link.is-active {
  background: var(--paper-raised);
  color: var(--forest-900);
  box-shadow: 0 1px 3px rgba(19, 33, 25, 0.08);
}

.app-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 1.35rem;
  align-items: start;
}
@media (max-width: 991.98px) {
  .app-detail-layout { grid-template-columns: 1fr; }
  .app-detail-hero__aside { text-align: left; width: 100%; }
  .app-detail-hero__exports { justify-content: flex-start; }
}

.app-detail-section,
.app-detail-panel {
  background: var(--paper-raised);
  border: 1px solid var(--ink-border);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.15rem;
}
.app-detail-section--accent {
  background:
    linear-gradient(160deg, rgba(61, 130, 96, 0.06), transparent 50%),
    var(--paper-raised);
}
.app-detail-section__head { margin-bottom: 1.1rem; }
.app-detail-section__head--row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.app-detail-section__title,
.app-detail-panel__title {
  font-size: 1rem;
  font-weight: 750;
  color: var(--forest-900);
  margin: 0 0 0.2rem;
  letter-spacing: -0.015em;
}
.app-detail-panel__title {
  padding-bottom: 0.65rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--ink-100);
}
.app-detail-section__lede {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-500);
}
.app-detail-budget-total {
  font-weight: 800;
  color: var(--forest-900);
  font-size: 0.95rem;
}

.app-detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.25rem;
}
.app-detail-facts--compact { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
@media (max-width: 575.98px) {
  .app-detail-facts { grid-template-columns: 1fr; }
}
.app-detail-fact .detail-value,
.app-detail-block .detail-value { margin-bottom: 0; }
.app-detail-fact.is-missing,
.app-detail-block.is-missing {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: rgba(155, 34, 38, 0.04);
}

.app-detail-narrative { display: flex; flex-direction: column; gap: 1rem; }
.app-detail-block {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ink-100);
}
.app-detail-block:last-child { border-bottom: 0; padding-bottom: 0; }

.app-detail-table-wrap {
  border: 1px solid var(--ink-100);
  border-radius: 10px;
  overflow: hidden;
}
.app-detail-table-wrap .table { margin: 0; }
.app-detail-table-wrap thead th {
  background: var(--ink-50);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-500);
}

.app-detail-doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.app-detail-doc {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--ink-100);
  background: var(--ink-50);
}
.app-detail-doc__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.app-detail-doc__body { flex: 1 1 180px; min-width: 0; }
.app-detail-doc__name { font-weight: 650; font-size: 0.9rem; color: var(--ink-900); }
.app-detail-doc__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--ink-500);
}
.app-detail-doc__actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.app-detail-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}
.app-detail-action {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--ink-border);
  background: var(--paper-raised);
  color: var(--ink-900);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.app-detail-action i {
  font-size: 1.15rem;
  color: var(--canopy-600);
  margin-top: 0.1rem;
}
.app-detail-action strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.1rem;
}
.app-detail-action small {
  display: block;
  color: var(--ink-500);
  font-size: 0.78rem;
}
.app-detail-action:hover {
  border-color: var(--canopy-400);
  color: var(--forest-900);
  box-shadow: 0 4px 14px rgba(19, 33, 25, 0.06);
  transform: translateY(-1px);
}

.app-detail-review { padding: 0.25rem 0 1rem; }
.app-detail-review--border {
  border-bottom: 1px solid var(--ink-100);
  margin-bottom: 1rem;
}
.app-detail-review__head { margin-bottom: 0.75rem; }
.app-detail-scores {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
}
.app-detail-scores li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--ink-100);
  font-size: 0.86rem;
}
.app-detail-scores li:last-child { border-bottom: 0; }
.app-detail-decision__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.app-detail-section .app-detail-decision,
.app-detail-section .app-detail-panel {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
}

/* Timeline log */
.timeline-log { border-left: 2px solid var(--ink-200); padding-left: 1.1rem; }
.timeline-log .entry { position: relative; padding-bottom: 1rem; }
.timeline-log .entry::before {
  content: '';
  position: absolute; left: -1.42rem; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--canopy-500);
  border: 2px solid var(--paper-raised);
}
.timeline-log .entry:last-child { padding-bottom: 0; }

/* Empty state */
.empty-state {
  text-align: center; padding: 3.5rem 1.5rem; color: var(--ink-400);
}
.empty-state .empty-icon {
  font-size: 2.4rem; color: var(--ink-200);
  margin-bottom: 1rem; display: block;
}
.empty-state h6 { color: var(--ink-700); margin-bottom: 0.35rem; }

/* Pagination */
.pagination-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; border-top: 1px solid var(--ink-border);
  gap: 0.5rem; flex-wrap: wrap;
}

/* Badge */
.notif-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--sun-500); color: var(--forest-950);
  border-radius: var(--r-full); font-size: 0.64rem; font-weight: 800;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER — PUBLIC SITE
   ═══════════════════════════════════════════════════════════════ */
.site-footer { background: var(--forest-950); color: rgba(255,255,255,.58); }
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: #fff; }

.footer-partners-card {
  background: var(--paper-raised);
  border-radius: var(--r-xl);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-xl);
  transform: translateY(-36px);
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1.2rem;
}
.footer-action {
  min-width: 160px;
}
.footer-action .btn {
  white-space: nowrap;
}
@media (max-width: 575.98px) {
  .footer-action { width: 100%; text-align: left; }
}
.footer-partners-card .fp-label {
  font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-400); font-weight: 700;
}
.footer-partners-card .fp-logos {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.6rem;
}
.footer-partners-card .fp-logos img { height: 36px; width: auto; object-fit: contain; }
.footer-partners-card .fp-logos .brand-logo,
.footer-partners-card .fp-logos .brand-logo-sm {
  height: 40px;
  width: 40px;
  object-fit: cover;
  border-radius: 50%;
}
.footer-partners-card .fp-divider { width: 1px; height: 30px; background: var(--ink-border); }
.footer-heading {
  color: #fff; font-size: 0.73rem; text-transform: uppercase;
  letter-spacing: 0.09em; font-weight: 700; margin-bottom: 0.9rem;
}
.footer-columns ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-columns ul a { color: rgba(255,255,255,.72); font-size: 0.85rem; }
.footer-columns ul a:hover { color: #fff; }
.footer-columns .small-note { font-size: 0.82rem; color: rgba(255,255,255,.55); }
.footer-columns .footer-heading { margin-bottom: 1rem; }
.row.g-4.footer-columns.align-items-start { padding: 30px 0; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.07);
  font-size: 0.76rem; color: rgba(255,255,255,.4); gap: 0.5rem;
}

/* YCAF wordmark */
.ycaf-wordmark { display: flex; align-items: center; gap: 0.5rem; }
.ycaf-wordmark-name { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--forest-900); letter-spacing: -0.01em; }
.ycaf-wordmark-sub  { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--canopy-600); }

/* Partner chip */
.partner-chip {
  background: #fff; border-radius: 10px; padding: 0.4rem 0.85rem;
  display: flex; align-items: center; height: 40px;
  box-shadow: var(--shadow-sm);
}
.partner-chip img { height: 22px; width: auto; object-fit: contain; }
.partner-chip.ycaf-chip { gap: 0.5rem; color: var(--forest-900); font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; }
.partner-chip.ycaf-chip .brand-mark { width: 22px; height: 22px; font-size: 0.68rem; }
.partner-chip.ycaf-chip .brand-logo-sm {
  height: 26px;
  width: 26px;
  object-fit: cover;
  border-radius: 50%;
}

.partner-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}
.partner-label {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,.8);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}
.step-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.step-item .step-num {
  width: 42px; height: 42px;
  border-radius: 999px;
  background: var(--sun-500);
  color: var(--forest-950);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.step-item .step-line {
  width: 1px;
  min-height: 1.5rem;
  background: var(--ink-border);
  margin-top: 0.5rem;
}

@media (max-width: 767.98px) {
  .footer-partners-card { transform: translateY(-20px); padding: 1.2rem; flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════════════
   UTILITIES & MISC
   ═══════════════════════════════════════════════════════════════ */

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--ink-200); border-radius: var(--r-md);
  padding: 1.6rem 1rem; text-align: center; cursor: pointer;
  transition: border-color var(--t-base), background var(--t-base);
  background: var(--paper);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--canopy-500); background: #edf6f0;
}
.upload-zone i { font-size: 1.6rem; color: var(--canopy-500); }
.upload-zone input[type=file] { display: none; }

.upload-file-chip {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 0.85rem; border-radius: var(--r-sm);
  border: 1px solid var(--ink-border); background: var(--paper-raised); margin-top: 0.5rem;
}
.upload-file-chip .name { font-weight: 600; font-size: 0.85rem; }
.upload-file-chip .meta { font-size: 0.73rem; color: var(--ink-500); }

/* Accordion */
.accordion-button:not(.collapsed) { background: #ecf8f2; color: var(--forest-900); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 3px rgba(58,130,96,.14); }

/* Progress bar */
.progress-bar { background: var(--canopy-500) !important; }

/* Table hover */
.table-hover tbody tr:hover td { background: var(--sun-50) !important; }

/* Form page shells */
.form-page-shell      { max-width: 760px; margin: 0 auto; }
.form-page-shell-wide { max-width: 960px; margin: 0 auto; }

/* Topo texture */
.topo-field svg.topo { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.28; pointer-events: none; }

/* Budget row */
.budget-row .btn-remove { color: var(--coral-600); }

/* Smooth load animation for dash content */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dash-content > * { animation: fadeInUp 0.3s var(--ease-out) both; }
.dash-content > *:nth-child(2) { animation-delay: 0.04s; }
.dash-content > *:nth-child(3) { animation-delay: 0.08s; }
.dash-content > *:nth-child(4) { animation-delay: 0.12s; }

/* Notification dropdown */
.notif-dropdown {
  min-width: 320px; max-height: 400px; overflow-y: auto;
  border-radius: var(--r-md); border: 1px solid var(--ink-border);
  box-shadow: var(--shadow-lg); padding: 0;
}
.notif-item {
  display: flex; gap: 0.75rem; padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--ink-50);
  transition: background var(--t-fast);
  text-decoration: none; color: inherit;
}
.notif-item:hover { background: var(--sun-50); }
.notif-item.unread { background: var(--sky-100); }
.notif-item.unread:hover { background: #d0e8f2; }
.notif-dot-indicator {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sun-500); flex-shrink: 0; margin-top: 5px;
}

@media (max-width: 575.98px) {
  .card-soft { border-radius: var(--r-md); }
  .form-shell { border-radius: var(--r-lg) !important; padding: 1.25rem !important; }
  .stat-value { font-size: 1.55rem; }
}

/* Modern Admin Submissions Toggle Switch Button */
.toggle-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  text-decoration: none;
}
.toggle-pill-open {
  background-color: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
.toggle-pill-open:hover {
  background-color: #bbf7d0;
  color: #166534;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(34,197,94,0.25);
}
.toggle-pill-open .toggle-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  flex-shrink: 0;
}

.toggle-pill-closed {
  background-color: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}
.toggle-pill-closed:hover {
  background-color: #fca5a5;
  color: #991b1b;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(239,68,68,0.25);
}
.toggle-pill-closed .toggle-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 6px #ef4444;
  flex-shrink: 0;
}
