/* Compliance HUB Pinas - Core Styling sheet */

@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette (Cool Government Green & Sleek Grays) */
  --primary-rgb: 27, 77, 44;
  --primary-color: rgb(var(--primary-rgb));
  --primary-light-rgb: 45, 106, 79;
  --primary-light: rgb(var(--primary-light-rgb));
  --primary-dark: #0f2b18;
  --primary-glow: rgba(var(--primary-light-rgb), 0.15);
  --accent-rgb: 82, 183, 136;
  --accent-color: rgb(var(--accent-rgb));
  
  --bg-color: #f7f9f6;
  --card-bg: #ffffff;
  --text-dark: #1b201c;
  --text-light: #6b776d;
  --border-color: #e0e5e1;

  /* Status Colors */
  --status-approved: #2d6a4f;      /* Green */
  --status-approved-bg: #d8f3dc;
  --status-review: #e0a96d;        /* Yellow */
  --status-review-bg: #fef3c7;
  --status-late: #d97706;          /* Orange */
  --status-late-bg: #ffedd5;
  --status-missing: #b91c1c;       /* Red */
  --status-missing-bg: #fee2e2;
  --status-closed: #64748b;
  --status-closed-bg: #f1f5f9;
  --status-returned: #0288d1;      /* Light Blue */
  --status-returned-bg: #e0f2fe;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(27, 32, 28, 0.06);
  --shadow-lg: 0 10px 25px rgba(27, 32, 28, 0.1);
  
  --border-radius: 16px;
  --font-main: 'Outfit', sans-serif;
  --transition-speed: 0.25s;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body, button, input, select, textarea, table, th, td {
  font-family: var(--font-main);
}

body {
  background-color: #f0f2f5; /* Elegant modern backdrop for desktop/tablet */
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  margin: 0;
}

/* Responsive App Container Wrapper (formerly Smartphone emulator) */
.device-emulator {
  width: 100%;
  max-width: 1000px;
  background-color: var(--bg-color);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.04);
}

/* Hide notch on all layouts by default */
.device-emulator::before {
  display: none;
}

.app-container {
  width: 100%;
  flex: 1;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Hide simulated status bar by default */
.status-bar {
  display: none;
}

.status-bar-icons {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* General Layout Elements */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); /* Space for navbar + safe area */
  position: relative;
  overscroll-behavior-y: contain; /* Prevents scroll chaining to parent viewport */
  -webkit-overflow-scrolling: touch; /* Momentum smooth scrolling for iOS */
}

.app-page {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
  width: 100%;
  min-height: 100%;
  padding: 16px;
}

.app-page.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Header Component */
.header-bar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: #ffffff;
  padding: 12px 20px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 99;
}

.header-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top, 0px);
  background-color: transparent; /* Same green color as header (no darkening layer) */
  border-bottom: 1px solid rgba(255, 255, 255, 0.12); /* Thin division line separating status bar and header */
  pointer-events: none;
}

.header-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logout-btn {
  display: none;
}

.header-notif-button {
  padding: 0;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.header-notif-button:hover,
#header-notif-container:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background-color: rgba(255, 255, 255, 0.12);
}

.header-notif-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.header-logo-container {
  width: 34px;
  height: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2px;
  transition: transform var(--transition-speed) ease;
}

.header-logo-container:hover {
  transform: scale(1.05);
  background-color: rgba(255, 255, 255, 0.18);
}

.header-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.header-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

.header-action-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background-color var(--transition-speed);
}

.header-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1000px;
  height: calc(72px + env(safe-area-inset-bottom, 0px));
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px env(safe-area-inset-bottom, 0px) 10px;
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  transition: color var(--transition-speed) ease;
  cursor: pointer;
  flex: 1;
  height: 100%;
  position: relative;
}

.nav-item i, 
.nav-item svg,
.nav-item .lucide {
  width: 20px !important;
  height: 20px !important;
  font-size: 20px !important;
  margin-bottom: 4px !important;
  flex-shrink: 0 !important;
  transition: transform var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item span {
  display: inline-block;
  transition: transform var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1), font-weight var(--transition-speed) ease;
  transform-origin: center top;
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-item.active i, .nav-item.active svg {
  transform: scale(1.22) translateY(-3px);
}

.nav-item.active span {
  font-weight: 700;
  transform: scale(1.08);
}

/* Hover effects for regular nav items */
.nav-item:hover:not(.active):not(.submit-popped) i,
.nav-item:hover:not(.active):not(.submit-popped) svg {
  transform: scale(1.1) translateY(-1px);
  color: var(--primary-light);
}

/* Popped-out Barangay Submit Button */
.nav-item.submit-popped {
  position: relative;
  top: -18px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: #ffffff !important;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.4);
  flex: none;
  border: 4px solid var(--card-bg);
  transition: transform var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow var(--transition-speed) ease;
  z-index: 1;
}

.nav-item.submit-popped:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.55);
}

.nav-item.submit-popped:active {
  transform: scale(0.95) translateY(0);
}

.nav-item.submit-popped i,
.nav-item.submit-popped svg,
.nav-item.submit-popped .lucide {
  width: 24px;
  height: 24px;
  font-size: 24px;
  margin: 0 !important;
  margin-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.nav-item.submit-popped span {
  display: none;
}

.submit-label-desktop {
  display: none;
}

/* Outer Pulse Ring for Active/Returned Reports (Landing Page Breaker Pulse Style, 70% Width) */
.submit-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2.5px solid rgba(var(--accent-rgb), 0.65);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.4);
  transform: translate(-50%, -50%) scale(1);
  animation: submit-pulse-ring-ping 2.2s infinite ease-out;
  pointer-events: none;
  box-sizing: border-box;
  z-index: -1;
}

@keyframes submit-pulse-ring-ping {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.85;
  }
  70%, 100% {
    transform: translate(-50%, -50%) scale(1.48);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .submit-pulse-ring {
    animation: none;
  }
}

/* Landing Page Elements */
#page-landing {
  position: relative;
  overflow: hidden;
}

/* Floating blur decorative background blobs */
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  z-index: 1;
  opacity: 0.13;
  pointer-events: none;
}

.blob-1 {
  top: -5%;
  left: -15%;
  width: 160px;
  height: 160px;
  background-color: var(--accent-color);
}

.blob-2 {
  bottom: 22%;
  right: -15%;
  width: 180px;
  height: 180px;
  background-color: var(--primary-light);
}

.landing-hero {
  text-align: center;
  padding: 45px 16px 16px 16px;
  position: relative;
  z-index: 2;
  background: radial-gradient(circle at top, rgba(var(--accent-rgb), 0.08) 0%, transparent 65%);
}

.landing-logo-container {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  width: 160px; /* 30% larger than 124px */
  height: 160px; /* 30% larger than 124px */
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(var(--accent-rgb), 0.28);
  box-shadow: 0 12px 30px rgba(var(--primary-rgb), 0.12), inset 0 0 15px rgba(var(--accent-rgb), 0.08);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.landing-logo-container:hover {
  transform: scale(1.04);
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 16px 36px rgba(var(--primary-rgb), 0.18), inset 0 0 20px rgba(var(--accent-rgb), 0.15);
}

.landing-logo {
  width: 90%;
  height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(var(--primary-rgb), 0.1));
}

.login-logo-container {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
}

.login-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(var(--primary-rgb), 0.12));
  transition: transform var(--transition-speed) ease;
}

.login-logo:hover {
  transform: scale(1.04);
}

.landing-title {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  margin-bottom: 4px;
}

.landing-subtitle {
  font-family: 'Dancing Script', cursive;
  font-size: 20px;
  color: var(--primary-light);
  margin-bottom: 20px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.landing-desc {
  font-size: 13.5px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 24px;
  padding: 0 8px;
}

.landing-actions {
  padding: 0 16px;
  margin-bottom: 20px;
}

.register-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
}

.register-divider::before,
.register-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border-color);
  margin: 0 16px;
}

.landing-trial-banner {
  margin: 0 0 20px;
  padding: 16px 12px;
  width: 100%;
  box-sizing: border-box;
  background: rgba(var(--primary-rgb), 0.04);
  border: 1.5px dashed rgba(var(--primary-rgb), 0.35);
  border-radius: var(--border-radius);
  position: relative;
  z-index: 2;
  text-align: center;
}

.landing-trial-banner-title {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.landing-trial-banner-title i,
.landing-trial-banner-title svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.landing-trial-banner-desc {
  margin: 0 0 10px;
  font-size: 11.5px;
  color: var(--text-light);
  line-height: 1.4;
}

.landing-trial-banner-features {
  margin: 0 auto;
  padding: 0 2px;
  list-style: none;
  display: grid;
  grid-template-columns: max-content max-content;
  grid-template-rows: repeat(2, auto);
  justify-content: center;
  column-gap: 12px;
  row-gap: 4px;
  width: 100%;
  font-size: 11px;
  color: var(--text-dark);
  text-align: left;
}

.landing-trial-banner-features li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
  white-space: nowrap;
}

.landing-trial-banner-features li::before {
  content: "•";
  flex-shrink: 0;
  width: 0.65em;
  text-align: center;
  color: var(--primary-color);
  line-height: 1.4;
}

.role-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

.role-card {
  background-color: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.role-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background-color: #fafdfb;
}

.role-icon {
  width: 48px;
  height: 48px;
  background-color: var(--bg-color);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  font-size: 20px;
  transition: all var(--transition-speed);
}

.role-card:hover .role-icon {
  background-color: var(--status-approved-bg);
  color: var(--primary-color);
  transform: scale(1.05);
}

.role-info {
  flex: 1;
}

.role-info h3 {
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--primary-color);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.role-info p {
  font-size: 11.5px;
  color: var(--text-light);
  line-height: 1.4;
}

.role-info .role-action {
  margin: 0;
  font-size: 11.5px;
  color: var(--primary-light);
  line-height: 1.3;
}

.role-arrow {
  color: var(--text-light);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color var(--transition-speed) ease;
}

.role-card:hover .role-arrow {
  color: var(--primary-color);
  transform: translateX(3px) scale(1.1);
}

/* ── Marketing breaker between registration and benefits ── */
.landing-breaker {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 16px 36px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
  background: radial-gradient(circle at center, rgba(var(--accent-rgb), 0.23) 0%, transparent 70%);
}

.landing-breaker-title {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
  font-family: 'Outfit', sans-serif;
}

.landing-breaker-subtitle {
  font-size: 13.5px;
  color: var(--text-light);
  margin: 0 auto;
  line-height: 1.6;
  font-family: 'Outfit', sans-serif;
  max-width: 480px;
}

.landing-breaker-divider {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 18px auto 0;
  width: 100%;
  max-width: 360px;
  overflow: visible;
}

.landing-breaker-line-left {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.25));
  position: relative;
}

.landing-breaker-line-left::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.landing-breaker-line-right {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.25), transparent);
  position: relative;
}

.landing-breaker-line-right::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.landing-breaker-icon-wrap {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
  z-index: 1;
}

.landing-breaker-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(var(--accent-rgb), 0.5);
  transform: translate(-50%, -50%) scale(0.9);
  animation: breaker-ring-ping 2.2s infinite ease-out;
  pointer-events: none;
  box-sizing: border-box;
}

.landing-breaker-icon-badge {
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.1) 0%, rgba(var(--accent-rgb), 0.14) 100%);
  border: 1.5px solid rgba(var(--primary-rgb), 0.22);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  position: relative;
  z-index: 1;
  animation: breaker-pulse-glow 2.2s infinite ease-in-out;
}

.landing-breaker-icon {
  width: 22px;
  height: 22px;
  display: block;
  animation: breaker-icon-pop 2.2s infinite ease-in-out;
}

@keyframes breaker-ring-ping {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.75;
  }
  70%, 100% {
    transform: translate(-50%, -50%) scale(1.75);
    opacity: 0;
  }
}

@keyframes breaker-pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 rgba(var(--primary-rgb), 0), 0 4px 14px rgba(var(--primary-rgb), 0.12);
    border-color: rgba(var(--primary-rgb), 0.22);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.12), 0 6px 20px rgba(var(--primary-rgb), 0.2);
    border-color: rgba(var(--accent-rgb), 0.55);
    transform: scale(1.06);
  }
}

@keyframes breaker-icon-pop {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.14) rotate(8deg);
    opacity: 1;
  }
}

/* ── Benefits section wrapper + role header ── */
.landing-benefits-section {
  margin-bottom: 24px;
}

/* Clear gap under Why Go Digital — ring animation can sit flush against this label */
.landing-breaker + .landing-benefits-section {
  margin-top: 20px;
}

.benefits-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-left: 2px;
}

.benefits-section-header i,
.benefits-section-header svg {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.benefits-section-header span {
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Benefits grid — mobile: single column; desktop: 2-column ── */
.landing-benefits-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.benefit-card {
  background-color: rgba(var(--primary-rgb), 0.03);
  border: 1.5px dashed rgba(var(--primary-rgb), 0.25);
  border-radius: var(--border-radius);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: none;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.benefit-card:hover {
  border-color: rgba(var(--primary-rgb), 0.45);
  background-color: rgba(var(--primary-rgb), 0.06);
  transform: translateY(-1px);
}

.benefit-icon {
  width: 38px;
  height: 38px;
  background-color: rgba(var(--primary-rgb), 0.06);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  flex-shrink: 0;
}

.benefit-icon i,
.benefit-icon svg {
  width: 18px;
  height: 18px;
}

.benefit-body {
  flex: 1;
  min-width: 0;
}

.benefit-title {
  font-size: 13.5px;
  font-weight: 600;
  margin: 0 0 3px 0;
  color: var(--text-dark);
  font-family: 'Outfit', sans-serif;
}

.benefit-desc {
  font-size: 11.5px;
  color: var(--text-light);
  line-height: 1.45;
  margin: 0;
  font-family: 'Outfit', sans-serif;
}

/* ── App Showcase — 3D Perspective Laptop & Smartphone Mockup ── */
.landing-showcase {
  width: 100%;
  box-sizing: border-box;
  padding: 0 20px 32px;
  margin: 12px auto 0;
}

.showcase-perspective-wrapper {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  transform: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

.showcase-perspective-wrapper:hover {
  transform: translateY(-4px) scale(1.006);
}

.showcase-perspective-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Your Compliance Journey (scroll-driven milestone path) ── */
.landing-journey-section {
  margin: 0 0 32px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  z-index: 2;
}

/* Clear gap under Journey breaker — same rhythm as Pricing / Why go digital */
.landing-journey-section > .landing-breaker + .journey-track {
  margin-top: 20px;
}

.journey-track {
  position: relative;
  padding: 4px 0;
}

/* Spine — JS positions top/height between first and last node centers */
.journey-spine {
  position: absolute;
  left: 21px;
  width: 3px;
  background: rgba(var(--primary-rgb), 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.journey-spine-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border-radius: inherit;
  transition: height 0.25s ease-out;
}

.journey-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.journey-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: flex-start;
  position: relative;
}

.journey-node {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--card-bg);
  border: 1.5px solid rgba(var(--primary-rgb), 0.28);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--bg-color);
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.journey-node-icon,
.journey-node-check {
  width: 18px;
  height: 18px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.journey-node-check {
  position: absolute;
  opacity: 0;
  transform: scale(0.5);
}

.journey-node.is-done {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.journey-node.is-done .journey-node-icon {
  opacity: 0;
  transform: scale(0.5);
}

.journey-node.is-done .journey-node-check {
  opacity: 1;
  transform: scale(1);
}

.journey-node-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(var(--accent-rgb), 0.55);
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  box-sizing: border-box;
}

.journey-node.is-active .journey-node-ring {
  opacity: 1;
  animation: breaker-ring-ping 2.2s infinite ease-out;
}

.journey-node.journey-node-pop {
  animation: journey-node-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes journey-node-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

.journey-card {
  background-color: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 14px 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.55s ease,
    border-color 0.3s ease, box-shadow 0.3s ease;
}

.journey-card:hover {
  border-color: rgba(var(--primary-rgb), 0.4);
  box-shadow: var(--shadow-sm);
}

/* Pre-reveal state only applies once JS arms the animation (safe no-JS fallback) */
.journey-anim-ready .journey-step:not(.is-visible) .journey-card {
  opacity: 0;
  transform: translateY(20px);
}

.journey-step-kicker {
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--primary-light);
}

.journey-step-title {
  margin: 0;
  font-family: var(--font-main);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

.journey-step-desc {
  margin: 0;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-light);
  line-height: 1.5;
}

.journey-chip {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px dashed rgba(var(--primary-rgb), 0.3);
  background: rgba(var(--primary-rgb), 0.04);
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.3;
}

.journey-chip i,
.journey-chip svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.journey-step.is-final .journey-card {
  background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.05) 0%, rgba(var(--accent-rgb), 0.12) 100%);
  border-color: rgba(var(--primary-rgb), 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .journey-card,
  .journey-node,
  .journey-spine-fill,
  .journey-node-icon,
  .journey-node-check {
    transition: none !important;
  }

  .journey-node.is-active .journey-node-ring,
  .journey-node.journey-node-pop {
    animation: none !important;
  }
}

/* ── Landing Pricing (merchant disclosure) ── */
.landing-pricing-section {
  margin: 0 0 28px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

/* Clear gap under Pricing breaker — ring animation can sit flush against cards */
.landing-pricing-section > .landing-breaker + .landing-pricing-grid {
  margin-top: 20px;
}

.landing-pricing-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.landing-pricing-card {
  background-color: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.landing-pricing-card:hover {
  border-color: rgba(var(--primary-rgb), 0.45);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.landing-pricing-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-pricing-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-color: rgba(var(--primary-rgb), 0.06);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.landing-pricing-icon i,
.landing-pricing-icon svg {
  width: 19px;
  height: 19px;
}

.landing-pricing-card-title {
  margin: 0;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.3;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.landing-pricing-card-audience {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-light);
  line-height: 1.5;
  min-height: 32px;
}

.landing-pricing-amounts {
  padding: 12px 14px;
  border-radius: var(--border-radius);
  background: rgba(var(--primary-rgb), 0.04);
  border: 1.5px dashed rgba(var(--primary-rgb), 0.3);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.landing-pricing-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.landing-pricing-price-label {
  font-family: 'Outfit', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.landing-pricing-price-label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Ribbon-style "Best value" banner with folded dovetail tails */
.landing-pricing-best-value {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  margin: 0 9px;
  border-radius: 1.5px;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary-color) 100%);
  color: #fff;
  font-family: var(--font-main);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.3);
}

.landing-pricing-best-value::before,
.landing-pricing-best-value::after {
  content: "";
  position: absolute;
  top: 3px;
  bottom: -2.5px;
  width: 10px;
  z-index: -1;
  background: rgb(var(--primary-rgb));
  filter: brightness(0.72);
}

.landing-pricing-best-value::before {
  left: -7px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 42% 50%);
}

.landing-pricing-best-value::after {
  right: -7px;
  clip-path: polygon(0 0, 100% 0, 58% 50%, 100% 100%, 0 100%);
}


.landing-pricing-price-value {
  font-family: 'Outfit', sans-serif;
  color: var(--primary-color);
  line-height: 1.2;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.landing-pricing-price-row.is-main .landing-pricing-price-value {
  font-size: 21px;
  font-weight: 800;
}

.landing-pricing-price-row.is-alt .landing-pricing-price-value {
  font-size: 14px;
  font-weight: 700;
}

.landing-pricing-price-note {
  margin: 4px 0 0;
  padding-top: 7px;
  border-top: 1px dashed rgba(var(--primary-rgb), 0.22);
  font-family: 'Outfit', sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-light);
  line-height: 1.45;
}

.landing-pricing-features {
  margin: 0;
  padding: 0 2px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.landing-pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.45;
}

.landing-pricing-features li i,
.landing-pricing-features li svg {
  width: 14px;
  height: 14px;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-top: 1.5px;
}

.landing-pricing-note {
  margin: 16px auto 0;
  max-width: 440px;
  display: block;
  text-align: center;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-light);
  line-height: 1.45;
  padding: 0 8px;
  box-sizing: border-box;
}

.landing-pricing-note i,
.landing-pricing-note svg {
  width: 14px;
  height: 14px;
  color: var(--primary-color);
  display: inline-block;
  vertical-align: -2px;
  margin-right: 5px;
}

/* ── Landing Bottom CTA Hero ── */
.landing-bottom-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 16px 36px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  background: radial-gradient(circle at center, rgba(var(--accent-rgb), 0.23) 0%, transparent 70%);
  margin: 16px 0 0;
}

.landing-bottom-cta-title {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 1px;
  letter-spacing: -0.5px;
  font-family: 'Outfit', sans-serif;
}

.landing-bottom-cta-desc {
  font-size: 13.5px;
  color: var(--text-light);
  margin: 0 auto 13px;
  line-height: 1.6;
  font-family: 'Outfit', sans-serif;
  max-width: 480px;
}

.landing-bottom-cta-actions {
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}


/* ── Landing Footer Style (PayMongo Merchant Verified) ── */
.landing-footer,
.landing-footer-container,
.landing-footer-grid,
.footer-bottom-row {
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
}

.landing-footer {
  position: relative;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  background: radial-gradient(circle at center, rgba(var(--accent-rgb), 0.23) 0%, transparent 70%);
  padding: 28px 16px 18px;
  color: var(--text-dark);
  font-family: var(--font-main);
  box-sizing: border-box;
  margin-top: 28px;
  margin-bottom: 0;
}

.landing-footer-container {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.landing-footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.15fr;
  gap: 28px;
  margin-bottom: 20px;
  text-align: left;
  align-items: start;
}

.footer-col-brand {
  display: flex;
  flex-direction: column;
}

.footer-col-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 10px 0;
  line-height: 1.3;
  font-family: var(--font-main);
  letter-spacing: 0.1px;
}

.footer-brand-desc {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-light);
  margin: 0;
  font-family: var(--font-main);
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links-list a {
  font-size: 11.5px;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 400;
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.18s ease;
}

.footer-links-list a:hover {
  color: var(--primary-color);
}

.footer-links-list a:hover .contact-icon-box {
  background-color: rgba(var(--primary-rgb), 0.12);
  border-color: rgba(var(--primary-rgb), 0.25);
}

/* Contact Info Section */
.footer-contact-info li {
  font-size: 11.5px;
  color: var(--text-light);
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-main);
}

