/* ============================================
   BoothSakhi - Premium Mobile App CSS
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #FF5500;
  --primary-dark: #D94400;
  --primary-light: #FFF0E8;
  --secondary: #0D1F47;
  --secondary-light: #1A3580;
  --accent: #F4A200;
  --accent-light: #FFF8E1;
  --success: #10B981;
  --success-light: #D1FAE5;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --info: #3B82F6;
  --info-light: #DBEAFE;
  --bg: #F2F3F8;
  --bg-card: #FFFFFF;
  --bg-input: #F8F9FA;
  --text: #0D1F47;
  --text-secondary: #5B6882;
  --text-muted: #9CA3AF;
  --border: #E2E6EF;
  --border-light: #EEF0F6;
  --shadow-sm: 0 1px 3px rgba(13,31,71,0.06);
  --shadow: 0 4px 12px rgba(13,31,71,0.08), 0 1px 3px rgba(13,31,71,0.04);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --font: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  --transition-spring: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --bottom-nav-height: 72px;
  --header-height: 56px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ---------- App Shell ---------- */
.app-wrapper {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 60px rgba(0,0,0,0.08);
}

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  backdrop-filter: blur(10px);
}
.app-header h1 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.app-header .back-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.app-header .back-btn:hover { background: rgba(255,255,255,0.25); }
.app-header .header-actions { display: flex; gap: 8px; align-items: center; }
.lang-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.lang-badge:hover { background: rgba(255,255,255,0.35); }

/* ---------- Content Area ---------- */
.app-content {
  padding: 16px 16px calc(var(--bottom-nav-height) + 16px);
  min-height: calc(100vh - var(--header-height));
  animation: fadeInUp 0.4s ease-out;
}
.app-content.no-bottom { padding-bottom: 16px; }

/* ---------- Bottom Nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--bottom-nav-height);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 500;
  transition: var(--transition);
  border-radius: var(--radius);
  position: relative;
  text-decoration: none;
}
.nav-item:hover { color: var(--primary); }
.nav-item.active {
  color: var(--primary);
  font-weight: 700;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 var(--radius-full) var(--radius-full);
}
.nav-icon {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.nav-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header { margin-bottom: 16px; }
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-subtitle { font-size: 0.82rem; color: var(--text-secondary); margin-top: 4px; }
.card-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ---------- Stat Cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card.primary::before { background: var(--primary); }
.stat-card.success::before { background: var(--success); }
.stat-card.info::before { background: var(--info); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--danger); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.stat-value.primary { color: var(--primary); }
.stat-value.success { color: var(--success); }
.stat-value.info { color: var(--info); }
.stat-value.warning { color: var(--warning); }
.stat-value.danger { color: var(--danger); }
.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(255,107,0,0.3); }
.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: var(--secondary-light); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-input); color: var(--text); }
.btn-lg { padding: 16px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-full); }
.btn:disabled, .btn.loading {
  opacity: 0.6;
  pointer-events: none;
}
.btn.loading::before {
  content: '';
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(255,107,0,0.1);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.form-error { color: var(--danger); font-size: 0.78rem; margin-top: 4px; }
.form-hint { color: var(--text-muted); font-size: 0.78rem; margin-top: 4px; }

/* ---------- OTP Input ---------- */
.otp-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}
.otp-input {
  width: 48px; height: 56px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  transition: var(--transition);
  outline: none;
}
.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.1);
  background: white;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-neutral { background: var(--bg-input); color: var(--text-secondary); }

