/* ==========================================================================
   AC 171 - PADMANABHANAGAR KPCC EXECUTIVE DASHBOARD
   Pixel-Accurate Design System with Light/Dark Themes, Glassmorphism & 3D Effects
   ========================================================================== */

:root {
  /* LIGHT THEME (Default) */
  --bg-app: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 50%, #f8fafc 100%);
  --bg-sidebar: rgba(13, 33, 55, 0.85);
  --bg-sidebar-hover: rgba(22, 47, 76, 0.9);
  --bg-sidebar-active: rgba(25, 56, 92, 0.95);
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.55);
  --bg-card-subtle: rgba(248, 250, 252, 0.7);

  --border-light: #e2e8f0;
  --border-card: #e2e8f0;
  --border-glass: rgba(255, 255, 255, 0.95);
  --divider-color: #cbd5e1;

  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light-muted: #94a3b8;

  /* Accents */
  --color-primary: #1b59b8;
  --color-blue: #2563eb;
  --color-blue-tint: #eff6ff;
  --color-cyan: #0284c7;
  --color-green: #10b981;
  --color-green-dark: #15803d;
  --color-green-tint: #f0fdf4;
  --color-red: #dc2626;
  --color-red-tint: #fef2f2;
  --color-orange: #ea580c;
  --color-orange-tint: #fff7ed;
  --color-amber: #f59e0b;
  --color-pink: #db2777;
  --color-purple: #7c3aed;
  --color-purple-tint: #faf5ff;
  --color-yellow: #facc15;

  /* 3D Shadows & Specular Lights */
  --shadow-card-3d: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-card-3d-hover: 0 14px 28px -6px rgba(15, 23, 42, 0.14), 0 4px 8px -2px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 1);
  --shadow-popup: 0 15px 35px -5px rgba(15, 23, 42, 0.25);
  --banner-bg: #0d2137;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-pill: 9999px;

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-cursive: var(--font-sans);
  --font-display: var(--font-sans);
}

/* DARK THEME */
[data-theme="dark"] {
  --bg-app: linear-gradient(135deg, #080d1a 0%, #060e1a 50%, #0a1128 100%);
  --bg-sidebar: rgba(6, 14, 26, 0.85);
  --bg-sidebar-hover: rgba(16, 28, 48, 0.9);
  --bg-sidebar-active: rgba(21, 39, 68, 0.95);
  --bg-card: #0f192c;
  --bg-card-glass: rgba(16, 27, 48, 0.45);
  --bg-card-subtle: rgba(18, 30, 53, 0.7);

  --border-light: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.09);
  --border-glass: rgba(255, 255, 255, 0.12);
  --divider-color: rgba(255, 255, 255, 0.12);

  --text-dark: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light-muted: #64748b;

  --color-blue-tint: rgba(37, 99, 235, 0.15);
  --color-green-tint: rgba(16, 185, 129, 0.15);
  --color-red-tint: rgba(220, 38, 38, 0.15);
  --color-orange-tint: rgba(234, 88, 12, 0.15);
  --color-purple-tint: rgba(124, 58, 237, 0.15);

  --shadow-card-3d: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-card-3d-hover: 0 14px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --banner-bg: #0b172a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--text-body);
  font-size: 13px;
  line-height: 1.45;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ==========================================================================
   LOGIN OVERLAY
   ========================================================================== */
/* ==========================================================================
   FIGMA DESIGN: KPCC LOGIN OVERLAY & PORTAL
   ========================================================================== */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background-color: #012241;
  background-image: linear-gradient(rgba(1, 34, 65, 0.45), rgba(1, 34, 65, 0.55)), url('figma_assets/bg_pic_2.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Wrapper representing 1440x1024 Canvas */
.figma-login-wrapper {
  width: 100%;
  max-width: 1440px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  position: relative;
}

/* --- Top Leadership Header --- */
.figma-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 36px;
  box-sizing: border-box;
  min-height: 129px;
  z-index: 10;
  flex-wrap: wrap;
  gap: 16px;
}

.figma-header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.figma-brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.figma-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.figma-brand-title {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 32px;
  line-height: 1;
  color: #FFFFFF;
  letter-spacing: -0.5px;
}

.figma-brand-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

.figma-header-divider {
  width: 2px;
  height: 95px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 16px;
  align-self: flex-start;
  margin-top: 8px;
}

/* 6 Leader Avatars */
.figma-leadership-avatars {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 14px;
  align-self: flex-start;
}

.figma-avatar-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #FFFFFF;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  cursor: pointer;
}

.figma-avatar-ring:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.figma-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figma-avatar-ring img[src*="sonia_gandhi"],
.dash-avatar-ring img[src*="sonia_gandhi"] {
  transform: translateY(5%) scale(0.95);
}

.figma-avatar-ring img[src*="siddaramaiah"],
.dash-avatar-ring img[src*="siddaramaiah"] {
  transform: translateY(8%) scale(0.95);
}

.figma-header-slogan {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: auto;
}

.figma-slogan-text {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #FFFFFF;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.figma-flag-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  transform: rotate(5.53deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
  align-self: flex-end;
}

/* --- Core Values Tagline Row (below header) --- */
.figma-core-values-row {
  width: 100%;
  padding: 6px 36px 10px 36px;
  box-sizing: border-box;
  background: transparent;
  z-index: 9;
  position: relative;
}

.figma-core-values-tag {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: space-between;
  width: 308px;
  /* matches logo + gap + text width */
  white-space: nowrap;
}

/* --- Main Central Body --- */
.figma-main-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  padding: 10px 40px 10px 30px;
  box-sizing: border-box;
  position: relative;
  min-height: 520px;
}

/* Left Hero Section with Rahul Gandhi */
.figma-hero-left {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  min-height: 500px;
  justify-content: flex-end;
  z-index: 11;
}

.figma-core-values {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
  line-height: 35px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-bottom: 8px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 5;
}

.figma-hero-visuals {
  position: relative;
  width: 100%;
  max-width: 580px;
  height: 540px;
  display: flex;
  align-items: flex-end;
}

.figma-rahul-img {
  max-height: 530px;
  width: auto;
  object-fit: contain;
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.45));
}

.figma-indian-flag-img {
  position: absolute;
  left: -80px;
  bottom: -100px;
  width: 540px;
  max-width: none;
  z-index: 4;
  pointer-events: none;
  opacity: 0.95;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.figma-leader-graphic {
  position: absolute;
  right: 20px;
  bottom: 80px;
  width: 110px;
  z-index: 2;
  opacity: 0.85;
  pointer-events: none;
}

/* Right Login Portal Section */
.figma-login-right {
  flex: 0.9;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 10;
}

.figma-brush-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.figma-brush-backdrop {
  position: absolute;
  inset: -45px -40px -45px -40px;
  width: calc(100% + 80px);
  height: calc(100% + 90px);
  object-fit: fill;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.3));
}

.figma-login-card-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 370px;
  padding: 30px 24px 20px 24px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Portal Branding Header */
.figma-portal-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}

.figma-portal-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.figma-portal-svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.figma-portal-titles {
  display: flex;
  flex-direction: column;
}

.figma-title-reports {
  font-family: 'Bebas Neue', 'Outfit', sans-serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 0.92;
  color: #012641;
  margin: 0;
  letter-spacing: 0.8px;
}

.figma-title-dashboard {
  font-family: 'Bebas Neue', 'Outfit', sans-serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 0.92;
  color: #012641;
  margin: 0;
  letter-spacing: 0.8px;
}

.figma-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
  color: #012641;
  margin: 10px 0 20px 0;
}

/* Form Styling */
.figma-login-form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.figma-field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.figma-field-label {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #2D3748;
  margin-bottom: 6px;
}

