/* ============================================================
   GramShala Civic Platform Stylesheet
   Visual Redesign: Rural Karnataka Civic-Tech Platform
   Design Tokens: Warm Cream Beige (#F5F0E5, ~60%),
                  Muted Sage Green (#87977B, ~35%),
                  Deep Burgundy (#672D3D, <= 5%)
   Texture: Refined, tactile organic handmade paper grain
   Watermarks: Subtle animated Karnataka Gram Panchayat motifs
   ============================================================ */

:root {
  /* Core Foundation Colors */
  --cream-base: #F5F0E5;       /* Dominant warm cream canvas (55–65%) */
  --cream-surface: #FAF7F0;    /* Soft elevated surface */
  --cream-card: #FFFFFF;       /* Crisp warm-white card background */
  --cream-subtle: #EFE8DA;     /* Secondary section / hovered surface */
  --cream-muted: #E5DDCB;      /* Soft neutral divider */
  --cream-border: #D8CEB9;     /* Defined surface border */

  /* Muted Sage Green Identity (30–40%) */
  --sage: #87977B;             /* Base muted sage green (Identity & visual accents) */
  --sage-hover: #758569;       /* Interactive hover state */
  --sage-deep: #3A4B33;        /* Dark accessible sage for high-contrast text & primary actions */
  --sage-dark: #2F3D2A;        /* Deeper forest-sage for headings & high-contrast elements */
  --sage-subtle: #EBF0E7;      /* Very soft sage wash for badges, active tabs, highlights */
  --sage-border: #C6D1BE;      /* Soft sage border for cards, badges, inputs */
  --sage-shadow: rgba(135, 151, 123, 0.16);

  /* Deep Burgundy (Supporting Accent: <= 5%) */
  --burgundy: #672D3D;         /* Deep burgundy (Restrained accent, selected links, minor emphasis) */
  --burgundy-hover: #532331;   /* Hover state for burgundy accents */
  --burgundy-subtle: #F6EDF0;  /* Very soft blush tint for special accent tags */
  --burgundy-border: #DFCAD1;  /* Soft burgundy accent border */

  /* Accessible Typography */
  --text: #222B1E;             /* Deep earthy charcoal-green (Contrast > 11:1 on cream) */
  --text-muted: #4B5646;       /* Medium earthy neutral (Contrast > 5.5:1 on cream, WCAG AA) */
  --text-subtle: #6D7768;      /* Supporting metadata / captions (Contrast > 4.5:1) */

  /* Semantic Aliases (seamless backward compatibility with existing styles) */
  --bg: var(--cream-base);
  --surface: var(--cream-card);
  --surface-subtle: var(--cream-surface);
  --surface-muted: var(--cream-subtle);
  --border: var(--cream-border);
  --border-subtle: var(--cream-muted);
  --border-focus: var(--sage-deep);

  --primary: var(--sage-deep);
  --primary-hover: var(--sage-dark);
  --primary-subtle: var(--sage-subtle);
  --primary-border: var(--sage-border);

  /* Accent Tokens */
  --accent-burgundy: var(--burgundy);
  --accent-burgundy-hover: var(--burgundy-hover);
  --accent-burgundy-subtle: var(--burgundy-subtle);

  /* Status Tokens (Harmonized with earthy palette) */
  --status-new-bg: #EAEFF5;
  --status-new-text: #2C4D6F;
  --status-new-border: #C5D4E3;

  --status-review-bg: #F7EFE1;
  --status-review-text: #7A531C;
  --status-review-border: #E5CCA2;

  --status-progress-bg: #EAF3EC;
  --status-progress-text: #2E5D38;
  --status-progress-border: #BEDBC2;

  --status-resolved-bg: #E7EFE6;
  --status-resolved-text: #234E2A;
  --status-resolved-border: #B7D1B5;

  --status-closed-bg: #ECE8DE;
  --status-closed-text: #505649;
  --status-closed-border: #D5CEBE;

  /* Priority & Alerts */
  --danger: #8C2222;
  --danger-bg: #FDF2F2;
  --danger-border: #F7C8C8;

  --warning: #854E15;
  --warning-bg: #FDF8EE;
  --warning-border: #F3DCB0;

  /* Elevation & Geometry */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-subtle: 0 1px 3px rgba(34, 43, 30, 0.04);
  --shadow-card: 0 2px 6px rgba(34, 43, 30, 0.05), 0 1px 2px rgba(34, 43, 30, 0.03);
}

