/* ═══════════════════════════════════════════════════════════════
   Dashboard Base Styles
   Shared across all dashboard pages
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   1. DESIGN TOKENS (CSS Variables)
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* ── Text Colors ── */
  --color-ink: #1a1c1a;
  --color-subtle: #4b4737;
  --color-muted: #7d7765;
  --color-gold-text: #6f5d00;

  /* ── Surfaces ── */
  --surface: #ffffff;
  --surface-alt: #faf9f6;
  --surface-muted: #f4f3f1;

  /* ── Borders ── */
  --color-border: #e3e2e0;
  --color-border-strong: #cec6b1;
  --color-border-faint: #f0ede6;
  --color-skeleton: #efeeeb;

  /* ── Brand Swatches (Gold) ── */
  --swatch-gold-bg: #fde274;
  --swatch-gold-text: #544600;
  --swatch-gold-strong: #221b00;
  --swatch-gold-gradient: #dfc65b;
  --swatch-gold-hover: #c9b04f;

  /* ── Brand Swatches (Green) ── */
  --swatch-green-bg: #d3e8d5;
  --swatch-green-text: #394b3d;
  --swatch-green-strong: #0e1f13;
  --swatch-green-accent: #506354;
  --swatch-green-gradient: #8fa89a;
  --swatch-green-accent-hover: #3f5044;
  --swatch-green-strong-alt: #1b4332;

  /* ── Brand Swatches (Amber & Terracotta) ── */
  --swatch-amber-bg: #ffd5ae;
  --swatch-amber-text: #61401b;
  --swatch-amber-strong: #2c1600;
  --swatch-amber-accent: #eebd8e;
  --swatch-amber-accent-hover: #dba876;
  --swatch-terracotta: #7c5730;
  --swatch-terracotta-hover: #6a4929;

  /* ── Brand Swatches (Red/Error) ── */
  --swatch-red-bg: #ffdad6;
  --swatch-red-text: #93000a;
  --status-rejected: #ba1a1a;
  --status-outstanding: #a05c00;

  /* ── Radii ── */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-pill: 0.75rem;

  /* ── Shadows ── */
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 8px 28px rgba(0, 0, 0, 0.07);
  --shadow-dropdown: 0 8px 32px rgba(0, 0, 0, 0.08);

  /* ── Typography ── */
  --font-serif: "Libre Caslon Text", serif;
  --font-serif-alt: "Source Serif 4", serif;
  --font-sans: "Source Sans 3", sans-serif;

  /* ── Charts & Heatmaps ── */
  --chart-gold: #D4A017;
  --chart-teal: #3D8B7A;
  --chart-terracotta: #C4704B;
  --chart-red: #C9452B;
  --heatmap-gradient-start: #fff8dc;
  --heatmap-gradient-end: #bad400;
}


/* ═══════════════════════════════════════════════════════════════
   2. GLOBAL RESETS & BASE LAYOUT
   ═══════════════════════════════════════════════════════════════ */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  padding-top: 64px; /* Offset for fixed navbar height */
}

/* Lock body scroll when mobile menu is open */
body.db-menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Force main content to darken when menu is open */
body.db-menu-open .db-page,
body.db-menu-open .db-shortcut-bar,
body.db-menu-open .db-footer {
  filter: brightness(0.6);
  pointer-events: none; /* Prevents accidental clicks on the background content */
}


/* ═══════════════════════════════════════════════════════════════
   3. ICONS & TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */
.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 4px;
}


/* ═══════════════════════════════════════════════════════════════
   4. ANIMATIONS & LOADING STATES
   ═══════════════════════════════════════════════════════════════ */

/* ── Card Entrance ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.anim-card {
  animation: fadeSlideUp 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.anim-card:nth-child(1) { animation-delay: 0.05s; }
.anim-card:nth-child(2) { animation-delay: 0.10s; }
.anim-card:nth-child(3) { animation-delay: 0.15s; }
.anim-card:nth-child(4) { animation-delay: 0.20s; }
.anim-card:nth-child(5) { animation-delay: 0.25s; }
.anim-card:nth-child(6) { animation-delay: 0.30s; }

/* ── Skeleton Loaders ── */
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--color-skeleton) 25%, var(--color-border) 50%, var(--color-skeleton) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 28px; width: 60%; margin-bottom: 12px; }
.skeleton-chart { height: 200px; }

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .anim-card, .skeleton { animation: none; }
  .kpi-card:hover { transform: none; }
}


/* ═══════════════════════════════════════════════════════════════
   5. LAYOUT COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

/* ── Main Page Container ── */
.db-page {
  padding: 40px 24px;
  flex: 1;
  transition: filter 0.3s ease; /* Smooth darkening transition */
}
/* ── Bento Grid ── */
.bento-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(12, 1fr);
}