.contact-icon-box {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background-color: rgba(var(--primary-rgb), 0.06);
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.contact-icon-box svg,
.contact-icon-box i {
  width: 13.5px;
  height: 13.5px;
  color: var(--primary-color);
}

.footer-divider {
  height: 1px;
  background-color: var(--border-color);
  margin-bottom: 14px;
}

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 16px;
}

.footer-bottom-item {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-light);
  font-weight: 400;
  font-family: var(--font-main);
  white-space: nowrap;
}

.footer-bottom-center {
  justify-content: center;
}

.footer-bottom-right {
  justify-content: flex-end;
}

.copyright-icon {
  width: 14px;
  height: 14px;
  color: var(--text-light);
  flex-shrink: 0;
}

.security-badge {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-main);
}

.security-badge svg,
.security-badge i {
  width: 14px;
  height: 14px;
  color: var(--text-light);
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .landing-footer-grid {
    grid-template-columns: 1.2fr 1fr 1.1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .landing-footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .footer-bottom-row {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }

  .footer-bottom-item,
  .footer-bottom-center,
  .footer-bottom-right {
    flex: none;
    justify-content: center;
  }
}

/* Remove bottom padding of content viewport when landing page is active */
.app-content:has(#page-landing.active) {
  padding-bottom: 2px !important;
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-dark);
  letter-spacing: 0.2px;
}

.form-control {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  background-color: #ffffff;
  border: 1.5px solid rgba(var(--primary-rgb), 0.13);
  border-radius: 12px;
  color: var(--text-dark);
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.04);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

textarea.form-control {
  height: auto;
  padding: 10px 14px;
}

select.form-control {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%231b4d2c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

input[type="date"].form-control {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231b4d2c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  position: relative;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  color: transparent;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control:hover {
  border-color: rgba(var(--primary-rgb), 0.3);
  box-shadow: 0 3px 8px rgba(var(--primary-rgb), 0.07);
}

.btn-primary,
.btn-outline {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.18);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-color) 100%);
  box-shadow: 0 6px 14px rgba(var(--primary-rgb), 0.26);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 5px rgba(var(--primary-rgb), 0.15);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 1.5px solid var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
  background-color: rgba(var(--primary-light-rgb), 0.05);
  border-color: var(--primary-light);
  color: var(--primary-light);
}

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

.btn-primary:disabled,
.btn-outline:disabled {
  cursor: not-allowed !important;
  opacity: 0.6;
  box-shadow: none !important;
  transform: none !important;
}

.btn-primary:disabled {
  background: var(--border-color) !important;
  color: var(--text-light) !important;
  border: none !important;
}

.btn-outline:disabled {
  border: 1.5px solid var(--border-color) !important;
  color: var(--text-light) !important;
  background-color: transparent !important;
}

.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-light);
}

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

/* Card components */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  transform-origin: left center;
}

@keyframes dashboard-stat-page-turn-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(8px);
  }
}

@keyframes dashboard-stat-page-turn-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.stat-grid.is-page-turn-out {
  animation: dashboard-stat-page-turn-out 175ms ease-in forwards;
  pointer-events: none;
}

.stat-grid.is-page-turn-in {
  animation: dashboard-stat-page-turn-in 175ms ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .stat-grid.is-page-turn-out,
  .stat-grid.is-page-turn-in {
    animation: none;
  }
}

.stat-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-speed);
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.stat-card.total::before { background-color: var(--primary-color); }
.stat-card.approved::before { background-color: var(--status-approved); }
.stat-card.review::before { background-color: var(--status-review); }
.stat-card.returned::before { background-color: var(--status-returned); }
.stat-card.due::before { background-color: var(--status-missing); }
.stat-card.closed::before { background-color: #6b7280; }
.stat-card.missing::before { background-color: #6b7280; }

/* Stat Card Top-Right Tinted Icon Badge (Option A) */
.stat-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.stat-card-badge i,
.stat-card-badge svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.stat-card:hover .stat-card-badge {
  transform: scale(1.08);
}

.stat-card.total .stat-card-badge {
  background-color: rgba(var(--primary-rgb), 0.10);
  color: var(--primary-color);
}

.stat-card.approved .stat-card-badge {
  background-color: rgba(46, 125, 50, 0.12);
  color: var(--status-approved);
}

.stat-card.review .stat-card-badge {
  background-color: rgba(230, 81, 0, 0.12);
  color: var(--status-review);
}

.stat-card.returned .stat-card-badge {
  background-color: rgba(2, 136, 209, 0.12);
  color: var(--status-returned);
}

.stat-card.due .stat-card-badge {
  background-color: rgba(198, 40, 40, 0.12);
  color: var(--status-missing);
}

.stat-card.closed .stat-card-badge,
.stat-card.missing .stat-card-badge {
  background-color: rgba(107, 114, 128, 0.12);
  color: #6b7280;
}

/* Dashboard metrics zone — slider + stat grid */
.dashboard-metrics-zone {
  position: relative;
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 16px;
  padding-right: 16px;
  overflow: visible;
}

@media (min-width: 768px) {
  .dashboard-metrics-zone {
    margin-left: -40px;
    margin-right: -40px;
    padding-left: 40px;
    padding-right: 40px;
  }
}

.dashboard-metrics-zone.is-custom-mode .scorecard-card {
  opacity: 0.92;
}

/* Keep inactive tracks laid out (not display:none) so scroll resets stick before reveal */
.dashboard-metrics-zone.is-custom-mode .fo-slider-track--regular,
.dashboard-metrics-zone:not(.is-custom-mode) .fo-slider-track--custom,
.dashboard-metrics-zone.is-custom-mode .bo-slider-track--regular,
.dashboard-metrics-zone:not(.is-custom-mode) .bo-slider-track--custom {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  visibility: hidden;
  pointer-events: none;
  z-index: -1;
}

/* Dashboard Regular / Custom toggle — pulse only (base styles in unified segment system) */
.dashboard-report-toggle.is-toggle-pulse {
  animation: dashboard-report-toggle-pulse 350ms ease-out;
}

@keyframes dashboard-report-toggle-pulse {
  0%, 100% { box-shadow: var(--shadow-sm); }
  50% { box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.22); }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-report-toggle.is-toggle-pulse {
    animation: none;
  }
}

.stat-label {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 6px;
}

/* Section Title */
.section-title-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 12px 0;
}

.section-title {
  font-family: var(--font-main);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.1px;
  display: inline-flex;
  align-items: center;
}

.section-title-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  color: var(--primary-color);
  stroke-width: 2.2;
  flex-shrink: 0;
  display: inline-block;
}

.segment-icon {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  vertical-align: -2px;
  stroke-width: 2.2;
  flex-shrink: 0;
  display: inline-block;
}

.section-link {
  font-size: 12px;
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* Dashboard / matrix section divider (standard gray hairline — matches .form-divider) */
.section-title-wrapper.dashboard-section-divider {
  margin-top: 14px;
  padding-top: 12px;
  border-top: none;
  background-image: linear-gradient(var(--border-color), var(--border-color));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top;
}

/* Compliance Scorecard Card */
.scorecard-card {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: #ffffff;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.scorecard-card::after {
  content: '';
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.scorecard-header {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.scorecard-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
}

.scorecard-score-wrapper {
  display: flex;
  align-items: baseline;
}

.scorecard-score {
  font-size: 42px;
  font-weight: 800;
}

.scorecard-max {
  font-size: 18px;
  opacity: 0.6;
  margin-left: 2px;
}

.scorecard-grade-badge {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}

.scorecard-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 12px;
  margin-top: 4px;
}

.scorecard-details--single {
  grid-template-columns: 1fr;
}

.scorecard-detail-item {
  text-align: center;
}

.scorecard-detail-item:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.scorecard-detail-val {
  font-weight: 700;
  font-size: 15px;
}

.scorecard-detail-lbl {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 2px;
}

/* Announcement and Activity Card Styles */
.announcement-box {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: transform var(--transition-speed);
}

.announcement-box:hover {
  transform: scale(0.99);
}

#fo-active-reports-list .announcement-box.is-actionable {
  cursor: pointer;
}

#matrix-export-menu {
  min-width: 88px;
}

#matrix-download-dropdown-wrapper.custom-dropdown {
  position: relative;
}

.announcement-icon {
  width: 40px;
  height: 40px;
  background-color: var(--status-returned-bg);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--status-returned);
  font-size: 16px;
  flex-shrink: 0;
}

/* Active Reports list — template-style file icon (regular = green, custom = blue like templates) */
.active-report-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.active-report-icon i,
.active-report-icon svg {
  width: 20px;
  height: 20px;
}

.active-report-icon--regular {
  color: #16a34a;
  background-color: #dcfce7;
}

.active-report-icon--custom {
  color: #2563eb;
  background-color: #dbeafe;
}

.announcement-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.announcement-info p {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.4;
}

.announcement-time {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 500;
  display: block;
  margin-top: 6px;
}

/* Item List / Recent Activity Cards */
.item-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 11px 14px;
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-speed);
}

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

.item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 65%;
}

.item-title {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-dark);
  display: block;
  margin-bottom: 5px;
}

.item-subtitle {
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.item-meta {
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-light);
}

.status-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-align: center;
  min-width: 80px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pill.approved { background-color: var(--status-approved-bg); color: var(--status-approved); }
.status-pill.review { background-color: var(--status-review-bg); color: var(--status-review); }
.status-pill.late { background-color: var(--status-late-bg); color: var(--status-late); }
.status-pill.missing,
.status-pill.overdue { background-color: var(--status-missing-bg); color: var(--status-missing); }
.status-pill.closed { background-color: var(--status-closed-bg); color: var(--status-closed); }
.status-pill.returned { background-color: var(--status-returned-bg); color: var(--status-returned); }
.status-pill.muted {
  background-color: #eef0ef;
  color: #9aa3a0;
  border: none;
  cursor: pointer;
  min-width: auto;
  font-family: var(--font-main);
  transition: background-color var(--transition-speed), color var(--transition-speed);
}
.status-pill.muted:hover {
  background-color: #e2e6e4;
  color: #7a8480;
}

.fo-manage-accordion {
  margin-top: 0;
}

.fo-manage-accordion .accordion-item.active {
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.fo-manage-accordion .accordion-item.active .accordion-content-inner {
  padding: 10px 20px 20px;
}

.mgmt-card--tracking .mgmt-card-subtitle,
.mgmt-card--tracking .mgmt-card-meta {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.45;
}

.mgmt-card--tracking .mgmt-card-meta + .mgmt-card-meta {
  margin-top: 4px;
}

.mgmt-card--tracking.mgmt-card--review::before {
  background-color: var(--primary-color);
}

.mgmt-card--tracking.mgmt-card--review:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.1);
}

.mgmt-tracking-status {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.95;
  min-height: 1.95em;
}

.mgmt-tracking-status--active {
  color: var(--primary-color);
}

.mgmt-tracking-status--required {
  color: var(--status-missing);
}

/* Manage tab — unified card shell (Reports, Memos, Templates) */
.mgmt-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mgmt-card {
  position: relative;
  overflow: hidden;
  padding: 11px 14px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.mgmt-card--clickable {
  cursor: pointer;
}

.mgmt-card:hover {
  transform: translateY(-2.5px);
}

.mgmt-card--review::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4.5px;
  pointer-events: none;
  z-index: 2;
  background-color: var(--status-review);
}

.mgmt-card--review {
  padding-left: 20px;
  border-color: var(--border-color);
  background: var(--card-bg);
}

.mgmt-card--review:hover {
  border-color: var(--status-review);
  box-shadow: 0 8px 20px rgba(224, 169, 109, 0.1);
}

.mgmt-card:not(.mgmt-card--review):hover {
  border-color: var(--accent-color);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.06);
}

.mgmt-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.mgmt-card-leading {
  flex-shrink: 0;
}

.mgmt-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mgmt-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mgmt-card-title {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--text-dark);
  margin: 0 0 5px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  display: block;
}

.mgmt-card-title--status-active {
  color: var(--primary-color);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.mgmt-card-title--status-required {
  color: var(--status-missing);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.mgmt-card-badge {
  font-family: var(--font-main);
  font-size: 9.5px;
  padding: 2px 6px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--primary-color);
  font-weight: 700;
  border-radius: 4px;
  flex-shrink: 0;
  line-height: 1.2;
}

.mgmt-card-subtitle {
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-light);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.mgmt-card-meta {
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-light);
  margin: 0;
}

.mgmt-card-meta-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mgmt-card-footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 8px;
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-light);
}

.mgmt-card-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mgmt-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dir-card-details {
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dir-status-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dir-status-icon--registered {
  background: #e2f0d9;
  color: #385723;
}

.dir-status-icon--unregistered {
  background: #fee2e2;
  color: var(--status-missing);
}

.dir-status-icon--pending {
  background: var(--status-review-bg);
  color: var(--status-late);
}

.dir-account-name {
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-color);
  margin: 0 0 2px 0;
}

.dir-empty-note {
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-light);
  font-style: italic;
  margin: 0;
}

/* Manage tab card action buttons */
.mgmt-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  align-self: flex-start;
}

.mgmt-btn-square {
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  background: var(--bg-color);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  padding: 0;
  font-family: var(--font-main);
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.mgmt-btn-square:hover {
  border-color: var(--primary-color);
  background: rgba(var(--primary-rgb), 0.05);
}

.mgmt-btn-square.danger {
  border-color: rgba(220, 53, 69, 0.2);
}

.mgmt-btn-square.danger:hover {
  border-color: var(--status-missing);
  background: rgba(220, 53, 69, 0.06);
}

@media (max-width: 576px) {
  .mgmt-card-header {
    flex-wrap: wrap;
  }

  .mgmt-card-actions {
    margin-left: auto;
  }
}

/* Modal and Overlays */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: flex-end;
  z-index: 10000;
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--card-bg);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  width: 100%;
  max-height: 85%;
  overflow-y: auto;
  padding: 24px;
  transform: translateY(100%);
  transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
}

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

/* File Upload Controls */
.upload-actions-wrapper {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.upload-actions-wrapper.upload-actions-single .upload-zone {
  flex: 1;
}

.upload-zone, .camera-capture-zone, .scanner-trigger-zone {
  flex: 1;
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 30px 20px;
  text-align: center;
  background-color: var(--bg-color);
  cursor: pointer;
  transition: all var(--transition-speed);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.upload-zone:hover, .scanner-trigger-zone:hover {
  border-color: var(--primary-color);
  background-color: var(--status-approved-bg);
}

.camera-capture-zone:hover {
  border-color: var(--status-review);
  background-color: var(--status-review-bg);
}

.upload-icon {
  font-size: 36px;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.upload-text {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
}

.upload-text strong {
  color: var(--primary-color);
}

.upload-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.preview-thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  position: relative;
}

.preview-thumbnail-pdf {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: #fee2e2;
  color: #c62828;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  position: relative;
}

/* Filter controls */
.filters-bar {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 16px;
  position: sticky;
  top: 72px;
  z-index: 98;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 10px;
}

.search-input-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 16px;
}

.search-input {
  width: 100%;
  padding: 10px 10px 10px 36px;
  font-family: var(--font-main);
  font-size: 13px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  outline: none;
  background-color: var(--bg-color);
}

.filter-pills-row {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.filter-pills-row::-webkit-scrollbar {
  display: none;
}

/* Collapsible Advanced Filters */
.advanced-filters-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-top: 10px;
  box-shadow: var(--shadow-sm);
  display: none;
}

.advanced-filters-card.active {
  display: block;
}

.adv-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.adv-filter-grid .form-group {
  margin-bottom: 0 !important;
}

@media (max-width: 576px) {
  .adv-filter-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px !important;
  }
}



/* Alerts and Notifications View */
.notif-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  position: relative;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.notif-item::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 0;
  width: 4px;
  height: calc(100% - 24px);
  background-color: var(--primary-color);
  border-radius: 0 4px 4px 0;
  opacity: 0;
  transition: opacity var(--transition-speed);
}

.notif-item.unread::before {
  opacity: 1;
}

.notif-item.unread {
  background-color: #fafdfb;
  border-color: rgba(var(--primary-light-rgb), 0.2);
}

.notif-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.notif-title {
  font-weight: 600;
  font-size: 13px;
}

.notif-date {
  font-size: 10px;
  color: var(--text-light);
}

.notif-body {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.4;
}

/* Document Viewer Sandbox */
.pdf-viewer-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  margin-bottom: 6px;
}

.pdf-viewer-box {
  width: 100%;
  height: 520px;
  background-color: var(--bg-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text-light);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}

.pdf-viewer-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .pdf-viewer-box {
    height: 320px;
  }
}

.pdf-viewer-icon {
  font-size: 40px;
  color: var(--status-missing);
  margin-bottom: 8px;
}

.pdf-viewer-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dark);
  text-align: center;
  padding: 0 20px;
}

