:root {
  --primary: #0a8f5c;
  --primary-hover: #07734a;
  --primary-soft: #eaf7f1;
  --primary-border: #bce6d4;
  --saffron: #f97316;
  --saffron-soft: #fff4ed;
  --navy: #0f2744;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #475569;
  --bar-fill: #bbf7d0;
  --bar-lead: #34d399;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --warn: #eab308;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --font-family: 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0b131e;
  --card-bg: #141f2f;
  --card-border: #23344a;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-sub: #cbd5e1;
  --primary: #22c55e;
  --primary-hover: #16a34a;
  --primary-soft: #143527;
  --primary-border: #1e523b;
  --bar-fill: #1e4536;
  --bar-lead: #22c55e;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOP ANNOUNCEMENT BANNER */
.top-notice {
  background: linear-gradient(90deg, #f97316 0%, #0a8f5c 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.top-notice a {
  color: #fff;
  text-decoration: underline;
  cursor: pointer;
}

/* NAVBAR */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  padding: 10px 18px;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--saffron), var(--primary));
  color: #ffffff;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(10, 143, 92, 0.25);
}

.brand-text h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.brand-text h1 span.t-domain {
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
}
.brand-text p {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin: 0;
}

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

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(10, 143, 92, 0.25);
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--card-border);
  color: var(--text-main);
}
.btn-outline:hover {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary);
}

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

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-google {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}
.btn-google:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.duration-pill {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
}
.duration-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.duration-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(10, 143, 92, 0.25);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  position: relative;
  cursor: pointer;
}
.btn-icon:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 9px;
  height: 9px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--card-bg);
}

/* USER PROFILE PILL */
.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: bold;
}
.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* MAIN CONTAINER */
.main-wrapper {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px 50px;
  flex: 1;
}

/* HERO SECTION */
.hero {
  background: linear-gradient(135deg, #075e3a 0%, #0a8f5c 50%, #15803d 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: 0 12px 30px rgba(10, 143, 92, 0.22);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "🗳️";
  position: absolute;
  right: -20px;
  bottom: -30px;
  font-size: 160px;
  opacity: 0.12;
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  backdrop-filter: blur(4px);
}

.hero h2 {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
}

.hero p {
  font-size: clamp(14px, 2vw, 16px);
  opacity: 0.92;
  max-width: 720px;
  margin-bottom: 20px;
}

.hero-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  min-width: 105px;
}
.stat-item b {
  display: block;
  font-size: 22px;
  font-weight: 800;
}
.stat-item span {
  font-size: 11px;
  opacity: 0.88;
  font-weight: 600;
}

/* SEARCH & CONTROLS */
.search-box {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
.search-box input {
  border: 0;
  outline: 0;
  flex: 1;
  padding: 8px 0;
  font-size: 15px;
  background: transparent;
  color: var(--text-main);
}
.search-box input::placeholder {
  color: var(--text-muted);
}

/* CATEGORY TABS */
.category-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 14px;
  scrollbar-width: none;
}
.category-bar::-webkit-scrollbar {
  display: none;
}

.chip {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-sub);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}
.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(10, 143, 92, 0.25);
}

/* FILTER ROW */
.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

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

.select-control {
  padding: 9px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}
.select-control:focus {
  border-color: var(--primary);
}

.one-device-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
}
[data-theme="dark"] .one-device-badge {
  background: #451a03;
  color: #fde68a;
  border-color: #78350f;
}

/* POLLS GRID */
.polls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

/* POLL CARD */
.poll-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}
.poll-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
}
.tag-badge.votes {
  background: var(--primary-soft);
  color: var(--primary);
}
.tag-badge.live {
  background: #dcfce7;
  color: #15803d;
}
.tag-badge.end {
  background: var(--danger-soft);
  color: var(--danger);
}
.tag-badge.type {
  background: var(--saffron-soft);
  color: var(--saffron);
}

.card-location {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  margin: 2px 0;
}