/* ═══════════════════════════════════════════════════════════════
   6. UI COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

/* ── KPI Cards (Hoverable) ── */
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

/* ── KPI Grid Items ── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.kpi-item {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 18px;
}
.kpi-item__label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 6px;
}
.kpi-item__value {
  font-family: var(--font-serif);
  font-size: 30px;
  color: var(--color-gold-text);
  margin: 0;
  font-weight: 700;
}
.kpi-item__subtext {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--color-muted);
  margin: 2px 0 0;
}

/* ── Trend Cards ── */
.trend-row-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.trend-card {
  background: var(--surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.trend-card--full { margin-bottom: 40px; }
.trend-card__label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-subtle);
  margin: 0 0 16px;
}

/* ── Data Tables ── */
.db-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.db-table th {
  background: var(--surface-muted);
  padding: 10px 14px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-subtle);
  border-bottom: 2px solid var(--color-border-strong);
}
.db-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-ink);
}
.db-table tr:last-child td { border-bottom: none; }
.db-table tr:hover td { background: var(--surface-alt); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge-gold { background: var(--swatch-gold-bg); color: var(--swatch-gold-text); }
.badge-green { background: var(--swatch-green-bg); color: var(--swatch-green-text); }
.badge-amber { background: var(--swatch-amber-bg); color: var(--swatch-amber-text); }
.badge-red { background: var(--swatch-red-bg); color: var(--swatch-red-text); }

/* ── Accordion ── */
.accordion-item { border-bottom: 1px solid var(--color-border); }
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
}
.accordion-trigger:hover { color: var(--color-gold-text); }
.accordion-icon { transition: transform 0.25s ease; }
.accordion-trigger[aria-expanded="true"] .accordion-icon { transform: rotate(180deg); }
.accordion-body { padding-bottom: 24px; }

/* ── Search Input ── */
.db-search {
  width: 100%;
  background: var(--surface-muted);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: 10px 16px 10px 44px;
  font-size: 14px;
  color: var(--color-ink);
  outline: none;
  transition: border-color 0.2s;
}
.db-search:focus { border-color: var(--color-gold-text); }


/* ═══════════════════════════════════════════════════════════════
   7. NAVIGATION (Desktop)
   ═══════════════════════════════════════════════════════════════ */
.db-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-strong);
}

.db-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
  width: 100%;
}

/* ── Logo ── */
.db-logo-text {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--color-ink);
  letter-spacing: 0.02em;
  font-weight: 700;
}
.db-logo-divider {
  width: 1px;
  height: 24px;
  background: var(--color-border-strong);
  margin: 0 4px;
}
.db-logo-subtitle {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  text-transform: uppercase;
}

/* ── Nav Links ── */
.db-nav-link {
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-subtle);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.db-nav-link:hover,
.db-nav-link.is-active {
  color: var(--color-gold-text);
  border-bottom-color: var(--color-gold-text);
}

/* ── Dropdowns ── */
.db-dropdown { position: relative; }

.db-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-subtle);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.db-dropdown-btn:hover,
.db-dropdown:focus-within .db-dropdown-btn {
  color: var(--color-gold-text);
  border-bottom-color: var(--color-gold-text);
}

.db-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  z-index: 100;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.db-dropdown:focus-within .db-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.db-dropdown-menu a {
  display: block;
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-subtle);
  text-decoration: none;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease, padding-left 0.2s ease;
}
.db-dropdown-menu a:hover {
  background: var(--surface-muted);
  color: var(--color-gold-text);
  padding-left: 20px;
}
.db-dropdown-menu .divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}

/* ── Dropdown Icons ── */
.db-dropdown button .material-symbols-outlined {
  font-size: 16px;
  transition: transform 0.2s ease;
}
.db-dropdown:focus-within button .material-symbols-outlined {
  transform: rotate(180deg);
}
.db-dropdown-menu .material-symbols-outlined {
  font-size: 15px;
  vertical-align: -3px;
  margin-right: 6px;
}


/* ═══════════════════════════════════════════════════════════════
   8. NAVIGATION (Mobile)
   ═══════════════════════════════════════════════════════════════ */

/* ── Hamburger Button ── */
.db-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-ink);
}

/* ── Slide-out Overlay ── */
.db-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.db-mobile-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ── Slide-out Menu Panel ── */
.db-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  height: 100dvh; /* Dynamic viewport height for mobile browsers */
  width: 280px;
  max-width: 85vw;
  background: var(--surface);
  z-index: 100; /* Must be higher than overlay */
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  will-change: transform;
}
.db-mobile-menu.is-open {
  transform: translateX(0);
}