/* User Settings View */
.profile-card {
  position: relative;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.btn-edit-profile-icon {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 1px solid rgba(var(--primary-rgb), 0.13);
  background-color: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary-color);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn-edit-profile-icon:hover {
  background-color: rgba(var(--primary-rgb), 0.05);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.btn-edit-profile-icon:active {
  transform: translateY(1px);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  background-color: var(--status-approved-bg);
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  border: 2px solid var(--primary-color);
}

/* Avatar Upload Hover Overlay */
.profile-avatar-container:hover .profile-avatar-overlay {
  opacity: 1 !important;
}

/* Collapsible Section Chevron Animation */
.collapsible-trigger.active .chevron-icon {
  transform: rotate(180deg) !important;
}

.profile-card-top {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.profile-card-bottom {
  display: flex;
  align-items: stretch;
  width: 100%;
  border-top: 1px solid var(--border-color);
}

.profile-details-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 55%;
  min-width: 55%;
  max-width: 55%;
  flex: none;
  box-sizing: border-box;
  border-right: 1px solid var(--border-color);
}

.profile-details-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 55%;
  min-width: 55%;
  max-width: 55%;
  flex: none;
  box-sizing: border-box;
  border-right: 1px solid var(--border-color);
}

.profile-detail-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 40px;
  box-sizing: border-box;
  padding: 0 16px 0 0;
  width: 100%;
  border-bottom: 1px solid var(--border-color);
}

.profile-details-top .profile-detail-row:last-of-type,
.profile-details-bottom .profile-detail-row {
  border-bottom: none;
}

.profile-detail-label {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 2px;
}

.profile-detail-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.3;
}

.profile-avatar-section {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45%;
  min-width: 45%;
  max-width: 45%;
  flex: none;
  box-sizing: border-box;
  padding: 4px 0;
}

.profile-avatar-section .profile-avatar-container {
  transform: translateX(7px);
}

.profile-subscription-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 40px;
  box-sizing: border-box;
  width: 45%;
  min-width: 45%;
  max-width: 45%;
  flex: none;
}

.profile-subscription-section .profile-detail-label,
.profile-subscription-section #prof-subscription-badge-container {
  transform: translateX(7px);
}

.profile-subscription-section #prof-subscription-badge-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.list-group {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

/* Allow .list-group that wraps a form with custom selects to let the
   floating cs-menu escape the clipping boundary */
.list-group:has(.cs-wrapper) {
  overflow: visible;
}

/* Ensure form-groups with custom selects are also not clipped */
.form-group:has(.cs-wrapper) {
  position: relative;
  z-index: 10;
}

.form-group:has(.cs-trigger.open),
.form-group:has(.cdp-trigger.open),
.list-group-item:has(.cs-trigger.open),
.matrix-select-group:has(.cs-trigger.open) {
  z-index: 100 !important;
}

.list-group-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--transition-speed);
}

.list-group-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.list-group-item:hover {
  background-color: var(--bg-color);
}

.list-group-item i:first-child {
  margin-right: 12px;
  font-size: 16px;
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}

.list-group-item i:last-child {
  font-size: 14px;
  color: var(--text-light);
}

/* Form switch for preferences */
.switch-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.switch-item > div:first-child {
  flex: 1;
  min-width: 0;
}

.switch-item-title {
  margin: 0 0 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.switch-item-desc {
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-light);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* ═══════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   Mobile: 0–767px
   Desktop: 768px+
   ═══════════════════════════════════════ */

/* === TABLET & DESKTOP (768px+) === */
@media (min-width: 768px) {
  html, body {
    height: 100vh;
    overflow: hidden;
  }
  body {
    background-color: #eef2ef;
  }
  .device-emulator {
    max-width: 930px;
    width: 100%;
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
    box-shadow: 
      0 20px 50px rgba(16, 24, 40, 0.08),
      0 6px 16px rgba(16, 24, 40, 0.04);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
  }
  .app-container {
    border-radius: 24px 24px 0 0;
    height: 100%;
    overflow: hidden;
  }
  .app-page {
    padding: 32px 40px;
  }
  .app-content {
    overflow-y: auto !important;
    padding-bottom: 140px !important; /* Prevent floating dock overlap */
  }
  .bottom-nav {
    position: fixed !important;
    bottom: 28px !important;
    width: 90% !important;
    max-width: 500px !important;
    height: 74px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-radius: 999px !important;
    border: 1px solid rgba(0, 10, 0, 0.06) !important;
    box-shadow:
      0 20px 50px rgba(16, 24, 40, 0.12),
      0 8px 20px rgba(16, 24, 40, 0.06) !important;
    backdrop-filter: blur(10px) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    z-index: 1000 !important;
    padding: 0 20px !important;
  }
  .header-bar {
    height: 72px;
    padding: 0 28px;
    box-sizing: border-box;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }
}

/* === MOBILE (0–767px) — Preserve current mobile experience === */
@media (max-width: 767px) {
  html, body {
    height: auto;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto; /* Allow natural browser scrolling */
    position: static; /* Remove fixed position lock */
  }

  body {
    background-color: var(--bg-color);
    align-items: flex-start;
  }
  
  .device-emulator {
    width: 100%;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    border: none;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    overflow: visible;
  }
  
  .device-emulator::before {
    display: none; /* Hide simulated phone speaker/camera notch on actual mobile devices */
  }
  
  .app-container {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    overflow: visible;
  }
  
  .status-bar {
    display: none; /* Hide simulated status bar on actual mobile browsers */
  }

  .app-content {
    overflow-y: visible !important; /* Stretch container naturally on mobile */
    overscroll-behavior-y: auto !important;
  }

  .bottom-nav {
    position: fixed; /* Pin navigation to the bottom of the device viewport */
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    transform: none;
    z-index: 1000;
  }

  .header-bar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  .app-content.has-header {
    padding-top: calc(60px + env(safe-area-inset-top, 0px)) !important;
  }

  .filters-bar {
    top: calc(60px + env(safe-area-inset-top, 0px)) !important;
  }

  .modal-overlay {
    position: fixed; /* Overlays the screen viewport instead of absolute container */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
  }
}

/* Notification Badge Dots */
.nav-item {
  position: relative;
}

.badge-dot {
  position: absolute;
  top: 10px;
  right: calc(50% - 14px);
  width: 8px;
  height: 8px;
  background-color: var(--status-missing);
  border-radius: 50%;
  border: 1px solid var(--card-bg);
}

.header-action-btn {
  position: relative;
}

.header-badge-dot {
  position: absolute;
  top: 2px;
  right: 1px;
  width: 8px;
  height: 8px;
  background-color: var(--status-missing);
  border-radius: 50%;
  border: 1px solid var(--primary-color);
}

/* Mobile Optimizations for Modal Dialogs */
@media (max-width: 576px) {
  .modal-content {
    padding: 16px 14px !important;
    max-height: 95% !important;
  }
  .modal-header {
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
  }
  .modal-title {
    font-size: 16px !important;
  }
  .form-group {
    margin-bottom: 10px !important;
  }
  .form-group label {
    font-size: 11px !important;
    margin-bottom: 4px !important;
  }
  .form-control, .premium-select, .cs-trigger, .btn-controls-square-action {
    height: 40px !important;
    padding: 0 12px !important;
    font-size: 12.5px !important;
    border-radius: 10px !important;
  }
  .btn-controls-square-action {
    width: 40px !important;
    padding: 0 !important;
  }
  textarea.form-control {
    height: auto !important;
    padding: 9px 12px !important;
  }
  select.form-control, select.premium-select {
    padding-right: 32px !important;
  }
  .upload-actions-wrapper {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }
  .upload-zone, .camera-capture-zone {
    padding: 12px 10px !important;
  }
  .upload-icon {
    font-size: 22px !important;
    margin-bottom: 4px !important;
  }
  .upload-icon i {
    width: 24px !important;
    height: 24px !important;
  }
  .upload-text {
    font-size: 12px !important;
  }
  .btn-primary, .btn-outline {
    height: 40px !important;
    padding: 0 !important;
    font-size: 13.5px !important;
    border-radius: 10px !important;
  }
  .modal-form-grid {
    gap: 8px !important;
    margin-bottom: 10px !important;
  }
}

/* Loading Spinner Animation */
.loading-animation-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 12px 16px;
  background-color: var(--status-review-bg);
  border-left: 4px solid var(--status-review);
  border-radius: 8px;
}

.spinner-ring {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(224, 169, 109, 0.2);
  border-top-color: var(--status-review);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.loading-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-color);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.form-control:disabled {
  background-color: var(--bg-color);
  color: var(--text-light);
  cursor: not-allowed;
  opacity: 0.75;
}

select.form-control:disabled {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

/* ===================================================
   UNIFIED SELECT OPTION & OPTGROUP STYLING
   Applies to: form-control & premium-select selects
   =================================================== */

select.form-control option,
select.premium-select option {
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dark);
  padding: 6px 12px;
  background-color: #ffffff;
}

select.form-control optgroup,
select.premium-select optgroup {
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  background-color: #f5faf7;
  padding: 4px 0 2px 0;
}

select.form-control optgroup option,
select.premium-select optgroup option {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dark);
  text-transform: none;
  letter-spacing: 0;
  padding-left: 18px;
  background-color: #ffffff;
}

/* Submit Report Modal, Edit Profile Modal & Subscription Modal full-screen styling inside app-container */
#modal-submit-report, #modal-edit-profile, #modal-payment-billing, #modal-bulk-download, #modal-upload-memo, #modal-upload-template, #modal-special-report, #modal-edit-custom-report, #modal-lgu-tracking-setup, #modal-lgu-duplicate-explanation, #modal-document-scanner, #modal-view-report, #modal-fo-barangay-matrix, #modal-desktop-matrix-preview, #modal-fo-quick-tips, #modal-fo-faq, #modal-bo-quick-tips, #modal-bo-faq, #modal-policy-viewer {
  position: fixed !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 1000px !important;
  height: 100% !important;
  max-height: 100% !important;
  border-radius: 0 !important;
  padding-top: calc(24px + env(safe-area-inset-top, 0px)) !important;
  padding-right: 20px !important;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  padding-left: 20px !important;
  background-color: var(--card-bg) !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  z-index: 10005 !important;
}

@media (min-width: 768px) {
  #modal-submit-report, #modal-edit-profile, #modal-payment-billing, #modal-bulk-download, #modal-upload-memo, #modal-upload-template, #modal-special-report, #modal-edit-custom-report, #modal-lgu-tracking-setup, #modal-lgu-duplicate-explanation, #modal-document-scanner, #modal-view-report, #modal-fo-barangay-matrix, #modal-desktop-matrix-preview, #modal-fo-quick-tips, #modal-fo-faq, #modal-bo-quick-tips, #modal-bo-faq, #modal-policy-viewer {
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    max-width: 930px !important;
    width: min(100%, 930px) !important;
    border-radius: 24px 24px 0 0 !important;
    box-shadow:
      0 20px 50px rgba(16, 24, 40, 0.08),
      0 6px 16px rgba(16, 24, 40, 0.04) !important;
  }

  .modal-overlay.active #modal-submit-report,
  .modal-overlay.active #modal-edit-profile,
  .modal-overlay.active #modal-payment-billing,
  .modal-overlay.active #modal-bulk-download,
  .modal-overlay.active #modal-upload-memo,
  .modal-overlay.active #modal-upload-template,
  .modal-overlay.active #modal-special-report,
  .modal-overlay.active #modal-edit-custom-report,
  .modal-overlay.active #modal-lgu-tracking-setup,
  .modal-overlay.active #modal-lgu-duplicate-explanation,
  .modal-overlay.active #modal-document-scanner,
  .modal-overlay.active #modal-view-report,
  .modal-overlay.active #modal-fo-barangay-matrix,
  .modal-overlay.active #modal-desktop-matrix-preview,
  .modal-overlay.active #modal-fo-quick-tips,
  .modal-overlay.active #modal-fo-faq,
  .modal-overlay.active #modal-bo-quick-tips,
  .modal-overlay.active #modal-bo-faq,
  .modal-overlay.active #modal-policy-viewer {
    transform: translateX(-50%) !important;
  }
}

@media (max-width: 767px) {
  #modal-submit-report, #modal-edit-profile, #modal-payment-billing, #modal-bulk-download, #modal-upload-memo, #modal-upload-template, #modal-special-report, #modal-edit-custom-report, #modal-lgu-tracking-setup, #modal-lgu-duplicate-explanation, #modal-document-scanner, #modal-view-report, #modal-fo-barangay-matrix, #modal-desktop-matrix-preview, #modal-fo-quick-tips, #modal-fo-faq, #modal-bo-quick-tips, #modal-bo-faq, #modal-policy-viewer {
    max-width: 100% !important;
    left: 0 !important;
    transform: none !important;
    padding-top: calc(16px + env(safe-area-inset-top, 0px)) !important;
    padding-right: 14px !important;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    padding-left: 14px !important;
  }

  /* Custom date picker panels inside full-screen modals */
  #modal-special-report .cdp-panel,
  #modal-edit-custom-report .cdp-panel {
    z-index: 10020;
  }
}

/* ── Policy Viewer Section Grouping & Typography ── */
.policy-section-group {
  margin-bottom: 20px;
}

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

.policy-section-heading {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 0 4px 0;
  line-height: 1.35;
  font-family: var(--font-main);
  letter-spacing: 0.1px;
}

.policy-section-desc {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0;
  font-family: var(--font-main);
  text-align: justify;
}

.policy-contact-detail {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0 0 6px 0;
  font-family: var(--font-main);
}

.form-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 14px 0;
}

/* Connection Status Badge Styling */
.connection-status-pill-container {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}

.connection-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-speed);
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.connection-status-pill.offline {
  background-color: var(--status-review-bg);
  color: #c07e2c;
  border-color: rgba(224, 169, 109, 0.3);
}

.connection-status-pill.online {
  background-color: var(--status-approved-bg);
  color: var(--primary-color);
  border-color: rgba(var(--primary-light-rgb), 0.3);
}

.connection-status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.connection-status-pill.offline .dot {
  background-color: var(--status-late);
  animation: pulse-offline 1.8s infinite ease-in-out;
}

.connection-status-pill.online .dot {
  background-color: var(--status-approved);
  animation: pulse-online 1.8s infinite ease-in-out;
}

@keyframes pulse-offline {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(217, 119, 6, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

@keyframes pulse-online {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--primary-light-rgb), 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(var(--primary-light-rgb), 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--primary-light-rgb), 0); }
}

/* Header status dot pulse */
.header-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.header-status-dot.offline {
  background-color: var(--status-late);
  animation: pulse-offline 1.8s infinite ease-in-out;
}

.header-status-dot.online {
  background-color: var(--status-approved);
  animation: pulse-online 1.8s infinite ease-in-out;
}

/* Unified segmented controls — Dashboard, Reports, Manage, Resources, Requests */
.view-switcher-row {
  display: flex;
  width: 100%;
  margin: 0 0 12px 0;
}

.segmented-control,
.filter-pills-row,
.frequency-tabs-row,
.dashboard-report-toggle {
  display: flex;
  width: 100%;
  align-items: stretch;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(var(--primary-rgb), 0.05);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.switcher-btn,
.filter-pill,
.freq-tab,
.dashboard-report-toggle-btn {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 9px;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--text-light);
  cursor: pointer;
  outline: none;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.switcher-btn:hover:not(.active),
.filter-pill:hover:not(.active),
.freq-tab:hover:not(.active),
.dashboard-report-toggle-btn:hover:not(.is-active) {
  color: var(--primary-color);
  background-color: rgba(var(--primary-rgb), 0.04);
}

.switcher-btn.active,
.filter-pill.active,
.freq-tab.active,
.dashboard-report-toggle-btn.is-active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.25);
}

.frequency-tabs-row {
  margin-top: 0;
  margin-bottom: 12px;
}

@property --reports-action-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

#reports-status-filter-row .filter-pill.is-action-needed,
.reports-desktop-segments button.is-action-needed {
  position: relative;
}

#reports-status-filter-row .filter-pill.is-pending-action,
.reports-desktop-segments button.is-pending-action {
  --reports-action-color: var(--status-review);
}

#reports-status-filter-row .filter-pill.is-returned-action,
.reports-desktop-segments button.is-returned-action {
  --reports-action-color: var(--status-returned);
}

#reports-status-filter-row .filter-pill.is-action-needed::after,
.reports-desktop-segments button.is-action-needed::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1.5px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(
    from var(--reports-action-angle),
    transparent 0deg 245deg,
    color-mix(in srgb, var(--reports-action-color) 12%, transparent) 275deg,
    color-mix(in srgb, var(--reports-action-color) 78%, transparent) 315deg,
    color-mix(in srgb, var(--reports-action-color) 18%, transparent) 345deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: reports-action-border-travel 4.5s linear infinite;
}

#reports-status-filter-row .filter-pill.is-action-needed .segment-label,
.reports-desktop-segments button.is-action-needed .segment-label {
  padding-right: 0;
}

@keyframes reports-action-border-travel {
  to { --reports-action-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
  #reports-status-filter-row .filter-pill.is-action-needed::after,
  .reports-desktop-segments button.is-action-needed::after {
    animation: none;
  }
}

/* Reports hub — secondary segment rows share List status-pill height/spacing */
.view-switcher-row > .filter-pills-row,
.view-switcher-row > .frequency-tabs-row,
.view-switcher-row > .segmented-control,
.view-switcher-row > .dashboard-report-toggle {
  margin-bottom: 0;
}

#reports-matrix-report-toggle.is-toggle-pulse {
  animation: dashboard-report-toggle-pulse 350ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  #reports-matrix-report-toggle.is-toggle-pulse {
    animation: none;
  }
}

/* Segment → content spacing (matches Reports List view rhythm) */
.view-switcher-row + .section-title-wrapper,
#fo-view-directory-container > .section-title-wrapper:first-child,
#fo-view-claims-container > .section-title-wrapper:first-child {
  margin-top: 0;
  margin-bottom: 12px;
}

.view-switcher-row + .fo-slider-outer,
.view-switcher-row + .bo-slider-outer {
  margin-top: 0;
}

.dashboard-report-toggle .segment-label {
  padding-right: 8px;
}

.dashboard-report-toggle .segment-count-badge {
  position: absolute;
  top: -6px;
  right: -9.5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background-color: var(--status-missing);
  color: #fff;
  border-radius: 999px;
  border: 1.5px solid var(--card-bg);
  box-shadow: 0 0 4px rgba(255, 77, 79, 0.35);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.dashboard-report-toggle-btn.is-active .segment-count-badge {
  border-color: var(--primary-light);
}

/* Premium Select Dropdowns Grid Bar */
.matrix-controls-bar {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 10px;
  margin-top: 0;
  margin-bottom: 14px;
  width: 100%;
}

.matrix-controls-bar.has-download {
  grid-template-columns: 2.2fr 1fr auto;
}

.matrix-controls-bar.bo-matrix-year-only {
  grid-template-columns: 1fr;
}

.matrix-controls-bar.bo-matrix-custom {
  grid-template-columns: 2.2fr 1fr;
}

.list-controls-bar {
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.8fr;
  gap: 10px;
  margin-top: 0;
  margin-bottom: 14px;
  width: 100%;
}

.list-controls-bar.two-columns {
  grid-template-columns: 2fr 1fr;
}

.admin-users-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
  width: 100%;
}