.figma-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.figma-input-icon {
  position: absolute;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.figma-input {
  width: 100%;
  height: 48px;
  background: #FFFFFF;
  border: 1.5px solid #C7C4D8;
  border-radius: 12px;
  padding: 0 44px 0 42px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #1E293B;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.figma-input:focus {
  border-color: #3525CD;
  box-shadow: 0 0 0 4px rgba(53, 37, 205, 0.14);
}

.figma-input::placeholder {
  color: #94A3B8;
}

.figma-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.figma-password-toggle:hover {
  background: rgba(53, 37, 205, 0.08);
}

.figma-login-error {
  min-height: 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #DC2626;
  margin-bottom: 8px;
  text-align: left;
}

.figma-submit-btn {
  width: 100%;
  height: 52px;
  background: linear-gradient(90deg, #3525CD 0%, #4F46E5 100%);
  border-radius: 12px;
  border: none;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(53, 37, 205, 0.35);
  transition: all 0.25s ease;
}

.figma-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(53, 37, 205, 0.45);
  filter: brightness(1.06);
}

.figma-submit-btn:active {
  transform: translateY(0);
}

.figma-remember-forgot {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.figma-forgot-link {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
  text-decoration: none;
  transition: color 0.2s ease;
}

.figma-forgot-link:hover {
  color: #3525CD;
  text-decoration: underline;
}

/* --- Bottom Executive Navy Footer Bar --- */
.figma-footer-bar {
  width: 100%;
  height: 88px;
  background: #012241;
  border-top: 5px solid #2F6089;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 0;
  box-sizing: border-box;
  z-index: 10;
  overflow: hidden;
  gap: 0;
}

/* LEFT: Indian Flag Panel */
.figma-footer-flag-side {
  display: flex;
  align-items: flex-end;
  height: 100%;
  flex-shrink: 0;
  width: 200px;
}

.figma-footer-flag-img {
  height: 90px;
  width: auto;
  object-fit: contain;
  object-position: left bottom;
  opacity: 0.92;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

/* CENTER: Branding */
.figma-footer-center {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 40px;
}

.figma-footer-branding {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
}

.figma-footer-title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #FFFFFF;
  line-height: 1.3;
}

.figma-footer-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.figma-badge-item {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: #829DBB;
}

.figma-badge-dot {
  font-size: 10px;
  color: #829DBB;
}

.figma-footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.figma-pillar-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.figma-pillar-text {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: #829DBB;
}

.figma-pillar-separator {
  width: 1px;
  height: 28px;
  background: rgba(217, 217, 217, 0.35);
  border-radius: 1px;
}

/* --- Responsive Adaptations --- */
@media (max-width: 1200px) {
  .figma-avatar-ring {
    width: 54px;
    height: 54px;
  }

  .figma-header-slogan {
    display: none;
  }

  .figma-rahul-img {
    max-height: 440px;
  }

  .figma-brush-container {
    max-width: 460px;
  }
}

@media (max-width: 900px) {
  .figma-header {
    padding: 16px 20px;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .figma-header-divider {
    display: none;
  }

  .figma-leadership-avatars {
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .figma-avatar-ring {
    width: 44px;
    height: 44px;
    border-width: 2px;
  }

  .figma-main-body {
    flex-direction: column;
    padding: 20px;
    gap: 16px;
  }

  .figma-hero-left {
    min-height: auto;
    align-items: center;
    text-align: center;
    margin-bottom: 12px;
  }

  .figma-hero-visuals {
    height: auto;
    max-width: 280px;
    margin: 0 auto;
  }

  .figma-rahul-img {
    max-height: 260px;
  }

  .figma-indian-flag-img {
    width: 280px;
    max-width: 100%;
    left: 0;
  }

  .figma-footer-bar {
    height: auto;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    text-align: center;
  }

  .figma-footer-flag-side {
    width: auto;
    height: 60px;
    justify-content: center;
  }

  .figma-footer-flag-img {
    height: 55px;
  }

  .figma-footer-right {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .figma-pillar-separator {
    display: none;
  }

  .login-overlay {
    justify-content: flex-start;
    padding-top: 30px;
    padding-bottom: 30px;
  }
}

@media (max-width: 640px) {
  .figma-login-wrapper {
    min-height: 100vh;
    justify-content: flex-start;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .figma-header {
    padding: 12px 14px;
    gap: 8px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .figma-header-brand {
    justify-content: center;
    text-align: center;
    gap: 10px;
  }

  .figma-brand-logo {
    width: 42px;
    height: 42px;
  }

  .figma-brand-title {
    font-size: 22px;
  }

  .figma-brand-sub {
    font-size: 9px;
    letter-spacing: 0.3px;
    white-space: normal;
    text-align: center;
    max-width: 230px;
    line-height: 1.25;
  }

  .figma-header-slogan {
    display: none;
  }

  .figma-core-values-row {
    padding: 4px 14px 8px 14px;
    text-align: center;
  }

  .figma-core-values-tag {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .figma-leadership-avatars {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 3px;
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    padding: 2px 4px 2px 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .figma-leadership-avatars::-webkit-scrollbar {
    display: none;
  }

  .figma-avatar-ring {
    width: 28px;
    height: 28px;
    border-width: 1.5px;
    flex-shrink: 0;
  }

  .figma-main-body {
    padding: 8px 12px 16px 12px;
    gap: 10px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .figma-hero-left {
    min-height: auto;
    align-items: center;
    text-align: center;
    margin-bottom: 4px;
    width: 100%;
  }

  .figma-core-values {
    font-size: 11px;
    letter-spacing: 0.14em;
    line-height: 18px;
    margin-bottom: 2px;
    text-align: center;
  }

  .figma-hero-visuals {
    max-width: 320px;
    height: auto;
    margin: 0 auto;
    position: relative;
    justify-content: flex-start;
  }

  .figma-rahul-img {
    max-height: 240px;
    margin-left: -35px;
  }

  .figma-indian-flag-img {
    width: 320px;
    max-width: none;
    left: -30px;
    bottom: -15px;
  }

  .figma-voice-youth-wrap {
    right: -55px;
    bottom: 30px;
  }

  .figma-voice-youth-img {
    width: 110px;
  }

  .figma-leader-graphic {
    display: none;
  }

  .figma-login-right {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
  }

  .figma-brush-container {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    min-height: auto;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.6);
  }

  .figma-brush-backdrop {
    display: none;
  }

  .figma-login-card-content {
    padding: 20px 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .figma-portal-head {
    gap: 10px;
    margin-bottom: 2px;
  }

  .figma-title-reports {
    font-size: 26px;
  }

  .figma-title-dashboard {
    font-size: 34px;
  }

  .figma-subtitle {
    font-size: 12px;
    margin: 4px 0 14px 0;
  }

  .figma-field-group {
    margin-bottom: 12px;
  }

  .figma-field-label {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .figma-input {
    height: 44px;
    font-size: 16px;
    padding: 0 42px 0 40px;
    border-radius: 10px;
    box-sizing: border-box;
  }

  .figma-submit-btn {
    height: 46px;
    font-size: 15px;
    border-radius: 10px;
  }

  .figma-footer-bar {
    padding: 12px 14px;
    gap: 8px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: auto;
  }

  .figma-footer-flag-side {
    width: auto;
    height: 50px;
    justify-content: center;
  }

  .figma-footer-flag-img {
    height: 48px;
  }

  .figma-footer-center {
    width: 100%;
    justify-content: center;
  }

  .figma-footer-branding {
    align-items: center;
    text-align: center;
  }

  .figma-footer-title {
    font-size: 11px;
    line-height: 1.3;
    text-align: center;
  }

  .figma-footer-badges {
    font-size: 10px;
    gap: 4px;
    justify-content: center;
  }

  .figma-footer-right {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .figma-pillar-item {
    font-size: 10.5px;
    gap: 4px;
  }
}

/* ==========================================================================
   TOP GLOBAL EXECUTIVE HEADER
   ========================================================================== */
.top-nav-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  min-height: 68px;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: background-color 0.25s ease;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.kpcc-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.kpcc-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
}

.kpcc-sub {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.header-slogan {
  display: flex;
  flex-direction: column;
  font-family: var(--font-cursive);
  line-height: 1.05;
  color: var(--text-dark);
  border-left: 1px solid var(--border-light);
  padding-left: 1rem;
}

.slogan-line1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-muted);
}

.slogan-line2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* Center Top Bar Direct Text (No oval card) */
.nav-center-direct {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
}

.nav-center-direct .header-center-main-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: 0.02em;
  line-height: 1.25;
  white-space: nowrap;
}

.nav-center-direct .header-center-sub-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
}

[data-theme="dark"] .nav-center-direct .header-center-main-title {
  color: #f8fafc;
}

[data-theme="dark"] .nav-center-direct .header-center-sub-title {
  color: #94a3b8;
}

.nav-leaders-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.leader-photo-item {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

[data-theme="dark"] .leader-photo-item {
  border-color: #334155;
  background: #1e293b;
}

.leader-photo-item:hover {
  transform: translateY(-3px) scale(1.15);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
  border-color: var(--color-blue);
  z-index: 10;
}

.leader-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Sidebar Constituency Selector */
.sidebar-constituency-box {
  position: relative;
  margin-bottom: 0.85rem;
  padding: 0.25rem 0.25rem 0.85rem 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-constituency-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 0.4rem;
  padding-left: 0.2rem;
}

.sidebar-select-pill {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 0.48rem 0.65rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.sidebar-select-pill:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(96, 165, 250, 0.5);
}

.sidebar-select-pill .pill-text {
  font-size: 0.76rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-select-pill .chevron-icon {
  color: #94a3b8;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

/* Constituency Selector Dropdown Menu */
.constituency-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  min-width: 236px;
  background: #0f1f38;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  padding: 0.4rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 500;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fadeIn 0.15s ease-out;
}

.constituency-menu-dropdown.active {
  display: flex;
}

.constituency-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #cbd5e1;
  border: 1.5px solid transparent;
  margin-bottom: 2px;
}

.constituency-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.constituency-option.active {
  background: linear-gradient(90deg, #1d4ed8 0%, #1e40af 100%) !important;
  border: 2px solid #60a5fa !important;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  position: relative;
}

.constituency-option.active::before {
  content: "SELECTED";
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: #16a34a;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 2px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(22, 163, 74, 0.5);
}

.constituency-option .ac-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
}

.constituency-option.active .ac-title {
  color: #ffffff !important;
  font-weight: 900 !important;
}

.constituency-option .ac-sub {
  color: #94a3b8;
  font-size: 0.67rem;
}

.constituency-option.active .ac-sub {
  color: #dbeafe !important;
  font-weight: 600 !important;
}

.ac-badge {
  background: #0d2137;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.constituency-option.active .ac-badge {
  background: #ffffff !important;
  color: #1e3a8a !important;
  font-weight: 900 !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8) !important;
  transform: scale(1.05);
}

.ac-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.ac-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dark);
}

.ac-sub {
  font-size: 0.67rem;
  color: var(--text-muted);
}

.constituency-option .check-icon {
  opacity: 0;
  color: #22c55e;
  margin-left: auto;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.constituency-option.active .check-icon {
  opacity: 1 !important;
  color: #4ade80 !important;
  stroke-width: 3 !important;
  transform: scale(1.3) !important;
  filter: drop-shadow(0 0 5px rgba(74, 222, 128, 0.8)) !important;
}

.nav-center {
  text-align: center;
}

.doc-main-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.doc-sub-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-monument {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

/* Page View Switcher Tabs */
.view-switch-tabs {
  display: flex;
  background: var(--bg-app);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  gap: 3px;
}

.view-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-tab-btn:hover {
  color: var(--text-dark);
}

.view-tab-btn.active {
  background: var(--color-blue);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

/* Header Buttons */
.header-icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.header-icon-btn:hover {
  color: var(--color-blue);
  border-color: var(--color-blue);
}

.logout-btn {
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  background: rgba(239, 68, 68, 0.08) !important;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #ef4444 !important;
  border-color: #ef4444 !important;
  transform: translateY(-1px);
}

/* Instant Authenticated State (Prevents any flash of login on reload) */
.kpcc-authenticated #login-overlay {
  display: none !important;
}

/* Sun/Moon Theme Toggle Visibility */
[data-theme="light"] .sun-icon {
  display: none;
}

[data-theme="light"] .moon-icon {
  display: block;
}

[data-theme="dark"] .sun-icon {
  display: block;
}

[data-theme="dark"] .moon-icon {
  display: none;
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  color: var(--color-blue);
  border-color: var(--color-blue);
  background-color: var(--color-blue-tint);
}

.kpcc-logo-img {
  height: 44px;
  width: auto;
  max-width: 50px;
  object-fit: contain;
  display: block;
}

/* ==========================================================================
   APP LAYOUT: SIDEBAR & STAGE
   ========================================================================== */
.app-layout {
  display: flex !important;
  flex: 1 1 0% !important;
  overflow: hidden;
  position: relative;
  min-height: 0;
  min-width: 0;
}

/* Left Sidebar - Stationary & Non-Scrollable with Page Content */
.sidebar-nav {
  width: 250px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  height: 100%;
  position: sticky;
  top: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s ease;
  overflow: hidden;
  z-index: 50;
}

.sidebar-menu-wrapper {
  padding: 0.85rem 0.5rem;
  overflow-y: auto;
  flex: 1;
}

.sidebar-menu-wrapper::-webkit-scrollbar {
  width: 3px;
}

.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

/* Collapsible Sidebar State */
body.sidebar-collapsed .sidebar-nav {
  width: 62px;
}

body.sidebar-collapsed .sidebar-nav .menu-label,
body.sidebar-collapsed .sidebar-nav .sub-menu-tree,
body.sidebar-collapsed .sidebar-nav .chevron-toggle,
body.sidebar-collapsed .sidebar-nav .sidebar-cursive-slogan,
body.sidebar-collapsed .sidebar-nav .sidebar-constituency-label,
body.sidebar-collapsed .sidebar-nav .sidebar-select-pill .pill-text,
body.sidebar-collapsed .sidebar-nav .sidebar-select-pill .chevron-icon,
body.sidebar-collapsed .sidebar-nav .karnataka-map-watermark {
  display: none !important;
}

body.sidebar-collapsed .sidebar-constituency-box {
  padding: 0.4rem 0 0.75rem 0;
  display: flex;
  justify-content: center;
}

body.sidebar-collapsed .sidebar-select-pill {
  width: 44px;
  height: 38px;
  padding: 0;
  justify-content: center;
}

body.sidebar-collapsed .sidebar-select-pill::before {
  content: "AC";
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  color: #60a5fa;
}

body.sidebar-collapsed .sidebar-constituency-menu {
  left: 62px;
  top: 0;
  width: 240px;
}

body.sidebar-collapsed .sidebar-nav .menu-item-root,
body.sidebar-collapsed .sidebar-nav .menu-group-header {
  justify-content: center;
  padding: 0.7rem 0;
  text-align: center;
}

body.sidebar-collapsed .sidebar-nav .group-title-wrap {
  justify-content: center;
  gap: 0;
}

body.sidebar-collapsed .sidebar-nav .sidebar-footer {
  padding: 0.5rem 0.35rem;
  display: flex;
  justify-content: center;
}

body.sidebar-collapsed .sidebar-user-profile {
  padding: 0.35rem;
  justify-content: center;
  border: none;
  background: transparent;
}

body.sidebar-collapsed .sidebar-user-profile .user-info-text,
body.sidebar-collapsed .sidebar-user-profile .user-status-dot {
  display: none !important;
}

.sidebar-footer {
  padding: 0.65rem 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-user-profile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-user-profile:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(96, 165, 250, 0.4);
}

.sidebar-user-profile .user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.sidebar-user-profile .user-info-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sidebar-user-profile .user-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.sidebar-user-profile .user-role {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 500;
  line-height: 1.1;
}

.sidebar-user-profile .user-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 6px #10b981;
  flex-shrink: 0;
}

.menu-item-root {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  margin-bottom: 0.35rem;
  transition: all 0.15s ease;
}

.menu-item-root:hover {
  background-color: var(--bg-sidebar-hover);
  color: #ffffff;
  transform: translateX(4px);
}

.menu-item-root.active {
  background-color: #1e40af;
  color: #ffffff;
}

.menu-group {
  margin-bottom: 0.5rem;
}

.menu-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  color: #f1f5f9;
  cursor: pointer;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.menu-group-header:hover {
  background-color: var(--bg-sidebar-hover);
}

.group-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chevron-toggle {
  transition: transform 0.2s ease;
  color: #64748b;
}

.menu-group.open .chevron-toggle {
  transform: rotate(180deg);
}

/* Sub-Menu Tree Links */
.sub-menu-tree {
  list-style: none;
  padding-left: 1.65rem;
  position: relative;
  margin-top: 0.2rem;
  margin-bottom: 0.5rem;
}

.sub-menu-tree::before {
  content: '';
  position: absolute;
  left: 1.85rem;
  top: 0.4rem;
  bottom: 0.6rem;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.sub-item a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.38rem 0.5rem 0.38rem 1.1rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  position: relative;
  transition: all 0.15s ease;
}

.sub-item a:hover {
  color: #ffffff;
  transform: translateX(3px);
}

.tree-bullet {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #64748b;
  position: absolute;
  left: 0.25rem;
}

.sub-item.active a {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.35) 0%, rgba(37, 99, 235, 0.1) 100%) !important;
  border-left: 3.5px solid #38bdf8 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  padding-left: 0.95rem !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

.sub-item.active .tree-bullet {
  background: #38bdf8 !important;
  box-shadow: 0 0 10px #38bdf8 !important;
  width: 7px !important;
  height: 7px !important;
}

.sidebar-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
  flex-shrink: 0;
}

.sidebar-logout-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.08);
}

.sidebar-footer {
  padding: 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sidebar-cursive-slogan {
  display: flex;
  flex-direction: column;
  font-family: var(--font-cursive);
  font-size: 1.15rem;
  color: #94a3b8;
  line-height: 1.1;
}

.sidebar-cursive-slogan .cursive-highlight {
  color: #ffffff;
  font-size: 1.25rem;
}

.constituency-map-wrap {
  width: 100%;
  max-height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.constituency-map-img {
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  object-position: center;
  opacity: 0.9;
  transition: opacity 0.25s ease, transform 0.3s ease;
}

.constituency-map-wrap:hover .constituency-map-img {
  opacity: 1;
  transform: scale(1.05);
}

body.sidebar-collapsed .constituency-map-wrap {
  display: none !important;
}

/* ==========================================================================
   MAIN CONTENT STAGE (PAGES)
   ========================================================================== */
.main-content-stage {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  height: 100%;
  padding: 1.15rem 1.5rem 3rem;
  background-color: var(--bg-app);
  scroll-behavior: smooth;
  box-sizing: border-box;
}

.page-view-container {
  display: block;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sub-header Strip */
.content-header-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-strip-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.strip-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: #0d2137;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(13, 33, 55, 0.3);
}

.strip-icon-box.orange-bg {
  background: #ea580c;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
}

.page-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.header-strip-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.booth-quick-search-box {
  position: relative;
  width: 220px;
}

.booth-quick-search-box .search-ico {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.booth-filter-input {
  width: 100%;
  padding: 0.4rem 0.65rem 0.4rem 2rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  font-size: 0.78rem;
  color: var(--text-dark);
  outline: none;
}

.booth-filter-input:focus {
  border-color: var(--color-blue);
}

.booth-dropdown {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-popup);
  max-height: 250px;
  overflow-y: auto;
  display: none;
  z-index: 150;
}

.booth-dropdown.active {
  display: block;
}

.booth-dropdown-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.booth-dropdown-item:hover {
  background: var(--bg-card-subtle);
}

.export-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.export-pdf-btn:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.last-updated-text {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   WINDOW BOXES, 3D GLASS CARDS & SUBTLE LINE DIVIDERS
   ========================================================================== */
.window-box {
  scroll-margin-top: 85px;
  position: relative;
}

/* Subtle line between boxes */
.subtle-line-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--divider-color) 25%, var(--divider-color) 75%, transparent);
  margin: 1.45rem 0;
  position: relative;
}

.subtle-line-divider::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-blue);
  box-shadow: 0 0 6px var(--color-blue);
}

/* 3D Glass Effect Card */
.glass-card-3d {
  background: var(--bg-card-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-3d);
  overflow: hidden;
  position: relative;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
  transform-style: preserve-3d;
}

.glass-card-3d:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: var(--shadow-card-3d-hover);
}