/* ---------- Voter Cards ---------- */
.voter-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
  cursor: pointer;
  animation: slideIn 0.3s ease-out both;
}
.voter-card:hover { box-shadow: var(--shadow); transform: translateX(4px); }
.voter-card:active { transform: scale(0.98); }
.voter-avatar {
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}
.voter-avatar.male { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.voter-avatar.female { background: linear-gradient(135deg, #EC4899, #DB2777); }
.voter-avatar.other { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.voter-info { flex: 1; min-width: 0; }
.voter-name { font-weight: 600; font-size: 0.92rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voter-meta { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.voter-action { flex-shrink: 0; }

/* ---------- Survey Cards ---------- */
.survey-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  animation: slideIn 0.3s ease-out both;
}
.survey-card:hover { box-shadow: var(--shadow); }
.survey-card .survey-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.survey-card .survey-title { font-weight: 600; font-size: 0.92rem; }
.survey-card .survey-meta { font-size: 0.78rem; color: var(--text-secondary); display: flex; gap: 12px; }

/* ---------- Quick Action Grid ---------- */
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.action-item {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
}
.action-item:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); color: var(--text); }
.action-item:active { transform: scale(0.95); }
.action-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
  font-size: 1.4rem;
}
.action-icon.orange { background: var(--primary-light); color: var(--primary); }
.action-icon.blue { background: var(--info-light); color: var(--info); }
.action-icon.green { background: var(--success-light); color: var(--success); }
.action-icon.purple { background: #F3E8FF; color: #8B5CF6; }
.action-label { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}
.tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: transparent;
  white-space: nowrap;
}
.tab.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.tab:hover:not(.active) { color: var(--text); }

/* ---------- Filter Pills ---------- */
.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pill {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ---------- Search Bar ---------- */
.search-bar {
  position: relative;
  margin-bottom: 16px;
}
.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}
.search-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,0,0.1); }
.search-bar .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

/* ---------- Progress Bar ---------- */
.progress-bar {
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 12px 0;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-title { font-size: 1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-text { font-size: 0.85rem; }

/* ---------- Alerts / Flash ---------- */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s ease-out;
}
.alert-error { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.alert-success { background: var(--success-light); color: #15803D; border: 1px solid rgba(34,197,94,0.2); }
.alert-info { background: var(--info-light); color: #1D4ED8; border: 1px solid rgba(59,130,246,0.2); }
.alert-warning { background: var(--warning-light); color: #92400E; border: 1px solid rgba(245,158,11,0.2); }

/* ---------- Consent Screen ---------- */
.consent-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.consent-icon { font-size: 3rem; margin-bottom: 16px; }
.consent-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; }
.consent-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 24px; }
.consent-privacy { font-size: 0.78rem; color: var(--text-muted); padding: 12px; background: var(--bg-input); border-radius: var(--radius); margin-bottom: 24px; }
.consent-actions { display: flex; gap: 12px; }
.consent-actions .btn { flex: 1; }

/* ---------- Survey Question Screen ---------- */
.question-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.question-number {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.question-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 24px;
}
.option-list { display: flex; flex-direction: column; gap: 10px; }
.option-item {
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.option-item:hover { border-color: var(--primary); background: var(--primary-light); }
.option-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}
.option-radio {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.option-item.selected .option-radio {
  border-color: var(--primary);
}
.option-item.selected .option-radio::after {
  content: '';
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  animation: popIn 0.2s ease-out;
}
.question-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

/* ---------- Survey Done Screen ---------- */
.done-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.done-celebration {
  font-size: 4rem;
  animation: bounce 1s ease-in-out;
  margin-bottom: 16px;
}
.done-checkmark {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--success-light);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  animation: scaleIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.done-checkmark svg { width: 40px; height: 40px; color: var(--success); stroke-width: 3; }
.done-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.done-subtitle { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 24px; }
.done-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
}
.done-stat-item { text-align: center; }
.done-stat-value { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.done-stat-label { font-size: 0.78rem; color: var(--text-secondary); }
.done-actions { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Login Screen ---------- */
.auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 50%);
}
.auth-logo {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(255,107,0,0.3);
  animation: floatIn 0.6s ease-out;
}
.auth-logo span { font-size: 2rem; color: white; font-weight: 900; }
.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 32px;
  font-size: 0.9rem;
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
}
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- Language Selector ---------- */
.lang-selector {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}
.lang-option {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-secondary);
}
.lang-option:hover { border-color: var(--primary); color: var(--primary); }
.lang-option.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ---------- Admin Layout ---------- */
.admin-header {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
}
.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 16px;
  margin: 0 -16px;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  background: var(--bg-input);
  color: var(--text-secondary);
}
.admin-tab.active { background: var(--secondary); color: white; }
.admin-tab:hover:not(.active) { background: var(--border); color: var(--text); }