@media (min-width: 768px) {
  .admin-users-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.admin-users-filters > .matrix-select-group,
.admin-users-filters > .admin-users-search-wrap {
  min-width: 0;
  width: 100%;
}

.admin-users-filters .cs-wrapper {
  min-width: 0;
  width: 100%;
}

.admin-users-filters .cs-trigger {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-users-filters .cs-wrapper.cs-compact .cs-trigger {
  height: 44px;
  min-height: 44px;
  padding: 0 30px 0 13px;
  font-size: 12px;
  border-radius: 12px;
}

.admin-users-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.admin-users-clear-btn {
  width: 100%;
  height: 40px;
  font-size: 12px;
  font-weight: 600;
  margin: 0;
}

.admin-users-total-count {
  margin: 12px 0 6px;
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
}

.admin-billing-filters {
  margin-top: 4px;
}

.admin-billing-filters .admin-billing-date-input {
  height: 44px !important;
  margin-bottom: 0;
  font-size: 12px !important;
  font-weight: 500;
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
}

.admin-billing-summary-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.admin-billing-metric {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.admin-billing-metric-label {
  display: block;
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 4px;
}

.admin-billing-metric-value {
  display: block;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-billing-list {
  margin-bottom: 8px;
}

.admin-billing-card {
  cursor: default;
  font-family: var(--font-main);
}

.admin-billing-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--border-color);
}

.admin-billing-card.is-paid::before {
  background: var(--status-approved);
}

.admin-billing-card.is-pending::before {
  background: #d97706;
}

.admin-billing-card.is-failed::before,
.admin-billing-card.is-expired::before {
  background: var(--status-missing);
}

.admin-billing-card.is-refunded::before {
  background: #64748b;
}

.admin-billing-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-billing-card-identity {
  min-width: 0;
  flex: 1;
}

.admin-billing-card-name {
  margin: 0;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-billing-card-email {
  margin: 2px 0 0;
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-billing-card-status-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 56px;
}

.admin-billing-role-label {
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-light);
  line-height: 1.2;
  text-align: center;
}

.admin-billing-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 3px 8px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-billing-status-badge.paid {
  background: var(--status-approved-bg);
  color: var(--status-approved);
}

.admin-billing-status-badge.pending {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.admin-billing-status-badge.failed,
.admin-billing-status-badge.expired {
  background: var(--status-missing-bg);
  color: var(--status-missing);
}

.admin-billing-status-badge.refunded {
  background: #e2e8f0;
  color: #475569;
}

.admin-billing-lgu-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.admin-billing-lgu-meta {
  min-width: 0;
  flex: 1;
}

.admin-billing-refund-btn {
  flex-shrink: 0;
  height: 28px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-main);
  line-height: 1;
  color: var(--text-dark);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.admin-billing-refund-btn:hover {
  border-color: rgba(var(--primary-rgb), 0.35);
  color: var(--primary-color);
  background: rgba(var(--primary-rgb), 0.04);
}

.admin-billing-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.admin-billing-field-label {
  display: block;
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-light);
  margin-bottom: 2px;
}

.admin-billing-field-value {
  display: block;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
  word-break: break-word;
}

.admin-billing-field-value.is-amount {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dark);
}

.admin-billing-card.is-paid .admin-billing-field-value.is-amount {
  color: var(--primary-color);
}

.admin-billing-field-value.is-mono {
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-light);
  word-break: break-all;
  white-space: normal;
  line-height: 1.35;
}

.admin-billing-field-time {
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-light);
}

.admin-billing-field--full {
  grid-column: 1 / -1;
}

#admin-billing-pagination {
  margin-top: 14px;
}

.admin-users-search-field {
  position: relative;
  width: 100%;
  min-width: 0;
}

.admin-users-search-field .form-control {
  padding-left: 38px !important;
  height: 44px !important;
  margin-bottom: 0;
  font-size: 12px !important;
  font-weight: 500;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-users-search-field .form-control::placeholder {
  color: var(--text-light);
  font-weight: 500;
  opacity: 1;
}

.admin-users-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-light);
  pointer-events: none;
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 12px;
}

.admin-users-empty {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  padding: 20px 0;
  margin: 0;
}

.mgmt-card--admin-user .mgmt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.mgmt-card--admin-user .mgmt-card-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mgmt-card--admin-user .mgmt-card-title {
  margin: 0;
  line-height: 1.25;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dark);
}

.mgmt-card--admin-user .admin-user-header-sub {
  margin: 3px 0 0 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.25;
}

.mgmt-card--admin-user .admin-user-header-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -2px;
}

.btn-delete-icon:hover {
  background: var(--status-missing) !important;
  color: #ffffff !important;
  border-color: var(--status-missing) !important;
  transform: scale(1.05);
}

.mgmt-card--admin-user .dir-card-details {
  margin-top: 0;
}

.admin-user-override-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
  margin-top: 8px;
}

.admin-user-override-row .premium-select {
  width: 110px;
  height: 32px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: 8px;
}

.admin-user-override-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
}

.export-controls-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 4px;
  width: 100%;
}

.matrix-select-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.matrix-select-group label {
  font-size: 9.5px;
  font-weight: 700;
  color: #4b6555;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}

.premium-select {
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dark);
  height: 44px;
  padding: 0 30px 0 13px;
  border: 1.5px solid rgba(var(--primary-rgb), 0.13);
  border-radius: 12px;
  background-color: #ffffff;
  cursor: pointer;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.04);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%231b4d2c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
}

.premium-select:hover {
  border-color: rgba(var(--primary-rgb), 0.3);
  box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.08);
}

.premium-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background-color: #ffffff;
}

.matrix-controls-bar.fo-matrix-once-only {
  grid-template-columns: 1fr auto;
}

.reports-matrix-zone {
  position: relative;
  overflow: visible;
}

.matrix-empty-state {
  font-size: 12px;
  color: var(--text-light);
  padding: 20px;
  text-align: center;
  margin: 0;
}

.reports-matrix-grid {
  position: relative;
}

/* Compliance Matrix Styles */
.matrix-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid rgba(var(--primary-rgb), 0.08);
  background-color: var(--card-bg);
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  position: relative;
}

/* Custom Scrollbars */
.matrix-table-wrapper::-webkit-scrollbar {
  height: 6px;
}

.matrix-table-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.matrix-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(var(--primary-rgb), 0.15);
  border-radius: 10px;
}

.matrix-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
}

.matrix-table th, .matrix-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  vertical-align: middle;
  transition: background-color 0.15s ease;
  height: 52px;
}

.matrix-table th:last-child, .matrix-table td:last-child {
  border-right: none;
}

.matrix-table th {
  background-color: #f7f9f6;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.5px;
}

.matrix-table tr:nth-child(even) {
  background-color: rgba(var(--primary-rgb), 0.01);
}

.matrix-table tr:hover {
  background-color: rgba(var(--primary-rgb), 0.035) !important;
}

.matrix-table td.brgy-name-cell {
  font-weight: 700;
  color: var(--text-dark);
  background-color: var(--card-bg);
  position: sticky;
  left: 0;
  z-index: 2;
  border-right: 1px solid var(--border-color);
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.03);
  white-space: nowrap;
}

.matrix-table th.brgy-header-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  border-right: 1px solid var(--border-color);
  background-color: #f7f9f6 !important;
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.03);
}

/* Matrix view: capped inner scroll with smooth chaining to page scroll */
.matrix-scroll-panel {
  max-height: 65vh;
  max-height: 65dvh;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.fo-matrix-wrapper,
.reports-matrix-grid .fo-barangay-matrix-table-wrapper {
  max-height: 65vh;
  max-height: 65dvh;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.matrix-scroll-panel .matrix-table th,
.fo-matrix-wrapper .matrix-table th,
.reports-matrix-grid .fo-barangay-matrix-table-wrapper .matrix-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
}

.matrix-scroll-panel .matrix-table th.brgy-header-cell,
.fo-matrix-wrapper .matrix-table th.brgy-header-cell,
.reports-matrix-grid .fo-barangay-matrix-table-wrapper .matrix-table th.brgy-header-cell {
  z-index: 4; /* Keep the top-left corner above everything */
}

/* Fix the FO matrix barangay column to a uniform 140px width */
.fo-matrix-wrapper .matrix-table th.brgy-header-cell,
.fo-matrix-wrapper .matrix-table td.brgy-name-cell {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
}

.fo-barangay-matrix-content {
  padding-bottom: 24px;
}

.desktop-matrix-preview-subtitle {
  margin: 3px 0 0;
  color: var(--text-light);
  font-size: 12px;
}

.desktop-matrix-preview-content {
  min-width: 0;
  overflow: auto;
}

.desktop-matrix-preview-content .reports-desktop-matrix-grid {
  display: block;
}

.fo-barangay-matrix-controls {
  grid-template-columns: 1fr 1fr 1fr;
  margin-bottom: 20px;
}

@media (max-width: 767px) {
  .fo-barangay-matrix-controls {
    grid-template-columns: 1fr;
  }
}

.fo-barangay-matrix-controls .matrix-select-group select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: #f4f6f4;
}

#fo-barangay-matrix-iteration-group.is-disabled {
  opacity: 0.55;
}

.bo-matrix-table-block {
  margin-top: 0;
}

.consolidated-matrix-table th.brgy-header-cell,
.consolidated-matrix-table td.fo-barangay-matrix-period-col {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
  text-align: left;
}

.consolidated-matrix-table th:not(.brgy-header-cell),
.consolidated-matrix-table td:not(.brgy-header-cell):not(.fo-barangay-matrix-period-col):not(.brgy-name-cell) {
  min-width: 104px;
  text-align: center;
}

.fo-matrix-wrapper .matrix-table.consolidated-matrix-table th:not(.brgy-header-cell),
.fo-matrix-wrapper .matrix-table.consolidated-matrix-table td:not(.brgy-name-cell) {
  min-width: 104px;
  text-align: center;
}

.fo-matrix-wrapper .matrix-table.consolidated-matrix-table td.brgy-name-cell,
.fo-matrix-wrapper .matrix-table.consolidated-matrix-table th.brgy-header-cell {
  text-align: left;
}

.fo-barangay-matrix-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: none;
  background-image: linear-gradient(var(--border-color), var(--border-color));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top;
}

.fo-barangay-matrix-section .matrix-table-wrapper {
  margin-bottom: 0;
}

.fo-barangay-matrix-section:first-child {
  margin-top: 8px;
}

.fo-barangay-matrix-section:last-child {
  padding-bottom: 4px;
}

.fo-barangay-matrix-section-title {
  font-family: var(--font-main);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.1px;
  margin: 0 0 8px 0;
}

.fo-barangay-matrix-table-wrapper {
  max-width: 100%;
}

.fo-barangay-matrix-table .fo-barangay-matrix-period-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background-color: var(--card-bg);
  min-width: 140px;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.04);
}

.fo-barangay-matrix-table thead .fo-barangay-matrix-period-col {
  z-index: 3;
}


/* Matrix Status Badge Pill */
.matrix-cell-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  padding: 4px 10px 4px 20px;
  border-radius: 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border: 1px solid transparent;
  white-space: nowrap;
  min-width: 88px;
  height: 22px;
}

.matrix-cell-pill::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.matrix-cell-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.matrix-cell-pill:active {
  transform: translateY(0);
}

.matrix-cell-pill.approved {
  background-color: rgba(var(--primary-light-rgb), 0.06);
  color: var(--status-approved);
  border-color: rgba(var(--primary-light-rgb), 0.12);
}
.matrix-cell-pill.approved::before {
  background-color: var(--status-approved);
}

.matrix-cell-pill.review {
  background-color: rgba(224, 169, 109, 0.08);
  color: #c28d53;
  border-color: rgba(224, 169, 109, 0.15);
}
.matrix-cell-pill.review::before {
  background-color: #e0a96d;
}

.matrix-cell-pill.returned {
  background-color: rgba(2, 136, 209, 0.06);
  color: var(--status-returned);
  border-color: rgba(2, 136, 209, 0.12);
}
.matrix-cell-pill.returned::before {
  background-color: var(--status-returned);
}

.matrix-cell-pill.missing,
.matrix-cell-pill.overdue {
  background-color: rgba(185, 28, 28, 0.06);
  color: var(--status-missing);
  border-color: rgba(185, 28, 28, 0.12);
}
.matrix-cell-pill.missing::before,
.matrix-cell-pill.overdue::before {
  background-color: var(--status-missing);
}

.matrix-cell-pill.closed {
  background-color: rgba(100, 116, 139, 0.08);
  color: var(--status-closed);
  border-color: rgba(100, 116, 139, 0.18);
  cursor: default;
}
.matrix-cell-pill.closed::before {
  background-color: var(--status-closed);
}

.matrix-cell-pill.na {
  background-color: transparent;
  color: transparent;
  border-color: transparent;
  cursor: default;
  font-size: 0;
  width: 22px;
  min-width: 22px;
  height: 22px;
  padding: 0;
}
.matrix-cell-pill.na::before {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  background-color: #7f8c8d;
}

.matrix-cell-pill.na-missed {
  background-color: transparent;
  color: transparent;
  border-color: transparent;
  cursor: default;
  font-size: 0;
  width: 22px;
  min-width: 22px;
  height: 22px;
  padding: 0;
}
.matrix-cell-pill.na-missed::before {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  background-color: var(--status-missing);
}

/* Timing indicator on the pill's dot: green = on-time, orange = late within grace, red = beyond grace.
   Overrides the status-based dot color for submitted reports. */
.matrix-cell-pill.timing-ontime::before {
  background-color: var(--status-approved);
}
.matrix-cell-pill.timing-late::before {
  background-color: var(--status-late);
}
.matrix-cell-pill.timing-beyond-grace::before {
  background-color: var(--status-missing);
}

/* BO Checklist Grid & Checklist Card Styles */
.checklist-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.checklist-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-speed) ease;
}

.checklist-card:hover {
  border-color: var(--primary-light);
}

.checklist-card.returned {
  border-color: var(--status-returned);
  background-color: rgba(2, 136, 209, 0.02);
}

.checklist-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.checklist-title-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 70%;
}

.checklist-report-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-dark);
}

.checklist-period-badge {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 500;
}

.checklist-card-meta {
  font-size: 10px;
  color: var(--text-light);
}

.submit-deadline-reminder {
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.submit-deadline-row {
  font-size: 12px;
  color: var(--text-color);
  line-height: 1.55;
  margin: 0;
}

.submit-deadline-row + .submit-deadline-row {
  margin-top: 2px;
}

.submit-deadline-status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.submit-deadline-helper {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.45;
  margin: 1px 0 0;
}

.submit-modal-empty-state {
  text-align: center;
  padding: 28px 16px 32px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, var(--card-bg), rgba(var(--primary-rgb), 0.025));
  box-shadow: var(--shadow-sm);
}

.submit-modal-empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  background-color: rgba(var(--primary-rgb), 0.08);
}

.submit-modal-empty-title {
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 8px;
}

.submit-modal-empty-text {
  font-family: var(--font-main);
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.55;
  margin: 0;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.checklist-remarks-panel {
  background-color: rgba(2, 136, 209, 0.05);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.4;
  color: #01579b;
  border-left: 3px solid var(--status-returned);
  margin-top: 4px;
}

.checklist-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.btn-checklist-action {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  width: auto;
  height: auto;
  transition: all var(--transition-speed);
}

.btn-checklist-action.submit {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
}

.btn-checklist-action.submit:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-color) 100%);
}

.btn-checklist-action.resubmit {
  background-color: var(--status-returned);
  color: white;
}

.btn-checklist-action.resubmit:hover {
  background-color: #0277bd;
}

/* Barangay Header Card on Matrix Views */
.matrix-brgy-header {
  position: relative;
  background-color: var(--primary-color);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: #ffffff !important;
  padding: 20px 16px;
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  overflow: hidden;
}

.matrix-brgy-header::after {
  content: '';
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.matrix-brgy-header-info h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: -0.3px;
}

.matrix-report-subtitle {
  margin: 6px 0 0 0 !important;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Premium Responsive Scrollbars (Best of Both Worlds approach) */
/* Custom styled thin scrollbars for desktop/laptop preview screens */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(var(--primary-rgb), 0.2); /* Semi-transparent theme green */
  border-radius: 10px;
  border: 1px solid transparent;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(var(--primary-rgb), 0.4); /* Darker green on hover */
}

/* Firefox scrollbar support */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--primary-rgb), 0.2) transparent;
}

/* Hide scrollbars completely on real mobile screens/viewports */
@media (max-width: 767px) {
  ::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
  
  * {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }
}

/* Scorecards Scroll Wrapper Removed */

/* Premium Select Mini for sorting option */
.premium-select-mini {
  font-family: var(--font-main);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dark);
  padding: 4px 18px 4px 8px;
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  border-radius: 8px;
  background-color: #ffffff;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(var(--primary-rgb), 0.02);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%231b4d2c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: auto;
  height: 24px;
}

.premium-select-mini:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.08);
}

/* Mini Icon Button (used for toggling sort options and pagination) */
.btn-icon-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--primary-rgb), 0.12);
  background-color: #ffffff;
  color: var(--primary-color);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  padding: 0;
  box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.04);
}

.btn-icon-mini:hover:not(:disabled) {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.18);
}

.btn-icon-mini:active:not(:disabled) {
  transform: translateY(0) scale(0.95);
  box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.1);
}

.btn-icon-mini:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background-color: #f7f9f6;
  border-color: var(--border-color);
  color: var(--text-light);
}

/* Premium Pagination Layout */
.premium-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 14px;
}

.pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1.5px solid rgba(var(--primary-rgb), 0.12);
  background-color: #ffffff;
  color: var(--primary-color);
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.04);
}

.pagination-page-btn:hover:not(.active) {
  border-color: var(--primary-color);
  background-color: rgba(var(--primary-rgb), 0.06);
}

.pagination-page-btn.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.18);
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 28px;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  user-select: none;
}

.pagination-range {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

/* BO Dashboard Progress Bar styles */
.bo-progress-container {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  margin: 12px 0 16px 0;
  overflow: hidden;
  position: relative;
}
.bo-progress-fill {
  height: 100%;
  background-color: #ffffff;
  border-radius: 6px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* FO Dashboard Barangay Card Mini Progress Bar styles */
.mini-progress-container {
  width: 80px;
  height: 6px;
  background-color: rgba(var(--primary-rgb), 0.08);
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
  display: inline-block;
}
.mini-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}
.mini-progress-fill.approved { background-color: var(--status-approved); }
.mini-progress-fill.review { background-color: var(--status-review); }
.mini-progress-fill.due { background-color: var(--status-missing); }

/* --- Option 1: Modern Executive Scorecard Cards --- */
.item-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              background 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-card.approved::before,
.item-card.review::before,
.item-card.late::before,
.item-card.returned::before,
.item-card.missing::before,
.item-card.due::before,
.item-card.closed::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4.5px;
  height: 100%;
  z-index: 2;
}

.item-card.approved::before { background-color: var(--status-approved); }
.item-card.review::before { background-color: var(--status-review); }
.item-card.late::before { background-color: var(--status-late); }
.item-card.returned::before { background-color: var(--status-returned); }
.item-card.missing::before,
.item-card.due::before { background-color: var(--status-missing); }
.item-card.closed::before { background-color: var(--status-closed); }

/* Adjust left padding for status items to make room for stripe */
.item-card.approved,
.item-card.review,
.item-card.late,
.item-card.returned,
.item-card.missing,
.item-card.due,
.item-card.closed {
  padding-left: 20px !important;
}

/* Translucent Soft Gradient Backdrop Tints */
.item-card.approved {
  background: linear-gradient(135deg, var(--card-bg), rgba(var(--primary-light-rgb), 0.035)) !important;
  border-color: rgba(var(--primary-light-rgb), 0.12) !important;
}
.item-card.review {
  background: linear-gradient(135deg, var(--card-bg), rgba(224, 169, 109, 0.045)) !important;
  border-color: rgba(224, 169, 109, 0.18) !important;
}
.item-card.late {
  background: linear-gradient(135deg, var(--card-bg), rgba(217, 119, 6, 0.045)) !important;
  border-color: rgba(217, 119, 6, 0.15) !important;
}
.item-card.returned {
  background: linear-gradient(135deg, var(--card-bg), rgba(2, 136, 209, 0.04)) !important;
  border-color: rgba(2, 136, 209, 0.15) !important;
}
.item-card.missing,
.item-card.due {
  background: linear-gradient(135deg, var(--card-bg), rgba(185, 28, 28, 0.035)) !important;
  border-color: rgba(185, 28, 28, 0.12) !important;
}
.item-card.closed {
  background: linear-gradient(135deg, var(--card-bg), rgba(100, 116, 139, 0.035)) !important;
  border-color: rgba(100, 116, 139, 0.12) !important;
}

/* Premium Hover Transitions & Status-Colored Aura Glows */
.item-card:hover {
  transform: translateY(-2.5px) !important;
}