.glass-card-3d.h-100 {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.block-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.block-num-badge {
  background-color: var(--color-primary);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 4px rgba(27, 89, 184, 0.3);
}

.block-num-badge.red-badge {
  background-color: var(--color-red);
}

.block-num-badge.blue-badge {
  background-color: var(--color-blue);
}

.block-num-badge.green-badge {
  background-color: var(--color-green-dark);
}

.block-num-badge.orange-badge {
  background-color: var(--color-orange);
}

.block-heading {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: 0.03em;
}

/* Top Ribbons */
.card-top-ribbon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-light);
}

.card-top-ribbon.blue-ribbon {
  background-color: var(--color-blue-tint);
  color: var(--color-blue);
}

.card-top-ribbon.purple-ribbon {
  background-color: var(--color-purple-tint);
  color: var(--color-purple);
}

.card-top-ribbon.green-ribbon {
  background-color: var(--color-green-tint);
  color: var(--color-green-dark);
}

.card-top-ribbon.teal-ribbon {
  background-color: rgba(13, 148, 136, 0.08);
  color: #0d9488;
}

.card-header-clean {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem 0.35rem;
}

.card-clean-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark);
}

.card-inner-body {
  padding: 0.85rem 1rem 0.95rem;
}

/* ==========================================================================
   PAGE 1: SUMMARY VIEW SECTIONS
   ========================================================================== */
.tri-card-grid {
  display: grid;
  grid-template-columns: 1.18fr 1.14fr 1fr;
  gap: 0.85rem;
  align-items: stretch;
}

.tri-card-grid>.glass-card-3d {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tri-card-grid>.glass-card-3d>.card-inner-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

/* ==========================================================================
   VISUAL CONSTITUENCY DETAILS CARD (MOCKUP ACCURATE)
   ========================================================================== */
.cd-header-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.04);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.65rem;
}

[data-theme="dark"] .cd-header-pill {
  border-color: rgba(56, 189, 248, 0.25);
  background: rgba(14, 165, 233, 0.06);
  color: #f1f5f9;
}

