:root {
    /* Brand palette — maps onto Bootstrap's CSS variable system */
    --brand-50:  #eff6ff;
    --brand-100: #dbeafe;
    --brand-200: #bfdbfe;
    --lightblue-500: #1a56db;
    --balancedblue-600: #1d4ed8;
    --darkblue-bg-primary: #1E40AF;
    --cyan-500: #00BCD4;
    --brand-800: #EC4D37; 
    --brand-900: #1D1B1B;
    --brand-1000: #0f172a;
    /* Light text font color */
    --text-light-primary: #FCEDDA;
    /* #EE4E34 oregish bgcolor*/

    /* Override Bootstrap's primary to use brand color */
    --bs-primary:         var(--brand-500);
    --bs-primary-rgb:     26, 86, 219;
    --bs-link-color:      var(--brand-600);
    --bs-link-hover-color:var(--brand-700);

    --primary-orange2: #FF6B35;
    --primary-orange: #EC4D37;
    --primary-dark: #1a1a2e;
    --secondary-orange: #FF8C42;
    --accent-coral: #FF9B71;
    --accent-peach: #FFB4A2;
    --dark-bg: #16213e;
    --darker-bg: #0f1624;
    --blue-bg: #2c3e50;
    --light-gray: #f8f9fa;
    --text-dark: #2d3748;
    --text-light: #718096;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    --gradient-secondary: linear-gradient(135deg, #FF8C42 0%, #FFB4A2 100%);
    --gradient-blue: linear-gradient(125deg, #1E40AF 100%, #EFF6FF 20%);
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #1E40AF 100%);
    --ribbon-gradient: linear-gradient(130deg, #1E40AF 0%, #00BCD4 100%);
    --voter-gradient1: linear-gradient(130deg, #00BCD4 50%, #1E40AF 100%);
    --voter-gradient2: linear-gradient(130deg, #1E40AF 40%, #00BCD4 100%);

    --dark: #0d1117;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --text-light: #e2e8f0;
    --text-muted: #64748b;
    --input-border: #cbd5e1;
    --white: #ffffff;
    --bg: #f1f5f9;
}

body {
    font-family: Quicksand, sans-serif !important;
    /* background: #1E40AF; */
    /* background-color: #f8fafc; */
    /* color: #0f172a; */
    -webkit-font-smoothing: antialiased;
}

.logofont {
  font-family: "Comfortaa", sans-serif !important;
}

.footer {
    margin-bottom: 0;
    padding-bottom: 0;
}

.darkSection {
    padding: 4rem;
    background: var(--primary-dark);
    color: white;
}

.lightgraySection {
    padding: 4rem;
    background: var(--light-gray);
    color: var(--primary-dark);
}

.lightblueSection {
    padding: 4rem;
    background: var(--brand-50);
    color: var(--primary-dark);
}

.bluegradientbg {
    padding: 4rem;
    background: var(--gradient-blue);
    color: var(--light-gray);
}

.card.styledcard {
  transition: all 0.3s ease;
  background: var(--white);
  border-radius: 20px;
}

.styledcard {
  transition: all 0.3s ease;
  background: var(--light-gray);
}

.styledcard:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  border-color: var(--primary-orange);
}

.card.active {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: var(--primary-orange);
    background-color: var(--brand-50);
}

.adminLoginSection {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff 0%, #FFF5F2 100%);
}

.registerSection {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  height: 100%;
}

.voterSection {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0f172a;
}

.logoutSection {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0f172a;
}

@media (max-width: 768px) {
    .leftside { flex: 0 0 auto; padding: 28px 24px; }
    .rightside { padding: 40px 24px; }
}


/* ── Page transition ─────────────────────────────────────────────── */
main {
    animation: fadeUp 0.22s ease-out;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}



/* Log and Auth in pages  */
.left {
    flex: 0 0 52%;
    background: var(--dark);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px 48px 32px 40px;
    position: relative;
    overflow: hidden;
    /* margin-left: 5px; */
}

.left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.left::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(37,99,235,.18) 0%, transparent 70%);
    top: 30%;
    left: -60px;
    pointer-events: none;
}


.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
}

