/* ==============================================================================
   ELECTORAL INTELLIGENCE PLATFORM - PRODUCTION STYLESHEET
   Apple Cupertino High-Precision Dark System
   ============================================================================== */

:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0e17;
  --bg-tertiary: #131926;
  --bg-card: rgba(16, 22, 34, 0.82);
  --bg-glass: rgba(20, 26, 38, 0.65);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --primary-accent: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #60a5fa;
  --purple-accent: #8b5cf6;
  --emerald-accent: #10b981;
  --gold-accent: #f59e0b;
  --danger-accent: #ef4444;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(37, 99, 235, 0.5);
  --border-highlight: rgba(255, 255, 255, 0.16);
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --sidebar-width: 260px;
  --header-height: 68px;
  --transition-smooth: 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* ========================================== */
/* 🌟 1. EXPANSIVE PUBLIC LANDING PAGE */
/* ========================================== */
.landing-view {
  width: 100%;
  min-height: 100vh;
  background: 
    radial-gradient(ellipse at 50% 0%, rgba(37, 99, 235, 0.18), transparent 70%),
    radial-gradient(ellipse at 80% 30%, rgba(139, 92, 246, 0.1), transparent 50%),
    #000000;
  overflow-x: hidden;
}

/* Sticky Nav Bar */
.landing-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px solid var(--border-subtle);
}

.landing-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-gem {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge-pro {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, 0.35);
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-anchor {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-smooth);
}

.nav-anchor:hover {
  color: #ffffff;
}

.btn-landing-signin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.btn-landing-signin:hover {
  background: #2563eb;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

/* Hero Section */
.landing-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 60px 24px 40px 24px;
  text-align: center;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.3);
  color: #93c5fd;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

.landing-title {
  font-size: clamp(32px, 5.5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 22px;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-subtitle {
  font-size: clamp(15px, 2vw, 19px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto 36px auto;
}

.landing-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 30px;
  border-radius: 9999px;
  background: #2563eb;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-smooth);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.45);
}

.btn-hero-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.6);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

/* Metrics Strip */
.landing-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.landing-metric-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 24px 18px;
  text-align: center;
  backdrop-filter: blur(20px);
  transition: transform var(--transition-smooth);
}

.landing-metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
}

.landing-metric-num {
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.landing-metric-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.landing-metric-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Common Section Layouts */
.landing-section {
  padding: 70px 24px;
  width: 100%;
}

.section-container {
  max-width: 1180px;
  margin: 0 auto;
}

.section-header-center {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 50px auto;
}

.section-kicker {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-light);
  display: inline-block;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Studio UI Preview (Mockup) */
.studio-mockup-frame {
  background: rgba(13, 17, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
}

.studio-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.w-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.w-dot.red { background: #ef4444; }
.w-dot.yellow { background: #f59e0b; }
.w-dot.green { background: #10b981; }

.window-title {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.window-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.studio-content-preview {
  padding: 24px;
}

.preview-hero-strip {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 16px;
}

.preview-seat-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 6px;
}

.tag-blue { background: rgba(37, 99, 235, 0.2); color: #93c5fd; border: 1px solid rgba(37, 99, 235, 0.35); }
.tag-purple { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.35); }
.tag-gold { background: rgba(245, 158, 11, 0.2); color: #fde047; border: 1px solid rgba(245, 158, 11, 0.35); }

.preview-seat-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.preview-seat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.preview-kpi-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.preview-kpi-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: right;
}

.pk-label {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.pk-val {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono);
}

.preview-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.preview-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px;
}

.pcard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 14px;
}

.pcard-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.mock-bars-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mbar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.mbar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.mbar-fill {
  height: 100%;
  border-radius: 3px;
}
.fill-orange { background: #f97316; }
.fill-green { background: #10b981; }
.fill-yellow { background: #eab308; }

.mock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.mock-table th {
  text-align: left;
  padding: 6px 8px;
  color: var(--text-muted);
  font-size: 10.5px;
  border-bottom: 1px solid var(--border-subtle);
}

.mock-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.preview-footer-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.pfooter-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #34d399;
}

.pbadge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
}

.pfooter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mock-btn-dossier {
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
}

.mock-btn-purple {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bento-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.bento-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
}

.bento-wide {
  grid-column: span 2;
}

.bento-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.bento-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.bento-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.bento-meta-pill {
  display: inline-block;
  margin-top: 18px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: #93c5fd;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  align-self: flex-start;
}

/* Workflow Steps */
.workflow-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.workflow-step-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px 20px;
  position: relative;
}

.step-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-light);
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

.step-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Security Section */
.security-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(0, 0, 0, 0.9));
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 24px;
  padding: 44px 36px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.security-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.security-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 720px;
  margin: 0 auto 28px auto;
}