/* CANDIDATE PREVIEW BARS */
.candidates-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.cand-bar-row {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  min-height: 40px;
}

.cand-bar-row .fill-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.22;
}

.cand-bar-row.leading {
  border-color: rgba(234, 179, 8, 0.45);
}

.cand-bar-row .cand-info {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cand-bar-row .cand-stats {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.cand-bar-row .cand-vote-count {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.cand-bar-row .cand-pct {
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}

/* 4 PERCENTAGE COLOR TIERS (<25% Red, 25-40% Yellow, 40-70% Light Green, >70% Pure Green) */
.pct-tier-red .fill-bar, .bar-tier-red {
  background: #ef4444 !important;
}
.pct-tier-red .cand-pct, .badge-tier-red {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.pct-tier-yellow .fill-bar, .bar-tier-yellow {
  background: #f59e0b !important;
}
.pct-tier-yellow .cand-pct, .badge-tier-yellow {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.pct-tier-light-green .fill-bar, .bar-tier-light-green {
  background: #22c55e !important;
}
.pct-tier-light-green .cand-pct, .badge-tier-light-green {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #86efac;
}

.pct-tier-pure-green .fill-bar, .bar-tier-pure-green {
  background: #15803d !important;
}
.pct-tier-pure-green .cand-pct, .badge-tier-pure-green {
  background: #bbf7d0;
  color: #14532d;
  border: 1px solid #4ade80;
}

.pct-tier-zero .fill-bar, .bar-tier-zero {
  background: #94a3b8 !important;
}
.pct-tier-zero .cand-pct, .badge-tier-zero {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

/* SHADOW CROWN BADGE (हल्का शैडो / वॉटरमार्क क्राउन) */
.crown-shadow-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(234, 179, 8, 0.5));
  opacity: 0.9;
  position: relative;
  animation: crownSoftGlow 3s infinite ease-in-out;
  cursor: help;
}

@keyframes crownSoftGlow {
  0%, 100% {
    filter: drop-shadow(0 2px 3px rgba(234, 179, 8, 0.4));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 3px 7px rgba(234, 179, 8, 0.75));
    transform: scale(1.06);
  }
}

.card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* EMPTY STATE */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}
.empty-state .emoji {
  font-size: 54px;
  margin-bottom: 14px;
}
.empty-state h3 {
  font-size: 20px;
  color: var(--text-main);
  margin-bottom: 6px;
}

/* MODAL SYSTEM */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--card-bg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 32px;
  transform: translateY(30px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal-dialog {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
  .modal-dialog {
    border-radius: var(--radius-lg);
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
}

.close-btn {
  background: var(--primary-soft);
  color: var(--primary);
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.close-btn:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.modal-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.modal-back-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

/* VIEW SWITCHER TABS (लाइव पोल बनाम विजेता व परिणाम) */
.view-switch-wrapper {
  margin-bottom: 18px;
}
.view-switch-tabs {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--card-border);
  padding: 4px;
  border-radius: var(--radius-pill);
  gap: 4px;
  max-width: 480px;
}
.view-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
}
.view-tab-btn:hover {
  color: var(--primary);
  background: var(--primary-soft);
}
.view-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(10, 143, 92, 0.28);
}
.view-tab-btn .count-pill {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.08);
  font-weight: 800;
}
.view-tab-btn.active .count-pill {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* VOTING OPTIONS (WITH LIVE VOTE NUMBERS & PERCENTAGE TIER BARS) */
.voting-option {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition);
  background: var(--card-bg);
}
.voting-option:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.voting-option.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 1px var(--primary);
}

.voting-option-main {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.radio-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: var(--transition);
}
.voting-option.selected .radio-circle {
  border-color: var(--primary);
  background: var(--primary);
}
.voting-option.selected .radio-circle::after {
  content: "";
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
}

.option-details {
  flex: 1;
  min-width: 0;
}
.option-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.option-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.option-vote-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.option-votes-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}
.option-pct-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}