/* ============================================================
   BASE RESETS & GLOBAL TYPOGRAPHY
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  /* Refined organic handmade paper texture: microscopic fibers and speckling (embedded SVG tile) */
  background-image: url("data:image/svg+xml,%3Csvg width='240' height='240' viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 35 Q30 38 48 33 M110 85 Q125 92 145 88 M180 45 Q198 40 215 52 M40 160 Q62 150 80 165 M150 145 Q170 156 192 148 M90 205 Q112 215 130 208' stroke='%2387977B' stroke-width='0.75' stroke-linecap='round' fill='none' opacity='0.08'/%3E%3Cpath d='M75 25 Q68 45 72 65 M190 110 Q196 130 191 148 M35 95 Q42 115 38 132 M135 170 Q142 190 137 208' stroke='%23672D3D' stroke-width='0.5' stroke-linecap='round' fill='none' opacity='0.05'/%3E%3Ccircle cx='55' cy='75' r='0.65' fill='%23672D3D' opacity='0.08'/%3E%3Ccircle cx='165' cy='95' r='0.75' fill='%2387977B' opacity='0.10'/%3E%3Ccircle cx='115' cy='40' r='0.6' fill='%2387977B' opacity='0.08'/%3E%3Ccircle cx='205' cy='180' r='0.7' fill='%2387977B' opacity='0.09'/%3E%3Ccircle cx='28' cy='125' r='0.65' fill='%23672D3D' opacity='0.06'/%3E%3Ccircle cx='95' cy='185' r='0.6' fill='%2387977B' opacity='0.08'/%3E%3Ccircle cx='175' cy='22' r='0.55' fill='%2387977B' opacity='0.07'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 240px 240px;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   GRAM PANCHAYAT WATERMARK LAYER (UNDERSTATED KARNATAKA CIVIC MOTIFS)
   ============================================================ */
.site-watermark-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.watermark-item {
  position: absolute;
  pointer-events: none;
  user-select: none;
  opacity: 0.11;
  transition: opacity 0.3s ease;
}

.watermark-banyan {
  top: 65px;
  left: 10px;
  width: 220px;
  height: auto;
  opacity: 0.12;
  animation: slowFloatA 20s ease-in-out infinite;
}

.watermark-panchayat {
  top: 75px;
  right: 15px;
  width: 200px;
  height: auto;
  opacity: 0.11;
  /* Grounded stationary civic hall */
}

.watermark-tap {
  top: 52%;
  left: 16px;
  width: 140px;
  height: auto;
  opacity: 0.12;
  animation: slowDrift 22s ease-in-out infinite;
}

.watermark-crops {
  top: 62%;
  right: 24px;
  width: 145px;
  height: auto;
  opacity: 0.11;
  /* Stationary agricultural sheaf motif */
}

.watermark-roof {
  bottom: 35px;
  left: 8%;
  width: 170px;
  height: auto;
  opacity: 0.10;
  /* Grounded stationary village home */
}

/* Hero-specific subtle watermarks in home.html */
.hero-watermark {
  position: absolute;
  pointer-events: none;
  user-select: none;
  opacity: 0.10;
  z-index: 0;
}
.hero-watermark-left {
  top: 20px;
  left: 3%;
  width: 170px;
  animation: slowFloatA 21s ease-in-out infinite;
}
.hero-watermark-right {
  bottom: 15px;
  right: 3%;
  width: 165px;
  /* Grounded stationary building */
}

@keyframes slowFloatA {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(0, -7px, 0) rotate(0.4deg);
  }
}

@keyframes slowFloatB {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(-5px, 5px, 0) rotate(-0.3deg);
  }
}

@keyframes slowDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(6px, -4px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .watermark-item,
  .hero-watermark {
    animation: none !important;
  }
}

#main {
  position: relative;
  z-index: 1;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}

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

/* Accessible Focus States */
:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-md) 0;
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* Headings & Text Classes */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  margin-top: 0;
  font-weight: 700;
  line-height: 1.3;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.text-center { text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--burgundy);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.eyebrow.confirmed {
  color: var(--sage-deep);
}