.item-card.approved:hover {
  border-color: var(--status-approved) !important;
  box-shadow: 0 8px 20px rgba(var(--primary-light-rgb), 0.08) !important;
}
.item-card.review:hover {
  border-color: var(--status-review) !important;
  box-shadow: 0 8px 20px rgba(224, 169, 109, 0.1) !important;
}
.item-card.late:hover {
  border-color: var(--status-late) !important;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.08) !important;
}
.item-card.returned:hover {
  border-color: var(--status-returned) !important;
  box-shadow: 0 8px 20px rgba(2, 136, 209, 0.08) !important;
}
.item-card.missing:hover,
.item-card.due:hover {
  border-color: var(--status-missing) !important;
  box-shadow: 0 8px 20px rgba(185, 28, 28, 0.08) !important;
}
.item-card.closed:hover {
  border-color: var(--status-closed) !important;
  box-shadow: 0 8px 20px rgba(100, 116, 139, 0.08) !important;
}

/* Scorecard Metrics Layout Styles */
.scorecard-metrics-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 5px;
}

.scorecard-metrics-row {
  font-size: 11px;
  color: var(--text-light);
  white-space: nowrap;
  line-height: 1.3;
  letter-spacing: 0.1px;
  font-weight: 500;
}

.scorecard-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

.scorecard-percentage {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2px;
  letter-spacing: -0.3px;
}

.scorecard-percentage.approved {
  color: var(--status-approved);
}
.scorecard-percentage.review {
  color: var(--status-late);
}
.scorecard-percentage.due {
  color: var(--status-missing);
}

/* Custom Floating Dropdown Menu (No Layout Disruption) */
.custom-dropdown {
  position: relative;
  display: inline-block;
}

.custom-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  min-width: 140px;
  z-index: 999;
  overflow: hidden;
  animation: dropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-dropdown-menu.show {
  display: block;
}

.custom-dropdown-item {
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition-speed);
  text-align: left;
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.04);
  line-height: 1.5;
}

.custom-dropdown-item:first-child {
  padding-top: 8px;
}

.custom-dropdown-item:last-child {
  border-bottom: none;
  padding-bottom: 8px;
}

.custom-dropdown-item:hover {
  background-color: rgba(var(--primary-rgb), 0.05);
  color: var(--primary-color);
}

.custom-dropdown-item.active {
  background-color: rgba(var(--primary-rgb), 0.07);
  color: var(--primary-color);
  font-weight: 600;
}

/* Custom Filter Button with 3-lines + 3-dots mixer icon */
.btn-filter-sort {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1.5px solid rgba(var(--primary-rgb), 0.13);
  background-color: #ffffff;
  color: var(--primary-color);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  padding: 0;
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.05);
  flex-shrink: 0;
}

.btn-filter-sort:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.18);
}

.btn-filter-sort svg {
  pointer-events: none;
}

/* Custom 44px Square Controls Action Button matching premium select height */
.btn-controls-square-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid rgba(var(--primary-rgb), 0.13);
  background-color: #ffffff;
  color: var(--primary-color);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  padding: 0;
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.05);
  flex-shrink: 0;
}

.btn-controls-square-action:hover {
  border-color: var(--primary-color);
  background-color: rgba(var(--primary-rgb), 0.06);
  color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.12);
}

/* After a download, force the default look even while the pointer lingers on the
   button (the .suppress-hover class is cleared once the pointer leaves). */
.btn-controls-square-action.suppress-hover,
.btn-controls-square-action.suppress-hover:hover {
  border-color: rgba(var(--primary-rgb), 0.13);
  background-color: #ffffff;
  color: var(--primary-color);
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.05);
}

.btn-controls-square-action svg, .btn-controls-square-action i {
  pointer-events: none;
}

/* Loading state for the matrix PDF download button (keeps default look, shows spinner) */
.btn-controls-square-action.is-loading,
.btn-controls-square-action.is-loading:hover {
  background-color: #ffffff;
  color: var(--primary-color);
  border-color: rgba(var(--primary-rgb), 0.13);
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.05);
  cursor: progress;
}

.btn-square-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(var(--primary-rgb), 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* =====================================================
   CUSTOM SELECT COMPONENT  (cs-*)
   Fully styled div-based dropdowns replacing native
   <select> elements for uniform cross-browser look.
   ===================================================== */

.cs-wrapper {
  position: relative;
  width: 100%;
}

.cs-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 12px 0 14px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  background-color: #ffffff;
  border: 1.5px solid rgba(var(--primary-rgb), 0.13);
  border-radius: 12px;
  cursor: pointer;
  outline: none;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.04);
  gap: 8px;
  height: 44px;
}

.cs-trigger:hover:not(.cs-disabled) {
  border-color: rgba(var(--primary-rgb), 0.3);
  box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.08);
}

.cs-trigger.open {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.cs-trigger.cs-disabled {
  background-color: var(--bg-color);
  color: var(--text-light);
  cursor: not-allowed;
  opacity: 0.7;
}

.cs-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.cs-label.cs-placeholder {
  color: var(--text-light);
}

.cs-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: var(--primary-color);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.cs-trigger.cs-disabled .cs-arrow {
  color: #b0b8b0;
}

.cs-trigger.open .cs-arrow {
  transform: rotate(180deg);
}

.cs-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background-color: #ffffff;
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(var(--primary-rgb), 0.14), 0 2px 8px rgba(var(--primary-rgb), 0.06);
  z-index: 9999;
  overflow: hidden;
  max-height: 238px;
  overflow-y: auto;
  animation: csDropIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.cs-menu.show {
  display: block;
}

@keyframes csDropIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cs-menu::-webkit-scrollbar { width: 4px; }
.cs-menu::-webkit-scrollbar-track { background: transparent; }
.cs-menu::-webkit-scrollbar-thumb {
  background: rgba(var(--primary-rgb), 0.15);
  border-radius: 4px;
}

.cs-group-label {
  padding: 7px 16px 4px;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background-color: rgba(var(--primary-rgb), 0.04);
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.07);
  border-top: 1px solid rgba(var(--primary-rgb), 0.05);
}

.cs-item {
  padding: 5px 16px;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-dark);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.035);
  line-height: 1.45;
  white-space: normal;
}

.cs-item:last-child {
  border-bottom: none;
}

.cs-item-grouped {
  padding-left: 22px;
  font-size: 12px;
}

.cs-item:hover {
  background-color: rgba(var(--primary-rgb), 0.05);
  color: var(--primary-color);
}

.cs-item.active {
  background-color: rgba(var(--primary-rgb), 0.09);
  color: var(--primary-color);
  font-weight: 600;
}

.cs-item:first-child  { padding-top: 6px; }
.cs-item:last-child   { padding-bottom: 6px; }

.cs-custom-tag { font-style: italic; }

.cs-item-multi {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cs-item-checkbox {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(var(--primary-rgb), 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.cs-item.active .cs-item-checkbox {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.cs-item-checkbox svg {
  width: 11px;
  height: 11px;
  stroke: #ffffff;
  stroke-width: 3;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.15s ease;
}

.cs-item.active .cs-item-checkbox svg {
  opacity: 1;
  transform: scale(1);
}

.cs-item-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-wrapper.cs-compact .cs-trigger {
  min-height: 36px;
  padding: 7px 10px 7px 12px;
  font-size: 12px;
  border-radius: 10px;
}

/* =====================================================
   CustomDatePicker — Branded calendar (matches CustomSelect)
   ===================================================== */

.cdp-wrapper {
  position: relative;
  width: 100%;
}

.cdp-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 12px 0 14px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  background-color: #ffffff;
  border: 1.5px solid rgba(var(--primary-rgb), 0.13);
  border-radius: 12px;
  cursor: pointer;
  outline: none;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.04);
  gap: 8px;
  height: 44px;
}

.cdp-trigger:hover:not(.cdp-disabled) {
  border-color: rgba(var(--primary-rgb), 0.3);
  box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.08);
}

.cdp-trigger.open {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.cdp-trigger.cdp-disabled {
  background-color: var(--bg-color);
  color: var(--text-light);
  cursor: not-allowed;
  opacity: 0.7;
}

.cdp-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.cdp-label.cdp-placeholder {
  color: var(--text-light);
}

.cdp-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: var(--primary-color);
}

.cdp-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background-color: var(--card-bg);
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(var(--primary-rgb), 0.14), 0 2px 8px rgba(var(--primary-rgb), 0.06);
  z-index: 9999;
  padding: 12px;
  animation: csDropIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.cdp-panel.show {
  display: block;
}

.cdp-panel.cdp-panel-up {
  top: auto;
  bottom: calc(100% + 6px);
}

.cdp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.cdp-month-label {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.2px;
}

.cdp-nav-btn {
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(var(--primary-rgb), 0.12);
  border-radius: 10px;
  background: rgba(var(--primary-rgb), 0.04);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cdp-nav-btn:hover {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.cdp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}

.cdp-weekday {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.cdp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cdp-day {
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-dark);
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cdp-day:hover {
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--primary-dark);
}

.cdp-day-other {
  color: rgba(var(--primary-rgb), 0.28);
}

.cdp-day-today {
  box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), 0.55);
}

.cdp-day-selected {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.22);
}

.cdp-day-selected:hover {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: #ffffff;
}

input[type="date"].cdp-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

/* =====================================================
   SUBSCRIPTION & BILLING COMPONENT STYLING
   ===================================================== */

.sub-dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  padding: 8px 4px;
}

/* Current Status Banner */
.sub-status-banner {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, rgba(var(--primary-rgb), 0.02) 100%);
  border: 1.5px solid rgba(var(--primary-rgb), 0.1);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sub-status-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sub-status-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
}

.sub-status-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-status-subtext {
  font-size: 11.5px;
  color: var(--text-light);
}

/* Plan Badges */
.sub-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sub-badge.trialing,
.sub-badge.trial {
  background-color: rgba(255, 179, 0, 0.15);
  color: #c98200;
  border: 1px solid rgba(255, 179, 0, 0.25);
}

.sub-badge.basic {
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.sub-badge.pro {
  background-color: rgba(76, 175, 80, 0.12);
  color: #2e7d32;
  border: 1px solid rgba(76, 175, 80, 0.25);
}

.sub-badge.active {
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.sub-badge.past_due {
  background-color: rgba(239, 83, 80, 0.1);
  color: #d32f2f;
  border: 1px solid rgba(239, 83, 80, 0.2);
}

.sub-badge.expired {
  background-color: rgba(117, 117, 117, 0.1);
  color: #616161;
  border: 1px solid rgba(117, 117, 117, 0.2);
}

/* Plans Grid */
.sub-plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 4px;
}

@media (max-width: 767px) {
  .sub-plans-grid {
    grid-template-columns: 1fr;
  }
}

.sub-plan-card {
  background-color: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.sub-plan-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--primary-rgb), 0.25);
  box-shadow: var(--shadow-md);
}

.sub-plan-card.recommended {
  border-color: var(--border-color);
  background: #ffffff;
}

.sub-plan-card.selected {
  border-color: var(--primary-color) !important;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.04) 0%, #ffffff 100%) !important;
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.14) !important;
}

.sub-plan-card.disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background-color: var(--bg-light) !important;
  border-color: var(--border-color) !important;
  box-shadow: none !important;
  transform: none !important;
}

.plan-select-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.sub-plan-card:not(.disabled):active .plan-select-indicator {
  transform: scale(0.9);
}

.sub-plan-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sub-plan-header h4 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.sub-plan-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-color);
  margin: 12px 0;
  display: flex;
  align-items: baseline;
}

.sub-plan-price span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  margin-left: 2px;
}

.sub-plan-features {
  list-style: none;
  padding: 0;
  margin: 14px 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.sub-plan-features li {
  font-size: 11.5px;
  color: var(--text-dark);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.sub-plan-features li svg {
  color: var(--primary-color);
  flex-shrink: 0;
  margin-top: 1px;
}

.sub-plan-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12.5px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.sub-plan-btn.basic {
  background-color: rgba(var(--primary-rgb), 0.08);
  color: var(--primary-color);
}

.sub-plan-btn.basic:hover {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: #ffffff;
}

.sub-plan-btn.pro {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
}

.sub-plan-btn.pro:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-color) 100%);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.25);
}

.sub-plan-btn:disabled {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: #ffffff !important;
  opacity: 0.8;
  cursor: not-allowed;
  box-shadow: none;
}

/* Billing History */
.billing-history-section {
  margin-top: 8px;
}

.billing-history-section h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.billing-table-wrapper {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background-color: #ffffff;
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.billing-table th {
  background-color: var(--bg-color);
  color: var(--text-light);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.billing-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
  line-height: 1.4;
  vertical-align: middle;
}

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

.billing-status {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.billing-status.paid {
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-color);
}

.billing-status.pending {
  background-color: rgba(255, 179, 0, 0.1);
  color: #c98200;
}

.billing-status.failed {
  background-color: rgba(239, 83, 80, 0.1);
  color: #d32f2f;
}

.billing-status.refunded {
  background-color: #e2e8f0;
  color: #475569;
}

.billing-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  vertical-align: middle;
}

.billing-status-icon.paid {
  background-color: var(--status-approved-bg);
  color: var(--status-approved);
}

.billing-status-icon.pending {
  background-color: var(--status-late-bg);
  color: var(--status-late);
}

.billing-status-icon.failed {
  background-color: var(--status-missing-bg);
  color: var(--status-missing);
}

.billing-status-icon.refunded {
  background-color: var(--status-closed-bg);
  color: var(--status-closed);
}

.billing-receipt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  background-color: rgba(var(--primary-rgb), 0.07);
  color: var(--primary-color);
  cursor: pointer;
  transition: all 0.18s ease;
}

.billing-receipt-btn:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-1px);
}

.billing-action-link {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
}

.billing-empty-state {
  padding: 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 12px;
}

/* Subscription Expiration Gated Modal Warning */
.gated-warning-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 0;
}

.gated-warning-icon {
  width: 54px;
  height: 54px;
  color: #ef5350;
  background-color: rgba(239, 83, 80, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.gated-warning-icon--subscription {
  color: var(--primary-color);
  background-color: rgba(var(--primary-rgb), 0.08);
}

.gated-warning-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.gated-warning-text {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 24px;
}

.gated-upgrade-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: #ffffff;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.gated-upgrade-btn:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-color) 100%);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.25);
}

/* ================================================================
   Settings Accordion Styles for Consolidated Account Modal
   ================================================================ */
.settings-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.accordion-item {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--card-bg);
  overflow: hidden;
  transition: border-color var(--transition-speed) ease;
}

.accordion-item:not(.active) .accordion-content {
  visibility: hidden;
}

.accordion-item.active .accordion-content {
  visibility: visible;
}

.accordion-item.active {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.accordion-header {
  width: 100%;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  text-align: left;
}

.accordion-header span {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.2px;
}

.acc-chevron {
  color: var(--primary-color);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.accordion-item.active .acc-chevron {
  transform: rotate(180deg);
}

.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.accordion-item.active .accordion-content {
  grid-template-rows: 1fr;
  overflow: visible !important;
}

.accordion-content-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0 20px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.08);
  transition: padding 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .accordion-content-inner {
  padding: 16px 20px 24px;
  overflow: visible !important;
}

/* FO Quick Tips / FAQs modal (full-screen sizing handled by the shared
   #modal-* selector lists below, matching Subscription & Billing). */
.modal-content.fo-faq-modal {
  display: flex;
  flex-direction: column;
}

.modal-content.fo-faq-modal .modal-header {
  flex-shrink: 0;
}

.fo-faq-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.fo-faq-intro {
  margin: 0 0 16px 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-light);
}

.fo-faq-accordion {
  margin-top: 0;
  gap: 10px;
}

.faq-topic-body {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-color);
}

.faq-topic-body p {
  margin: 0 0 8px 0;
}

.faq-topic-body p:last-child {
  margin-bottom: 0;
}

.faq-topic-label {
  margin: 0;
  line-height: 1.1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--primary-color);
}

/* Wider gap between sub-topic blocks */
.faq-topic-label:not(:first-child) {
  margin-top: 16px;
}

/* Sub-topic title + details read as one unit */
.faq-topic-label + p,
.faq-topic-label + ul,
.faq-topic-label + .faq-topic-list {
  margin-top: -2px;
  padding-top: 0;
}

.faq-topic-label + p {
  line-height: 1.45;
}

.faq-topic-label + .faq-topic-list {
  padding-top: 0;
}

.faq-topic-label + .faq-topic-list li:first-child {
  margin-top: 0;
}

.faq-topic-body > *:first-child {
  margin-top: 0;
}

.faq-topic-list {
  margin: 0 0 8px 0;
  padding-left: 18px;
}

.faq-topic-list li {
  margin-bottom: 3px;
}

.faq-topic-list li:last-child {
  margin-bottom: 0;
}

/* Let the next sub-topic label supply the group gap (avoid double spacing) */
.faq-topic-body > p:not(.faq-topic-label):has(+ .faq-topic-label),
.faq-topic-body > .faq-topic-list:has(+ .faq-topic-label),
.faq-topic-body > p:not(.faq-topic-label):has(+ p.faq-topic-label) {
  margin-bottom: 0;
}

.fo-faq-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fo-faq-dismiss-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-light);
  cursor: pointer;
  user-select: none;
}

.fo-faq-dismiss-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

#fo-faq-continue-btn {
  width: 100%;
  margin: 0;
}

.settings-helper-text {
  font-family: var(--font-main);
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
}

.settings-action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.settings-action-row.double-btn {
  gap: 12px;
}

.settings-action-row.double-btn button {
  flex: 1;
}

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

.accordion-item .form-group label {
  margin-bottom: 4px;
}

/* ================================================================
   Admin Specific Styling Adjustments
   ================================================================ */
.admin-summary-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.admin-summary-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 6px;
}
.admin-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}
.admin-summary-row:last-child {
  margin-bottom: 0;
}
.admin-summary-lbl {
  color: var(--text-light);
  font-weight: 500;
}
.admin-summary-val {
  font-weight: 600;
  color: var(--text-dark);
}
.feedback-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.feedback-badge.bug {
  background-color: var(--status-missing-bg);
  color: var(--status-missing);
}
.feedback-badge.recommendation {
  background-color: var(--status-returned-bg);
  color: var(--status-returned);
}

/* PWA Install Banner styling */
.pwa-banner {
  position: absolute;
  bottom: 80px; /* Sit just above the bottom-nav */
  left: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  z-index: 950; /* Above bottom-nav (100) and below modal-overlay (1000) */
  padding: 16px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.pwa-banner.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 767px) {
  .pwa-banner {
    position: fixed; /* On actual mobile, stay fixed relative to viewport */
    bottom: calc(85px + env(safe-area-inset-bottom, 0px)); /* Account for mobile fixed nav + safe area */
    left: 12px;
    right: 12px;
  }
}

@media (min-width: 768px) {
  .pwa-banner {
    position: absolute;
    bottom: 116px;
    left: 50%;
    right: auto;
    width: 90%;
    max-width: 500px;
    transform: translateX(-50%) translateY(20px);
    z-index: 1005;
  }
  .pwa-banner.show {
    transform: translateX(-50%) translateY(0);
  }
}

.pwa-banner-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pwa-banner-close {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--border-color);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-light);
  transition: background-color 0.2s;
}

.pwa-banner-close:hover {
  background: #d0d6d2;
  color: var(--text-dark);
}

.pwa-banner-app-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-banner-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: white;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.pwa-banner-text {
  flex: 1;
}

.pwa-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.pwa-banner-subtitle {
  font-size: 11.5px;
  color: var(--text-light);
  line-height: 1.4;
}

.pwa-banner-actions {
  display: flex;
  justify-content: flex-end;
}

.pwa-btn-install {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  border: none;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(var(--primary-light-rgb), 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.pwa-btn-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-light-rgb), 0.35);
}

.pwa-btn-install:active {
  transform: translateY(0);
}

