:root {
    --sm-primary: #1B3B6F;      /* Navy — from the SautiMetrics logo mark */
    --sm-accent: #F5A623;       /* Gold — from the SautiMetrics logo mark */
    --sm-sidebar-bg: #14294D;
    --sm-sidebar-fg: #cbd5d1;
    --sm-sidebar-active: #1B3B6F;
    --sm-content-bg: #f4f6f8;
    --sm-card-bg: #ffffff;
    --sm-border: #e5e7eb;
}
[data-bs-theme="dark"] {
    --sm-content-bg: #10161a;
    --sm-card-bg: #171f24;
    --sm-border: #2a343a;
    --sm-primary: #5B82C4;      /* Lightened navy — the base #1B3B6F is too low-contrast on dark backgrounds */
    --sm-sidebar-active: #2A4A80;
}

body { font-family: 'Figtree', system-ui, sans-serif; background: var(--sm-content-bg); }

/* ---------- App shell ---------- */
.sm-app-shell { display: flex; min-height: 100vh; }
.sm-sidebar {
    width: 250px; flex-shrink: 0; background: var(--sm-sidebar-bg); color: var(--sm-sidebar-fg);
    position: sticky; top: 0; height: 100vh; overflow-y: auto; transition: margin-left .2s ease;
}
.sm-sidebar-brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; color: #fff; padding: 1.25rem 1rem; }
.sm-sidebar-brand i { color: var(--sm-primary); font-size: 1.4rem; }
.sm-nav { padding: 0 .5rem; }
.sm-nav .nav-link { color: var(--sm-sidebar-fg); border-radius: .5rem; padding: .55rem .75rem; margin-bottom: .15rem; display: flex; align-items: center; gap: .6rem; font-size: .92rem; }
.sm-nav .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sm-nav .nav-link.active { background: var(--sm-sidebar-active); color: #fff; }
.sm-nav-heading { text-transform: uppercase; font-size: .7rem; letter-spacing: .06em; color: #6b7a7a; padding: 1rem .75rem .35rem; }

.sm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sm-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.5rem; background: var(--sm-card-bg); border-bottom: 1px solid var(--sm-border); position: sticky; top: 0; z-index: 10; }
.sm-page-title { font-size: 1.15rem; font-weight: 600; margin: 0; flex: 1; }
.sm-topbar-actions { display: flex; align-items: center; gap: .5rem; }
.sm-content { padding: 1.5rem; }

/* ---------- Cards / stat widgets ---------- */
.sm-stat-card { background: var(--sm-card-bg); border: 1px solid var(--sm-border); border-radius: .85rem; padding: 1.25rem; height: 100%; }
.sm-stat-card .sm-stat-icon { width: 46px; height: 46px; border-radius: .65rem; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #fff; }
.sm-stat-value { font-size: 1.6rem; font-weight: 700; }
.card, .sm-card { background: var(--sm-card-bg); border: 1px solid var(--sm-border); }

/* ---------- Guest / auth pages ---------- */
.sm-guest-body { background: linear-gradient(160deg, var(--sm-sidebar-bg), #0c1a33); min-height: 100vh; display: flex; align-items: center; }
.sm-guest-wrapper { max-width: 460px; margin: 2rem auto; width: 100%; padding: 0 1rem; }
.sm-guest-brand { text-align: center; color: #fff; margin-bottom: 1.25rem; }
.sm-guest-brand i { font-size: 2rem; color: #ffd23f; }
.sm-guest-brand span { font-weight: 700; font-size: 1.4rem; margin-left: .4rem; }
.sm-guest-card { background: var(--sm-card-bg); border-radius: 1rem; padding: 2rem; box-shadow: 0 20px 40px rgba(0,0,0,.25); }

/* ---------- Public poll voting page ---------- */
.sm-public-poll { max-width: 640px; margin: 2rem auto; padding: 0 1rem; }
.sm-poll-option { border: 1px solid var(--sm-border); border-radius: .75rem; padding: 1rem; margin-bottom: .75rem; cursor: pointer; transition: all .15s; }
.sm-poll-option:hover { border-color: var(--sm-primary); background: rgba(11,110,79,.05); }
.sm-poll-option input:checked ~ label { font-weight: 600; }
.sm-result-bar { height: 10px; border-radius: 6px; background: var(--sm-border); overflow: hidden; }
.sm-result-bar > span { display: block; height: 100%; background: var(--sm-primary); }

@media (max-width: 991.98px) {
    .sm-sidebar { position: fixed; left: 0; z-index: 1030; margin-left: -250px; }
    .sm-sidebar.show { margin-left: 0; }
}

/* ---------- Public marketing navbar ---------- */
.sm-public-nav { background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--sm-border); padding: .65rem 0; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.sm-nav-logo { height: 44px; width: auto; }
.sm-public-nav .nav-link { font-weight: 500; color: #374151; padding: .5rem 1rem; border-radius: .5rem; }
.sm-public-nav .nav-link:hover { color: var(--sm-primary); background: rgba(27,59,111,.06); }
.sm-social-icons a { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: none; color: #9CA3AF; transition: color .15s; font-size: .95rem; }
.sm-social-icons a:hover { color: var(--sm-primary); }
.sm-btn-cta { background: var(--sm-accent); border: none; color: #14294D; font-weight: 600; border-radius: 999px; padding-left: 1.1rem; padding-right: 1.1rem; }
.sm-btn-cta:hover { color: #14294D; filter: brightness(0.93); }

/* ---------- Public pricing preview cards on homepage ---------- */
.sm-pricing-card { background: var(--sm-card-bg); border: 1px solid var(--sm-border); border-radius: 1rem; padding: 1.75rem; height: 100%; transition: transform .15s, box-shadow .15s; }
.sm-pricing-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.08); }
.sm-pricing-card.featured { border-color: var(--sm-primary); box-shadow: 0 12px 28px rgba(11,110,79,.15); }

/* ---------- Floating WhatsApp contact button with curved "CONTACT US" arc ---------- */
.sm-whatsapp-wrap {
    position: fixed; bottom: 20px; right: 20px; z-index: 1050;
    width: 100px; height: 100px;
    animation: sm-whatsapp-bob 2.6s ease-in-out infinite;
}
@keyframes sm-whatsapp-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.sm-whatsapp-arc {
    position: absolute; top: 0; left: 0; width: 100px; height: 100px;
    pointer-events: none;
}
.sm-whatsapp-arc text {
    font-family: 'Figtree', system-ui, sans-serif;
    font-size: 14px; font-weight: 700; letter-spacing: 0.5px;
    fill: #0b6e4f;
    text-transform: uppercase;
}
.sm-whatsapp-float {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60px; height: 60px; border-radius: 50%;
    background: #25D366; color: #fff; text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; box-shadow: 0 6px 18px rgba(37,211,102,.45);
    animation: sm-whatsapp-pulse 2.2s infinite;
    transition: transform .2s ease;
}
.sm-whatsapp-float:hover { color: #fff; transform: translateX(-50%) scale(1.08); animation-play-state: paused; }
@keyframes sm-whatsapp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55), 0 6px 18px rgba(37,211,102,.45); }
    70% { box-shadow: 0 0 0 14px rgba(37,211,102,0), 0 6px 18px rgba(37,211,102,.45); }
    100% { box-shadow: 0 0 0 0 rgba(37,211,102,0), 0 6px 18px rgba(37,211,102,.45); }
}
@media (max-width: 575.98px) {
    .sm-whatsapp-wrap { width: 88px; height: 88px; bottom: 14px; right: 14px; }
    .sm-whatsapp-arc { width: 88px; height: 88px; }
    .sm-whatsapp-float { width: 52px; height: 52px; font-size: 1.4rem; }
    .sm-whatsapp-arc text { font-size: 11px; }
}

/* ---------- Public rich footer ---------- */
.sm-public-footer { background: var(--sm-primary); color: #cbd5d1; }
.sm-public-footer h6 { font-weight: 700; letter-spacing: .03em; }
.sm-footer-links, .sm-footer-contact { display: flex; flex-direction: column; gap: .6rem; }
.sm-footer-links a { color: #a8b8b6; text-decoration: none; font-size: .9rem; }
.sm-footer-links a:hover { color: var(--sm-accent); }
.sm-footer-contact li { display: flex; align-items: flex-start; gap: .6rem; font-size: .88rem; color: #a8b8b6; }
.sm-footer-contact i { color: var(--sm-accent); font-size: 1rem; margin-top: .1rem; }
.sm-footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }

/* ---------- Public footer logo (navy/gold brand update) ---------- */
.sm-footer-logo-wrap { display: inline-flex; background: #fff; padding: .5rem .75rem; border-radius: .5rem; margin-bottom: .75rem; }
.sm-footer-logo { height: 44px; width: auto; display: block; }

/* ---------- Public footer bottom-bar legal links ---------- */
.sm-footer-bottom a.text-white-50:hover { color: var(--sm-accent) !important; }

/* ---------- Public footer: office card (light-on-dark, sits on navy footer bg) ---------- */
.sm-footer-office-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: .75rem; padding: 1rem 1.1rem; }
.sm-footer-office-card .badge-hq { background: var(--sm-accent); color: #14294D; font-size: .7rem; font-weight: 700; padding: .2rem .5rem; border-radius: 999px; margin-left: .4rem; }

/* ---------- Homepage brand-color utilities (replacing Bootstrap green) ---------- */
.sm-icon-brand { color: var(--sm-primary); }
.sm-badge-accent { background: var(--sm-accent); color: #14294D; }
.sm-btn-outline-brand { border: 1px solid var(--sm-primary); color: var(--sm-primary); background: transparent; }
.sm-btn-outline-brand:hover { background: var(--sm-primary); color: #fff; }
.sm-section-eyebrow { color: var(--sm-primary); font-weight: 700; letter-spacing: .05em; font-size: .78rem; }

/* ---------- Homepage: featured content cards ---------- */
.sm-content-card { border: 1px solid rgba(27,59,111,.08); border-radius: .75rem; overflow: hidden; transition: box-shadow .15s, transform .15s; background: #fff; height: 100%; }
.sm-content-card:hover { box-shadow: 0 .5rem 1.25rem rgba(27,59,111,.1); transform: translateY(-2px); }
.sm-content-card img { height: 160px; object-fit: cover; width: 100%; background: #eef1f6; }
.sm-content-card .sm-card-body { padding: 1rem 1.1rem; }

/* ---------- Homepage: candidate cards ---------- */
.sm-candidate-card { text-align: center; padding: 1.25rem 1rem; border-radius: .75rem; border: 1px solid rgba(27,59,111,.08); }
.sm-candidate-card img { width: 76px; height: 76px; object-fit: cover; border-radius: 50%; border: 3px solid var(--sm-accent); }

/* ---------- Homepage: how it works ---------- */
.sm-step-number { width: 42px; height: 42px; border-radius: 50%; background: var(--sm-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 1rem; }

/* ---------- Homepage: client categories ---------- */
.sm-client-chip { background: rgba(27,59,111,.06); color: var(--sm-primary); border-radius: 999px; padding: .5rem 1.1rem; font-size: .88rem; font-weight: 600; display: inline-block; }

/* ---------- Homepage: final CTA banner ---------- */
.sm-cta-banner { background: linear-gradient(135deg, var(--sm-primary), #0f2751); }

/* ---------- Homepage: candidate avatar placeholder (no photo) ---------- */
.sm-candidate-avatar-placeholder { width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--sm-accent); background: rgba(27,59,111,.06); display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.sm-candidate-avatar-placeholder i { font-size: 2.2rem; color: var(--sm-primary); }

/* ---------- Homepage: trust/credibility section ---------- */
.sm-trust-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; }
.sm-trust-card .sm-trust-icon { width: 46px; height: 46px; min-width: 46px; border-radius: .6rem; background: rgba(27,59,111,.08); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--sm-primary); }
.sm-commitment-tile { background: rgba(245,166,35,.08); border-radius: .75rem; padding: 1.25rem 1rem; text-align: center; height: 100%; }
.sm-commitment-tile i { font-size: 1.5rem; color: var(--sm-accent); }
.sm-commitment-tile .sm-commitment-label { font-weight: 700; font-size: .85rem; margin-top: .5rem; color: var(--sm-primary); }

/* ---------- Live Polls directory: poll title links ---------- */
.sm-card h6 a { color: var(--sm-primary); }
.sm-card h6 a:hover { color: var(--sm-accent); }

/* ---------- Poll results: leader row (brand gold instead of green) ---------- */
.sm-leader-row { background: rgba(245,166,35,.1); }

/* ---------- Featured poll card (Admin > Poll Moderation curated) ---------- */
.sm-featured-card { border-color: var(--sm-accent) !important; border-width: 2px; }

/* ---------- Politrack-style pill category filters ---------- */
.sm-pill {
    display: inline-block;
    padding: .4rem 1rem;
    border-radius: 999px;
    background: #eef1f5;
    color: var(--sm-primary);
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .15s ease;
}
.sm-pill:hover { background: #e2e6ec; color: var(--sm-primary); }
.sm-pill-active { background: var(--sm-primary); color: #fff; }

/* ---------- Poll card: gradient banner + stats box ---------- */
.sm-poll-card { background: var(--sm-card-bg); border: 1px solid var(--sm-border); box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.sm-poll-card-banner {
    position: relative;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--sm-primary), var(--sm-sidebar-bg));
}
.sm-status-badge { font-size: .7rem; font-weight: 600; padding: .3rem .6rem; }
.sm-status-live { background: #2e7d32; color: #fff; }
.sm-status-ended { background: rgba(255,255,255,.25); color: #fff; }
.sm-featured-ribbon {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: var(--sm-accent);

    color: #14294D;
    font-size: .7rem;
    font-weight: 700;
    padding: .25rem .6rem;
    border-radius: 999px;
}
.sm-vote-stats-box { border: 1px solid var(--sm-border); border-radius: .5rem; padding: .75rem; background: var(--sm-content-bg); }
.sm-stat-num { font-weight: 700; font-size: 1.1rem; color: var(--sm-primary); }
.sm-stat-label { font-size: .7rem; color: #6c757d; text-transform: uppercase; }

/* Featured poll card keeps its gold ring — takes priority over the plain banner style */
.sm-featured-card { border: 2px solid var(--sm-accent) !important; }

/* ---------- Vote page: card-style option picker ---------- */
.sm-option-card { border: 1px solid var(--sm-border); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.sm-option-card:has(input:checked) { border-color: var(--sm-primary); background: rgba(27,59,111,.05); }
.sm-option-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.sm-option-avatar-initials { display: inline-flex; align-items: center; justify-content: center; background: var(--sm-primary); color: #fff; font-weight: 700; }

/* ---------- Results page: ranked list + live status badges ---------- */
.sm-rank-row { background: var(--sm-content-bg); }
.sm-rank-badge { color: #fff; font-weight: 700; font-size: .75rem; border-radius: 999px; min-width: 32px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.sm-status-live { background: #198754; color: #fff; }
.sm-status-ended { background: #6c757d; color: #fff; }
.sm-range-btn.active { background: var(--sm-primary); color: #fff; border-color: var(--sm-primary); }
.sm-comment-row { border-bottom: 1px solid var(--sm-border); padding-bottom: .75rem; }

/* Ranked results — leaderboard v2 */
.sm-results-bg { background: #FBF9F5; border-radius: 1rem; padding: 1rem; }
.sm-rank-row-v2 { background: var(--sm-card-bg); border-radius: .85rem; padding: .85rem 1rem; }
.sm-rank-avatar-ring { border-radius: 50%; padding: 3px; flex-shrink: 0; display: inline-flex; }
.sm-rank-avatar-ring img, .sm-rank-avatar-ring .sm-option-avatar-initials { width: 48px; height: 48px; border-radius: 50%; display: block; margin: 0; }
.sm-vote-share-track { height: 6px; border-radius: 4px; background: var(--sm-border); overflow: hidden; margin-top: .45rem; max-width: 320px; }
.sm-vote-share-fill { height: 100%; border-radius: 4px; transition: width .5s ease; }
.sm-chip-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 1rem; }
.sm-chip { background: rgba(27,59,111,.07); color: var(--sm-primary); border-radius: 999px; padding: .25rem .75rem; font-size: .76rem; font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.sm-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; display: inline-block; animation: sm-pulse 1.4s ease-in-out infinite; }
@keyframes sm-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(1.5); } }

/* ---------- Elections dashboard ---------- */
.sm-race-tab { background: #eef1f5; color: var(--sm-primary); border-radius: 999px; font-weight: 500; font-size: .9rem; border: none; padding: .5rem 1.25rem; }
.sm-race-tab.active { background: var(--sm-primary) !important; color: #fff !important; }
.sm-standing-banner { background: rgba(245,166,35,.08); border: 1px solid rgba(245,166,35,.3); }
.sm-result-bar { height: 6px; border-radius: 999px; background: var(--sm-border); overflow: hidden; }
.sm-result-bar span { display: block; height: 100%; background: var(--sm-primary); }