/* ── Mobile Menu Inner Elements ── */
.db-mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}
.db-mobile-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-ink);
}
.db-mobile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-subtle);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.db-mobile-link:hover,
.db-mobile-link:active {
  background: var(--surface-muted);
  color: var(--color-gold-text);
}
.db-mobile-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}
.db-mobile-group-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 0 8px 6px;
}


/* ═══════════════════════════════════════════════════════════════
   9. DASHBOARD SHORTCUT BAR
   ═══════════════════════════════════════════════════════════════ */
.db-shortcut-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 16px 32px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--color-border);
  transition: filter 0.3s ease; /* Add this */
}

.db-shortcut-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--color-border-faint);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.db-shortcut-item:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
  border-color: var(--swatch-gold-gradient);
}
.db-shortcut-item.is-active {
  border-color: var(--swatch-gold-gradient);
  background: var(--swatch-gold-bg);
  color: var(--swatch-gold-text);
}
.db-shortcut-item .material-symbols-outlined {
  font-size: 20px;
  color: var(--color-gold-text);
  transition: transform 0.2s ease;
}
.db-shortcut-item:hover .material-symbols-outlined {
  transform: scale(1.1);
}


/* ═══════════════════════════════════════════════════════════════
   10. FOOTER
   ═══════════════════════════════════════════════════════════════ */
.db-footer {
  background: var(--surface-muted);
  border-top: 1px solid var(--color-border);
  padding: 24px 24px;
  transition: filter 0.3s ease; /* Add this */
}

.db-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.db-footer-brand,
.db-footer-desc {
  display: block; /* Forces line break between brand and description */
}

.db-footer-brand {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-gold-text);
}

.db-footer-desc {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 4px;
}

.db-footer-credit {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--color-muted);
}


/* ═══════════════════════════════════════════════════════════════
   Shared Dashboard Header & Filter Components
   ═══════════════════════════════════════════════════════════════ */

/* ── Page Header Bar ── */
.db-header-bar {
  background: var(--surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  flex-wrap: wrap;
  gap: 16px;
}

.db-page-title {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 600;
  color: var(--color-ink);
  margin: 0;
  letter-spacing: -0.02em;
}

.db-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: all 0.2s ease;
}

.db-btn-outline:hover {
  background: var(--color-bg-subtle);
  border-color: var(--color-muted);
}

.db-btn-outline .material-symbols-outlined {
  font-size: 18px;
}

/* ── Filter Section Bar ── */
.db-filter-bar {
  background: var(--surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  width: fit-content;  
  max-width: 100%;     
}

.db-select-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.db-select-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
}

.db-select-wrapper {
  position: relative;
  width: 100%;
  min-width: 200px;
}

.db-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 10px 40px 10px 16px;
  background: var(--surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-ink);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.db-select:focus {
  outline: none;
  border-color: var(--swatch-green-strong);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.db-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 20px;
  color: var(--color-muted);
}

/* ── Premium Stat Cards (KPIs) ── */
.stat-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 32px;
}
.stat-grid--2 { grid-template-columns: repeat(2, 1fr); }
.stat-grid--4 { grid-template-columns: repeat(4, 1fr); }

.stat-card {
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.stat-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-card__watermark {
  position: absolute;
  right: -20px;
  bottom: -20px;
  font-size: 140px !important;
  opacity: 0.08;
  pointer-events: none;
  transition: transform 0.5s ease;
}

.stat-card:hover .stat-card__watermark {
  transform: scale(1.1);
}

.stat-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.stat-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
  margin-bottom: 24px;
  width: fit-content;
}

.stat-card__pill .material-symbols-outlined {
  font-size: 18px;
}

.stat-card__pill-text {
  font-size: 14px;
  font-weight: 600;
}