/* Password visibility toggle styles */
.password-input-wrapper {
  position: relative;
  width: 100%;
}
/* Hide Microsoft Edge / IE native password reveal button */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none !important;
}
.password-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 10;
  border-radius: 50%;
}
.password-toggle-btn:hover {
  color: var(--primary-color);
  background-color: rgba(var(--primary-rgb), 0.05);
}
.password-input-wrapper .form-control {
  padding-right: 42px;
}

/* Loading spinner styles for button loading states */
.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin-button-loader 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin-button-loader {
  to { transform: rotate(360deg); }
}

/* Animated loading dots class */
.loading-dots::after {
  content: '...';
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: dots-animation 1.5s steps(4, end) infinite;
}

@keyframes dots-animation {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* Navigation Tab Red Dot Badge */
.nav-badge-dot {
  position: absolute;
  top: 6px;
  right: 28%;
  width: 8px;
  height: 8px;
  background-color: #ff4d4f;
  border-radius: 50%;
  border: 1.5px solid var(--card-bg);
  box-shadow: 0 0 4px rgba(255, 77, 79, 0.4);
  z-index: 10;
  display: none;
}

.nav-badge-count {
  position: absolute;
  top: 6px;
  left: calc(50% + 6px);
  right: auto;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background-color: var(--status-missing);
  color: #fff;
  border-radius: 999px;
  border: 1.5px solid var(--card-bg);
  box-shadow: 0 0 4px rgba(255, 77, 79, 0.35);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
  transition: top var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1),
    transform var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item.active .nav-badge-count {
  top: -2px;
  transform: translateY(-5px) scale(1.05);
}

.segment-label {
  position: relative;
  display: inline-block;
  padding-right: 2px;
}

.segment-alert-dot {
  display: none;
  position: absolute;
  top: -3px;
  right: -7px;
  width: 6px;
  height: 6px;
  background-color: var(--status-missing);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(255, 77, 79, 0.35);
  border: 1px solid var(--card-bg);
  pointer-events: none;
  z-index: 1;
}

.filter-pill.active .segment-alert-dot {
  border-color: var(--primary-color);
}

.switcher-btn.active .segment-alert-dot {
  border-color: var(--primary-color);
}

.reports-desktop-segments button.is-active .segment-alert-dot {
  border-color: var(--primary-color);
}

/* Admin Notifications Modal Items Styling */
.admin-notif-item {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background-color 0.2s;
  border-left: 3px solid transparent;
}

.admin-notif-item.unread {
  background-color: rgba(46, 85, 61, 0.04);
  border-left-color: var(--primary-color);
}

.admin-notif-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.admin-notif-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 4px 0;
}

.admin-notif-msg {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.4;
  margin: 0;
}

.admin-notif-date {
  font-size: 9px;
  color: var(--text-light);
  margin-top: 6px;
  align-self: flex-end;
}

/* Tablet & Desktop Layout Enhancements */
@media (min-width: 768px) {
  /* Center standard bottom-sheets to behave like modal dialogs on desktop/tablet */
  .modal-overlay {
    align-items: center;
  }
  
  .modal-content {
    max-width: 550px;
    margin: 0 auto;
    border-radius: 24px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    border: 1px solid var(--border-color);
  }
  
  .modal-overlay.active .modal-content {
    transform: translateY(0);
  }

  /* Role cards 2-column layout on landing page */
  .role-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .landing-breaker {
    padding-bottom: 52px;
  }

  .landing-breaker + .landing-benefits-section {
    margin-top: 28px;
  }

  .landing-pricing-section > .landing-breaker + .landing-pricing-grid {
    margin-top: 28px;
  }

  .landing-journey-section > .landing-breaker + .journey-track {
    margin-top: 28px;
  }

  /* Benefits 2-column layout matching role-cards grid */
  .landing-benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  /* Showcase — tablet proportioned composition */
  .landing-showcase {
    padding: 0 28px 40px;
    margin-top: 16px;
  }

  .showcase-perspective-wrapper {
    max-width: 820px;
    transform: translateX(50px);
  }

  .showcase-perspective-wrapper:hover {
    transform: translateX(50px) translateY(-4px) scale(1.006);
  }

  /* Journey — centered spine with alternating cards */
  .journey-track {
    padding: 8px 0;
  }

  .journey-steps {
    gap: 30px;
  }

  .journey-step {
    grid-template-columns: 1fr 56px 1fr;
    gap: 0;
    align-items: center;
  }

  .journey-node {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }

  .journey-card {
    max-width: 400px;
    width: 100%;
    padding: 16px 18px;
  }

  .journey-step:nth-child(odd) .journey-card {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    margin-right: 6px;
  }

  .journey-step:nth-child(even) .journey-card {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
    margin-left: 6px;
  }

  .journey-spine {
    left: 50%;
    transform: translateX(-50%);
  }

  .journey-anim-ready .journey-step:nth-child(odd):not(.is-visible) .journey-card {
    transform: translateX(-24px);
  }

  .journey-anim-ready .journey-step:nth-child(even):not(.is-visible) .journey-card {
    transform: translateX(24px);
  }

  .landing-pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
  }

  .landing-pricing-card {
    height: 100%;
    padding: 24px 22px;
  }

  /* Scorecards 3-column grid layout (2 rows of 3) */
  .stat-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px;
  }

  /* Limit max-width of authentication card forms */
  #page-login form, #page-register form {
    max-width: 460px;
    margin: 0 auto;
    background-color: var(--card-bg);
    padding: 32px;
    border-radius: 20px;
    border: 1.5px solid var(--border-color);
    box-shadow: var(--shadow-sm);
  }
  
  #page-login .form-footer, #page-register .form-footer {
    text-align: center;
    margin-top: 24px;
  }
}

/* Document View Split Layout */
.modal-view-layout {
  display: flex;
  gap: 24px;
  width: 100%;
  align-items: flex-start;
}

.modal-view-doc-column {
  flex: 1.6;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.modal-view-meta-column {
  flex: 1.4;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 4px;
}

/* Header Row (Barangay Name + Report Details + Status Pill) */
.view-meta-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 4px;
  border-bottom: none;
  margin: 0;
}

.view-meta-header-row.has-middle-section {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.view-meta-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 2px 0;
}

.view-meta-sub {
  font-size: 12px;
  color: var(--text-light);
  margin: 0;
}

/* Remarks View Box */
.view-remarks-box {
  background-color: rgba(var(--accent-rgb), 0.05);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0;
}

.view-remarks-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 4px 0;
}

.view-remarks-text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dark);
  margin: 0;
}

/* FO Review Panel */
.view-fo-review-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
}

.view-review-form-group {
  margin-bottom: 0 !important;
}

.view-form-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  display: block;
}

.view-fo-review-panel textarea.form-control {
  height: 72px;
  font-family: var(--font-main);
  font-size: 12.5px;
  resize: vertical;
}

.view-review-actions {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.view-review-actions button {
  flex: 1;
  margin: 0;
}

.view-btn-return {
  border-color: var(--status-returned);
  color: var(--status-returned);
  background-color: rgba(2, 136, 209, 0.05);
}

.view-btn-return:hover {
  background-color: rgba(2, 136, 209, 0.12);
}

/* BO Resubmit Button */
.view-bo-resubmit-btn {
  width: 100%;
  margin: 0;
}

.view-submission-history-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

#modal-view-report .view-section-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.2px;
}

#modal-view-report .view-history-table-wrapper {
  margin-bottom: 0;
}

#modal-view-report .view-history-table {
  table-layout: fixed;
  width: 100%;
  font-size: 10.5px;
  text-align: left;
}

#modal-view-report .view-history-table th,
#modal-view-report .view-history-table td {
  width: 50%;
  height: auto;
  min-height: 40px;
  padding: 7px 10px;
  font-size: 10.5px;
  line-height: 1.35;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

#modal-view-report .view-history-table th:last-child,
#modal-view-report .view-history-table td:last-child {
  border-right: none;
}

#modal-view-report .view-history-table th {
  background-color: #f7f9f6;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 8.5px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

#modal-view-report .view-history-table td {
  color: var(--text-dark);
  font-weight: 400;
}

#modal-view-report .view-history-table tr:nth-child(even) {
  background-color: rgba(var(--primary-rgb), 0.01);
}

#modal-view-report .view-history-table tr:hover {
  background-color: rgba(var(--primary-rgb), 0.035) !important;
}

#modal-view-report .view-history-table td.view-history-date {
  vertical-align: top;
}

#modal-view-report .view-history-date-line {
  display: block;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.3;
}

#modal-view-report .view-history-time-line {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 400;
  color: var(--text-light);
  line-height: 1.2;
}

#modal-view-report .view-history-table td.view-history-event {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#modal-view-report .view-history-empty {
  text-align: center;
  color: var(--text-light);
  font-style: italic;
  font-size: 10.5px;
  font-weight: 400;
  padding: 16px 10px !important;
  white-space: normal;
}

@media (max-width: 768px) {
  .modal-view-meta-column {
    max-height: none;
    overflow-y: visible;
  }

  .modal-view-layout {
    flex-direction: column;
    gap: 8px;
  }

  .pdf-viewer-box {
    height: 320px;
    margin-bottom: 0;
  }

  .modal-view-doc-column, .modal-view-meta-column {
    flex: none;
    width: 100%;
  }
}

.pdf-viewer-icon {
  font-size: 40px;
  color: var(--status-missing);
  margin-bottom: 8px;
}

.pdf-viewer-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dark);
  text-align: center;
  padding: 0 20px;
}

/* Document Scanner Styles */
.scanner-video-wrapper {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 240px;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
  border: 1px solid var(--border-color);
}

#scanner-video {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  display: block;
}

#scanner-canvas-overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2;
  object-fit: contain;
}

.scanner-overlay-message {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  z-index: 3;
}

.scanner-diagnostics-panel {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #f8faf9;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
}

.scanner-diagnostics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
}

.scanner-diagnostics-dismiss {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.scanner-diagnostics-body {
  padding: 10px 12px;
  max-height: 220px;
  overflow-y: auto;
}

.scanner-diag-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

.scanner-diag-label {
  color: var(--text-light);
  flex-shrink: 0;
}

.scanner-diag-value {
  color: var(--text-dark);
  text-align: right;
  word-break: break-word;
}

.scanner-diag-warnings {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #664d03;
  font-size: 10px;
}

}

/* ── FO & BO Home Page Slider styles ── */
.fo-slider-outer, .bo-slider-outer {
  position: relative;
  width: 100%;
  margin-top: 0;
  margin-bottom: 14px;
}
.fo-slider-container, .bo-slider-container {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
  box-sizing: border-box;
  padding: 0 0 8px; /* Bottom only — keeps card shadows visible without extra segment gap */
}
.fo-slider-container::-webkit-scrollbar, .bo-slider-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
.fo-slider-container .slide-card, .bo-slider-container .slide-card {
  width: 100%;
  flex-shrink: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  margin-bottom: 0; /* Override scorecard-card margin-bottom inside slider */
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease, filter 0.5s ease;
  opacity: 0.45;
  transform: scale(0.9);
  filter: blur(1.5px);
  will-change: transform, opacity, filter;
}
.fo-slider-container .slide-card.active, .bo-slider-container .slide-card.active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}
.fo-slider-container.no-transition .slide-card,
.bo-slider-container.no-transition .slide-card {
  transition: none !important;
}
.fo-slider-dots, .bo-slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 10px;
}
.fo-slider-dot, .bo-slider-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--border-color);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.fo-slider-dot.active, .bo-slider-dot.active {
  background-color: var(--primary-color);
  width: 16px;
  border-radius: 4px;
}

/* Explicit background overrides for FO and BO cards to ensure perfect design consistency */
#fo-scorecard,
#fo-monthly-summary-card,
#fo-quarterly-summary-card,
#fo-semestral-summary-card,
#bo-scorecard,
#bo-monthly-summary-card,
#bo-quarterly-summary-card,
#bo-semestral-summary-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
}

.summary-grid-4 {
  grid-template-columns: repeat(4, 1fr) !important;
}
.summary-grid-4 .scorecard-detail-item:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

/* Desktop FO/BO workspace. Mobile and tablet retain their existing layout. */
.desktop-dashboard-heading,
.desktop-nav-brand,
.desktop-nav-section-label {
  display: none;
}

.desktop-dashboard-columns {
  display: block;
}
.desktop-regular-slider-arrow {
  display: none;
}

.desktop-home-category-heading,
.desktop-custom-home-section {
  display: none;
}

.fo-request-panel-count {
  display: none;
}

.fo-request-panel-count:empty {
  display: none !important;
}

@media (max-width: 1199px) {
  .fo-request-panel-count {
    display: none !important;
  }
}

.reports-desktop-dual-list {
  display: none;
}

.fo-manage-desktop-resources {
  display: none !important;
}

.fo-manage-desktop-column {
  display: contents;
}

.bo-resources-desktop-grid,
.bo-resources-desktop-export {
  display: contents;
}

.bo-resources-desktop-library,
.bo-resources-export-heading {
  display: none !important;
}

@media (max-width: 1199px) {
  #page-manage .fo-manage-desktop-export {
    display: contents;
  }

  #page-manage .fo-manage-desktop-export > .accordion-header {
    display: none;
  }

  #page-manage .fo-manage-desktop-export > .accordion-content,
  #page-manage .fo-manage-desktop-export > .accordion-content > .accordion-content-inner {
    display: contents;
    visibility: visible;
    overflow: visible;
  }
}

/* BO Resources desktop: resource library and export use independent columns. */
@media (min-width: 1200px) {
  .app-container[data-user-role="barangay_official"] #page-resources {
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 24px 32px 48px;
  }

  .app-container[data-user-role="barangay_official"] #page-resources.active {
    display: block;
  }

  #page-resources > .view-switcher-row,
  #page-resources > .section-title-wrapper,
  #page-resources > #bo-resources-list-container {
    display: none !important;
  }

  #page-resources .bo-resources-desktop-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
  }

  #page-resources .bo-resources-desktop-library {
    min-width: 0;
    display: flex !important;
    flex-direction: column;
    gap: 0;
  }

  #page-resources .bo-resources-desktop-library,
  #page-resources .bo-resources-desktop-export {
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--card-bg);
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
    overflow: hidden;
  }

  #page-resources .bo-resources-desktop-export {
    display: block;
    box-sizing: border-box;
  }

  #page-resources .bo-resources-desktop-library > .accordion-item {
    border: 0;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: none;
  }

  #page-resources .bo-resources-desktop-library > .accordion-item:last-child {
    border-bottom: 0;
  }

  #page-resources .bo-resources-export-heading {
    min-height: 68px;
    padding: 14px 18px;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
  }

  #page-resources .bo-resources-export-heading strong,
  #page-resources .bo-resources-export-heading small {
    display: block;
  }

  #page-resources .bo-resources-export-heading strong {
    color: var(--primary-color);
    font-size: 15px;
    line-height: 1.3;
  }

  #page-resources .bo-resources-export-heading small {
    margin-top: 3px;
    color: var(--text-light);
    font-size: 10.5px;
    line-height: 1.35;
  }

  #page-resources .accordion-header {
    min-height: 52px;
    padding: 14px 18px;
  }

  #page-resources .accordion-item:not(.active) > .accordion-header {
    min-height: 44px;
    padding-block: 9px;
  }

  #page-resources .accordion-header span {
    font-size: 15px;
  }

  #page-resources .accordion-content-inner {
    width: 100%;
    padding: 0 18px;
  }

  #page-resources .accordion-item.active .accordion-content-inner {
    padding: 14px 18px 18px;
  }

  #page-resources .bo-resources-accordion-heading {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.08);
  }

  #page-resources .bo-resources-accordion-heading strong,
  #page-resources .bo-resources-accordion-heading small {
    display: block;
  }

  #page-resources .bo-resources-accordion-heading strong {
    color: var(--primary-color);
    font-size: 13.5px;
    line-height: 1.3;
  }

  #page-resources .bo-resources-accordion-heading small {
    margin-top: 2px;
    color: var(--text-light);
    font-size: 10.5px;
    line-height: 1.35;
  }

  #page-resources #bo-desktop-memos-list,
  #page-resources #bo-desktop-templates-list {
    gap: 8px;
    margin-bottom: 12px;
  }

  #page-resources .bo-resources-desktop-empty {
    min-height: 116px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-light);
    background: rgba(var(--primary-rgb), 0.018);
    font-size: 12px;
  }

  #page-resources .mgmt-card {
    box-shadow: none;
  }

  #page-resources #bo-resources-export-host {
    width: 100%;
    padding: 18px;
    box-sizing: border-box;
  }

  #page-resources #reports-export-container {
    margin-top: 0 !important;
  }

  #page-resources #reports-export-container .export-controls-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

.reports-desktop-matrix-heading {
  display: none;
}

.reports-desktop-list-heading,
.reports-desktop-matrix-workspaces,
.reports-desktop-control-label {
  display: none;
}

@property --dashboard-attention-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes dashboard-stat-border-travel {
  to { --dashboard-attention-angle: 360deg; }
}

@media (max-width: 1199px) {
  #page-bo-home .stat-card--action-needed,
  #page-fo-home .stat-card--action-needed {
    --dashboard-attention-color: var(--primary-color);
  }

  #page-bo-home .stat-card--action-needed::after,
  #page-fo-home .stat-card--action-needed::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 1.5px;
    border-radius: inherit;
    pointer-events: none;
    background: conic-gradient(
      from var(--dashboard-attention-angle),
      transparent 0deg 245deg,
      color-mix(in srgb, var(--dashboard-attention-color) 12%, transparent) 275deg,
      color-mix(in srgb, var(--dashboard-attention-color) 78%, transparent) 315deg,
      color-mix(in srgb, var(--dashboard-attention-color) 18%, transparent) 345deg,
      transparent 360deg
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: dashboard-stat-border-travel 4.5s linear infinite;
  }

  #page-fo-home .stat-card.review.stat-card--action-needed {
    --dashboard-attention-color: var(--status-review);
  }

  #page-bo-home .stat-card.returned.stat-card--action-needed {
    --dashboard-attention-color: var(--status-returned);
  }
}

@media (prefers-reduced-motion: reduce) {
  #page-bo-home .stat-card--action-needed::after,
  #page-fo-home .stat-card--action-needed::after {
    animation: none;
  }
}

@media (max-width: 1199px) {
  .reports-desktop-dual-list,
  .reports-desktop-matrix-heading,
  .reports-desktop-list-heading,
  .reports-desktop-matrix-workspaces,
  .reports-desktop-control-label {
    display: none !important;
  }
}