.security-pillars {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.sec-pillar {
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
}

/* FAQ Accordion */
.faq-accordion {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color var(--transition-smooth);
}

.faq-item.active {
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.04);
}

.faq-question {
  width: 100%;
  padding: 18px 22px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 15.5px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  font-size: 20px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--primary-light);
}

.faq-answer {
  display: none;
  padding: 0 22px 20px 22px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Footer */
.landing-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 24px;
  background: rgba(0, 0, 0, 0.8);
}

.footer-container {
  max-width: 1180px;
  margin: 0 auto;
}

.footer-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #34d399;
  font-family: var(--font-mono);
}

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-link-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
}

.footer-link-btn:hover {
  color: #ffffff;
}

/* ========================================== */
/* 🔑 2. AUTH MODAL (CANDIDATE ONLY) */
/* ========================================== */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.auth-modal-backdrop.active {
  display: flex;
}

.auth-card {
  background: rgba(14, 18, 27, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  padding: 38px 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
  position: relative;
}

.auth-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.auth-close-btn:hover {
  color: #ffffff;
}

.auth-header {
  text-align: center;
  margin-bottom: 26px;
}

.auth-logo {
  font-size: 38px;
  margin-bottom: 8px;
}

.auth-title {
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.auth-form-group {
  margin-bottom: 18px;
}

.auth-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 7px;
}

.auth-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 13px 16px;
  color: #ffffff;
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom */
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: var(--primary-accent);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.auth-error-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.4;
  text-align: left;
}

.auth-btn-submit {
  width: 100%;
  background: #2563eb;
  color: #ffffff;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.auth-btn-submit:hover:not(:disabled) {
  background: #1d4ed8;
}