/* ---------- Admin Sidebar ---------- */
.burger-menu-btn { color: white !important; }
.burger-menu-btn:hover { opacity: 0.8; }
.admin-sidebar {
  position: fixed;
  left: 0;
  top: 60px;
  height: calc(100vh - 60px);
  width: 250px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 900;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.admin-sidebar.open {
  transform: translateX(0);
}
.admin-nav {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition);
}
.admin-nav-item:hover {
  background: var(--bg-input);
  color: var(--text);
  border-left-color: var(--primary);
}
.admin-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
}
.admin-nav-item svg {
  flex-shrink: 0;
}

/* ---------- Table (Admin) ---------- */
.table-responsive { overflow-x: auto; border-radius: var(--radius); }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th {
  background: var(--bg-input);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}
.data-table tr:hover td { background: var(--bg-input); }

/* ---------- Confetti (Survey Done) ---------- */
.confetti { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1000; }
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confetti-fall 3s ease-in-out forwards;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}
@keyframes floatIn {
  from { opacity: 0; transform: translateY(20px) scale(0.8); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-10px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes confetti-fall {
  0% { top: -10%; opacity: 1; transform: translateX(0) rotateZ(0deg); }
  100% { top: 100%; opacity: 0; transform: translateX(var(--x)) rotateZ(720deg); }
}

/* Stagger children animation */
.stagger > * { animation: fadeInUp 0.4s ease-out both; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-0 { padding: 0; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.rounded-full { border-radius: var(--radius-full); }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.divider { height: 1px; background: var(--border-light); margin: 16px 0; }

/* ---------- Loading skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-input) 25%, var(--border-light) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-card { height: 80px; border-radius: var(--radius-lg); margin-bottom: 12px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 380px;
  text-align: center;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---------- Responsive ---------- */
@media (min-width: 431px) {
  body { background: #E5E7EF; }
}
@media (prefers-color-scheme: dark) {
  /* Dark mode support (future) */
}

/* ============================================
   PREMIUM UPGRADE - Classy & Animated
   ============================================ */

/* Enhanced App Header with glass */
.app-header {
  background: linear-gradient(135deg, var(--primary) 0%, #CC3300 100%);
  box-shadow: 0 2px 20px rgba(255,85,0,0.3);
}
.admin-header {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%) !important;
  box-shadow: 0 2px 20px rgba(13,31,71,0.4) !important;
}

/* Enhanced Bottom Nav */
.bottom-nav {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(226,230,239,0.8);
  box-shadow: 0 -4px 24px rgba(13,31,71,0.08);
}
.nav-item.active .nav-icon { transform: translateY(-2px); }
.nav-item.active .nav-label { color: var(--primary); font-weight: 700; }
.nav-item.active .nav-icon { color: var(--primary); }
.nav-item { transition: var(--transition); }
.nav-item:active { transform: scale(0.92); }

/* Enhanced Cards */
.card {
  box-shadow: 0 2px 16px rgba(13,31,71,0.07), 0 1px 4px rgba(13,31,71,0.04);
  border: 1px solid rgba(226,230,239,0.6);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover { box-shadow: 0 6px 24px rgba(13,31,71,0.1); }

/* Premium Stat Cards */
.stat-card {
  border: none !important;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s ease !important;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.stat-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
a.stat-card { display: block; text-decoration: none; }
a.stat-card:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 32px rgba(0,0,0,0.18) !important; }
a.stat-card:active { transform: scale(0.97); }
.stat-card.primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; }
.stat-card.success { background: linear-gradient(135deg, #10B981 0%, #059669 100%); color: white; }
.stat-card.info    { background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%); color: white; }
.stat-card.warning { background: linear-gradient(135deg, var(--accent) 0%, #D97706 100%); color: white; }
.stat-value.primary, .stat-value.success, .stat-value.info, .stat-value.warning {
  color: white !important;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}
.stat-label { color: rgba(255,255,255,0.85) !important; font-size: 0.78rem; font-weight: 600; margin-top: 4px; }
.stat-icon { font-size: 1.6rem; margin-bottom: 6px; }
.stat-arrow {
  position: absolute;
  bottom: 12px;
  right: 14px;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
  transition: transform 0.2s ease;
}
a.stat-card:hover .stat-arrow { transform: translateX(4px); color: white; }

/* Premium Buttons */
.btn {
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.btn:active { transform: scale(0.96) !important; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 4px 14px rgba(255,85,0,0.35);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(255,85,0,0.45); transform: translateY(-1px); }
.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  box-shadow: none;
}
.btn-outline:hover { background: var(--primary-light); }

/* Premium Badge shimmer on status */
.badge { font-weight: 700; letter-spacing: 0.02em; }

/* Survey Card hover glow */
.survey-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.survey-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13,31,71,0.1);
}

/* Voter Card hover */
.voter-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.voter-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(13,31,71,0.08);
}

/* Premium progress bar */
.progress-bar {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: progress-shimmer 2s ease infinite;
}
@keyframes progress-shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* Enhanced page load animation */
.app-content { animation: pageIn 0.35s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stagger with spring */
.stagger > * {
  animation: slideUpSpring 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes slideUpSpring {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Sidebar premium */
.admin-sidebar {
  background: linear-gradient(180deg, #0D1F47 0%, #1A3580 100%);
  border-right: none;
  box-shadow: 4px 0 24px rgba(13,31,71,0.3);
}
.admin-nav-item {
  color: rgba(255,255,255,0.7);
  border-left-color: transparent;
  font-size: 0.9rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2px 8px 2px 0;
}
.admin-nav-item:hover {
  background: rgba(255,255,255,0.12);
  color: white;
  border-left-color: var(--accent);
}
.admin-nav-item.active {
  background: rgba(255,255,255,0.16);
  color: white;
  border-left-color: var(--accent);
}
.admin-nav-item svg { opacity: 0.8; }
.admin-nav-item:hover svg, .admin-nav-item.active svg { opacity: 1; }

/* Worker sidebar (same treatment) */
#worker-sidebar {
  background: linear-gradient(180deg, #0D1F47 0%, #1A3580 100%);
  box-shadow: 4px 0 24px rgba(13,31,71,0.3);
}

/* Header logout / profile area */
.app-header .header-actions .back-btn {
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
}

/* Lang badge glow */
.lang-badge {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
}
.lang-badge:hover { background: rgba(255,255,255,0.35); }

/* Form inputs premium */
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,85,0,0.12);
  background: white;
}

/* Auth screen premium */
.auth-screen { background: linear-gradient(160deg, #FFF0E8 0%, var(--bg) 50%); }
.auth-logo {
  box-shadow: 0 12px 32px rgba(255,85,0,0.35);
  animation: floatBounce 0.7s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes floatBounce {
  from { opacity: 0; transform: translateY(24px) scale(0.7); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Ripple on buttons */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s, transform 0.5s;
}
.btn:active::after {
  opacity: 1;
  transform: scale(2.5);
  transition: none;
}

/* Pulse dot for sync status */
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}
.sync-dot { animation: pulseDot 2s ease infinite; }

/* OTP Input glow */
.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,85,0,0.15);
  transform: scale(1.05);
}