.stat-card__value {
  font-family: var(--font-sans);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Color Variants */
.stat-card--amber {
  background: var(--swatch-amber-bg);
  border: 1px solid rgba(234, 179, 8, 0.2);
}
.stat-card--amber .stat-card__watermark { color: var(--swatch-amber-strong); }
.stat-card--amber .stat-card__pill, 
.stat-card--amber .stat-card__pill .material-symbols-outlined, 
.stat-card--amber .stat-card__pill-text { color: var(--swatch-amber-strong); }
.stat-card--amber .stat-card__value { color: #78350f; }

.stat-card--green {
  background: var(--swatch-green-bg);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.stat-card--green .stat-card__watermark { color: var(--swatch-green-strong); }
.stat-card--green .stat-card__pill, 
.stat-card--green .stat-card__pill .material-symbols-outlined, 
.stat-card--green .stat-card__pill-text { color: var(--swatch-green-strong); }
.stat-card--green .stat-card__value { color: #052e16; }

/* For Grievance 4-grid (Neutral/White look to not overwhelm) */
.stat-card--neutral {
  background: var(--surface);
  border: 1px solid var(--color-border);
}
.stat-card--neutral .stat-card__watermark { color: var(--color-border-strong); opacity: 0.5; }
.stat-card--neutral .stat-card__pill { background: rgba(0,0,0,0.02); border: 1px solid var(--color-border); }
.stat-card--neutral .stat-card__pill .material-symbols-outlined, 
.stat-card--neutral .stat-card__pill-text { color: var(--color-subtle); }
.stat-card--neutral .stat-card__value { color: var(--color-ink); font-size: 36px; }

/* Solid Primary Button */
.db-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--swatch-green-strong);
  color: white;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.db-btn-primary:hover {
  background: #156030;
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
  .stat-grid--2, .stat-grid--4 { grid-template-columns: 1fr; }
  .stat-grid--4 { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   11. RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════ */

/* ── Mobile Viewport (<= 768px) ── */
@media (max-width: 768px) {
  /* Navigation: Hide desktop links, show hamburger */
  .db-nav-inner .db-nav-links {
    display: none !important;
  }
  .db-hamburger {
    display: flex !important;
  }

  /* Shortcut Bar: Hide completely on mobile (replaced by hamburger menu) */
  .db-shortcut-bar {
    display: none !important;
  }

  /* Layout: Stack KPIs and Trends */
  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .trend-row-half {
    grid-template-columns: 1fr;
  }

  /* Shortcut Bar (if it were visible) */
  .db-shortcut-bar {
    padding: 12px 16px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  /* Footer: Stack elements */
  .db-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .db-footer-credit {
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
  }
}

/* ═══════════════════════════════════════════════════════════════
   Mobile Responsive Adjustments (Premium UI)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* ── Header Bar ── */
  .db-header-bar {
    flex-direction: column;
    align-items: stretch; /* Makes items take full width */
    text-align: center;
    gap: 16px;
    padding: 20px;
  }

  .db-page-title {
    font-size: 24px; /* Slightly smaller for small screens */
  }

  .db-btn-outline {
    width: 100%;
    justify-content: center;
  }

  /* ── Filter Bar ── */
  .db-filter-bar {
    width: 100%; /* Override the fit-content to fill the screen */
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .db-select-group {
    width: 100%;
  }

  .db-select-wrapper {
    width: 100%;
    min-width: unset; /* Remove desktop min-width restriction */
  }

  .db-select {
    width: 100%;
  }

  /* ── Stat Cards (KPIs) ── */
  /* Stack 2-column grid to 1-column on phones */
  .stat-grid--2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Keep 4-column grid as 2x2 on tablets/large phones */
  .stat-grid--4 {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 20px; /* Reduce padding to save space */
  }

  .stat-card__value {
    font-size: 36px; /* Smaller numbers so they don't overflow */
  }

  .stat-card__pill-text {
    font-size: 13px;
  }

  /* Ensure Report Header inside the card wraps nicely */
  .net-latest-card__head,
  .grv-latest-card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .db-btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* ── Extra small phones (max-width: 480px) ── */
@media (max-width: 480px) {
  /* Stack the 4-column grid entirely to 1 column on tiny screens */
  .stat-grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ── Tablet/Desktop Viewport (> 768px) ── */
@media (min-width: 768px) {
  /* Navigation: Wider padding */
  .db-nav-inner {
    padding: 0 40px;
  }

  /* Page: Wider padding */
  .db-page {
    padding: 48px 40px;
  }

  /* Footer: Wider padding */
  .db-footer {
    padding: 24px 40px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   12. SHARED UI ELEMENTS (Buttons & Page Actions)
   ═══════════════════════════════════════════════════════════════ */

/* ── Page Header Actions (Title + Main Button) ── */
.db-page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.db-page-actions h1, 
.db-page-actions .claims-page-title {
  margin: 0;
  flex: 1;
}

/* ── Generalized Action Button ── */
.db-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--swatch-gold-strong);
  background: var(--swatch-gold-bg);
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.db-btn:hover {
  background: var(--swatch-gold-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
  color: var(--swatch-gold-strong);
}

.db-btn .material-symbols-outlined {
  font-size: 18px;
}

/* Icon-only variant (for tight spaces like accordions) */
.db-btn--sm {
  padding: 6px;
  border-radius: 50%;
}

.db-btn--sm .material-symbols-outlined {
  font-size: 18px;
}

/* ── Accordion Header Row (Fix for download btn alignment) ── */
.db-accordion-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.db-accordion-header-row .accordion-trigger {
  flex: 1;
}

.db-accordion-header-row .db-btn {
  flex-shrink: 0;
}

/* ── Mobile Adjustments for Buttons ── */
@media (max-width: 768px) {
  .db-page-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  /* Shrink text slightly on mobile if needed */
  .db-btn:not(.db-btn--sm) {
    font-size: 12px;
    padding: 7px 12px;
  }
}