.auth-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-notice-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ========================================== */
/* 💻 3. AUTHENTICATED APPLICATION DASHBOARD */
/* ========================================== */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--bg-primary);
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-smooth), transform var(--transition-smooth);
  z-index: 50;
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.brand-text .brand-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.brand-text .brand-sub {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.sidebar-close-mobile {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 6px 12px;
  margin-bottom: 4px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 3px;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
}

.nav-label {
  flex: 1;
}

.nav-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.sidebar-user-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-meta-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.user-meta-info {
  flex: 1;
  min-width: 0;
}

.user-meta-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta-role {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Viewport */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  background: var(--bg-primary);
}

.app-header {
  height: var(--header-height);
  padding: 0 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.header-icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

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

.header-breadcrumb h2 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-breadcrumb p {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-badge-role {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-admin { background: rgba(245, 158, 11, 0.15); color: #fde047; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-client { background: rgba(37, 99, 235, 0.15); color: #93c5fd; border: 1px solid rgba(37, 99, 235, 0.3); }

.header-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.btn-signout {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.btn-signout:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ffffff;
}

/* Scrollable Container */
.app-content-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

/* Apple Card */
.apple-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 22px;
  backdrop-filter: blur(20px);
}

.restricted-banner {
  margin-bottom: 20px;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
}

.banner-title {
  font-size: 15px;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 3px;
}

.banner-sub {
  font-size: 12.5px;
  color: #cbd5e1;
}

/* Constituencies Directory Table */
.state-directory-container {
  margin-bottom: 20px;
}

.apple-section-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.state-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.state-ribbon-btn {
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.state-ribbon-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.table-filter-bar {
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.search-input-wrapper {
  position: relative;
  width: 320px;
  max-width: 100%;
}

.search-input-wrapper svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input-wrapper input:focus {
  border-color: var(--primary-accent);
}

.table-seat-counter {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modern-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.modern-data-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.modern-data-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.seat-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.ac-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.ac-pill-large {
  padding: 6px 14px;
  font-size: 14px;
}

.seat-cell-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.seat-primary-name {
  font-weight: 600;
  color: #ffffff;
  font-size: 14px;
  transition: color 0.15s ease;
}

.seat-cell-group:hover .seat-primary-name {
  color: #38bdf8;
}

.seat-district-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.electors-booths-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.electors-num {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

.booths-num {
  font-size: 11px;
  color: var(--text-muted);
}

.dossier-actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-dossier-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-smooth);
}

.btn-dossier-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-dossier-detailed {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
}

.btn-dossier-detailed:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
  color: #ffffff;
}

.quick-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-action-view {
  padding: 6px 12px;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-view:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-action-csv {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-action-csv:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* Profile View & KPIs */
.seat-hero-card {
  padding: 24px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  margin-bottom: 20px;
}

.profile-hero-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-apple-executive {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-smooth);
}

.btn-apple-executive:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-apple-glow {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
  color: #ffffff;
}

.btn-apple-glow:hover {
  background: linear-gradient(135deg, #1d4ed8, #6d28d9);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.5);
}

.hero-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.apple-tag {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-seat-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.hero-seat-district {
  font-size: 13px;
  color: var(--text-secondary);
}

.apple-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.apple-kpi-item {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
}

.apple-kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.apple-kpi-val {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono);
}

.apple-kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ======================================================= */
/* 🌟 REPORT TIER SELECTOR: SEMI-DETAILED vs FULL DETAILED */
/* ======================================================= */
.report-tier-wrapper {
  margin-bottom: 22px;
}

.report-tier-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 6px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.tier-pill-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-smooth);
  text-align: left;
}

.tier-pill-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.tier-pill-btn.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(139, 92, 246, 0.16));
  border-color: rgba(59, 130, 246, 0.4);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.tier-pill-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.tier-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.tier-desc {
  font-size: 11.5px;
  color: var(--text-muted);
}

.tier-pill-btn.active .tier-desc {
  color: #cbd5e1;
}

.tier-live-badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ======================================================= */
/* 📑 BOOTH NAVIGATION TOOLBAR & 1-PAGE DOSSIER */
/* ======================================================= */
.booth-navigation-toolbar {
  padding: 14px 20px;
  margin-bottom: 20px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.booth-toolbar-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.booth-selector-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 320px;
}

.btn-booth-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-booth-step:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-booth-step:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.booth-select-wrapper {
  flex: 1;
}

.booth-select {
  width: 100%;
  padding: 8px 12px;
  background: #090e17;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.booth-jump-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.booth-indicator-pill {
  padding: 5px 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 20px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.jump-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.apple-input-part {
  width: 68px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-family: var(--font-mono);
  text-align: center;
  outline: none;
}

.apple-input-part:focus {
  border-color: #3b82f6;
}

.btn-jump-go {
  padding: 6px 12px;
  background: #2563eb;
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-jump-go:hover {
  background: #1d4ed8;
}

.booth-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.booth-view-switcher {
  display: inline-flex;
  padding: 3px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.btn-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-view-toggle.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-print-booth {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-print-booth:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* ======================================================= */
/* 📄 ONE PAGE PER BOOTH EXECUTIVE DOSSIER CARD */
/* ======================================================= */
.booth-page-dossier {
  padding: 30px;
  background: linear-gradient(180deg, rgba(20, 27, 45, 0.85) 0%, rgba(11, 16, 28, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.booth-dossier-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.booth-meta-left {
  flex: 1;
  min-width: 280px;
}

.booth-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.booth-part-badge {
  padding: 4px 12px;
  background: #2563eb;
  color: #ffffff;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.booth-ac-parent {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.booth-dossier-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.booth-dossier-address {
  font-size: 13.5px;
  color: #cbd5e1;
  margin-bottom: 4px;
  line-height: 1.4;
}

.booth-dossier-section {
  font-size: 12.5px;
  color: var(--text-muted);
}

.booth-meta-right {
  display: flex;
  align-items: center;
}

.booth-total-elector-card {
  padding: 16px 24px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 14px;
  text-align: right;
  display: flex;
  flex-direction: column;
}

.total-elector-sub {
  font-size: 10.5px;
  font-weight: 700;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.total-elector-val {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
  line-height: 1;
}

.total-elector-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Booth Metrics Strip */
.booth-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}

.booth-metric-box {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
}

.box-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.box-val {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.box-sub {
  font-size: 11.5px;
  color: #94a3b8;
}

/* Section Cards inside Booth Dossier */
.booth-section-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 24px;
}

.section-title-bar {
  margin-bottom: 18px;
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  font-size: 20px;
}

.section-heading {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.section-subtext {
  font-size: 12px;
  color: var(--text-muted);
}

/* Spectrum Bar */
.religions-spectrum-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 18px;
}

.religions-spectrum-seg {
  height: 100%;
  transition: width 0.4s ease;
}

/* All Religions Grid */
.religions-all-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.religion-mini-card {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.religion-mini-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.religion-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.religion-name-tag {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
}

.religion-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.religion-mini-val {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
  margin-bottom: 2px;
}

.religion-mini-pct {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
}

.religion-mini-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.religion-mini-fill {
  height: 100%;
  border-radius: 2px;
}

/* Top 50 Surnames Table */
.booth-surnames-table-wrapper {
  max-height: 520px;
  overflow-y: auto;
}

.apple-surnames-table th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.apple-surnames-table td {
  padding: 10px 14px;
  font-size: 13px;
}

.surname-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #94a3b8;
}

.rank-top-3 {
  background: rgba(234, 179, 8, 0.18);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.surname-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.surname-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #93c5fd;
}

.surname-name-text {
  font-weight: 700;
  color: #ffffff;
  font-size: 13.5px;
}

.surname-strength-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.surname-strength-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

/* Print Overrides */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .app-sidebar, .app-header, .landing-nav-wrapper, .booth-navigation-toolbar, .report-tier-wrapper, #tierSemiDetailedContainer, #allBoothsTableView {
    display: none !important;
  }
  .app-layout {
    display: block !important;
  }
  .app-main, .app-content-body {
    padding: 0 !important;
    margin: 0 !important;
  }
  .booth-page-dossier {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  .booth-dossier-title, .total-elector-val, .box-val, .section-heading, .surname-name-text {
    color: #000000 !important;
  }
  .apple-surnames-table th {
    color: #4b5563 !important;
  }
  .apple-surnames-table td {
    color: #111827 !important;
    border-bottom: 1px solid #e5e7eb !important;
  }
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .report-tier-selector {
    grid-template-columns: 1fr;
  }
  .booth-metrics-strip {
    grid-template-columns: 1fr 1fr;
  }
  .religions-all-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .religions-all-grid {
    grid-template-columns: 1fr 1fr;
  }
  .booth-metrics-strip {
    grid-template-columns: 1fr;
  }
  .booth-selector-group {
    min-width: 100%;
  }
}

/* Cupertino Segmented Bar */
.cupertino-tab-container {
  margin-bottom: 20px;
}

.cupertino-segmented-bar {
  display: inline-flex;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
}

.segmented-btn {
  padding: 8px 18px;
  border-radius: 9px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.segmented-btn:hover {
  color: #ffffff;
}

.segmented-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.profile-tab-content {
  display: none;
}

.profile-tab-content.active {
  display: block;
}

.grid-2-apple {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card-head-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
}

.religion-bars-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.religion-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rel-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #cbd5e1;
}

.religion-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.religion-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge-general { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-obc { background: rgba(234, 179, 8, 0.15); color: #fde047; border: 1px solid rgba(234, 179, 8, 0.3); }
.badge-scst { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.3); }

.polarity-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}

.polarity-stronghold { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.polarity-battleground { background: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); }
.polarity-swing { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

/* Historical Elections Grid */
.elections-timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.election-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px;
}

.election-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.election-year-pill {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.election-votes-total {
  font-size: 11px;
  color: var(--text-muted);
}

.candidate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 6px;
}

.winner-row { background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.2); }
.runnerup-row { background: rgba(255, 255, 255, 0.02); }

.cand-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cand-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.winner-badge { background: #15803d; color: #ffffff; }
.runnerup-badge { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }

.cand-name {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

.cand-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.party-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cand-votes {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.election-margin-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--text-secondary);
}

/* CSV Viewer & Controls */
.section-header-card {
  margin-bottom: 16px;
}

.sub-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-apple-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
}

.csv-controls-card {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  margin-bottom: 16px;
}

.csv-controls-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.csv-select-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.csv-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.csv-control-label {
  font-size: 13px;
  font-weight: 600;
}

.apple-select-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}

.apple-select-input option {
  background: #18181b;
  color: #ffffff;
}

.apple-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.apple-input:focus, .apple-select-input:focus {
  border-color: var(--primary-accent);
}

.csv-lang-switcher {
  display: inline-flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.btn-apple-lang {
  padding: 5px 12px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-apple-lang.active {
  background: #2563eb;
  color: #ffffff;
}

.csv-meta-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-pill {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.apple-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.apple-btn-page {
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.apple-btn-page:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.apple-btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-indicator {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  padding: 0 8px;
  font-family: var(--font-mono);
}

/* Admin Users Management */
.admin-users-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

.btn-apple-primary {
  padding: 12px;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-apple-primary:hover {
  background: #1d4ed8;
}

.btn-table-action {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.15s ease;
}

.btn-table-action:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.btn-table-delete {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.btn-table-delete:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ffffff;
}

.status-active { color: #4ade80; }
.status-suspended { color: #f87171; }

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(20, 20, 22, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px);
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast-notification.success {
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.toast-notification.error {
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* ==============================================================================
   📱 4. COMPREHENSIVE RESPONSIVE DESIGN & MOBILE BREAKPOINT OVERHAUL
   ============================================================================== */

/* Tablet & Smaller Devices (<= 1024px) */
@media (max-width: 1024px) {
  /* Off-canvas mobile drawer */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 90;
  }

  .sidebar-backdrop.active {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    width: 280px;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
    z-index: 100;
  }

  .app-sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-close-mobile {
    display: block;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-wide {
    grid-column: span 2;
  }

  .workflow-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-users-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  .landing-nav {
    padding: 14px 16px;
  }

  .landing-nav-links {
    display: none; /* Clean focus on CTA */
  }

  .landing-hero {
    padding: 40px 16px 20px 16px;
  }

  .landing-title {
    font-size: clamp(28px, 8vw, 42px);
  }

  .landing-subtitle {
    font-size: 15px;
    margin-bottom: 28px;
  }

  .landing-cta-group {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .btn-hero-primary, .btn-hero-secondary {
    width: 100%;
    justify-content: center;
  }

  .landing-metrics-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .landing-metric-card {
    padding: 16px 12px;
  }

  .landing-metric-num {
    font-size: 26px;
  }

  .landing-metric-label {
    font-size: 11px;
  }

  /* Bento grid to 1 col */
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .bento-wide {
    grid-column: span 1;
  }

  .bento-card {
    padding: 22px 18px;
  }

  /* Workflow to 1 col */
  .workflow-steps-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Preview grid */
  .preview-grid-2 {
    grid-template-columns: 1fr;
  }

  .preview-hero-strip {
    flex-direction: column;
  }

  .preview-kpi-row {
    width: 100%;
    justify-content: space-between;
  }

  .preview-kpi-card {
    flex: 1;
    text-align: center;
  }

  /* Application Header */
  .app-header {
    padding: 0 16px;
  }

  .header-breadcrumb p {
    display: none;
  }

  .action-btn-text {
    display: none;
  }

  .user-badge-role {
    display: none; /* Save space on small headers */
  }

  .app-content-body {
    padding: 16px;
  }

  /* KPI strip to 2x2 grid */
  .apple-kpi-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .apple-kpi-item {
    padding: 12px 14px;
  }

  .apple-kpi-val {
    font-size: 18px;
  }

  /* Demographics grid to 1 col */
  .grid-2-apple {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* CSV Controls ribbon stack */
  .csv-controls-flex {
    flex-direction: column;
    align-items: stretch;
  }

  .csv-select-group {
    flex-direction: column;
    align-items: stretch;
  }

  .csv-select-group select {
    max-width: 100% !important;
  }

  .csv-filter-group {
    flex-direction: column;
    align-items: stretch;
  }

  .csv-filter-group input {
    width: 100% !important;
  }

  /* Modern table mobile presentation */
  .modern-data-table td, .modern-data-table th {
    padding: 10px;
    font-size: 12px;
  }

  .dossier-actions-cell {
    flex-direction: column;
    align-items: flex-start;
  }

  .quick-actions-cell {
    flex-direction: column;
  }

  .btn-action-view {
    width: 100%;
    text-align: center;
  }

  /* Security card */
  .security-card {
    padding: 28px 18px;
  }

  .security-pillars {
    flex-direction: column;
  }
}

/* Small Phones (<= 480px) */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
    border-radius: 20px;
  }

  .auth-title {
    font-size: 18px;
  }

  .landing-nav {
    padding: 12px 14px;
  }

  .brand-title {
    font-size: 15px;
  }

  .landing-metrics-strip {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .landing-metric-card {
    padding: 12px 8px;
  }

  .landing-metric-num {
    font-size: 22px;
  }

  .apple-kpi-strip {
    grid-template-columns: 1fr 1fr;
  }

  .table-card {
    padding: 14px 10px;
  }
}