/* ============================================================
   INTERACTIVE CONTROLS & FORM CONTROLS
   ============================================================ */
button, input, select, textarea {
  font: inherit;
  color: var(--text);
}

input, select, textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 13px;
  background: var(--surface);
  font-size: 16px; /* Prevents auto-zoom on iOS */
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(135, 151, 123, 0.25);
}

button {
  cursor: pointer;
  border: 0;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* Primary Button */
.primary {
  background: var(--primary);
  color: #ffffff;
  padding: 10px 20px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--primary);
}
.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
}

/* Secondary Button */
.secondary {
  background: var(--cream-surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: var(--radius-md);
}
.secondary:hover {
  background: var(--cream-subtle);
  border-color: var(--sage);
  color: var(--text);
}

/* Text Links & Buttons */
.link-button {
  background: none;
  color: var(--primary);
  padding: 4px 6px;
  font-weight: 600;
  border: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.15s ease;
}
.link-button:hover {
  color: var(--burgundy);
  text-decoration: underline;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--sage);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  letter-spacing: 0;
  box-shadow: 0 1px 2px rgba(103, 45, 61, 0.12);
}

/* ============================================================
   SHARED SITE HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream-surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(34, 43, 30, 0.04);
}

.site-header-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.site-brand-name {
  font-size: 15px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  min-height: 38px;
  transition: all 0.15s ease;
}
.site-nav-link:hover {
  color: var(--text);
  background: var(--cream-subtle);
}
.site-nav-link.active {
  color: var(--primary);
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  border-bottom: 2.5px solid var(--burgundy);
  font-weight: 600;
}

.site-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.official-btn {
  background: var(--primary);
  color: #ffffff;
  margin-left: 8px;
}
.official-btn:hover {
  background: var(--primary-hover);
  color: #ffffff;
}
.small-btn {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

/* Mobile Nav Toggle & Drawer */
.mobile-nav-toggle {
  display: none;
  background: var(--cream-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}
.hamburger-icon .bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.2s ease;
}
.mobile-nav-toggle.is-open .hamburger-icon .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-nav-toggle.is-open .hamburger-icon .bar:nth-child(2) {
  opacity: 0;
}
.mobile-nav-toggle.is-open .hamburger-icon .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav-drawer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px 16px;
  background: var(--cream-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.mobile-nav-drawer[hidden] {
  display: none;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  min-height: 44px;
}
.mobile-nav-link:hover {
  background: var(--cream-subtle);
  color: var(--primary);
}
.mobile-nav-link.active {
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  border-left: 3.5px solid var(--burgundy);
  color: var(--primary);
  font-weight: 600;
}
.mobile-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}
.official-mobile-link {
  color: var(--primary);
  font-weight: 600;
}

/* ============================================================
   PAGE CONTAINERS & SECTION WRAPPERS
   ============================================================ */
.page-container {
  max-width: 1080px;
  margin: 32px auto 56px;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}
.page-header {
  margin-bottom: 30px;
}
.page-title {
  font-size: clamp(24px, 3.6vw, 32px);
  margin: 6px 0 8px;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--text);
}
.page-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   HOME PAGE (RESTRAINED, HUMAN, PROFESSIONAL)
   ============================================================ */
.site-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 68px 20px 60px;
  background-color: var(--cream-surface);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}
.brand-name {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--burgundy);
  text-transform: uppercase;
}
.site-hero h1 {
  margin: 8px auto 12px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.site-hero-sub {
  margin: 0 auto 26px;
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 620px;
}
.site-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.site-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* How It Works & Services Sections */
.how-it-works-section, .services-section, .about-section {
  padding: 48px 20px;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.site-section-head {
  text-align: center;
  margin-bottom: 30px;
}
.site-section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 26px);
  font-weight: 700;
}
.site-section-head p {
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.55;
  font-size: 15px;
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.step-card:hover {
  border-color: var(--sage);
  box-shadow: var(--shadow-card);
}
.step-index, .step-number {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--burgundy);
  background: var(--burgundy-subtle);
  border: 1px solid rgba(103, 45, 61, 0.22);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 26px;
  margin-bottom: 14px;
}
.step-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}
.step-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Services Grid & Outline Icons */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.service-card:hover {
  border-color: var(--sage);
  box-shadow: var(--shadow-card);
}
.service-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--sage-subtle);
  color: var(--sage-deep);
  border: 1px solid var(--sage-border);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.service-icon-wrap svg {
  display: block;
}
.service-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}
.service-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Home Feature Informational Panels (#forms & #ask) */
.home-feature-preview {
  padding: 20px 20px 40px;
  max-width: 1080px;
  margin: 0 auto;
  scroll-margin-top: 70px;
}
.preview-panel, .preview-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-subtle);
}
.preview-header h2 {
  margin: 4px 0 8px;
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 700;
}
.preview-header p {
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 16px;
  font-size: 15px;
  max-width: 720px;
}

