/* ==========================================================================
   Marathwada Graduate Voter Search Portal - Modern Responsive Stylesheet
   Candidate: Hon. Shri Satish Chavan (MLA - Maharashtra Legislative Council)
   Inspired by & Compatible with https://www.satishchavan.com/
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #f0f9ff;
  --primary-gradient: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  --secondary: #059669;
  --secondary-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
  --navy: #0f172a;
  --navy-light: #1e293b;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-sub: #64748b;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-focus: #0284c7;
  --male: #0284c7;
  --male-bg: #f0f9ff;
  --female: #db2777;
  --female-bg: #fdf2f8;
  --whatsapp: #16a34a;
  --whatsapp-hover: #15803d;
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-sm: 0 2px 4px rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 10px -2px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 10px 20px -3px rgb(0 0 0 / 0.08), 0 4px 6px -2px rgb(0 0 0 / 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 9999px;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif;
  --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

/* ---------------- Vector SVG Icons ---------------- */
.svg-icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
  vertical-align: -0.16em;
  flex-shrink: 0;
}

svg.svg-icon[stroke="currentColor"] {
  fill: none;
}

.input-svg-icon {
  width: 1.15em;
  height: 1.15em;
  color: #94a3b8;
}

.empty-svg-icon {
  width: 48px;
  height: 48px;
  color: #94a3b8;
  display: inline-block;
  margin-bottom: 8px;
}

.icon-box-blue {
  background: #f0f9ff !important;
  color: #0284c7 !important;
  border: 1px solid #bae6fd;
}

.icon-box-green {
  background: #f0fdf4 !important;
  color: #16a34a !important;
  border: 1px solid #bbf7d0;
}

.icon-box-amber {
  background: #fffbeb !important;
  color: #d97706 !important;
  border: 1px solid #fde68a;
}

.icon-box-purple {
  background: #faf5ff !important;
  color: #7c3aed !important;
  border: 1px solid #e9d5ff;
}

/* ---------------- CSS Reset & Base ---------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

/* ---------------- Top Status Bar (Clean Light Theme) ---------------- */
.top-status-bar {
  background: #ffffff;
  color: #334155;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.top-bar-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.gov-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gov-tag {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gov-title {
  color: #0f172a;
  font-weight: 600;
  font-size: 0.82rem;
}

.top-bar-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.visitor-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
}

.visitor-pill strong {
  color: #0f172a;
  font-weight: 800;
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  background-color: #16a34a;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: pulse 1.8s infinite;
}

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

.lang-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0284c7;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: #f0f9ff;
  border-color: #0284c7;
}

/* ---------------- Main Sticky Header ---------------- */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-symbol {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-pill-btn {
  background: transparent;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.nav-pill-btn:hover, .nav-pill-btn.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ---------------- Hero Campaign Banner ---------------- */
.hero-banner-wrap {
  max-width: 1240px;
  width: 100%;
  margin: 14px auto 0;
  padding: 0 16px;
}

.banner-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #ffffff;
  border: 1px solid var(--border);
}

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

.banner-desktop {
  display: block;
}

.banner-mobile {
  display: none;
}

/* ---------------- Metric Summary Ribbons ---------------- */
.metrics-grid {
  max-width: 1240px;
  margin: 14px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.metric-card {
  background: var(--bg-card);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: #bae6fd;
}

.metric-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.metric-data .value {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}

.metric-data .label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ---------------- Main Search Container ---------------- */
.main-wrapper {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 40px;
  flex: 1;
  box-sizing: border-box;
  overflow: hidden;
}

.search-panel {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Header of Search Card */
.search-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.search-title-wrap h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-title-wrap p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Scope Toggle (All vs City) */
.scope-segmented {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.scope-option-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.scope-option-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

/* District Chips Selector */
.district-bar {
  margin-bottom: 16px;
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid #edf2f7;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

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

.district-bar-header .title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.district-quick-links {
  display: flex;
  gap: 10px;
}

.district-quick-links button {
  background: none;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
}

.district-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.district-pill {
  background: #ffffff;
  border: 1.5px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  transition: all 0.15s ease;
}

.district-pill:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.district-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary-dark);
  box-shadow: 0 2px 6px rgba(1, 117, 194, 0.3);
}

.district-pill .badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.08);
}

.district-pill.active .badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Primary Search Row */
.search-input-group {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}

.main-search-wrap {
  flex: 3;
  min-width: 240px;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
}

.part-search-wrap {
  flex: 1;
  max-width: 160px;
  min-width: 110px;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
}

.input-icon-left {
  position: absolute;
  left: 14px;
  color: var(--text-sub);
  font-size: 1.1rem;
  pointer-events: none;
}

.main-search-input {
  width: 100%;
  height: 48px;
  padding: 0 40px 0 44px;
  font-size: 0.95rem;
  font-family: var(--font-family);
  font-weight: 500;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.main-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(1, 117, 194, 0.12);
}

.part-search-input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 40px;
  font-size: 0.92rem;
  font-family: var(--font-family);
  font-weight: 600;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.part-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(1, 117, 194, 0.12);
}

.clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text-sub);
  cursor: pointer;
  padding: 4px;
  display: none;
}

.clear-btn:hover {
  color: var(--text-main);
}

.search-btn-cluster {
  display: flex;
  gap: 8px;
}

.btn-search {
  height: 48px;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  padding: 0 22px;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-heading);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(1, 117, 194, 0.3);
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-search:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(1, 117, 194, 0.4);
}

.btn-search:active {
  transform: translateY(1px);
}

.btn-reset {
  height: 48px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0 16px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-reset:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* Quick Search Suggestions */
.quick-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.quick-tag-pill {
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 600;
  transition: all 0.15s;
}

.quick-tag-pill:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

/* Advanced Filter Accordion */
.filter-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.accordion-btn {
  background: none;
  border: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.accordion-btn:hover {
  text-decoration: underline;
}

.filter-drawer {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.filter-drawer.open {
  display: grid;
}

.drawer-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.drawer-field select, .drawer-field input {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  outline: none;
}

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

/* ---------------- Results Header Bar ---------------- */
.results-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.found-badge {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.query-speed {
  font-size: 0.78rem;
  color: var(--text-sub);
}

.status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-export {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-export:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ---------------- Voter Cards Grid ---------------- */
.voter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.voter-card-item {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.voter-card-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

/* Card Top Border Accent */
.voter-card-item.gender-M {
  border-top: 4px solid var(--male);
}

.voter-card-item.gender-F {
  border-top: 4px solid var(--female);
}

.voter-card-item.gender-O {
  border-top: 4px solid #a855f7;
}

/* Card Header */
.voter-card-header {
  padding: 12px 14px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.voter-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.pt-sr-tag {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Card Body */
.voter-card-body {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.address-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  min-height: 2.7em;
}

.address-line .pin {
  color: #ef4444;
  flex-shrink: 0;
  margin-top: 2px;
}

.address-line-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  color: var(--text-muted);
}

/* Demographics Badges */
.demographics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.demo-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip-age {
  background: #f1f5f9;
  color: var(--text-muted);
}

.chip-male {
  background: var(--male-bg);
  color: var(--male);
  border: 1px solid #bae6fd;
}

.chip-female {
  background: var(--female-bg);
  color: var(--female);
  border: 1px solid #fbcfe8;
}

.chip-epic-badge {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  cursor: pointer;
  transition: background 0.15s;
}

.chip-epic-badge:hover {
  background: #fef3c7;
}

/* Refined 2-Row Info Grid */
.info-grid-refined {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid #edf2f7;
}

.grid-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.grid-field .f-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1px;
}

.grid-field .f-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.district-span {
  grid-column: span 2;
  border-top: 1px dashed #e2e8f0;
  padding-top: 5px;
  margin-top: 2px;
}

.dist-highlight {
  color: var(--primary) !important;
  font-weight: 800 !important;
  white-space: normal !important;
  line-height: 1.25;
}

.booth-box {
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid #edf2f7;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  min-height: 56px;
}

.booth-box strong {
  display: block;
  font-size: 0.66rem;
  color: var(--navy);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.booth-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  color: var(--navy-light);
  font-weight: 500;
}

/* Card Action Buttons (3 Buttons) */
.card-actions-row {
  margin-top: auto;
  padding: 10px 12px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 6px;
}

.btn-card-action {
  flex: 1;
  min-height: 38px;
  padding: 6px 4px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-sms-action {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.btn-sms-action:hover {
  background: #e2e8f0;
}

.btn-whatsapp-action {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.btn-whatsapp-action:hover {
  background: #bbf7d0;
  color: #14532d;
}

.btn-slip-action {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid #bae6fd;
}

.btn-slip-action:hover {
  background: var(--primary);
  color: #ffffff;
}

/* ---------------- Pagination ---------------- */
.pagination-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

.page-chip {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-main);
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.page-chip:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.page-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary-dark);
}

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

/* ---------------- Voter Slip Modal ---------------- */
.slip-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 30, 58, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.slip-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.slip-modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 580px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.2s ease;
}

.slip-modal-backdrop.open .slip-modal-card {
  transform: scale(1);
}

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

.modal-header-bar h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-sub);
  cursor: pointer;
  line-height: 1;
}

.btn-close-modal:hover {
  color: var(--text-main);
}

.modal-canvas-body {
  padding: 16px;
  overflow-y: auto;
  text-align: center;
  background: #f8fafc;
}

.slip-canvas-render {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.modal-actions-bar {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: #ffffff;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ---------------- Loading Indicator ---------------- */
.spinner-box {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  color: var(--primary);
}

.spin-circle {
  width: 40px;
  height: 40px;
  border: 3.5px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 10px;
}

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

/* ---------------- Empty State ---------------- */
.no-results-box {
  text-align: center;
  padding: 50px 20px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.no-results-box .icon {
  font-size: 2.8rem;
  margin-bottom: 8px;
  opacity: 0.6;
}

.no-results-box h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}

/* ---------------- Site Footer (Clean Light Theme) ---------------- */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  color: #475569;
  padding: 32px 16px 20px;
  margin-top: 40px;
  font-size: 0.84rem;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f1f5f9;
}

.footer-col h4 {
  color: #0f172a;
  font-size: 0.95rem;
  margin-bottom: 8px;
  font-weight: 800;
}

.footer-col p {
  color: #64748b;
  line-height: 1.6;
  font-size: 0.82rem;
}

.footer-copy {
  max-width: 1240px;
  margin: 16px auto 0;
  text-align: center;
  color: #94a3b8;
  font-size: 0.76rem;
}

/* ==========================================================================
   Responsive Breakpoints - Fully optimized for Mobile & All Devices
   ========================================================================== */

/* Tablet & Smaller Laptops */
@media (max-width: 960px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Mobile Devices & Small Tablets (<= 768px) */
@media (max-width: 768px) {
  .banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
  }

  .site-header {
    padding: 0;
  }

  .header-inner {
    padding: 8px 12px;
    gap: 8px;
  }

  .brand-symbol {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .brand-text h1 {
    font-size: 0.95rem;
    line-height: 1.2;
  }

  .brand-text p {
    font-size: 0.65rem;
  }

  .header-nav {
    display: none;
  }

  .hero-banner-wrap {
    padding: 0 10px;
    margin-top: 10px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 10px;
    margin: 10px auto;
  }

  .metric-card {
    padding: 8px 10px;
    gap: 8px;
  }

  .metric-icon-box {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .metric-data .value {
    font-size: 1.05rem;
  }

  .metric-data .label {
    font-size: 0.62rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .main-wrapper {
    padding: 0 10px 30px;
  }

  .search-panel {
    padding: 12px;
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
  }

  .search-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
  }

  .search-title-wrap h2 {
    font-size: 1.05rem;
  }

  .search-title-wrap p {
    font-size: 0.72rem;
  }

  .scope-segmented {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 0;
    box-sizing: border-box;
  }

  .scope-option-btn {
    width: 100%;
    border-radius: var(--radius-md);
    background: #f1f5f9;
    border: 1.5px solid var(--border);
    padding: 9px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    justify-content: center;
    box-sizing: border-box;
  }

  .scope-option-btn.active {
    background: #ffffff;
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-xs);
  }

  .district-bar {
    padding: 10px 10px;
    margin-bottom: 12px;
  }

  .district-bar-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .district-chips-container {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
  }

  .district-pill {
    flex-shrink: 0;
    font-size: 0.76rem;
    padding: 5px 10px;
  }

  .search-input-group {
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .main-search-wrap {
    width: 100%;
    min-width: 0;
  }

  .main-search-input {
    height: 46px;
    font-size: 0.88rem;
    padding: 0 36px 0 38px;
    box-sizing: border-box;
  }

  .part-search-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .part-search-input {
    height: 46px;
    font-size: 0.88rem;
    padding: 0 12px 0 38px;
    box-sizing: border-box;
  }

  .input-icon-left {
    left: 12px;
    font-size: 1rem;
  }

  .search-btn-cluster {
    width: 100%;
    display: flex;
    gap: 8px;
    box-sizing: border-box;
  }

  .btn-search {
    flex: 1.2;
    height: 46px;
    font-size: 0.9rem;
    padding: 0 8px;
    justify-content: center;
    min-width: 0;
  }

  .btn-reset {
    flex: 1;
    height: 46px;
    font-size: 0.82rem;
    padding: 0 6px;
    justify-content: center;
    min-width: 0;
  }

  .quick-tags-row {
    margin-bottom: 10px;
    font-size: 0.74rem;
  }

  .voter-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .voter-card-header {
    padding: 10px 12px;
  }

  .voter-title {
    font-size: 0.92rem;
  }

  .pt-sr-tag {
    font-size: 0.68rem;
    padding: 3px 6px;
  }

  .voter-card-body {
    padding: 10px 12px;
    gap: 8px;
  }

  .card-actions-row {
    padding: 8px 10px;
    gap: 6px;
  }

  .btn-card-action {
    font-size: 0.72rem;
    min-height: 40px;
    padding: 6px 2px;
  }

  .results-status-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .status-actions {
    width: 100%;
  }

  .btn-export {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }

  .site-footer {
    padding: 20px 12px 16px;
  }

  /* Responsive Voter Slip & Analytics Modals */
  .slip-modal-backdrop {
    padding: 12px;
    align-items: center;
    justify-content: center;
  }

  .slip-modal-card {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    max-height: 92vh;
    border-radius: var(--radius-lg);
  }

  .modal-header-bar {
    padding: 10px 14px;
  }

  .modal-header-bar h3 {
    font-size: 0.92rem;
  }

  .modal-canvas-body {
    padding: 10px;
  }

  .modal-actions-bar {
    flex-direction: column;
    padding: 10px 14px;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .modal-actions-bar button {
    width: 100% !important;
    height: 44px;
    font-size: 0.88rem;
    justify-content: center;
    box-sizing: border-box;
    white-space: normal;
  }
}