.cd-grid-view {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cd-grid-container {
  display: grid;
  grid-template-columns: 1.32fr 1fr;
  gap: 0.65rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cd-left-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cd-right-col {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cd-top-tiles-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  width: 100%;
  box-sizing: border-box;
}

.cd-subcard {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0.65rem 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cd-voters-card {
  background: #285a9c;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(40, 90, 156, 0.25);
}

.cd-voters-card .cd-label {
  color: #bfdbfe;
}

.cd-voters-card .cd-big-num {
  color: #ffffff;
}

.cd-ac-card {
  background: #275a9c;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(39, 90, 156, 0.25);
}

.cd-ac-card .cd-label {
  color: #bfdbfe;
}

.cd-ac-card .cd-sub-val {
  color: #ffffff;
}

[data-theme="dark"] .cd-voters-card {
  background: #285a9c;
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .cd-ac-card {
  background: #275a9c;
  border-color: rgba(255, 255, 255, 0.15);
}

.cd-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.cd-big-num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

[data-theme="dark"] .cd-big-num {
  color: #ffffff;
}

.cd-sub-val {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 0.35rem;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .cd-sub-val {
  color: #f8fafc;
}

.cd-img-wrap {
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
}

.cd-tile-illustration {
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
}

.cd-infra-card {
  background: #17263c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 0.55rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(23, 38, 60, 0.25);
}

[data-theme="dark"] .cd-infra-card {
  background: #17263c;
  border-color: rgba(255, 255, 255, 0.15);
}

.cd-infra-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.45rem;
}

.cd-infra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.cd-infra-subcard {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.cd-booths-card,
.cd-sections-card {
  background: #2760a5;
  border-color: rgba(255, 255, 255, 0.15);
}

.cd-booths-card .cd-infra-label,
.cd-sections-card .cd-infra-label {
  color: #bfdbfe;
}

[data-theme="dark"] .cd-booths-card,
[data-theme="dark"] .cd-sections-card {
  background: #2760a5;
  border-color: rgba(255, 255, 255, 0.15);
}

.cd-infra-icon-wrap {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.2rem;
}

.cd-infra-img {
  max-height: 36px;
  max-width: 36px;
  object-fit: contain;
}

.cd-infra-num {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

[data-theme="dark"] .cd-infra-num {
  color: #ffffff;
}

.cd-infra-label {
  font-size: 0.67rem;
  font-weight: 600;
  color: #cbd5e1;
}

/* Right Column: Voter Breakdown */
.cd-breakdown-card {
  background: #204476;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(32, 68, 118, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.65rem 0.55rem;
}

[data-theme="dark"] .cd-breakdown-card {
  background: #204476;
  border-color: rgba(255, 255, 255, 0.15);
}

.cd-breakdown-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.45rem;
  width: 100%;
  text-align: center;
}

.cd-split-bar {
  width: 100%;
  height: 22px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  margin-bottom: 0.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cd-split-segment.male-bar {
  background: #38bdf8;
  height: 100%;
  transition: width 0.3s ease;
}

.cd-split-segment.female-bar {
  background: #ec4899;
  height: 100%;
  transition: width 0.3s ease;
}

.cd-pct-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  padding: 0 0.15rem;
}

.cd-pct-male {
  color: #38bdf8;
}

.cd-pct-female {
  color: #ec4899;
}

.cd-figures-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.25rem 0;
  flex: 1;
  min-height: 78px;
}

.cd-fig-col {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.cd-figure-img.male-fig {
  height: 76px;
  object-fit: contain;
}

.cd-female-group {
  display: flex;
  align-items: flex-end;
  gap: 0.15rem;
}

.cd-figure-img.female-fig {
  height: 72px;
  object-fit: contain;
}

.cd-child-fig {
  height: 40px;
  width: 16px;
  margin-bottom: 2px;
  flex-shrink: 0;
}

.cd-gender-counts-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  text-align: center;
  margin-bottom: 0.45rem;
}

.cd-gender-num {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
}

.cd-gender-num.male-text {
  color: #38bdf8;
}

.cd-gender-num.female-text {
  color: #ec4899;
}

.cd-gender-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: #cbd5e1;
}

.cd-others-pill {
  width: 100%;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: #d1fae5;
}

.cd-others-pill strong {
  color: #ffffff;
}

[data-theme="dark"] .cd-others-pill {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.cd-others-icon-circle {
  color: #10b981;
  display: flex;
  align-items: center;
}

.details-table,
.segments-table,
.duplicates-table {
  width: 100%;
  border-collapse: collapse;
}

.details-table td,
.segments-table td,
.duplicates-table td {
  padding: 0.32rem 0;
  font-size: 0.77rem;
  vertical-align: middle;
}

.td-icon {
  width: 22px;
}

.td-label {
  color: var(--text-muted);
}

.td-colon {
  width: 14px;
  color: var(--text-light-muted);
  text-align: center;
}

.td-val {
  color: var(--text-dark);
}

.text-right {
  text-align: right;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.text-navy {
  color: var(--text-dark);
}

.text-blue {
  color: var(--color-blue);
}

.text-pink {
  color: var(--color-pink);
}

.text-green {
  color: var(--color-green-dark);
}

.text-red {
  color: var(--color-red);
}

.text-orange {
  color: var(--color-orange);
}

.pct-sub,
.range-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.warning-callout-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  margin-top: 0.65rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.warning-callout-pill.orange-tint {
  background-color: var(--color-orange-tint);
  border: 1px solid #fed7aa;
}

.warning-icon-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--color-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.warning-text {
  font-size: 0.74rem;
  color: #9a3412;
  line-height: 1.35;
}

[data-theme="dark"] .warning-text {
  color: #fdba74;
}

/* Donut & Legends */
.voter-composition-wrap {
  padding: 0.4rem 1rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.donut-chart-holder {
  position: relative;
  width: 145px;
  height: 145px;
  flex-shrink: 0;
}

.donut-chart-holder.sm {
  width: 125px;
  height: 125px;
}

.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.center-lbl {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1;
}

.center-count {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.15;
}

.donut-legend-right {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.legend-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.dot-legend {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.dot-blue {
  background-color: var(--color-blue);
}

.dot-pink {
  background-color: var(--color-pink);
}

.dot-green {
  background-color: var(--color-green);
}

.dot-orange {
  background-color: var(--color-orange);
}

.dot-red {
  background-color: var(--color-red);
}

.dot-purple {
  background-color: var(--color-purple);
}

.dot-indigo {
  background-color: #a855f7;
}

.dot-teal {
  background-color: #0d9488;
}

.dot-cyan {
  background-color: var(--color-cyan);
}

/* Card View Toggle Buttons */
.card-view-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px;
  border-radius: var(--radius-pill);
  gap: 2px;
}

[data-theme="dark"] .card-view-toggle {
  background: rgba(255, 255, 255, 0.08);
}

.toggle-pill-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.toggle-pill-btn:hover {
  color: var(--text-dark);
}

.toggle-pill-btn.active {
  background: #ffffff;
  color: var(--color-purple);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .toggle-pill-btn.active {
  background: #7c3aed;
  color: #ffffff;
}

/* Special Segments Layout */
.special-segments-split-wrap {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  flex: 1;
  padding: 0.4rem 0;
  min-height: 215px;
}

.special-pie-holder {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  position: relative;
}

.special-table-wrap {
  flex: 1;
  min-width: 0;
}

.segments-table.compact td {
  padding: 0.38rem 0;
  font-size: 0.75rem;
}

.leg-title {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.leg-val {
  font-size: 0.8rem;
  color: var(--text-dark);
}

.leg-pct {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Roll Change Section - Unified Single Card Layout */
.card-split-layout.roll-change-split {
  grid-template-columns: 1.35fr 1.05fr;
  gap: 1.15rem;
}

@media (max-width: 1024px) {
  .card-split-layout.roll-change-split {
    grid-template-columns: 1fr;
  }
}

.roll-change-left-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: space-between;
  height: 100%;
}

.stat-tiles-group {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.55rem;
}

.stat-tile-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.35rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-tile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.tile-header-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.4rem 0;
}

.tile-icon-circle.blue-tint {
  background-color: var(--color-blue-tint);
}

.tile-icon-circle.navy-tint {
  background-color: rgba(13, 33, 55, 0.15);
}

.tile-icon-circle.green-tint {
  background-color: var(--color-green-tint);
}

.tile-icon-circle.red-tint {
  background-color: var(--color-red-tint);
}

.tile-icon-circle.orange-tint {
  background-color: var(--color-orange-tint);
}

.tile-number-val {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
}

.navy-reduction-banner {
  background-color: var(--banner-bg);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.15rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 6px 18px rgba(13, 33, 55, 0.35);
}

.reduction-top-flex {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.chart-drop-icon {
  flex-shrink: 0;
}

.banner-line-one {
  font-size: 0.8rem;
  color: #e2e8f0;
  line-height: 1.35;
}

.banner-line-two {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.highlight-yellow {
  color: #facc15;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

.reduction-bottom-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.65rem;
  font-size: 0.7rem;
  color: #cbd5e1;
  margin-top: 0.65rem;
}

/* Tri Columns Row (ASDDO, Religion, Duplicates) */
.tri-columns-section-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

/* Side-by-Side Split Layout for Cards 3, 4, 5, 6 */
.card-split-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.25rem;
  padding: 1rem 1.2rem;
  align-items: stretch;
}

@media (max-width: 960px) {
  .card-split-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.split-left-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  height: 100%;
}

.split-right-chart {
  display: flex;
  flex-direction: column;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  min-height: 210px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.chart-panel-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.chart-canvas-holder {
  flex: 1;
  position: relative;
  min-height: 170px;
  width: 100%;
}

.asddo-chart-legend-flex {
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.asddo-legend-list {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  flex: 1;
}

.asddo-item {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.asddo-item-meta {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.74rem;
}

.asddo-title {
  color: var(--text-muted);
}

.asddo-val {
  color: var(--text-dark);
}

.bottom-callout-box {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background-color: var(--bg-card-subtle);
  border-top: 1px solid var(--border-light);
  padding: 0.6rem 0.85rem;
  margin-top: auto;
}

.bottom-callout-box.purple-tint {
  background-color: var(--color-purple-tint);
}

.callout-icon-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.callout-icon-circle.blue {
  background-color: var(--color-blue);
}

.callout-icon-circle.purple {
  background-color: var(--color-purple);
}

.callout-icon-circle.lg {
  width: 28px;
  height: 28px;
}

.callout-text {
  font-size: 0.72rem;
  color: var(--text-body);
  line-height: 1.35;
}

/* Religion Card */
.religion-body-flex {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  justify-content: space-between;
}

.religion-top-row {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  width: 100%;
}

.religion-legend-metrics-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.religion-legend-list {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  width: 100%;
  font-size: 0.72rem;
}

.rel-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
}

.rel-count {
  margin-left: auto;
  color: var(--text-dark);
}

.rel-obs-card {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  width: 100%;
}

.rel-obs-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: 0.3rem;
}

.rel-obs-para {
  font-size: 0.72rem;
  color: var(--text-body);
  line-height: 1.4;
}

.rel-metrics-pills {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.green-trend-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-green-tint);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
  color: var(--color-green-dark);
}

/* Family Grouping Card */
.family-analysis-layout {
  padding: 0.85rem 1.15rem;
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.family-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.5rem;
  row-gap: 0.5rem;
}

.family-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.77rem;
  border-bottom: 1px dashed var(--border-light);
  padding-bottom: 0.35rem;
}

.f-label-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.family-callout-panel {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background-color: var(--color-blue-tint);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
}

.family-callout-text {
  font-size: 0.76rem;
  color: #1e3a8a;
  line-height: 1.4;
}

[data-theme="dark"] .family-callout-text {
  color: #93c5fd;
}

/* ==========================================================================
   PAGE 2: ACTIONABLE INSIGHTS VIEW SECTIONS
   ========================================================================== */

/* Key Observations Grid */
.key-observations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.obs-card {
  padding: 0.95rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.obs-num-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.obs-num-circle.red {
  background-color: var(--color-red);
}

.obs-num-circle.orange {
  background-color: var(--color-orange);
}

.obs-num-circle.purple {
  background-color: var(--color-purple);
}

.obs-num-circle.blue {
  background-color: var(--color-blue);
}

.obs-num-circle.green {
  background-color: var(--color-green-dark);
}

.obs-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.obs-text {
  font-size: 0.77rem;
  color: var(--text-body);
  line-height: 1.4;
}

/* Priority Action Plan */
.tag-ribbon-yellow {
  font-size: 0.7rem;
  font-weight: 700;
  background-color: #fef08a;
  color: #854d0e;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  margin-left: auto;
}

.priority-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.priority-action-card {
  padding: 0.95rem 1rem;
  display: flex;
  flex-direction: column;
}

.priority-top-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-light);
}

.p-badge {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.p-badge.red {
  background-color: var(--color-red);
}

.p-badge.blue {
  background-color: var(--color-blue);
}

.p-badge.orange {
  background-color: var(--color-orange);
}

.p-badge.green {
  background-color: var(--color-green-dark);
}

.p-badge.purple {
  background-color: var(--color-purple);
}

.p-badge.cyan {
  background-color: var(--color-cyan);
}

.p-title {
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-dark);
}

.p-bullet-list {
  padding-left: 1.1rem;
  font-size: 0.76rem;
  color: var(--text-body);
  line-height: 1.45;
}

.p-bullet-list li {
  margin-bottom: 0.25rem;
}

/* 10-Day Execution Plan Timeline */
.tag-ribbon-green {
  font-size: 0.7rem;
  font-weight: 700;
  background-color: #bbf7d0;
  color: #166534;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  margin-left: auto;
}

.ten-day-timeline-card {
  padding: 1.15rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.days-flow-bar {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.4rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.65rem;
}

.day-step {
  flex: 1;
  min-width: 95px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.45rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: default;
  transition: all 0.15s ease;
  user-select: none;
}

.day-step:hover {
  border-color: var(--border-light);
}

.day-step.done {
  background-color: var(--color-green-tint);
  border-color: #86efac;
}

.day-num-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0d2137;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
}

.day-step.done .day-num-circle {
  background-color: var(--color-green-dark);
}

.day-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--color-blue);
  margin-bottom: 0.2rem;
}

.day-text {
  font-size: 0.68rem;
  color: var(--text-body);
  line-height: 1.25;
}

.day-arrow {
  display: flex;
  align-items: center;
  color: var(--text-light-muted);
  font-size: 0.8rem;
}

.timeline-interaction-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-light);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.milestone-count-pill {
  font-weight: 700;
  color: var(--color-green-dark);
  background: var(--color-green-tint);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
}

/* Expected Outcomes & Our Commitment */
.outcomes-commitment-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.9rem;
}

.outcomes-four-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.outcome-box {
  padding: 0.95rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.outcome-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-orange-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.55rem;
}

.outcome-title {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.outcome-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Commitment Card */
.commitment-card {
  padding: 1.45rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--color-blue-tint) 0%, var(--color-green-tint) 100%);
  border: 1px solid #bfdbfe;
}

.quote-sign {
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--color-primary);
  line-height: 0.8;
  margin-bottom: 0.2rem;
}

.commitment-quote-text {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-dark);
  line-height: 1.55;
  margin-bottom: 0.95rem;
}