.option-progress-bg {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}
.option-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* RESULTS BREAKDOWN */
.result-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
  overflow: hidden;
}
.result-card.leader {
  border: 1.5px solid rgba(234, 179, 8, 0.55);
}
.result-card .result-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  opacity: 0.22;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.result-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 15px;
}
.result-meta {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* WINNERS & RESULTS CARDS (विजेता व परिणाम अनुभाग) */
.winner-card {
  background: var(--card-bg);
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
  position: relative;
}
.winner-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(234, 179, 8, 0.12);
  border-color: #f59e0b;
}

.winner-card .winner-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  align-self: flex-start;
}

.winner-spotlight {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fcd34d;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.6);
}
[data-theme="dark"] .winner-spotlight {
  background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
  border-color: #b45309;
}

.winner-trophy-icon {
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 4px 6px rgba(234, 179, 8, 0.35));
}
.winner-info {
  flex: 1;
}
.winner-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #b45309;
  letter-spacing: 0.5px;
}
[data-theme="dark"] .winner-label {
  color: #fde68a;
}
.winner-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin: 2px 0 4px;
}
.winner-votes-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #15803d;
  color: #ffffff;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
}

.top-3-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.top-3-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-candidate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--card-border);
  font-size: 13px;
}
.top-candidate-row.rank-1 {
  background: rgba(234, 179, 8, 0.08);
  border-color: rgba(234, 179, 8, 0.3);
}
.top-candidate-row .rank-medal {
  font-size: 15px;
  margin-right: 6px;
}
.top-candidate-row .cand-rank-info {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--text-main);
}
.top-candidate-row .cand-rank-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}







/* SHARE BUTTONS */
.share-tray {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  flex: 1;
}
.btn-whatsapp:hover {
  background: #1eb956;
}