.preview-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.preview-feature-list li {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.preview-feature-list li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--burgundy);
  flex-shrink: 0;
}

.preview-action {
  margin-top: 4px;
}

/* Backward-compatible fallback for feature badges if dynamically rendered */
.feature-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.feature-badge {
  background: var(--primary-subtle);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-border);
}

/* ============================================================
   FORMS & ISSUE SUBMISSION
   ============================================================ */
.form-page-container {
  max-width: 740px;
}
.public-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-subtle);
}
.site-form-card {
  margin: 0 auto;
  border-top: 3px solid var(--burgundy);
}
.form-card-header, .public-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.form-card-title {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 700;
}

.public-form {
  display: grid;
  gap: 16px;
}
.form-group {
  display: grid;
  gap: 6px;
}
.public-form label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.req {
  color: var(--burgundy);
  font-weight: 700;
}
.field-help {
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
}
.public-form input, .public-form select, .public-form textarea {
  width: 100%;
}
.public-form input[type=file] {
  padding: 8px 10px;
  background: var(--surface-subtle);
  min-height: 42px;
  font-size: 14px;
}

.pin-input-group, .field-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.pin-button {
  min-height: 42px;
  white-space: nowrap;
  padding: 0 16px;
  font-size: 14px;
}

.field-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 2px 0 0;
  line-height: 1.4;
}
.field-note.verified, .field-note.success {
  color: var(--sage-deep);
  font-weight: 600;
}
.field-note.error {
  color: var(--danger);
  font-weight: 600;
}
.field-note.loading {
  color: #1e40af;
  font-weight: 500;
}

/* Image Previews */
.image-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.image-previews:empty {
  display: none;
}
.preview-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-subtle);
  display: grid;
}
.preview-card img {
  width: 100%;
  height: 84px;
  object-fit: cover;
  display: block;
}
.preview-remove {
  background: var(--surface);
  color: var(--danger);
  border: 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  padding: 6px;
  min-height: 32px;
  cursor: pointer;
}
.preview-remove:hover {
  background: var(--danger-bg);
}

/* Voice Input Box */
.voice-box {
  border: 1px solid var(--sage-border);
  background: var(--sage-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: grid;
  gap: 8px;
}
.voice-box-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.voice-box-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.voice-actions {
  display: flex;
  gap: 8px;
}
.voice-button {
  min-height: 40px;
  background: var(--sage-deep);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
.voice-button.stop {
  background: var(--burgundy);
}
.voice-button:hover {
  opacity: 0.92;
}
.btn-icon {
  display: block;
  flex-shrink: 0;
}

/* Audio Preview Element in Form */
.audio-preview-box {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--sage-border);
  background: var(--cream-surface);
  border-radius: var(--radius-md);
}
.audio-preview-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--sage-deep);
  margin-bottom: 6px;
}
.audio-player-element {
  width: 100%;
  height: 38px;
}
.remove-audio-link {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  margin-top: 4px;
}
.remove-audio-link:hover {
  text-decoration: underline;
}

.form-submit-row {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.submit-button {
  min-height: 46px;
  font-weight: 600;
  font-size: 15px;
  width: 100%;
}

.public-form ul.errorlist {
  margin: 0;
  padding: 6px 12px 6px 26px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-weight: 500;
  font-size: 13px;
}

.alert {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 500;
}
.alert.danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.hidden {
  display: none !important;
}

/* ============================================================
   SUBMISSION CONFIRMATION / SUCCESS CARD
   ============================================================ */
.success-card {
  text-align: center;
  max-width: 600px;
  margin: 20px auto;
  padding: 36px 28px;
}
.success-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sage-subtle);
  color: var(--sage-deep);
  border: 1px solid var(--sage-border);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}