.commitment-author {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.55rem;
}

.commitment-footer-tag {
  display: flex;
  gap: 0.65rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* ==========================================================================
   BOOTH MODAL
   ========================================================================== */
.action-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 33, 55, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

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

.action-modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  box-shadow: var(--shadow-popup);
  overflow: hidden;
  animation: popIn 0.2s ease;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-top-bar {
  background: #0d2137;
  color: #ffffff;
  padding: 1rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-cluster {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.booth-badge-pill {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--color-blue);
  color: #ffffff;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.modal-heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}

.modal-close-x {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close-x:hover {
  color: #ffffff;
}

.modal-body-scroll {
  padding: 1.35rem;
  max-height: 70vh;
  overflow-y: auto;
  font-size: 0.84rem;
  color: var(--text-body);
}

.modal-footer-bar {
  padding: 0.85rem 1.35rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  background: var(--bg-card-subtle);
}

.btn-cancel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-primary {
  background: #1e40af;
  border: none;
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
}

/* Subtle Line Divider */
.subtle-line-divider {
  width: 100%;
  height: 1px;
  background-color: var(--border-light);
  margin: 2rem 0;
  opacity: 0.7;
}

/* Mobile Navigation Elements */
.mobile-hamburger-btn {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-dark);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.mobile-hamburger-btn:hover {
  color: var(--color-blue);
  border-color: var(--color-blue);
}

.mobile-sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 490;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

body.sidebar-open-mobile .mobile-sidebar-backdrop {
  opacity: 1;
  pointer-events: all;
}

/* ==========================================================================
   COMPREHENSIVE MULTI-DEVICE RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* 1. Large Laptops / Compact Desktops (<= 1200px) */
@media (max-width: 1200px) {
  .tri-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tri-card-grid>.col-card:nth-child(3) {
    grid-column: 1 / -1;
  }

  .card-split-layout {
    grid-template-columns: 1.15fr 1fr;
    gap: 1rem;
  }

  .card-split-layout.roll-change-split {
    grid-template-columns: 1.15fr 1fr;
    gap: 1rem;
  }
}

/* 2. Tablet Landscape / Small Laptops (<= 992px) */
@media (max-width: 992px) {
  .top-nav-bar {
    padding: 0.4rem 0.85rem;
  }

  .nav-center-direct .header-center-main-title {
    font-size: 0.92rem;
  }

  .nav-center-direct .header-center-sub-title {
    font-size: 0.7rem;
  }

  .leader-photo-item {
    width: 38px;
    height: 38px;
  }

  .tri-card-grid {
    grid-template-columns: 1fr;
  }

  .card-split-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card-split-layout.roll-change-split {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .family-analysis-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .key-observations-grid,
  .priority-actions-grid,
  .outcomes-commitment-grid {
    grid-template-columns: 1fr;
  }
}

/* 3. Tablet Portrait / Mobile Off-Canvas Drawer (<= 860px) */
@media (max-width: 860px) {
  .top-nav-bar {
    min-height: 48px;
    height: 48px;
    padding: 0.25rem 0.65rem;
    gap: 0.5rem;
  }

  .mobile-hamburger-btn {
    display: flex;
    width: 32px;
    height: 32px;
    padding: 4px;
  }

  .kpcc-brand {
    gap: 0.45rem;
  }

  .kpcc-logo-img {
    height: 28px;
    width: auto;
  }

  .kpcc-title {
    font-size: 1.12rem;
  }

  .kpcc-sub {
    display: none;
  }

  .header-slogan {
    display: none;
  }

  .nav-leaders-group {
    display: none;
  }

  .theme-toggle-btn {
    width: 32px;
    height: 32px;
  }

  .app-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
  }

  .sidebar-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    height: 100vh;
    z-index: 500;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  }

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

  .main-stage-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
  }

  /* Compact Report Tabs Bar on Mobile */
  .report-tabs-bar {
    min-height: 28px;
    height: 28px;
    padding: 0.1rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  .report-tabs-container {
    padding: 2px;
    gap: 2px;
    border-radius: 4px;
  }

  .report-tab-btn {
    padding: 0.15rem 0.4rem;
    font-size: 0.72rem;
    gap: 0.25rem;
    border-radius: 4px;
    line-height: 1.1;
  }

  .report-tab-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Ultra-compact Single-Line Persistent AC Bar on Mobile */
  .persistent-ac-bar {
    min-height: 32px;
    height: 32px;
    padding: 0 0.65rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
    gap: 0.45rem;
    font-size: 0.74rem;
  }

  .pac-left {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
  }

  .pac-pin-icon {
    font-size: 0.78rem;
    line-height: 1;
  }

  .pac-ac-badge {
    font-size: 0.68rem;
    padding: 0.08rem 0.35rem;
    border-radius: 3px;
    flex-shrink: 0;
  }

  .pac-ac-title {
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }

  .pac-type-pill {
    display: none !important;
  }

  .pac-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
    margin-left: auto;
    flex-shrink: 0;
  }

  .pac-stat-ratio,
  .pac-sep-voters {
    display: none !important;
  }

  .pac-quick-btn {
    padding: 0.15rem 0.45rem;
    font-size: 0.68rem;
    border-radius: 4px;
    gap: 0.2rem;
  }

  .pac-quick-btn svg {
    width: 11px;
    height: 11px;
  }

  .main-content-stage {
    padding: 0.75rem 0.65rem 3.5rem;
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .content-header-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .header-strip-left {
    width: 100%;
  }

  .header-strip-right {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
  }

  .booth-quick-search-box {
    flex: 1;
    min-width: 180px;
    width: auto;
  }

  .stat-tiles-group {
    grid-template-columns: repeat(3, 1fr);
  }

  .nav-center-direct .header-center-main-title {
    font-size: 0.85rem;
    white-space: normal;
  }

  .nav-center-direct .header-center-sub-title {
    font-size: 0.68rem;
    white-space: normal;
  }
}

/* 4. Mobile Phones (<= 640px) */
@media (max-width: 640px) {
  .top-nav-bar {
    min-height: 44px;
    height: 44px;
    padding: 0.2rem 0.5rem;
    gap: 0.35rem;
  }

  .app-layout {
    height: calc(100vh - 44px);
  }

  .kpcc-logo-img {
    height: 26px;
  }

  .kpcc-title {
    font-size: 1.05rem;
  }

  .nav-left {
    gap: 0.35rem;
  }

  .nav-right {
    gap: 0.35rem;
  }

  /* On mobile phones, hide the redundant long center titles to eliminate vertical bloat */
  .nav-center-direct {
    display: none !important;
  }

  .theme-toggle-btn {
    width: 30px;
    height: 30px;
  }

  .mobile-hamburger-btn {
    width: 30px;
    height: 30px;
  }

  /* Responsive Tab Buttons - Compact text */
  .tab-label-full {
    display: none !important;
  }

  .tab-label-short {
    display: inline !important;
  }

  .report-tabs-bar {
    min-height: 32px;
    height: 32px;
    padding: 0.15rem 0.4rem;
  }

  .report-tab-btn {
    padding: 0.22rem 0.35rem;
    font-size: 0.74rem;
    gap: 0.25rem;
  }

  .report-tab-btn svg {
    width: 13px;
    height: 13px;
  }

  /* Single-line Persistent AC Bar - Phone Optimization */
  .persistent-ac-bar {
    min-height: 30px;
    height: 30px;
    padding: 0 0.45rem;
    gap: 0.35rem;
  }

  .pac-district,
  .pac-sep-dist,
  .pac-stat-booths,
  .pac-sep-booths {
    display: none !important;
  }

  .pac-ac-title {
    max-width: 110px;
    font-size: 0.78rem;
  }

  .pac-stat-voters {
    font-size: 0.7rem;
  }

  .pac-btn-label-full {
    display: none !important;
  }

  .pac-btn-label-short {
    display: inline !important;
  }

  .pac-quick-btn {
    padding: 0.12rem 0.38rem;
    font-size: 0.65rem;
  }

  .stat-tiles-group {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
  }

  .asddo-chart-legend-flex {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .religion-top-row {
    flex-direction: column;
  }

  .special-segments-split-wrap {
    flex-direction: column;
    min-height: auto;
    text-align: center;
  }

  .special-pie-holder {
    margin: 0 auto;
  }

  .voter-composition-wrap {
    flex-direction: column;
    text-align: center;
  }

  .family-stats-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .navy-reduction-banner {
    padding: 0.75rem 0.85rem;
  }

  .banner-line-two {
    font-size: 1rem;
  }

  .chart-drop-icon svg {
    width: 26px;
    height: 26px;
  }

  /* Constituency Details Grid View Mobile Fix */
  .cd-grid-container {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }

  .cd-left-col,
  .cd-right-col {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .cd-subcard,
  .cd-breakdown-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .cd-figures-row {
    max-width: 100%;
    overflow: hidden;
  }

  .card-inner-body {
    padding: 0.65rem 0.75rem;
  }

  .table-responsive,
  .table-scroll-wrap,
  .card-table-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .table-responsive table,
  .table-scroll-wrap table,
  .card-table-wrapper table,
  table.data-table,
  table.cand-table,
  table.elections-table,
  table.critical-booths-table,
  table.high-addition-table {
    display: table !important;
    width: 100% !important;
    min-width: 560px !important;
  }

  .cand-callout-grid,
  .cand-split-2col,
  .cand-grid,
  .cand-summary-grid {
    grid-template-columns: 1fr !important;
  }

  .cand-callout-card {
    padding: 0.85rem;
    gap: 0.75rem;
  }

  .main-content-stage,
  .main-stage-wrapper,
  .app-layout {
    overflow-x: hidden !important;
    max-width: 100vw;
  }
}

/* 5. Extra Small Devices (<= 420px) */
@media (max-width: 420px) {
  .report-tab-btn {
    font-size: 0.7rem;
    padding: 0.18rem 0.28rem;
    gap: 0.2rem;
  }

  .report-tab-btn svg {
    width: 12px;
    height: 12px;
  }

  .pac-ac-title {
    max-width: 90px;
    font-size: 0.75rem;
  }

  .pac-stat-voters {
    font-size: 0.68rem;
  }

  .stat-tiles-group {
    grid-template-columns: 1fr 1fr;
  }

  .tile-number-val {
    font-size: 0.92rem;
  }

  .stat-tile-card {
    padding: 0.45rem 0.2rem;
  }

  .header-strip-right {
    flex-direction: column;
    align-items: stretch;
  }

  .export-pdf-btn {
    width: 100%;
    justify-content: center;
  }

  .page-title {
    font-size: 1.2rem;
  }

  .login-card {
    padding: 1.75rem 1.15rem;
    width: 92%;
  }

  .login-title {
    font-size: 1.35rem;
  }
}

/* 6. Ultra Compact Devices (<= 360px) */
@media (max-width: 360px) {
  .report-tab-btn svg {
    display: none;
    /* preserve space on tiny screens */
  }

  .pac-stat-voters {
    display: none !important;
  }

  .pac-ac-title {
    max-width: 80px;
  }
}

.tbl-icon-img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

/* ==========================================================================
   CONSTITUENCY SEARCH & DROPDOWN ENHANCEMENTS
   ========================================================================== */
.constituency-search-header {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 5;
}

.constituency-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.55rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.constituency-search-input-wrap:focus-within {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  background: var(--bg-card);
}

.cs-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.constituency-filter-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.78rem;
  color: var(--text-dark);
  width: 100%;
}

.cs-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.1rem 0.25rem;
  line-height: 1;
}

.cs-clear-btn:hover {
  color: var(--color-red);
}

.constituency-options-scroll {
  max-height: 280px;
  overflow-y: auto;
}

/* ==========================================================================
   CONSTITUENCY DETAILS (CARD 1A) - HEADER & TABLE VIEW
   ========================================================================== */
.cd-top-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.cd-top-header-row .cd-header-pill {
  margin-bottom: 0;
}

.cd-table-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 0.45rem;
}

#special-segments-container,
#voter-composition-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 0.45rem;
}

.cd-table-list {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.cd-table-row {
  display: flex;
  align-items: center;
  padding: 0.26rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  transition: background 0.15s ease;
}

.cd-table-row:hover {
  background: rgba(37, 99, 235, 0.04);
}

.cd-tbl-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 125px;
  flex-shrink: 0;
}

.cd-tbl-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cd-tbl-icon.cd-icon-location,
.cd-tbl-icon.cd-icon-booth,
.cd-tbl-icon.cd-icon-sections,
.cd-tbl-icon.cd-icon-voters,
.cd-tbl-icon.cd-icon-male {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
}

.cd-tbl-icon.cd-icon-female {
  background: rgba(236, 72, 153, 0.1);
  color: #ec4899;
}

.cd-tbl-icon.cd-icon-others {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.cd-tbl-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dark);
}