/* FORMS IN CREATE MODAL */
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}
.form-input:focus {
  border-color: var(--primary);
  background: var(--card-bg);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.candidate-entry {
  display: grid;
  grid-template-columns: 44px 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.info-alert {
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  margin: 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* NOTIFICATION DROPDOWN / LIST */
.notif-item {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--card-border);
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.notif-item.unread {
  background: var(--primary-soft);
  border-color: var(--primary-border);
}
.notif-icon {
  font-size: 18px;
}
.notif-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.4;
}
.notif-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* TOAST MESSAGE */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast-message {
  background: #0f172a;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* FOOTER */
footer {
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  padding: 30px 18px;
  margin-top: auto;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
footer .footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
footer a:hover {
  text-decoration: underline;
}

/* RESPONSIVE TWEAKS */
/* FLOATING ACTION BUTTON (MOBILE CREATE POLL) */
.mobile-fab {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 16px;
  z-index: 95;
  background: linear-gradient(135deg, #f97316 0%, #0a8f5c 100%);
  color: #ffffff;
  border-radius: 50px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(10, 143, 92, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(4px);
}
.mobile-fab:active {
  transform: scale(0.94);
}

/* 100% MOBILE-FRIENDLY RESPONSIVE SYSTEM */
@media (max-width: 640px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  /* Top Notice Strip */
  .top-notice {
    font-size: 11px;
    padding: 5px 8px;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
  }

  /* Compact Navbar for Mobile */
  header {
    padding: 8px 12px;
  }
  .nav-container {
    gap: 8px;
  }
  .brand {
    gap: 6px;
    min-width: 0;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
    border-radius: 8px;
  }
  .brand-text h1 {
    font-size: 16.5px;
    letter-spacing: -0.2px;
  }
  .brand-text h1 span.t-domain {
    font-size: 13.5px;
  }
  .brand-text p {
    display: none !important;
  }

  .nav-actions {
    gap: 6px;
  }
  .btn-icon {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
  .nav-actions .btn-google {
    padding: 6px 10px;
    font-size: 12px;
  }
  .nav-actions .btn-google span {
    display: none;
  }
  #createPollBtn {
    display: none !important;
  }
  .mobile-fab {
    display: inline-flex;
  }

  /* Main Wrapper */
  .main-wrapper {
    padding: 12px 10px 80px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Hero Section */
  .hero {
    padding: 18px 14px;
    border-radius: 16px;
    margin-bottom: 14px;
  }
  .hero::after {
    display: none;
  }
  .hero-tag {
    font-size: 11px;
    padding: 3px 10px;
    margin-bottom: 8px;
  }
  .hero h2 {
    font-size: 19px;
    line-height: 1.35;
    margin-bottom: 8px;
  }
  .hero p {
    font-size: 12.5px;
    line-height: 1.45;
    margin-bottom: 14px;
  }
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 14px;
  }
  .stat-item {
    padding: 6px 4px;
    min-width: 0;
    text-align: center;
    border-radius: 10px;
  }
  .stat-item b {
    font-size: 17px;
    line-height: 1.2;
  }
  .stat-item span {
    font-size: 10px;
    line-height: 1.2;
    display: block;
    white-space: nowrap;
  }
  .search-box {
    padding: 6px 10px;
    width: 100%;
    box-sizing: border-box;
  }
  .search-box input {
    font-size: 13px;
    width: 100%;
  }

  /* View Switcher Tabs */
  .view-switch-wrapper {
    margin-bottom: 12px;
  }
  .view-switch-tabs {
    width: 100%;
    max-width: 100%;
  }
  .view-tab-btn {
    padding: 8px 8px;
    font-size: 12px;
    gap: 4px;
  }

  /* Category Bar */
  .category-bar {
    padding: 4px 0 10px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .chip {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* Filter & Sort Row */
  .filter-row {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 14px;
  }
  .filter-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .select-control {
    width: 100%;
    padding: 8px 8px;
    font-size: 12px;
  }
  .one-device-badge {
    align-self: center;
    font-size: 11px;
    padding: 4px 10px;
  }

  /* Polls Grid & Cards */
  .polls-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
  }
  .poll-card {
    padding: 14px;
    border-radius: 14px;
  }
  .card-title {
    font-size: 16px;
    line-height: 1.35;
  }
  .cand-bar-row {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 38px;
  }
  .cand-bar-row .cand-info {
    max-width: 58%;
    font-size: 12px;
  }
  .cand-bar-row .cand-vote-count {
    font-size: 10.5px;
  }
  .cand-bar-row .cand-pct {
    font-size: 11px;
    padding: 2px 5px;
  }

  /* Winner Cards on Mobile */
  .winner-card {
    padding: 14px;
    border-radius: 14px;
  }
  .winner-spotlight {
    padding: 12px;
    gap: 10px;
  }
  .winner-trophy-icon {
    font-size: 32px;
  }
  .winner-name {
    font-size: 16px;
  }
  .top-candidate-row {
    padding: 7px 10px;
    font-size: 12px;
  }

  /* Modals on Mobile (100% Fullscreen App-like Experience) */
  .modal-overlay {
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
    background: var(--card-bg, #ffffff) !important;
  }
  .modal-dialog {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100% !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 14px 14px 70px !important;
    box-shadow: none !important;
    transform: none !important;
    border: none !important;
    overscroll-behavior-y: contain;
  }
  .modal-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }
  .modal-back-btn:hover {
    background: var(--primary);
    color: #ffffff;
  }
  .modal-header h3 {
    font-size: 16px;
    line-height: 1.35;
  }
  .voting-option {
    padding: 10px 12px;
  }
  .option-name {
    font-size: 14px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .candidate-entry {
    grid-template-columns: 40px 1fr 1fr 28px;
    gap: 6px;
  }
  .candidate-entry input {
    font-size: 12px;
    padding: 8px 10px;
  }
  .share-tray {
    flex-direction: column;
    gap: 8px;
  }
  .btn-whatsapp, .share-tray .btn-outline {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }
}

/* ----------------------------------------------------
   CAMPAIGN & ADVERTISING PROMOTION BANNER (COMPACT & LIGHT)
   ---------------------------------------------------- */
.promo-campaign-card-light {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 12px 18px;
  margin: 14px auto 20px;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.promo-header-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.promo-tag {
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--primary-border);
}

.promo-text {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text-muted);
}

.promo-contacts-compact {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid var(--card-border);
  color: var(--text-main);
  transition: all 0.2s ease;
}

.contact-chip.whatsapp-chip:hover {
  border-color: #25d366;
  color: #15803d;
  background: #f0fdf4;
}

.contact-chip.email-chip:hover {
  border-color: #3b82f6;
  color: #1d4ed8;
  background: #eff6ff;
}

.chip-icon {
  font-size: 15px;
}

.chip-title small {
  color: var(--text-muted);
  font-weight: normal;
  margin-left: 4px;
}

/* Modal overflow safety */
.modal-overlay {
  overflow-x: hidden;
}
.modal-dialog {
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Polished voting option states */
.voting-option {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.voting-option:hover {
  border-color: #10b981;
  background: #f8fafc;
}
.voting-option.selected {
  border-color: #10b981 !important;
  background: #f0fdf4 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15) !important;
}
.voting-option.selected .radio-circle {
  border-color: #10b981;
  background: #10b981;
}

#submitVoteBtn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}
#submitVoteBtn:disabled {
  background: #cbd5e1;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.8;
}
#submitVoteBtn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* COMPACT USER AVATAR BUTTON (MOBILE & DESKTOP SLEEK PILL) */
.user-profile.compact-avatar-btn {
  padding: 2px !important;
  border-radius: 50% !important;
  border: 2px solid var(--primary) !important;
  background: transparent !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.user-profile.compact-avatar-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 10px rgba(22, 101, 52, 0.25);
}
.user-profile.compact-avatar-btn .user-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  display: grid;
  place-items: center;
}

/* CANDIDATE PHOTO UPLOAD WRAPPER */
.cand-photo-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cand-photo-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px dashed var(--primary-border);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  transition: all 0.2s ease;
}
.cand-photo-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.cand-photo-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.cand-photo-placeholder {
  font-size: 16px;
  line-height: 1;
}

/* CANDIDATE AVATARS IN VOTING & RESULTS */
.cand-avatar-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
  border: 1.5px solid var(--primary-border);
}
.cand-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ADMIN NOTICE BOX FOR USERS (POLL CARD & MODAL) */
.poll-admin-notice-box {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 14px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-notice-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #14532d;
  flex: 1;
  min-width: 200px;
}
.admin-notice-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #15803d;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.admin-notice-btn:hover {
  background: #166534;
}

/* CARD COMPACT ADMIN NOTICE */
.card-admin-notice-compact {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 6px 10px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #166534;
  font-weight: 600;
  gap: 8px;
}
.admin-notice-btn-compact {
  background: #15803d;
  color: #fff !important;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* ADMIN NOTICE MANAGER CONTROLS (ONLY FOR MASTER ADMIN) */
.admin-notice-manager {
  background: #f8fafc;
  border: 1.5px dashed #0284c7;
  border-radius: 12px;
  padding: 14px;
  margin: 14px 0;
  text-align: left;
}
.admin-notice-manager-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 8px;
}

/* CANDIDATE PHOTO FULLSCREEN VIEWER */
.photo-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(8px);
}
.photo-viewer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.photo-viewer-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.photo-viewer-container {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.photo-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.photo-viewer-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.photo-viewer-back-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}
.photo-viewer-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
  text-align: center;
}
.photo-viewer-close-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.photo-viewer-close-btn:hover {
  background: rgba(239, 68, 68, 0.85);
}
.photo-viewer-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow: hidden;
  cursor: zoom-out;
}
.photo-viewer-img {
  max-width: 95%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  cursor: default;
}
.photo-viewer-caption {
  text-align: center;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.7);
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