.success-id-box {
  background: var(--sage-subtle);
  border: 1px solid var(--sage-border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin: 16px auto;
  display: inline-block;
  min-width: 260px;
}
.id-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.id-value {
  font-size: 22px;
  color: var(--sage-deep);
  letter-spacing: 0.04em;
  font-weight: 700;
}
.success-desc {
  max-width: 460px;
  margin: 0 auto 20px;
  font-size: 14px;
}
.success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   ABOUT US PAGE (MINIMAL & INFORMATIVE)
   ============================================================ */
.about-hero-card {
  background: var(--cream-surface);
  border: 1px solid var(--border);
  border-left: 3.5px solid var(--burgundy);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-subtle);
}
.about-hero-content h2 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
}
.lead-text {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 10px;
}
.about-hero-content p {
  margin: 0 0 10px;
  line-height: 1.65;
  color: var(--text-muted);
}
.about-hero-content p:last-child {
  margin-bottom: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
}
.about-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}
.about-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.about-cta-box {
  text-align: center;
  background: var(--cream-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 24px;
  box-shadow: var(--shadow-subtle);
  margin-top: 36px;
}
.about-cta-box h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}
.about-cta-box p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 20px;
  line-height: 1.55;
  font-size: 15px;
}
.about-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   ASK A QUESTION CONTAINER
   ============================================================ */
.ask-page-container {
  max-width: 960px;
}
.chatbot-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--cream-surface);
  box-shadow: var(--shadow-card);
}

/* ============================================================
   SHARED FOOTER
   ============================================================ */
.site-footer {
  background: var(--cream-subtle);
  border-top: 1px solid var(--border);
  padding: 44px 20px 24px;
  margin-top: 48px;
  position: relative;
  z-index: 1;
}
.footer-container {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 28px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.footer-tagline {
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 6px;
  font-size: 14px;
}
.footer-desc {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  max-width: 420px;
}
.footer-heading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin: 0 0 12px;
  font-weight: 700;
}
.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.footer-nav a {
  color: var(--text-muted);
  font-size: 13px;
  transition: color 0.15s ease;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a:hover {
  color: var(--burgundy);
}
.footer-subtext {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 12px;
}
.footer-bottom {
  max-width: 1140px;
  margin: 0 auto;
  padding-top: 16px;
  border-top: 1px solid var(--cream-muted);
  text-align: center;
}

/* ============================================================
   OPERATIONAL DASHBOARD, SETTINGS & AUTH SHELL
   ============================================================ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: #233221;
  color: #ffffff;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid #1c291a;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  padding: 4px 6px 20px;
}
.sidebar .brand-mark {
  background: var(--cream-surface);
  color: var(--primary);
}
.sidebar nav {
  display: grid;
  gap: 4px;
}
.sidebar .nav-item {
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: #d1ded5;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  min-height: 40px;
  transition: background-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
.sidebar .nav-item:hover, .sidebar .nav-item.active {
  background: #2E402B;
  color: #ffffff;
  font-weight: 600;
}
.sidebar .site-link {
  color: #A3CCA7;
}
.sidebar .site-link:hover {
  color: #c9e6cc;
}
.sidebar form {
  margin: 0;
}
.sidebar form .nav-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.user-mini {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 14px 6px 4px;
  display: grid;
  gap: 2px;
}
.user-mini strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}
.user-mini span {
  font-size: 12px;
  color: #9cb8a5;
}

.main {
  flex: 1;
  padding: 28px 32px;
  min-width: 0;
  background-color: var(--bg);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.topbar h1 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 700;
}

.stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  box-shadow: var(--shadow-subtle);
}
.stat span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat strong {
  font-size: 22px;
  color: var(--text);
  font-weight: 700;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
}

.toolbar {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #fafbf9;
}
.toolbar input {
  flex: 1;
}
.toolbar select {
  min-width: 160px;
}

/* Filter Status Notice Banner */
.filter-status-banner {
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.filter-status-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-active-pill {
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.reset-filter-link {
  color: var(--danger);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}
.reset-filter-link:hover {
  text-decoration: underline;
}

/* ============================================================
   DASHBOARD TOOLBAR (COMPACT SEARCH & FILTER TRIGGER)
   ============================================================ */
.dashboard-toolbar {
  padding: 14px 20px;
  background: var(--cream-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1;
  min-width: 240px;
  max-width: 560px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrap input[type="search"] {
  width: 100%;
  min-height: 40px;
  padding: 8px 74px 8px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input-wrap input[type="search"]:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-subtle);
}

.search-submit-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  padding: 0 14px;
  min-height: 32px;
  border: none;
  border-radius: 3px;
  background: var(--primary);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.search-submit-btn:hover {
  background: var(--primary-hover);
}

.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-toggle-btn:hover {
  background: var(--cream-subtle);
  border-color: var(--sage);
}

.filter-toggle-btn.has-filters {
  border-color: var(--sage);
  background: var(--sage-subtle);
  color: var(--sage-deep);
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--burgundy);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.toolbar-reset-link {
  font-size: 12.5px;
  color: var(--burgundy);
  font-weight: 600;
  text-decoration: underline;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.toolbar-reset-link:hover {
  color: var(--burgundy-hover);
}

/* ============================================================
   E-COMMERCE FILTER DRAWER & BACKDROP
   ============================================================ */
.filter-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 49, 33, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1100;
  transition: opacity 0.2s ease;
}

.filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 92vw;
  background: var(--cream-surface);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(35, 49, 33, 0.15);
  z-index: 1110;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

body.drawer-open {
  overflow: hidden;
}

.filter-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--cream-subtle);
}

.drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-drawer-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.drawer-active-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--sage-subtle);
  color: var(--sage-deep);
  border: 1px solid var(--sage-border);
}