.cd-tbl-sep {
  color: var(--text-muted);
  margin: 0 0.35rem;
  font-weight: 600;
}

.cd-tbl-val {
  font-size: 0.79rem;
  color: var(--text-dark);
  font-weight: 600;
  white-space: nowrap;
}

.cd-table-centenarian-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-top: auto;
  min-height: 54px;
}

.cd-table-centenarian-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.12);
}

[data-theme="dark"] .cd-table-centenarian-box {
  background: rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.35);
}

.cd-table-star-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cd-table-alert-text {
  font-size: 0.75rem;
  color: #9a3412;
  line-height: 1.35;
}

[data-theme="dark"] .cd-table-alert-text {
  color: #fdba74;
}

/* ==========================================================================
   CARDS 1B & 1C - MATCHING BOTTOM CALLOUT CARDS & BALANCED FIT
   ========================================================================== */
.card-bottom-callout-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: auto;
  min-height: 54px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-bottom-callout-box:hover {
  transform: translateY(-1px);
}

.card-bottom-callout-box.purple-tint {
  background: rgba(124, 58, 237, 0.05);
  border-color: rgba(124, 58, 237, 0.22);
}

[data-theme="dark"] .card-bottom-callout-box.purple-tint {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.35);
}

.card-bottom-callout-box.blue-tint {
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.22);
}

[data-theme="dark"] .card-bottom-callout-box.blue-tint {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.35);
}

.callout-icon-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.callout-icon-circle.purple-bg {
  background: #7c3aed;
  color: #ffffff;
}

.callout-icon-circle.blue-bg {
  background: linear-gradient(135deg, #2563eb, #ec4899);
  color: #ffffff;
}

.callout-text-body {
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-dark);
  flex: 1;
}

.callout-text-body .callout-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.1rem;
}

.metric-bar-item {
  display: flex;
  flex-direction: column;
}

.mb-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.mb-val {
  font-size: 0.88rem;
  color: var(--text-dark);
}

/* ==========================================================================
   SECTION 7: LOGICAL DISCREPANCY ANALYSIS
   ========================================================================== */
.logical-warning-badge {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-left: auto;
}

.logical-kpi-banner {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1.75fr;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

@media (max-width: 900px) {
  .logical-kpi-banner {
    grid-template-columns: 1fr;
  }
}

.logical-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  position: relative;
}

.logical-kpi-card.unmapped-kpi {
  background: rgba(220, 38, 38, 0.04);
  border-color: rgba(220, 38, 38, 0.22);
}

.lk-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lk-icon-circle.blue {
  background: rgba(37, 99, 235, 0.1);
}

.lk-icon-circle.red {
  background: rgba(220, 38, 38, 0.12);
}

.lk-meta {
  display: flex;
  flex-direction: column;
}

.lk-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.lk-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.lk-pct-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.lk-primary-tag {
  position: absolute;
  top: 0.55rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  background: #dc2626;
  color: #ffffff;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.logical-kpi-card.obs-kpi {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  background: rgba(37, 99, 235, 0.04);
  border-color: rgba(37, 99, 235, 0.2);
}

.lk-obs-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lk-obs-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-blue);
  letter-spacing: 0.04em;
}

.lk-obs-text {
  font-size: 0.78rem;
  color: var(--text-dark);
  line-height: 1.35;
  margin: 0;
}

.card-split-layout.logical-split {
  grid-template-columns: 1.1fr 1.2fr;
  gap: 1.15rem;
}

@media (max-width: 1024px) {
  .card-split-layout.logical-split {
    grid-template-columns: 1fr;
  }
}

.logical-cat-table {
  width: 100%;
  border-collapse: collapse;
}

.logical-cat-table th {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.logical-cat-table td {
  padding: 0.45rem 0.5rem;
  font-size: 0.78rem;
  border-bottom: 1px dashed var(--border-light);
}

.cat-reason-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.cat-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.logical-priority-booths-wrap {
  margin-top: 1rem;
  border-top: 1px solid var(--border-light);
  padding-top: 0.75rem;
}

.lpb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.lpb-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dark);
}