@media (min-width: 1200px) {
  body:has(.app-container[data-shell-mode="public"]) {
    display: block;
    background: var(--bg-color);
  }

  .device-emulator:has(.app-container[data-shell-mode="public"]) {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .app-container[data-shell-mode="public"] {
    display: flex;
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
  }

  .app-container[data-shell-mode="public"] > .app-content {
    width: 100%;
    min-width: 0;
    overflow-y: auto !important;
  }

  /* Desktop landing: full-width canvas with proportioned, centered content. */
  .app-container[data-shell-mode="public"] #page-landing {
    padding: 0;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-hero {
    width: min(100%, 720px);
    margin: 0 auto;
    padding: 68px 28px 22px;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-logo-container {
    width: 136px;
    height: 136px;
    margin-bottom: 20px;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-title {
    font-size: 36px;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-subtitle {
    font-size: 23px;
    margin-bottom: 16px;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-desc {
    max-width: 640px;
    margin: 0 auto 24px;
    padding: 0;
    font-size: 14px;
    line-height: 1.65;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-actions {
    width: min(calc(100% - 48px), 380px);
    margin: 0 auto 24px;
    padding: 0;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-trial-banner {
    width: min(calc(100% - 64px), 900px);
    margin: 0 auto 26px;
    padding: 18px 24px;
  }

  .app-container[data-shell-mode="public"] #page-landing .role-cards {
    width: min(calc(100% - 64px), 900px);
    margin: 0 auto 40px;
    gap: 20px;
  }

  .app-container[data-shell-mode="public"] #page-landing .role-card {
    min-height: 92px;
    padding: 20px 22px;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-breaker {
    padding: 72px 32px 52px;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-breaker-subtitle {
    max-width: 660px;
  }

  .app-container[data-shell-mode="public"] #page-landing > .landing-benefits-section {
    width: min(calc(100% - 64px), 900px);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 28px;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-benefits-grid {
    gap: 18px;
  }

  .app-container[data-shell-mode="public"] #page-landing .benefit-card {
    min-height: 94px;
    padding: 18px 20px;
  }

  /* Showcase — desktop proportioned composition matching trial banner width */
  .app-container[data-shell-mode="public"] #page-landing .landing-showcase {
    width: min(calc(100% - 64px), 900px);
    margin: 20px auto 0;
    padding: 0 0 56px;
  }

  .app-container[data-shell-mode="public"] #page-landing .showcase-perspective-wrapper {
    max-width: 900px;
    transform: translateX(50px);
  }

  .app-container[data-shell-mode="public"] #page-landing .showcase-perspective-wrapper:hover {
    transform: translateX(50px) translateY(-4px) scale(1.006);
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-journey-section {
    margin-bottom: 56px;
  }

  .app-container[data-shell-mode="public"] #page-landing .journey-track {
    width: min(calc(100% - 64px), 900px);
    margin-left: auto;
    margin-right: auto;
  }

  .app-container[data-shell-mode="public"] #page-landing #landing-pricing-root {
    width: 100%;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-pricing-grid,
  .app-container[data-shell-mode="public"] #page-landing .landing-pricing-note {
    width: min(calc(100% - 64px), 900px);
    margin-left: auto;
    margin-right: auto;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-pricing-grid {
    gap: 24px;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-bottom-cta {
    margin-top: 56px;
    padding: 72px 32px 58px;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-bottom-cta-actions {
    width: min(100%, 360px);
    padding: 0;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-footer {
    margin-top: 48px;
    padding: 38px 32px 24px;
  }

  .app-container[data-shell-mode="public"] #page-landing .landing-footer-container {
    width: min(calc(100% - 64px), 900px);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .app-container[data-user-role="field_officer"],
  .app-container[data-user-role="barangay_official"] {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr);
    width: 100%;
    height: 100vh;
    overflow: hidden;
    border-radius: 0;
    background: #f5f7f6;
  }

  .app-container[data-user-role="field_officer"] #page-reports,
  .app-container[data-user-role="barangay_official"] #page-reports {
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 24px 32px 48px;
  }

  .app-container[data-user-role="field_officer"] #page-reports.active,
  .app-container[data-user-role="barangay_official"] #page-reports.active {
    display: flex;
    flex-direction: column;
  }

  #reports-desktop-list-heading { order: 1; }
  #reports-desktop-dual-list { order: 2; }
  #reports-desktop-matrix-heading { order: 3; }
  #reports-desktop-matrix-workspaces { order: 4; }
  #fo-matrix-view-shell { order: 5; }
  #reports-view-switcher,
  #reports-status-filter-row,
  #list-controls-wrapper,
  #reports-list-container,
  #reports-list-pagination { order: 6; }

  .reports-desktop-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .reports-desktop-matrix-workspaces {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    width: 100%;
    margin: 12px auto 14px;
  }

  .reports-desktop-matrix-workspace {
    min-width: 0;
    padding: 0 20px 18px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(16, 24, 40, 0.045);
  }

  .reports-desktop-matrix-workspace-header {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .reports-desktop-matrix-workspace-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 14.5px;
  }

  .reports-desktop-matrix-workspace-header p {
    margin: 2px 0 0;
    color: var(--text-light);
    font-size: 11px;
  }

  .reports-desktop-matrix-maximize {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
  }

  .reports-desktop-matrix-maximize:hover,
  .reports-desktop-matrix-export:hover,
  .modal-desktop-matrix-export:hover {
    border-color: color-mix(in srgb, var(--primary-color) 35%, var(--border-color));
    background: rgba(var(--primary-rgb), 0.06);
  }

  .reports-desktop-matrix-maximize svg {
    width: 16px;
    height: 16px;
  }

  .reports-desktop-matrix-export,
  .modal-desktop-matrix-export {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    color: var(--primary-color);
    background: #fff;
    cursor: pointer;
  }

  .reports-desktop-matrix-export svg,
  .modal-desktop-matrix-export svg {
    width: 16px;
    height: 16px;
  }

  .reports-desktop-matrix-export-wrap,
  .modal-desktop-matrix-export-wrap {
    position: relative;
    align-self: end;
  }

  .modal-desktop-matrix-export-wrap {
    align-self: center !important;
  }

  .reports-desktop-matrix-export-menu,
  .modal-desktop-matrix-export-menu {
    right: 0;
    left: auto;
    min-width: 92px;
    z-index: 30;
  }

  .reports-desktop-matrix-export-menu .custom-dropdown-item,
  .modal-desktop-matrix-export-menu .custom-dropdown-item {
    width: 100%;
    border: 0;
    font-family: var(--font-main);
    text-align: left;
    cursor: pointer;
  }

  .reports-desktop-matrix-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(110px, 0.75fr) auto;
    gap: 8px;
    align-items: end;
    margin: 10px 0 12px;
  }

  .reports-desktop-matrix-filter-row.is-type-hidden {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .reports-desktop-matrix-workspace .reports-desktop-matrix-frequency {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  [data-matrix-category="custom"] .reports-desktop-matrix-frequency {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .reports-desktop-matrix-filter-row .cs-trigger,
  .reports-desktop-matrix-filter-row .premium-select {
    min-height: 36px;
    height: 36px;
    border-radius: 9px;
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: normal;
  }

  .reports-desktop-matrix-header .matrix-brgy-header {
    min-height: 82px;
    margin-bottom: 10px;
  }

  .reports-desktop-matrix-grid {
    min-width: 0;
    margin-top: 0 !important;
  }

  .reports-desktop-matrix-grid .matrix-table-wrapper {
    margin-bottom: 0;
  }

  .reports-desktop-matrix-grid .matrix-table {
    min-width: 680px;
  }

  .reports-desktop-list-heading h3,
  .reports-desktop-matrix-heading h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 18px;
  }

  .reports-desktop-list-heading p,
  .reports-desktop-matrix-heading p {
    margin: 3px 0 0;
    color: var(--text-light);
    font-size: 11px;
  }

  .reports-desktop-dual-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 12px;
    align-items: start;
  }

  .reports-desktop-column {
    min-width: 0;
    padding: 0 20px 18px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(16, 24, 40, 0.045);
  }

  .reports-desktop-column-header {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .reports-desktop-segments {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.05);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  }

  .reports-desktop-segments--frequency {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reports-desktop-column:nth-child(2) .reports-desktop-segments--frequency {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .reports-desktop-segments button {
    min-width: 0;
    height: 28px;
    padding: 0 4px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-light);
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
  }

  .reports-desktop-segments button.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.25);
  }

  .reports-desktop-column-filters {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr) minmax(100px, 0.75fr);
    gap: 8px;
    margin-bottom: 10px;
  }

  .reports-desktop-column-filters.is-bo {
    grid-template-columns: minmax(0, 1.45fr) minmax(100px, 0.75fr);
  }

  .reports-desktop-list-filter-group {
    min-width: 0;
  }

  .reports-desktop-list-filter-group label {
    margin-bottom: 5px;
    color: var(--text-light);
    font-family: var(--font-main);
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.8px;
    text-transform: uppercase;
  }

  .reports-desktop-list-filter-group .cs-wrapper,
  .reports-desktop-list-filter-group .cs-trigger {
    width: 100%;
    min-width: 0;
  }

  .reports-desktop-list-filter-group .cs-trigger {
    min-height: 36px;
    height: 36px;
    border-radius: 9px;
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 500;
  }

  .reports-desktop-control-label {
    display: block;
    margin: 2px 0 5px;
    color: var(--text-light);
    font-family: var(--font-main);
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.8px;
    text-transform: uppercase;
  }

  .reports-desktop-column-filters select {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 26px 0 9px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    background: #fff;
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: normal;
  }

  .reports-desktop-matrix-workspace .matrix-select-group label {
    font-family: var(--font-main);
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.8px;
  }

  .reports-desktop-matrix-heading {
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
  }

  #page-reports #fo-matrix-view-shell {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
  }

  #page-reports #reports-matrix-frequency-row,
  #page-reports #matrix-header-slot,
  #page-reports #matrix-controls-wrapper,
  #page-reports #reports-grid-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }

  .reports-desktop-column-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 14.5px;
  }

  .reports-desktop-column-header p {
    margin: 2px 0 0;
    color: var(--text-light);
    font-size: 11px;
  }

  .reports-desktop-column .item-card {
    min-height: 76px;
    box-shadow: none;
    border-radius: 10px;
  }

  .reports-desktop-column > [id$="-list-container"] {
    min-height: 76px;
  }

  .reports-desktop-column > [id$="-list-container"] > .item-card:last-child {
    margin-bottom: 0;
  }

  .reports-desktop-empty {
    min-height: 76px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 12px;
    text-align: center;
  }

  body:has(.app-container[data-user-role="field_officer"]),
  body:has(.app-container[data-user-role="barangay_official"]) {
    display: block;
    background: #f5f7f6;
  }

  .device-emulator:has(.app-container[data-user-role="field_officer"]),
  .device-emulator:has(.app-container[data-user-role="barangay_official"]) {
    width: 100%;
    max-width: none;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .app-container[data-user-role="field_officer"] > .header-bar,
  .app-container[data-user-role="barangay_official"] > .header-bar {
    grid-column: 1 / -1;
    grid-row: 1;
    position: relative;
    top: auto;
    height: 64px;
    padding: 0 28px;
    border-radius: 0 !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.16);
  }

  .app-container[data-user-role="field_officer"] .header-logo-container,
  .app-container[data-user-role="barangay_official"] .header-logo-container {
    border-color: rgba(255, 255, 255, 0.72) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.13);
  }

  .app-container[data-user-role="field_officer"] .header-title,
  .app-container[data-user-role="barangay_official"] .header-title {
    color: #fff;
    font-size: 16px;
  }

  .app-container[data-user-role="field_officer"] .header-subtitle,
  .app-container[data-user-role="barangay_official"] .header-subtitle {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
  }

  .app-container[data-user-role="field_officer"] #header-notif-container svg,
  .app-container[data-user-role="barangay_official"] #header-notif-container svg {
    color: #fff !important;
  }

  .app-container[data-user-role="field_officer"] > .app-content,
  .app-container[data-user-role="barangay_official"] > .app-content {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    height: 100%;
    padding-bottom: 48px !important;
    overflow-y: auto !important;
  }

  .app-container[data-user-role="field_officer"] > .bottom-nav,
  .app-container[data-user-role="barangay_official"] > .bottom-nav {
    grid-column: 1;
    grid-row: 2;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    width: 248px !important;
    max-width: none !important;
    height: calc(100vh - 64px) !important;
    padding: 18px 14px !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 5px;
    border: 0 !important;
    border-right: 1px solid var(--border-color) !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: 8px 0 24px rgba(16, 24, 40, 0.045) !important;
    backdrop-filter: none !important;
  }

  .desktop-nav-brand {
    display: none;
    align-items: center;
    gap: 11px;
    min-height: 62px;
    padding: 0 10px 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
  }

  .desktop-nav-brand img {
    width: 42px;
    height: 42px;
    padding: 4px;
    object-fit: contain;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.95);
  }

  .desktop-nav-brand div {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
  }

  .desktop-nav-brand strong {
    font-size: 14.5px;
    letter-spacing: -0.1px;
  }

  .desktop-nav-brand span {
    margin-top: 3px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.68);
    text-transform: uppercase;
    letter-spacing: 1.4px;
  }

  .desktop-nav-section-label {
    display: block;
    padding: 8px 14px 5px;
    color: var(--text-light);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.35px;
    text-transform: uppercase;
  }

  .app-container[data-user-role="field_officer"] .bottom-nav .nav-item,
  .app-container[data-user-role="barangay_official"] .bottom-nav .nav-item {
    flex: none;
    width: 100%;
    height: 45px;
    padding: 0 13px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 11px;
    border-radius: 11px;
    color: #5f6f66;
    font-size: 12.5px;
  }

  .app-container[data-user-role="field_officer"] .bottom-nav .nav-item svg,
  .app-container[data-user-role="barangay_official"] .bottom-nav .nav-item svg {
    width: 19px !important;
    height: 19px !important;
    margin: 0 !important;
    color: currentColor;
  }

  .app-container[data-user-role="field_officer"] .bottom-nav .nav-item.active,
  .app-container[data-user-role="barangay_official"] .bottom-nav .nav-item.active {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.09);
    box-shadow: none;
  }

  .app-container[data-user-role="field_officer"] .bottom-nav .nav-item:not(.active):hover,
  .app-container[data-user-role="barangay_official"] .bottom-nav .nav-item:not(.active):hover {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.055);
  }

  .app-container[data-user-role="field_officer"] .bottom-nav .nav-item.active svg,
  .app-container[data-user-role="barangay_official"] .bottom-nav .nav-item.active svg,
  .app-container[data-user-role="field_officer"] .bottom-nav .nav-item.active span,
  .app-container[data-user-role="barangay_official"] .bottom-nav .nav-item.active span {
    transform: none;
  }

  .app-container[data-user-role="field_officer"] .bottom-nav .nav-badge-count,
  .app-container[data-user-role="barangay_official"] .bottom-nav .nav-badge-count {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    margin-left: -5px;
    flex-shrink: 0;
    transform: none;
  }

  .app-container[data-user-role="field_officer"] .bottom-nav .nav-item.active .nav-badge-count,
  .app-container[data-user-role="barangay_official"] .bottom-nav .nav-item.active .nav-badge-count {
    top: auto;
    transform: none;
  }

  .app-container[data-user-role="barangay_official"] .bottom-nav #nav-submit-btn {
    display: flex !important;
    top: auto;
    width: 100%;
    height: 45px;
    min-height: 45px;
    padding: 0 13px;
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 11px;
    color: #5f6f66 !important;
    border: none;
    border-radius: 11px;
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  .app-container[data-user-role="barangay_official"] .bottom-nav #nav-submit-btn:hover {
    color: var(--primary-color) !important;
    background: rgba(var(--primary-rgb), 0.055);
    box-shadow: none;
    transform: none;
  }

  .app-container[data-user-role="barangay_official"] .bottom-nav #nav-submit-btn.is-submit-modal-open {
    color: var(--primary-color) !important;
    background: rgba(var(--primary-rgb), 0.18) !important;
    box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.24);
  }

  .app-container[data-user-role="barangay_official"] .bottom-nav:has(#nav-submit-btn.is-submit-modal-open) .nav-item.active:not(#nav-submit-btn) {
    color: #5f6f66;
    background: transparent;
  }

  .app-container[data-user-role="barangay_official"] .bottom-nav:has(#nav-submit-btn.is-submit-modal-open) .nav-item.active:not(#nav-submit-btn) span {
    font-weight: 500;
  }

  .app-container[data-user-role="barangay_official"] .bottom-nav #nav-submit-btn:active {
    transform: none;
  }

  .app-container[data-user-role="barangay_official"] .bottom-nav #nav-submit-btn .submit-label-mobile {
    display: none !important;
  }

  .app-container[data-user-role="barangay_official"] .bottom-nav #nav-submit-btn .submit-label-desktop {
    display: inline-block !important;
    color: inherit;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    transform: none;
  }

  .app-container[data-user-role="barangay_official"] .bottom-nav #nav-submit-pulse-ring {
    display: none !important;
    animation: none;
  }

  /* Pulse the '+' icon only on desktop sidebar when active submit reports exist */
  .app-container[data-user-role="barangay_official"] .bottom-nav #nav-submit-btn.has-submit-pulse i,
  .app-container[data-user-role="barangay_official"] .bottom-nav #nav-submit-btn.has-submit-pulse svg {
    color: var(--accent-color) !important;
    animation: desktop-submit-plus-pulse 2.2s infinite ease-in-out;
    transform-origin: center center;
  }

  @keyframes desktop-submit-plus-pulse {
    0%, 100% {
      transform: scale(1);
      filter: drop-shadow(0 0 0 rgba(var(--accent-rgb), 0));
    }
    50% {
      transform: scale(1.26);
      filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.55));
    }
  }

  .app-container[data-user-role="barangay_official"] #page-bo-home .desktop-dashboard-action {
    display: none;
  }

  .app-container[data-user-role="field_officer"] .bottom-nav #nav-profile,
  .app-container[data-user-role="barangay_official"] .bottom-nav #nav-profile {
    margin-top: auto;
    color: #5f6f66;
    border: none;
    background: rgba(var(--primary-rgb), 0.035);
  }

  .app-container[data-user-role="field_officer"] .bottom-nav #nav-create-custom-report {
    display: flex !important;
    min-height: 45px;
    margin-top: auto;
    color: #5f6f66;
    border: none;
    background: transparent;
    box-shadow: none;
  }


  .app-container[data-user-role="field_officer"] .bottom-nav #nav-create-custom-report:hover {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.055);
  }

  .app-container[data-user-role="field_officer"] .bottom-nav #nav-create-custom-report.is-custom-report-modal-open {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.18);
    box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.24);
  }

  .app-container[data-user-role="field_officer"] .bottom-nav:has(#nav-create-custom-report.is-custom-report-modal-open) .nav-item.active:not(#nav-create-custom-report) {
    color: #5f6f66;
    background: transparent;
  }

  .app-container[data-user-role="field_officer"] .bottom-nav:has(#nav-create-custom-report.is-custom-report-modal-open) .nav-item.active:not(#nav-create-custom-report) span {
    font-weight: 500;
  }

  .app-container[data-user-role="field_officer"] .bottom-nav #nav-profile {
    margin-top: 4px;
  }

  .app-container[data-user-role="field_officer"] #page-fo-home .desktop-dashboard-action {
    display: none;
  }

  .app-container[data-user-role="field_officer"] .bottom-nav #nav-profile.active,
  .app-container[data-user-role="barangay_official"] .bottom-nav #nav-profile.active {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.09);
  }

  #page-bo-home,
  #page-fo-home {
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 24px 32px 48px;
  }

  .desktop-dashboard-heading {
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: relative;
    min-height: 38px;
    margin-bottom: 18px;
  }

  .desktop-dashboard-heading h2 {
    color: var(--primary-color);
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0;
  }

  .desktop-dashboard-action {
    width: auto;
    min-width: 210px;
    height: 46px;
    margin: 0;
    padding: 0 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    font-size: 12.5px;
    position: absolute;
    right: 0;
    bottom: -58px;
    z-index: 4;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: 1px solid rgba(var(--primary-rgb), 0.22);
    box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.2);
  }

  .desktop-dashboard-action svg {
    width: 17px;
    height: 17px;
  }

  .desktop-dashboard-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 11px 24px rgba(var(--primary-rgb), 0.26);
  }

  #page-bo-home .dashboard-metrics-zone,
  #page-fo-home .dashboard-metrics-zone {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
    align-items: start;
    margin: 0;
    padding: 0;
    position: relative;
  }

  #page-bo-home .view-switcher-row,
  #page-fo-home .view-switcher-row {
    position: absolute;
    left: 0;
    right: auto;
    top: -54px;
    z-index: 3;
    width: calc(50% - 10px);
    margin: 0;
  }

  #page-bo-home > .dashboard-metrics-zone > .view-switcher-row,
  #page-fo-home > .dashboard-metrics-zone > .view-switcher-row {
    display: none;
  }

  .desktop-home-category-heading {
    display: block;
    margin: 8px 0 14px;
  }

  .desktop-home-category-heading h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 17px;
  }

  .desktop-home-category-heading p {
    margin: 3px 0 0;
    color: var(--text-light);
    font-size: 11px;
  }

  .desktop-home-category-heading--custom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
  }

  .desktop-custom-home-section {
    display: block;
    margin-top: 26px;
  }

  .desktop-custom-home-metrics,
  .desktop-custom-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
  }

  .desktop-custom-home-grid {
    margin-top: 6px;
  }

  .desktop-custom-home-section .desktop-custom-home-scorecard {
    padding: 0;
    overflow: visible;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
  }

  .desktop-custom-home-scorecard .scorecard-card {
    width: 100%;
    margin: 0;
    opacity: 1 !important;
  }

  .desktop-custom-slider-shell {
    position: static;
  }

  .desktop-custom-slider-container {
    display: flex;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .desktop-custom-slider-container::-webkit-scrollbar {
    display: none;
  }

  #page-bo-home .bo-slider-track--regular .bo-slider-container,
  #page-fo-home .fo-slider-track--regular .fo-slider-container {
    padding-bottom: 0;
  }

  .desktop-custom-slider-container .slide-card {
    display: block;
    width: 100%;
    flex: 0 0 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    opacity: 0.45 !important;
    transform: scale(0.9);
    filter: blur(1.5px);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease, filter 0.5s ease;
  }

  .desktop-custom-slider-container .slide-card.active {
    display: block;
    opacity: 1 !important;
    transform: scale(1);
    filter: blur(0);
  }

  .desktop-slider-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 26px;
    margin-top: 6px;
  }

  .desktop-custom-slider-arrow,
  .desktop-regular-slider-arrow {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--primary-color);
    box-shadow: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  }

  .desktop-custom-slider-arrow:hover:not(:disabled),
  .desktop-regular-slider-arrow:hover:not(:disabled) {
    background: rgba(31, 101, 67, 0.09);
    transform: scale(1.08);
  }

  .desktop-custom-slider-arrow:focus-visible,
  .desktop-regular-slider-arrow:focus-visible {
    outline: 2px solid rgba(31, 101, 67, 0.35);
    outline-offset: 2px;
  }

  .desktop-custom-slider-arrow:disabled,
  .desktop-regular-slider-arrow:disabled {
    opacity: 0.28;
    pointer-events: none;
  }

  .desktop-custom-slider-arrow svg,
  .desktop-regular-slider-arrow svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
  }

  .desktop-slider-navigation .fo-slider-dots,
  .desktop-slider-navigation .bo-slider-dots {
    min-width: 72px;
    margin: 0 !important;
  }

  .desktop-custom-slider-dots button {
    min-width: 0;
    padding: 0;
    border: 0;
    appearance: none;
  }

  #page-bo-home .desktop-custom-home-stats,
  #page-fo-home .desktop-custom-home-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(3, 82px);
    gap: 10px;
    margin: 0;
  }

  .desktop-custom-home-section .dashboard-five-entry-list {
    min-height: 76px !important;
  }

  .desktop-custom-home-empty {
    min-height: 76px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 11px;
  }

  #page-bo-home .dashboard-metrics-zone.is-custom-mode .bo-slider-track--regular,
  #page-fo-home .dashboard-metrics-zone.is-custom-mode .fo-slider-track--regular {
    position: relative;
    visibility: visible;
    pointer-events: auto;
    z-index: auto;
  }

  #page-bo-home .bo-slider-track--custom,
  #page-fo-home .fo-slider-track--custom {
    position: absolute !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -1 !important;
  }

  #page-bo-home .dashboard-report-toggle,
  #page-fo-home .dashboard-report-toggle {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 4px;
    gap: 4px;
    border-radius: 12px;
    border-color: #d8e1dc;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 5px 14px rgba(16, 24, 40, 0.055);
  }

  #page-bo-home .dashboard-report-toggle-btn,
  #page-fo-home .dashboard-report-toggle-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 11.5px;
    color: #607068;
  }

  #page-bo-home .dashboard-report-toggle-btn.is-active,
  #page-fo-home .dashboard-report-toggle-btn.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
  }

  #page-bo-home .bo-slider-outer,
  #page-fo-home .fo-slider-outer {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin-bottom: 0;
  }

  #page-bo-home .dashboard-metrics-zone > .stat-grid,
  #page-fo-home .dashboard-metrics-zone > .stat-grid {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(3, 82px);
    gap: 10px;
    margin-bottom: 0;
  }

  #page-bo-home .stat-card,
  #page-fo-home .stat-card {
    min-height: 0;
    height: 82px;
    padding: 12px 16px;
    justify-content: center;
    box-shadow: none;
    background: #fff;
  }

  #page-bo-home .stat-card--action-needed,
  #page-fo-home .stat-card--action-needed {
    --dashboard-attention-color: var(--primary-color);
  }

  #page-bo-home .stat-card--action-needed::after,
  #page-fo-home .stat-card--action-needed::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 1.5px;
    border-radius: inherit;
    pointer-events: none;
    background: conic-gradient(
      from var(--dashboard-attention-angle),
      transparent 0deg 245deg,
      color-mix(in srgb, var(--dashboard-attention-color) 12%, transparent) 275deg,
      color-mix(in srgb, var(--dashboard-attention-color) 78%, transparent) 315deg,
      color-mix(in srgb, var(--dashboard-attention-color) 18%, transparent) 345deg,
      transparent 360deg
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: dashboard-stat-border-travel 4.5s linear infinite;
  }

  #page-fo-home .stat-card.review.stat-card--action-needed {
    --dashboard-attention-color: var(--status-review);
  }

  #page-bo-home .stat-card.returned.stat-card--action-needed {
    --dashboard-attention-color: var(--status-returned);
  }

  #page-bo-home .stat-label,
  #page-fo-home .stat-label {
    font-size: 11.5px;
  }

  #page-bo-home .stat-value,
  #page-fo-home .stat-value {
    margin-top: 4px;
    font-size: 26px;
  }

  #page-bo-home .scorecard-card,
  #page-fo-home .scorecard-card {
    min-height: 0;
    height: 266px;
    margin-bottom: 0;
    padding: 22px 24px;
    border-radius: 16px;
  }

  #page-bo-home .scorecard-score,
  #page-fo-home .scorecard-score {
    font-size: 48px;
  }

  #page-bo-home .fo-slider-dots,
  #page-bo-home .bo-slider-dots,
  #page-fo-home .fo-slider-dots,
  #page-fo-home .bo-slider-dots {
    margin: 8px 0 0;
  }

  .desktop-dashboard-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 6px;
    align-items: start;
  }

  .desktop-dashboard-panel {
    min-width: 0;
    padding: 0 18px 14px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(16, 24, 40, 0.045);
  }

  .desktop-dashboard-panel .dashboard-section-divider {
    margin-top: 0;
    padding-top: 14px;
    background-image: none;
  }

  .desktop-dashboard-panel .announcement-box,
  .desktop-dashboard-panel .item-card {
    min-height: 76px;
    box-shadow: none;
    border-radius: 10px;
  }

  .desktop-dashboard-panel .dashboard-five-entry-list,
  .desktop-dashboard-panel--scorecards > [id$="-scorecards-list"],
  .desktop-custom-barangay-scorecards-list {
    min-height: 76px;
  }

  .desktop-dashboard-panel .dashboard-five-entry-list > :last-child,
  .desktop-dashboard-panel--scorecards > [id$="-scorecards-list"] > :last-child,
  .desktop-custom-barangay-scorecards-list > :last-child {
    margin-bottom: 0;
  }

  .desktop-dashboard-panel .dashboard-five-entry-list > p:only-child,
  .desktop-dashboard-panel--scorecards > [id$="-scorecards-list"] > p:only-child,
  .desktop-custom-barangay-scorecards-list > p:only-child {
    min-height: 76px;
    margin: 0;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .desktop-dashboard-columns--fo > .desktop-dashboard-activity-stack {
    grid-column: 2;
    grid-row: 1;
  }

  .desktop-dashboard-activity-stack {
    display: grid;
    gap: 20px;
    min-width: 0;
  }

  .desktop-dashboard-columns--fo > .desktop-dashboard-panel--scorecards {
    grid-column: 1;
    grid-row: 1;
  }

  #page-fo-home #fo-scorecard-sort-dropdown::before {
    content: "Sort";
    margin-right: 7px;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 700;
  }

  #page-fo-home #fo-scorecard-sort-dropdown {
    display: flex;
    align-items: center;
  }

  #page-fo-home .desktop-custom-scorecard-sort-dropdown {
    display: flex;
    align-items: center;
  }

  #page-fo-home .desktop-custom-scorecard-sort-dropdown::before {
    content: "Sort";
    margin-right: 7px;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 700;
  }

  #page-fo-home .fo-create-report-mobile {
    display: none;
  }

  #page-fo-home > .dashboard-section-divider,
  #page-bo-home > .dashboard-section-divider {
    margin-top: 18px;
  }
}