.drawer-close-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.drawer-close-btn:hover {
  background: var(--cream-subtle);
  color: var(--text);
  border-color: var(--border);
}

.filter-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  -webkit-overflow-scrolling: touch;
}

.drawer-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.drawer-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.drawer-select,
.drawer-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease;
}

.drawer-select:focus,
.drawer-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-subtle);
}

.drawer-field-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.drawer-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.filter-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--cream-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--burgundy);
  transition: all 0.15s ease;
}

.drawer-reset-btn:hover {
  background: var(--cream-subtle);
  border-color: var(--burgundy);
}

.drawer-apply-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.drawer-apply-btn:hover {
  background: var(--primary-hover);
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--cream-surface);
  gap: 12px;
  flex-wrap: wrap;
}
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.page-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.page-nav-btn:hover:not(.disabled) {
  background: var(--cream-subtle);
  border-color: var(--sage);
}
.page-nav-btn.disabled {
  color: var(--text-subtle);
  background: var(--cream-subtle);
  cursor: not-allowed;
  opacity: 0.7;
}
.page-current {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  padding: 30px 16px;
  text-align: center;
}
.empty-title {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--text);
}

.query-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
  background: var(--surface);
}
th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--cream-subtle);
  font-weight: 600;
}
tr:hover td {
  background: var(--cream-surface);
}

/* Status & Priority Labels (Restrained, Flat, Bordered) */
.status, .priority {
  display: inline-flex;
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}
.status-new {
  background: var(--status-new-bg);
  color: var(--status-new-text);
  border-color: var(--status-new-border);
}
.status-under_review {
  background: var(--status-review-bg);
  color: var(--status-review-text);
  border-color: var(--status-review-border);
}
.status-in_progress {
  background: var(--status-progress-bg);
  color: var(--status-progress-text);
  border-color: var(--status-progress-border);
}
.status-resolved {
  background: var(--status-resolved-bg);
  color: var(--status-resolved-text);
  border-color: var(--status-resolved-border);
}
.status-closed {
  background: var(--status-closed-bg);
  color: var(--status-closed-text);
  border-color: var(--status-closed-border);
}