.lpb-summary {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.logical-booths-table {
  width: 100%;
  border-collapse: collapse;
}

.logical-booths-table th {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}

.logical-booths-table td {
  padding: 0.38rem 0.4rem;
  font-size: 0.74rem;
  border-bottom: 1px dashed var(--border-light);
}

.booth-chip-clickable {
  display: inline-block;
  background: var(--color-blue-tint);
  color: var(--color-blue);
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0.1rem;
}

.booth-chip-clickable:hover {
  background: var(--color-blue);
  color: #ffffff;
}

/* ==========================================================================
   KEY FOCUS AREAS BANNER
   ========================================================================== */
.key-focus-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.kfb-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.kfb-title-icon {
  font-size: 1.15rem;
}

.kfb-heading {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-dark);
  margin: 0;
}

.kfb-tiles-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

@media (max-width: 1024px) {
  .kfb-tiles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .kfb-tiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kfb-tile {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  text-align: center;
  transition: transform 0.15s ease;
}

.kfb-tile:hover {
  transform: translateY(-2px);
}

.kfb-tile.highlight-tile {
  background: rgba(124, 58, 237, 0.05);
  border-color: rgba(124, 58, 237, 0.25);
}

.kfb-tile-num {
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.2;
}

.kfb-tile-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* ==========================================================================
   MAIN STAGE WRAPPER, PERSISTENT AC BAR & REPORT TABS BAR
   ========================================================================== */
.main-stage-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.report-tabs-bar {
  background: linear-gradient(180deg, #091728 0%, #0e223d 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
  padding: 0.45rem 1.25rem !important;
  display: flex;
  align-items: center;
  justify-content: stretch;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 95;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28) !important;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

[data-theme="dark"] .report-tabs-bar {
  background: linear-gradient(180deg, #050d18 0%, #0a1728 100%) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.persistent-ac-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 0.4rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  z-index: 90;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .persistent-ac-bar {
  background: #111d33;
  border-color: rgba(255, 255, 255, 0.08);
}

.pac-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pac-pin-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.pac-ac-badge {
  background: var(--color-blue);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
}

.pac-ac-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-dark);
}

.pac-sep {
  color: var(--text-light-muted);
  font-size: 0.75rem;
}

.pac-district {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
}

.pac-type-pill {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-green-dark);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

[data-theme="dark"] .pac-type-pill {
  color: #a7f3d0;
}

.pac-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.pac-stat-item {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.pac-stat-item strong {
  color: var(--text-dark);
}

.pac-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card-subtle);
  color: var(--color-blue);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pac-quick-btn:hover {
  background: var(--color-blue-tint);
  border-color: var(--color-blue);
}

.report-tabs-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(4, 13, 26, 0.7) !important;
  padding: 5px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45) !important;
  width: 100%;
  box-sizing: border-box;
}

.report-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.65rem 1.25rem;
  border: 1.5px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #cbd5e1;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  text-align: center;
  position: relative;
}

.report-tab-btn svg {
  color: inherit;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

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

/* SUPER PROMINENT ACTIVE SELECTION FOR TOP 2 TABS */
.report-tab-btn.active {
  background: #ffffff !important;
  color: #0b1f3d !important;
  font-weight: 800 !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 0 2.5px #2563eb !important;
}

.report-tab-btn.active svg {
  color: #1d4ed8 !important;
  transform: scale(1.15);
}

.report-tab-btn.active::after {
  content: "ACTIVE";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: #2563eb;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 6px;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.4);
}

[data-theme="dark"] .report-tab-btn.active {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.5), 0 0 0 2px #93c5fd !important;
}

[data-theme="dark"] .report-tab-btn.active svg {
  color: #ffffff !important;
}

[data-theme="dark"] .report-tab-btn.active::after {
  background: #ffffff;
  color: #1e3a8a;
}

@media (max-width: 640px) {
  .report-tab-btn.active::after {
    display: none;
  }
}

/* Full / Short Label Helper Utilities for Responsive Tabs & Persistent Bar */
.pac-btn-label-short {
  display: none;
}

.pac-btn-label-full {
  display: inline;
}

.tab-label-short {
  display: none;
}

.tab-label-full {
  display: inline;
}

/* ==========================================================================
   CANDIDATE SUMMARY COMPONENT STYLING (15 SECTIONS)
   ========================================================================== */
.cand-tag-badge {
  display: inline-block;
  background: rgba(234, 88, 12, 0.12);
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.3);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

[data-theme="dark"] .cand-tag-badge {
  background: rgba(234, 88, 12, 0.2);
  color: #fb923c;
  border-color: rgba(234, 88, 12, 0.4);
}

.kpi-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  width: 100%;
}

.kpi-mini-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-mini-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.kpi-mini-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-mini-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

[data-theme="dark"] .kpi-mini-val {
  color: #ffffff;
}

.cand-split-2col {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.25rem;
  padding: 1.15rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .cand-split-2col {
    grid-template-columns: 1fr;
  }
}

.split-left-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.split-right-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.95rem;
}

.roll-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-top: 0.35rem;
}

@media (max-width: 640px) {
  .roll-summary-grid {
    grid-template-columns: 1fr;
  }
}

.callout-card {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.callout-card strong {
  font-size: 0.85rem;
}

.blue-callout {
  background: var(--color-blue-tint);
  border-left: 4px solid var(--color-blue);
  color: var(--text-body);
}

.blue-callout strong {
  color: var(--color-blue);
}

.orange-callout {
  background: var(--color-orange-tint);
  border-left: 4px solid var(--color-orange);
  color: var(--text-body);
}

.orange-callout strong {
  color: var(--color-orange);
}

.purple-callout {
  background: var(--color-purple-tint);
  border-left: 4px solid var(--color-purple);
  color: var(--text-body);
}

.purple-callout strong {
  color: var(--color-purple);
}

.green-callout {
  background: var(--color-green-tint);
  border-left: 4px solid var(--color-green-dark);
  color: var(--text-body);
}

.green-callout strong {
  color: var(--color-green-dark);
}

.red-callout {
  background: var(--color-red-tint);
  border-left: 4px solid var(--color-red);
  color: var(--text-body);
}

.red-callout strong {
  color: var(--color-red);
}

.compact-table th,
.compact-table td {
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
}

/* ==========================================================================
   ENHANCED CANDIDATE SUMMARY DASHBOARD STYLES
   ========================================================================== */
.cand-split-2col {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.cand-split-2col.equal {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 900px) {

  .cand-split-2col,
  .cand-split-2col.equal {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.split-left-main,
.split-right-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

/* KPI Mini Grid */
.kpi-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.kpi-mini-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-mini-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.kpi-mini-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.kpi-mini-val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.kpi-mini-sub {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
}

.kpi-mini-box.blue-tint {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.2);
}

.kpi-mini-box.blue-tint .kpi-mini-val {
  color: var(--color-blue);
}

.kpi-mini-box.green-tint {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.2);
}

.kpi-mini-box.green-tint .kpi-mini-val {
  color: var(--color-green-dark);
}

.kpi-mini-box.red-tint {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.2);
}

.kpi-mini-box.red-tint .kpi-mini-val {
  color: var(--color-red);
}

.kpi-mini-box.orange-tint {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.2);
}

.kpi-mini-box.orange-tint .kpi-mini-val {
  color: var(--color-orange);
}

.kpi-mini-box.purple-tint {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.2);
}

.kpi-mini-box.purple-tint .kpi-mini-val {
  color: var(--color-purple);
}

/* Gender Progress Meter */
.cand-gender-meter-wrap {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  margin-top: 0.65rem;
}

.cand-meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.cand-meter-bar {
  width: 100%;
  height: 12px;
  border-radius: 6px;
  background: #f1f5f9;
  display: flex;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cand-bar-segment.male {
  background: #3b82f6;
  height: 100%;
}

.cand-bar-segment.female {
  background: #ec4899;
  height: 100%;
}

.cand-meter-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Tag Badge */
.cand-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-dark);
}

.cand-tag-badge.blue-tag {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--color-blue);
}

.cand-tag-badge.orange-tag {
  background: rgba(234, 88, 12, 0.1);
  border-color: rgba(234, 88, 12, 0.3);
  color: var(--color-orange);
}

.cand-tag-badge.green-tag {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--color-green-dark);
}

/* ==========================================================================
   SECTION 1: HERO INTELLIGENCE BRIEFING & VIBRANT KPIS
   ========================================================================== */
.cand-hero-brief-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(99, 102, 241, 0.04));
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-left: 4px solid var(--color-blue);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  margin-bottom: 1.35rem;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.05);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .cand-hero-brief-card {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.22), rgba(15, 23, 42, 0.5));
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.hero-brief-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

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

.hero-brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
}

.hero-brief-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--color-blue);
  text-transform: uppercase;
}

.pulse-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.hero-brief-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-brief-text {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-dark);
  font-weight: 500;
  margin: 0;
}

/* 8 Vibrant KPI Stat Cards Grid */
.kpi-vibrant-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