/* FO Requests desktop workspace. Compact layouts retain the segmented view. */
@media (min-width: 1200px) {
  .app-container[data-user-role="field_officer"] #page-fo-requests {
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 24px 32px 48px;
  }

  .app-container[data-user-role="field_officer"] #page-fo-requests.active {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
  }

  #page-fo-requests > .view-switcher-row {
    display: none !important;
  }

  #fo-view-directory-container,
  #fo-view-claims-container {
    display: flex !important;
    min-width: 0;
    min-height: 620px;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: 0 9px 24px rgba(16, 24, 40, 0.055);
  }

  #page-fo-requests .section-title-wrapper {
    min-height: 40px;
    margin: 0 0 16px !important;
    align-items: flex-start;
  }

  #page-fo-requests .section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px !important;
  }

  #page-fo-requests .fo-request-panel-count {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--card-bg);
    border-radius: 999px;
    color: #fff;
    background: var(--status-missing);
    box-shadow: 0 0 4px rgba(220, 38, 38, 0.3);
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
  }

  #fo-directory-filter-container {
    margin-bottom: 10px !important;
  }

  #fo-directory-filter-container > .matrix-select-group {
    width: 100% !important;
  }

  #fo-directory-total-count {
    display: block;
    margin: 0 0 10px;
    text-align: right;
  }

  #fo-barangay-monitor-container,
  #fo-claims-list-container {
    width: 100%;
    gap: 10px !important;
  }

  #fo-barangay-monitor-container {
    flex: 1;
    margin-bottom: 14px !important;
  }

  #fo-claims-list-container {
    flex: 1;
    margin-bottom: 0 !important;
  }

  #page-fo-requests .mgmt-card,
  #fo-claims-list-container > .accordion-item {
    border-radius: 12px !important;
    box-shadow: none !important;
  }

  #page-fo-requests .mgmt-card {
    padding: 13px 15px;
  }

  #fo-claims-list-container > .accordion-item {
    padding: 16px !important;
    border-width: 1px !important;
    border-left-width: 4px !important;
  }

  #fo-claims-list-container > p:only-child,
  #fo-barangay-monitor-container > p:only-child {
    min-height: 112px;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    background: rgba(var(--primary-rgb), 0.018) !important;
  }

  #fo-directory-pagination {
    margin-top: auto;
  }
}

/* FO Manage desktop: two accordion columns with no top segmentation. */
@media (min-width: 1200px) {
  .app-container[data-user-role="field_officer"] #page-manage {
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 24px 32px 48px;
  }

  .app-container[data-user-role="field_officer"] #page-manage.active {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
    align-content: start;
  }

  #page-manage > .view-switcher-row:first-child {
    display: none !important;
  }

  #page-manage > .fo-manage-desktop-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  #page-manage > #fo-manage-desktop-left-column {
    grid-column: 1;
  }

  #page-manage > #fo-manage-desktop-right-column {
    grid-column: 2;
  }

  #page-manage .fo-manage-desktop-resources {
    display: flex !important;
    flex-direction: column;
    gap: 0;
  }

  #page-manage > #fo-manage-files-container {
    display: none !important;
  }

  #page-manage .fo-manage-accordion,
  #page-manage .fo-manage-desktop-resources,
  #page-manage .fo-manage-desktop-export {
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--card-bg);
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
    overflow: hidden;
  }

  #page-manage .fo-manage-accordion {
    gap: 0;
  }

  #page-manage .fo-manage-accordion > .accordion-item,
  #page-manage .fo-manage-desktop-resources > .accordion-item {
    border: 0;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: none;
  }

  #page-manage .fo-manage-accordion > .accordion-item:last-child,
  #page-manage .fo-manage-desktop-resources > .accordion-item:last-child {
    border-bottom: 0;
  }

  #page-manage .fo-manage-desktop-export {
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
  }

  #page-manage .accordion-header {
    min-height: 52px;
    padding: 14px 18px;
  }

  #page-manage .accordion-item:not(.active) > .accordion-header {
    min-height: 44px;
    padding-block: 9px;
  }

  #page-manage .accordion-header span {
    font-size: 15px;
  }

  #page-manage .accordion-content-inner {
    padding: 0 18px;
  }

  #page-manage .accordion-item.active .accordion-content-inner {
    padding: 14px 18px 18px;
  }

  #page-manage .fo-manage-accordion-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.08);
  }

  #page-manage .fo-manage-accordion-toolbar > div {
    min-width: 0;
  }

  #page-manage .fo-manage-accordion-toolbar strong,
  #page-manage .fo-manage-accordion-toolbar small {
    display: block;
  }

  #page-manage .fo-manage-accordion-toolbar strong {
    color: var(--primary-color);
    font-size: 13.5px;
    line-height: 1.3;
  }

  #page-manage .fo-manage-accordion-toolbar small {
    margin-top: 2px;
    color: var(--text-light);
    font-size: 10.5px;
    line-height: 1.35;
  }

  #page-manage .fo-manage-accordion-toolbar .btn-primary {
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 18px;
    white-space: nowrap;
  }

  #page-manage #fo-desktop-memos-list,
  #page-manage #fo-desktop-templates-list {
    gap: 8px;
    margin-bottom: 12px;
  }

  #page-manage .fo-manage-desktop-empty {
    min-height: 116px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-light);
    background: rgba(var(--primary-rgb), 0.018);
    font-size: 12px;
  }

  #page-manage .mgmt-card {
    box-shadow: none;
  }

  #page-manage .fo-manage-desktop-export > .accordion-content-inner {
    padding: 0;
  }

  #page-manage #fo-manage-export-host {
    padding: 0;
  }

  #page-manage #reports-export-container {
    margin-top: 0 !important;
  }

  #page-manage #reports-export-container .export-controls-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

/* FO/BO desktop header actions. Compact layouts retain the profile logout button. */
@media (min-width: 1200px) {
  #page-profile .profile-mobile-logout {
    display: none !important;
  }

  .app-container[data-user-role="field_officer"] .header-logout-btn,
  .app-container[data-user-role="barangay_official"] .header-logout-btn {
    width: 36px;
    height: 36px;
    margin-left: 6px;
    padding: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  }

  .app-container[data-user-role="field_officer"] .header-logout-btn:hover,
  .app-container[data-user-role="barangay_official"] .header-logout-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.12);
  }

  .app-container[data-user-role="field_officer"] .header-logout-btn:focus-visible,
  .app-container[data-user-role="barangay_official"] .header-logout-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
  }

  .app-container[data-user-role="field_officer"] .header-logout-btn svg,
  .app-container[data-user-role="barangay_official"] .header-logout-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* ================================================================
   Maroon Theme & Theme Picker Styles
   ================================================================ */
[data-theme="red"] {
  --primary-rgb: 100, 43, 47; /* rgb of #642b2f */
  --primary-color: rgb(var(--primary-rgb));
  --primary-light-rgb: 133, 61, 66; /* rgb of #853d42 */
  --primary-light: rgb(var(--primary-light-rgb));
  --primary-dark: #3f1719;
  --primary-glow: rgba(var(--primary-light-rgb), 0.15);
  --accent-rgb: 168, 80, 86; /* rgb of #a85056 */
  --accent-color: rgb(var(--accent-rgb));
  --bg-color: #faf6f6;
  --card-bg: #ffffff;
  --text-dark: #000000;  /* Keep font text black */
  --text-light: #444444; /* Muted text is very dark gray/black */
  --border-color: #ebdcdc;
}

/* Backup anti-flash (primary rule is inlined in index.html theme boot) */
html[data-theme="red"] .landing-logo:not([src*="logo_transparent_3"]),
html[data-theme="red"] .pwa-banner-logo:not([src*="logo_transparent_3"]),
html[data-theme="red"] img[data-themed-logo][src*="logo_transparent.png"] {
  visibility: hidden;
}

/* Maroon Theme SVGs (Responsive inputs & select chevrons) */
[data-theme="red"] input[type="date"].form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23642b2f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") !important;
}
[data-theme="red"] select.form-control,
[data-theme="red"] .premium-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23642b2f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}
[data-theme="red"] .premium-select-mini {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23642b2f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

/* Theme Toggle Switch Customizations (Green to Maroon) */
.theme-switch .theme-slider {
  background: linear-gradient(135deg, #1b4d2c 0%, #2d6a4f 100%); /* Green on the left */
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}
.theme-switch input:checked + .theme-slider {
  background: linear-gradient(135deg, #642b2f 0%, #853d42 100%); /* Maroon on the right */
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* FO Send Reminders modal */
#modal-fo-send-reminders .settings-action-row {
  margin-top: 16px;
}

#modal-delete-submission .settings-action-row {
  margin-top: 16px;
}

.delete-submission-detail-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-color);
}

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

.delete-submission-detail-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1.3;
}

.delete-submission-detail-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

#modal-delete-submission .delete-submission-confirm-btn {
  background-color: #dc2626 !important;
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 700;
}

#modal-delete-submission .delete-submission-confirm-btn:hover:not(:disabled) {
  background-color: #b91c1c !important;
  background: #b91c1c !important;
  border-color: #b91c1c !important;
}

#modal-delete-submission .delete-submission-confirm-btn:disabled,
#modal-delete-submission .delete-submission-confirm-btn[disabled] {
  background-color: #b91c1c !important;
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
  opacity: 1 !important;
  cursor: wait !important;
}

.fo-remind-summary-strip {
  display: flex;
  align-items: stretch;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}

.fo-remind-summary-item {
  flex: 1;
  padding: 12px 10px;
  text-align: center;
}

.fo-remind-summary-divider {
  width: 1px;
  background: var(--border-color);
  flex-shrink: 0;
}

.fo-remind-stat-val {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.1;
}

.fo-remind-stat-lbl {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1.3;
}

.fo-remind-list-panel {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
}

#modal-fo-send-reminders .form-group label.fo-remind-select-all-row,
#modal-fo-send-reminders .form-group label.fo-remind-modal-item {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  font-family: var(--font-main);
  letter-spacing: normal;
}

.fo-remind-select-all-row {
  gap: 10px;
  padding: 11px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  user-select: none;
  background: rgba(var(--primary-rgb), 0.04);
  border-bottom: 1px solid var(--border-color);
}

.fo-remind-select-all-row span {
  line-height: 1.2;
}

.fo-remind-select-all-row input,
.fo-remind-modal-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  margin: 0;
  flex-shrink: 0;
}

.fo-remind-modal-list {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.fo-remind-modal-item {
  gap: 10px;
  padding: 11px 12px;
  border: none;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: background-color var(--transition-speed);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

.fo-remind-modal-item:last-child {
  border-bottom: none;
}

.fo-remind-modal-item:hover {
  background: rgba(var(--primary-rgb), 0.03);
}

.fo-remind-modal-item.is-selected {
  background: rgba(var(--primary-rgb), 0.06);
}

.fo-remind-modal-item-name {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fo-remind-count-pill {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--status-missing);
  background: var(--status-missing-bg);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
  line-height: 1.2;
}

.fo-remind-modal-empty {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  padding: 20px 12px;
  margin: 0;
}