.priority-low {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}
.priority-medium {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.priority-high {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
.priority-critical {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.empty {
  text-align: center;
  padding: 44px;
  color: var(--text-muted);
}

/* Dashboard Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.modal.hidden {
  display: none;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 49, 33, 0.45);
  backdrop-filter: blur(2px);
}
.modal-card {
  position: relative;
  background: var(--cream-surface);
  width: min(840px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: 20px auto;
  border-radius: var(--radius-lg);
  padding: 26px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px -5px rgba(35, 49, 33, 0.12);
}
.close {
  position: absolute;
  right: 14px;
  top: 14px;
  background: var(--cream-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 20px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.close:hover {
  background: var(--border);
  color: var(--text);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 16px;
}
.detail-header h2 {
  margin: 2px 0 0;
  font-size: 20px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.detail-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 12px;
  background: var(--surface);
}
.detail-section h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.submission {
  white-space: pre-wrap;
  line-height: 1.55;
  background: var(--cream-surface);
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}
.audio-playback-box {
  background: var(--cream-surface);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.stack {
  display: grid;
  gap: 10px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.timeline, .message-list {
  display: grid;
  gap: 8px;
}
.timeline-item, .message-item {
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  background: var(--cream-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
}
.timeline-item p, .message-item p {
  margin: 2px 0;
  font-size: 13px;
}
.timeline-item span, .message-item span {
  font-size: 11px;
  color: var(--text-muted);
}
.image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.image-list a {
  font-size: 13px;
  color: var(--primary);
  text-decoration: underline;
}

/* Settings Layout */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.settings-grid .panel {
  padding: 22px;
}

/* Auth Shell / Login */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
  position: relative;
  z-index: 1;
}
.auth-card {
  width: min(420px, 100%);
  background: var(--cream-surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--burgundy);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.auth-card .brand-mark {
  margin: 0 auto 12px;
}
.auth-title {
  margin: 0 0 2px;
  font-size: 22px;
  font-weight: 700;
}
.auth-subtitle {
  margin: 0 0 20px;
  font-size: 14px;
}
.auth-form {
  text-align: left;
  margin-bottom: 16px;
}
.auth-note {
  margin: 12px 0 0;
}
.auth-footer-nav {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES (FLAWLESS MOBILE, TABLET & DESKTOP)
   ============================================================ */
@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand-col {
    grid-column: span 2;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .mobile-nav-toggle {
    display: inline-flex;
  }

  /* Responsive Watermark Scale on Tablets/Mobile */
  .watermark-banyan { width: 140px; top: 80px; left: -10px; opacity: 0.08; }
  .watermark-panchayat { width: 130px; top: 90px; right: -10px; opacity: 0.075; }
  .watermark-tap, .watermark-roof { display: none; }
  .watermark-crops { width: 110px; right: 10px; opacity: 0.075; }
  .hero-watermark-left { width: 110px; opacity: 0.075; }
  .hero-watermark-right { width: 110px; opacity: 0.075; }

  /* Responsive Dashboard Sidebar to Topbar */
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    padding: 12px 16px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 90;
  }
  .sidebar .brand {
    padding: 0;
    font-size: 16px;
  }
  .sidebar nav {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .sidebar .nav-item {
    padding: 6px 10px;
    font-size: 13px;
    min-height: 34px;
  }
  .user-mini {
    display: none;
  }
  .main {
    padding: 16px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .field-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .page-container {
    margin: 20px auto 40px;
    padding: 0 14px;
  }
  .public-card {
    padding: 20px 16px;
  }
  .site-hero {
    padding: 42px 14px 36px;
  }
  .site-hero-actions {
    flex-direction: column;
  }
  .site-cta {
    width: 100%;
  }
  .preview-panel, .preview-box {
    padding: 20px 16px;
  }
  .pin-input-group, .field-grid {
    grid-template-columns: 1fr;
  }
  .pin-button {
    width: 100%;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-brand-col {
    grid-column: span 1;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .stat {
    padding: 10px;
  }
  .stat strong {
    font-size: 18px;
  }
  .dashboard-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .search-input-wrap {
    max-width: 100%;
    min-width: 100%;
  }
  .filter-toggle-btn {
    width: 100%;
    justify-content: center;
  }
  .toolbar-reset-link {
    text-align: center;
  }
  .filter-drawer {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.16);
    animation: slideUpBottom 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes slideUpBottom {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .drawer-date-grid {
    grid-template-columns: 1fr;
  }
  .pagination-bar {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .hero-watermark-left, .hero-watermark-right {
    opacity: 0.06;
    width: 95px;
  }
}