@media (max-width: 1100px) {
  .kpi-vibrant-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .kpi-vibrant-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-vibrant-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.kpi-vibrant-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .kpi-vibrant-card {
  background: rgba(30, 41, 59, 0.7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .kpi-vibrant-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.kpi-vibrant-card.border-blue {
  border-left: 4px solid #2563eb;
}

.kpi-vibrant-card.border-indigo {
  border-left: 4px solid #6366f1;
}

.kpi-vibrant-card.border-sky {
  border-left: 4px solid #0284c7;
}

.kpi-vibrant-card.border-emerald {
  border-left: 4px solid #10b981;
}

.kpi-vibrant-card.border-pink {
  border-left: 4px solid #ec4899;
}

.kpi-vibrant-card.border-red {
  border-left: 4px solid #ef4444;
}

.kpi-vibrant-card.border-amber {
  border-left: 4px solid #f59e0b;
}

.kpi-vibrant-card.border-purple {
  border-left: 4px solid #8b5cf6;
}

.kpi-vibrant-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.kpi-vibrant-card:hover .kpi-vibrant-icon-wrap {
  transform: scale(1.08);
}

.bg-blue-tint {
  background: rgba(37, 99, 235, 0.12);
}

.bg-indigo-tint {
  background: rgba(99, 102, 241, 0.12);
}

.bg-sky-tint {
  background: rgba(2, 132, 199, 0.12);
}

.bg-emerald-tint {
  background: rgba(16, 185, 129, 0.12);
}

.bg-pink-tint {
  background: rgba(236, 72, 153, 0.12);
}

.bg-red-tint {
  background: rgba(239, 68, 68, 0.12);
}

.bg-amber-tint {
  background: rgba(245, 158, 11, 0.12);
}

.bg-purple-tint {
  background: rgba(139, 92, 246, 0.12);
}

.kpi-vibrant-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.kpi-vibrant-label {
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-vibrant-val {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-dark);
  margin-bottom: 0.15rem;
}

.text-indigo {
  color: #6366f1;
}

.text-sky {
  color: #0284c7;
}

.kpi-vibrant-sub {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Enhanced Elector Gender Dynamics Showcase */
.cand-gender-showcase {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

@media (max-width: 900px) {
  .cand-gender-showcase {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.gender-showcase-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
}

.gender-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gender-avatar-wrap.male-avatar {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.gender-avatar-wrap.female-avatar {
  background: linear-gradient(135deg, #db2777, #ec4899);
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.3);
}

.gender-cohort-info {
  display: flex;
  flex-direction: column;
}

.cohort-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.cohort-metric-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.cohort-pct {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.cohort-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.gender-showcase-center {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.gender-meter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.meter-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dark);
}

.meter-ratio-badge {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(236, 72, 153, 0.12));
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-dark);
}

.gender-dual-bar {
  width: 100%;
  height: 14px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.08);
  display: flex;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.dual-bar-segment.male-bar {
  background: linear-gradient(90deg, #1d4ed8, #3b82f6);
  height: 100%;
  transition: width 0.4s ease;
}

.dual-bar-segment.female-bar {
  background: linear-gradient(90deg, #ec4899, #f43f5e);
  height: 100%;
  transition: width 0.4s ease;
}

.gender-meter-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   SECTION 2: ELECTION SNAPSHOT CARDS, STYLED TABLE & CALLOUT HERO
   ========================================================================== */
.election-snapshots-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
  .election-snapshots-row {
    grid-template-columns: 1fr;
  }
}

.election-snapshot-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-card-3d);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.election-snapshot-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-3d-hover);
}

.election-snapshot-card.win-inc {
  border-top: 4px solid #10b981;
}

.election-snapshot-card.win-bjp {
  border-top: 4px solid #ea580c;
}

.election-snapshot-card.win-jds {
  border-top: 4px solid #16a34a;
}

.snapshot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.65rem;
}

.snapshot-year-tag {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.snapshot-status-pill {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.snapshot-status-pill.pill-inc {
  background: rgba(16, 185, 129, 0.15);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .snapshot-status-pill.pill-inc {
  background: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.snapshot-status-pill.pill-bjp {
  background: rgba(234, 88, 12, 0.15);
  color: #9a3412;
  border: 1px solid rgba(234, 88, 12, 0.35);
}

[data-theme="dark"] .snapshot-status-pill.pill-bjp {
  background: rgba(234, 88, 12, 0.25);
  color: #fdba74;
}

.snapshot-status-pill.pill-jds {
  background: rgba(22, 163, 74, 0.15);
  color: #166534;
  border: 1px solid rgba(22, 163, 74, 0.35);
}

[data-theme="dark"] .snapshot-status-pill.pill-jds {
  background: rgba(22, 163, 74, 0.25);
  color: #bbf7d0;
}

.snapshot-candidate-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
}

.snapshot-candidate-box.winner-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(37, 99, 235, 0.06));
  border-color: rgba(16, 185, 129, 0.25);
}

.cand-profile-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.cand-party-logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.15s ease;
}

.cand-party-logo-badge:hover {
  transform: scale(1.1);
}

[data-theme="dark"] .cand-party-logo-badge {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.15);
}

.cand-party-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.table-party-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  margin-right: 0.35rem;
  vertical-align: -2.5px;
}

.cand-rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.cand-rank-badge.gold {
  background: #fef08a;
  color: #854d0e;
  border: 1px solid #facc15;
}

.cand-rank-badge.silver {
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.cand-names-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cand-name-text {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.cand-votes-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-dark);
  text-align: right;
  white-space: nowrap;
}

.snapshot-metrics-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.45rem;
  font-size: 0.74rem;
}

.snapshot-margin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .snapshot-margin-badge {
  color: #fcd34d;
}

.snapshot-turnout-text {
  font-weight: 600;
  color: var(--text-muted);
}

/* Party Pills */
.party-pill-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.party-pill-brand.inc {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.35);
  color: #1d4ed8;
}

[data-theme="dark"] .party-pill-brand.inc {
  color: #93c5fd;
  border-color: rgba(37, 99, 235, 0.5);
}

.party-pill-brand.bjp {
  background: rgba(234, 88, 12, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.35);
  color: #c2410c;
}

[data-theme="dark"] .party-pill-brand.bjp {
  color: #fdba74;
}

.party-pill-brand.jds {
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.35);
  color: #15803d;
}

[data-theme="dark"] .party-pill-brand.jds {
  color: #86efac;
}

/* Strategic Insights Callout Grid */
.cand-callout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .cand-callout-grid {
    grid-template-columns: 1fr;
  }
}

.cand-callout-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.cand-callout-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.cand-callout-card.strategic-callout {
  border-left: 4px solid #2563eb;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), var(--bg-card));
}

.cand-callout-card.action-callout {
  border-left: 4px solid #ea580c;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.05), var(--bg-card));
}

.callout-hero-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.callout-hero-icon-box.bg-blue-glow {
  background: rgba(37, 99, 235, 0.14);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.15);
}

.callout-hero-icon-box.bg-orange-glow {
  background: rgba(234, 88, 12, 0.14);
  box-shadow: 0 0 15px rgba(234, 88, 12, 0.15);
}

.callout-hero-content {
  flex: 1;
  min-width: 0;
}

.callout-pill-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.callout-headline {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.45rem;
  line-height: 1.25;
}

.callout-text {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-body);
  margin: 0;
}

/* Styled Table & Chart Card */
.panel-title-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.panel-main-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.panel-sub-title {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chart-card-styled {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* ==========================================================================
   IMAGE 1 & IMAGE 2 EXECUTIVE UI ENHANCEMENTS
   ========================================================================== */

/* Login Overlay Core Values Tag */
.figma-core-values-tag {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  margin-top: 4px;
  display: block;
}

/* Voice of India's Youth Calligraphy Wrap — between Rahul Gandhi and login card */
.figma-voice-youth-wrap {
  position: absolute;
  right: -90px;
  bottom: 140px;
  z-index: 12;
  pointer-events: none;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
  animation: subtleFloat 4s ease-in-out infinite alternate;
}

@keyframes subtleFloat {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-5px);
  }
}

.figma-voice-youth-img {
  width: 120px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Login Overlay Vidhana Soudha Graphic in Corner */
.figma-vidhana-corner {
  position: absolute;
  right: -20px;
  bottom: -15px;
  z-index: 2;
  pointer-events: none;
}

.figma-vidhana-img {
  height: 140px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.55));
  opacity: 0.95;
}

/* Top Executive Global Header matching Image 1 */
.top-nav-bar {
  background: #012241 !important;
  border-bottom: 2px solid #2F6089 !important;
  min-height: 72px;
  padding: 0.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  gap: 1.5rem;
}

.top-nav-bar .kpcc-title {
  color: #FFFFFF !important;
}

.top-nav-bar .kpcc-sub {
  color: rgba(255, 255, 255, 0.75) !important;
}

.header-divider-line {
  width: 2px;
  height: 42px;
  background: rgba(255, 255, 255, 0.25);
  margin: 0 1rem;
}

.nav-title-cluster {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.top-nav-bar .header-center-main-title {
  font-family: var(--font-display, 'Inter');
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF !important;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.top-nav-bar .header-center-sub-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: #829DBB !important;
  margin-top: 2px;
}

/* 8 Leadership Circular Avatars in Dashboard Header */
.dash-leadership-avatars {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dash-avatar-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.dash-avatar-ring:hover {
  transform: translateY(-3px) scale(1.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.dash-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 12px;
}

.dash-header-controls .header-icon-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-header-controls .header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

/* Executive Dashboard Bottom Footer Bar matching Image 1 */
.dashboard-footer-bar {
  width: 100%;
  height: 64px !important;
  max-height: 64px !important;
  min-height: 64px !important;
  background: #012241;
  border-top: 4px solid #2F6089;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 2rem;
  box-sizing: border-box;
  position: relative;
  z-index: 50;
  flex-shrink: 0;
  flex-grow: 0 !important;
  gap: 1.5rem;
  overflow: hidden;
}

.dash-footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-slogan-text {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: #FFFFFF;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dash-tricolor-swoosh {
  height: 15px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.dash-footer-center {
  display: flex;
  align-items: center;
  gap: 18px;
}

.dash-pillar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #829DBB;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
}

.dash-pillar-item svg {
  stroke: #829DBB;
}

.dash-pillar-separator {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.25);
}

.dash-footer-right {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 170px;
}

.dash-soudha-img {
  height: 58px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  opacity: 0.95;
}

/* Responsive Overrides */
@media (max-width: 1200px) {
  .dash-avatar-ring {
    width: 38px;
    height: 38px;
  }

  .figma-avatar-ring {
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 860px) {
  .top-nav-bar {
    flex-wrap: nowrap;
    padding: 0.5rem 1rem;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    min-height: auto;
    height: auto;
  }

  .header-divider-line {
    display: none;
  }

  .dash-leadership-avatars {
    display: none;
  }

  .top-nav-bar .header-center-main-title {
    white-space: normal;
    text-align: center;
    font-size: 1.1rem;
  }

  .top-nav-bar .header-center-sub-title {
    white-space: normal;
    text-align: center;
  }

  .figma-header {
    padding: 16px 18px;
  }

  .figma-leadership-avatars {
    overflow-x: auto;
    max-width: 100%;
    padding: 6px 0;
    scrollbar-width: none;
  }

  .figma-leadership-avatars::-webkit-scrollbar {
    display: none;
  }

  .figma-voice-youth-wrap {
    left: auto;
    right: -10px;
    bottom: 50px;
  }

  .figma-voice-youth-img {
    width: 120px;
  }

  .figma-vidhana-corner {
    display: none;
  }

  .dashboard-footer-bar {
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    gap: 0.85rem;
  }

  .dash-footer-center {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .dash-footer-right {
    display: none;
  }
}