.logo-name {
    font-weight: 600;
    font-size: 18px;
    color: var(--white);
}

.left-body {
    position: relative;
    z-index: 1;
}

.tagline {
    font-family: 'Sora', sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: var(--text-light);
    line-height: 1.55;
    max-width: 480px;
}

.tagline em { font-style: normal; color: #fff; }

.social-proof {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
}

.avatars { display: flex; }

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    margin-left: -8px;
}
.avatar:first-child { margin-left: 0; }
.avatar.a { background: #7c3aed; }
.avatar.b { background: #0891b2; }
.avatar.c { background: #16a34a; }
.avatar.d { background: #dc2626; }
.avatar.e { background: #d97706; }

.proof-text { font-size: 13px; color: var(--text-muted); }
.proof-text strong { color: #94a3b8; font-weight: 500; }

.left-footer { font-size: 12px; color: #334155; position: relative; z-index: 1; }

.right {
    display: flex;
    min-height: 100vh;
    background: #eff6ff;
    overflow: hidden;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* @media (max-width: 768px) {
    body { flex-direction: column; }
    .left { flex: 0 0 auto; padding: 28px 24px; }
    .left-body { margin-top: 48px; }
    .tagline { font-size: 18px; }
    .left-footer { display: none; }
    .right { padding: 40px 24px; }
    .card { padding: 28px 20px; }
    .field-row { grid-template-columns: 1fr; }
    .plans { grid-template-columns: 1fr; }
    .voter-card { padding: 28px 20px; }
} */

.pageheader {
    background: var(--primary-gradient);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.planribbon {
    background: var(--ribbon-gradient);
    /* border-radius: 2rem; */
    /* padding: 2rem; */
}

.voterheader {
    background: var(--voter-gradient2);
}

.card.notificationribbon {
    background: var(--brand-1000);
}

.blink {
  /* Shorthand animation property: name | duration | timing-function | iteration-count */
  animation: blink 1s linear infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}


/* --- Candidate card button --- */
.candidate-btn {
    border-color: #cbd5e1 !important; /* slate-200 equivalent */
    transition: all 0.2s ease;
    cursor: pointer;
}

.candidate-btn:hover {
    border-color: #6366f1 !important; /* your brand color */
    background-color: #eef2ff !important; /* brand-50 tint */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: scale(1.01);
}

/* --- Avatar circle with gradient --- */
.candidate-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1, #22d3ee); /* brand-500 → cyan-400 */
    min-width: 48px; /* prevents shrinking in flex */
}

/* --- Checkmark circle --- */
.candidate-check {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-color: #cbd5e1 !important;
    color: transparent; /* hides checkmark by default */
    transition: all 0.2s ease;
}

.candidate-btn:hover .candidate-check {
    border-color: #6366f1 !important;
    background-color: #6366f1;
    color: white; /* reveals checkmark on hover */
}



.notification-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-unread {
    background-color: #f8f9fc;
    border-left: 3px solid #0d6efd;
}

.notification-read {
    opacity: 0.8;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}




  .checkout-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: #f8fafc;
  }

  .checkout-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.09);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
  }

  /* Header */
  .checkout-header {
    background: linear-gradient(135deg, #00a550 0%, #007a3d 100%);
    padding: 2rem;
    text-align: center;
    color: #fff;
  }
  .mpesa-logo {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
  }
  .mpesa-logo span { color: #ffd700; }
  .checkout-header p {
    font-size: 0.85rem;
    opacity: 0.85;
    margin: 0;
  }

  /* Order summary */
  .order-summary {
    background: #f0fdf4;
    border-bottom: 1px solid #d1fae5;
    padding: 1.25rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .order-summary .os-plan { font-size: 0.85rem; color: #374151; }
  .order-summary .os-plan strong { display: block; font-size: 1rem; color: #0f172a; }
  .order-summary .os-amount {
    font-size: 1.6rem;
    font-weight: 800;
    color: #00a550;
    white-space: nowrap;
  }
  .order-summary .os-amount span {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6b7280;
  }

  /* Form body */
  .checkout-body { padding: 1.75rem; }

  .form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.4rem;
  }

  .phone-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s;
  }
  .phone-input-wrap:focus-within { border-color: #00a550; }

  .phone-prefix {
    background: #f3f4f6;
    border-right: 1px solid #d1d5db;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .phone-input {
    border: none;
    outline: none;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
    color: #0f172a;
    width: 100%;
    background: transparent;
  }
  .phone-input::placeholder { color: #9ca3af; }

  .form-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.4rem;
  }

  /* What happens next */
  .steps {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem 1.1rem;
    margin: 1.25rem 0;
  }
  .steps-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.6rem;
  }
  .step {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
  }
  .step:last-child { margin-bottom: 0; }
  .step-num {
    background: #00a550;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
  }
  .step p { margin: 0; font-size: 0.8rem; color: #374151; line-height: 1.5; }

  /* Submit button */
  .btn-pay {
    width: 100%;
    background: #00a550;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 0.25rem;
  }
  .btn-pay:hover { background: #007a3d; }
  .btn-pay:disabled { background: #86efac; cursor: not-allowed; }

  .cancel-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #6b7280;
    text-decoration: none;
  }
  .cancel-link:hover { color: #374151; }



    .waiting-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: #f8fafc;
  }

  .waiting-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.09);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2rem;
    text-align: center;
  }

  /* Animated phone icon */
  .phone-icon-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
  }
  .phone-icon {
    font-size: 3.5rem;
    display: block;
    animation: phonePulse 1.5s ease-in-out infinite;
  }
  @keyframes phonePulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.1); }
  }
  .ping-ring {
    position: absolute;
    inset: -8px;
    border: 3px solid #00a550;
    border-radius: 50%;
    animation: pingRing 1.5s ease-out infinite;
    opacity: 0;
  }
  @keyframes pingRing {
    0%   { transform: scale(0.8); opacity: 0.7; }
    100% { transform: scale(1.4); opacity: 0; }
  }

  .waiting-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
  }
  .waiting-subtitle {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.6;
  }

  /* Status display */
  .status-box {
    background: #f8fafc;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
  }
  .status-box .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    animation: blink 1s ease-in-out infinite;
    flex-shrink: 0;
  }
  .status-box.success .status-dot { background: #22c55e; animation: none; }
  .status-box.failed  .status-dot { background: #ef4444; animation: none; }
  @keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
  }
  .status-box .status-text {
    font-size: 0.85rem;
    color: #374151;
  }

  /* Progress dots */
  .progress-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 1.5rem; }
  .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    animation: dotBounce 1.2s ease-in-out infinite;
  }
  .dot:nth-child(2) { animation-delay: 0.2s; }
  .dot:nth-child(3) { animation-delay: 0.4s; }
  @keyframes dotBounce {
    0%, 80%, 100% { transform: translateY(0); background: #d1d5db; }
    40%           { transform: translateY(-6px); background: #00a550; }
  }

  /* Tip box */
  .tip-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
    color: #92400e;
    margin-bottom: 1.5rem;
    text-align: left;
  }
  .tip-box strong { display: block; margin-bottom: 0.25rem; }

  .cancel-link {
    font-size: 0.8rem;
    color: #94a3b8;
    text-decoration: none;
    display: block;
  }
  .cancel-link:hover { color: #6b7280; }

  /* Success / error overlays (shown via JS) */
  .result-overlay { display: none; }
  .result-overlay.visible { display: block; }

  .btn-continue {
    display: inline-block;
    background: #00a550;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    margin-top: 1rem;
  }
  .btn-retry {
    display: inline-block;
    background: transparent;
    color: #ef4444;
    border: 1.5px solid #ef4444;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    margin-top: 1rem;
  }