/* ================================================================
   VERIVOTE — Global Design System
   ================================================================ */

:root {
  --vv-blue:    #4361EE;
  --vv-indigo:  #3A0CA3;
  --vv-purple:  #7209B7;
  --vv-teal:    #06D6A0;
  --vv-gold:    #FFB703;
  --vv-dark:    #0D1B2A;
  --vv-navy:    #16213E;
  --vv-mid:     #1F3462;
  --vv-glass:   rgba(255,255,255,0.07);
  --vv-glass2:  rgba(255,255,255,0.12);
  --vv-border:  rgba(255,255,255,0.15);
  --vv-shadow:  0 20px 60px rgba(0,0,0,0.4);
  --vv-grad:    linear-gradient(135deg, #0D1B2A 0%, #16213E 60%, #1F3462 100%);
  --vv-grad2:   linear-gradient(135deg, #4361EE, #7209B7);
  --vv-grad3:   linear-gradient(135deg, #06D6A0, #4361EE);
  --vv-radius:  16px;
  --vv-radius-sm: 10px;
}

/* ── Smooth scrolling & font ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Auth pages full-screen background ── */
.vv-auth-bg {
  min-height: 100vh;
  background: var(--vv-grad);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.vv-auth-bg::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(67,97,238,0.3) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
}

.vv-auth-bg::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(114,9,183,0.2) 0%, transparent 70%);
  bottom: -150px;
  left: -150px;
  pointer-events: none;
}

/* ── Glass card ── */
.vv-glass-card {
  background: var(--vv-glass2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--vv-border);
  border-radius: var(--vv-radius);
  box-shadow: var(--vv-shadow);
}

/* ── Gradient button ── */
.vv-btn {
  background: var(--vv-grad2);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(67,97,238,0.4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}
.vv-btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(67,97,238,0.5);
}
.vv-btn:active:not(:disabled) { transform: translateY(0); }
.vv-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.vv-btn-teal {
  background: var(--vv-grad3);
  box-shadow: 0 4px 20px rgba(6,214,160,0.35);
}

/* ── Input field ── */
.vv-input {
  background: rgba(255,255,255,0.06) !important;
  border: 1.5px solid rgba(255,255,255,0.15) !important;
  border-radius: var(--vv-radius-sm) !important;
  color: #fff !important;
  padding: 0.85rem 1.1rem !important;
  font-size: 1rem !important;
  letter-spacing: 2px;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}
.vv-input::placeholder { color: rgba(255,255,255,0.35) !important; letter-spacing: 0; }
.vv-input:focus {
  background: rgba(255,255,255,0.10) !important;
  border-color: var(--vv-blue) !important;
  box-shadow: 0 0 0 3px rgba(67,97,238,0.25) !important;
  outline: none !important;
  color: #fff !important;
}

/* ── Label ── */
.vv-label {
  color: rgba(255,255,255,0.65);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

/* ── Branding ── */
.vv-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.vv-logo-icon {
  width: 48px;
  height: 48px;
  background: var(--vv-grad2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 20px rgba(67,97,238,0.5);
}

.vv-logo-text {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.vv-logo-text span {
  background: var(--vv-grad2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vv-tagline {
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 0.25rem;
}

/* ── Admin layout overrides ── */
.vv-sidebar {
  background: var(--vv-dark) !important;
  border-right: 1px solid rgba(255,255,255,0.06) !important;
}

.vv-sidebar .navbar-brand-box {
  background: var(--vv-dark) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}

.vv-sidebar .nav-link.menu-link {
  color: rgba(255,255,255,0.55) !important;
  border-radius: 10px !important;
  margin: 2px 8px !important;
  transition: all 0.2s !important;
}
.vv-sidebar .nav-link.menu-link:hover,
.vv-sidebar .nav-link.menu-link.active {
  color: #fff !important;
  background: rgba(67,97,238,0.2) !important;
}
.vv-sidebar .nav-link.menu-link.active {
  background: var(--vv-grad2) !important;
  box-shadow: 0 4px 12px rgba(67,97,238,0.35) !important;
}

/* ── Stat cards ── */
.vv-stat-card {
  border-radius: 16px !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
  transition: transform 0.2s, box-shadow 0.2s;
}
.vv-stat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(0,0,0,0.12) !important; }

.vv-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1rem;
}

/* ── Voter card ── */
.vv-candidate-card {
  background: #fff;
  border: 2px solid #f0f2f5;
  border-radius: 18px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.vv-candidate-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--vv-grad2);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 0;
}
.vv-candidate-card:hover { border-color: var(--vv-blue); box-shadow: 0 8px 30px rgba(67,97,238,0.2); transform: translateY(-4px); }
.vv-candidate-card.selected { border-color: var(--vv-blue); box-shadow: 0 8px 30px rgba(67,97,238,0.35); }
.vv-candidate-card.selected::before { opacity: 0.06; }
.vv-candidate-card > * { position: relative; z-index: 1; }

.vv-candidate-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #e8ecf8;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin: 0 auto 0.75rem;
  display: block;
}
.vv-candidate-card:hover .vv-candidate-avatar,
.vv-candidate-card.selected .vv-candidate-avatar {
  border-color: var(--vv-blue);
  box-shadow: 0 0 0 4px rgba(67,97,238,0.18);
}

.vv-candidate-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a1a2e;
  margin: 0;
  line-height: 1.3;
}

.vv-check-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: var(--vv-grad2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s;
}
.vv-candidate-card.selected .vv-check-badge { opacity: 1; transform: scale(1); }

/* ── Progress bar themed ── */
.vv-progress-wrap {
  background: #f0f2f8;
  border-radius: 30px;
  height: 8px;
  overflow: hidden;
  margin-top: 4px;
}
.vv-progress-bar {
  height: 100%;
  border-radius: 30px;
  background: var(--vv-grad2);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.vv-progress-bar.winner { background: linear-gradient(90deg, #06D6A0, #4361EE); }

/* ── Result bars ── */
.vv-result-bar-wrap { background: rgba(67,97,238,0.08); border-radius: 30px; height: 10px; overflow: hidden; }
.vv-result-bar { height: 100%; border-radius: 30px; background: var(--vv-grad2); transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.vv-result-bar.winner { background: linear-gradient(90deg, #06D6A0, #0bbf8e); }

/* ── Animations ── */
@keyframes vv-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes vv-pop {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes vv-pulse-ring {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

.vv-fade-up  { animation: vv-fade-up 0.5s ease both; }
.vv-pop      { animation: vv-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.vv-delay-1  { animation-delay: 0.08s; }
.vv-delay-2  { animation-delay: 0.16s; }
.vv-delay-3  { animation-delay: 0.24s; }

/* ── Table improvements ── */
.vv-table thead th {
  background: #f8f9fc !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  color: #6c757d !important;
  border-bottom: 2px solid #e9ecef !important;
  padding: 0.85rem 1rem !important;
}
.vv-table tbody td {
  vertical-align: middle !important;
  padding: 0.85rem 1rem !important;
  font-size: 0.9rem !important;
}
.vv-table tbody tr { transition: background 0.15s; }
.vv-table tbody tr:hover { background: #f8f9fc !important; }

/* ── Modal overlay ── */
.vv-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,27,42,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  padding: 1rem;
}
.vv-modal {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
  animation: vv-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}

/* ── Step indicator ── */
.vv-step-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.vv-step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--vv-blue);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.vv-step-count {
  font-size: 0.82rem;
  color: #6c757d;
}

/* ── Confirm modal inner ── */
.vv-confirm-card {
  padding: 2rem;
  text-align: center;
  max-width: 340px;
}
.vv-confirm-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #e8ecf8;
  margin: 0 auto 1rem;
  display: block;
}

/* ── Skip button ── */
.vv-skip-btn {
  background: transparent;
  border: 2px solid #e0e4f0;
  color: #8896AB;
  border-radius: 10px;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.vv-skip-btn:hover { border-color: #ffd166; color: #e09000; background: #fffbf0; }

/* ── Live results badge ── */
.vv-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(6,214,160,0.12);
  color: #06D6A0;
  border: 1px solid rgba(6,214,160,0.3);
  border-radius: 50px;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.vv-live-dot {
  width: 7px; height: 7px;
  background: #06D6A0;
  border-radius: 50%;
  animation: vv-live-blink 1.2s ease-in-out infinite;
}
@keyframes vv-live-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── Done modal ── */
.vv-done-card {
  padding: 2.5rem;
  text-align: center;
  max-width: 360px;
}
.vv-done-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: vv-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.vv-done-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 0.5rem;
}
