@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
    color-scheme: light;
    --navy:        #171647;
    --navy-dark:   #100f36;
    --navy-soft:   #27245d;
    --orange:      #ef4b0b;
    --orange-dark: #c63c0a;
    --gold:        #f4c51c;
    --cream:       #fbf8f2;
    --ink:         #27243b;
    --muted:       #7a7590;
    --border:      #e2dff0;
    --surface:     #ffffff;
    --shadow:      0 24px 60px rgba(23,22,71,.12);

    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: inherit;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

::selection { color: #fff; background: var(--orange); }

a { text-underline-offset: .2em; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(244,197,28,.8) !important;
    outline-offset: 3px;
}

button, input, select, textarea { font: inherit; }

/* ── NAVBAR ─────────────────────────────────────────────────── */
.brand-nav {
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem 1.5rem;
    background: rgba(16,15,54,.88);
    border-bottom: 1px solid rgba(244,197,28,.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 4px 24px rgba(0,0,0,.28);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-brand img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    background: #fff;
    border: 2px solid var(--gold);
    border-radius: .6rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.28);
}

.nav-brand-text { line-height: 1; }

.nav-brand-text strong {
    display: block;
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.25;
}

.nav-brand-text span {
    display: block;
    color: var(--gold);
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-top: .15rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .85rem;
    color: rgba(255,255,255,.8);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: .6rem;
    transition: color .18s, background .18s;
}

.nav-links a:hover { color: var(--gold); background: rgba(255,255,255,.07); }

.nav-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1.1rem;
    color: #fff !important;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(239,75,11,.35);
    transition: transform .18s, box-shadow .18s;
}

.nav-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 20px rgba(239,75,11,.45);
    color: #fff !important;
}

.nav-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .42rem 1.1rem;
    color: #fff !important;
    background: transparent;
    border: 1.5px solid rgba(255,255,255,.35);
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s, border-color .18s;
}

.nav-btn-outline:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.6);
}

/* Avatar dropdown */
.nav-avatar-wrap { position: relative; }

.nav-avatar-btn {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: .3rem .5rem;
    border-radius: .6rem;
    color: rgba(255,255,255,.85);
    font-size: .85rem;
    font-weight: 600;
    transition: background .18s;
}

.nav-avatar-btn:hover { background: rgba(255,255,255,.1); }

.nav-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
}

.nav-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: .9rem;
    box-shadow: 0 16px 40px rgba(23,22,71,.16);
    padding: .4rem;
    display: none;
    z-index: 1000;
}

.nav-dropdown.open { display: block; }

.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .75rem;
    color: var(--ink);
    font-size: .84rem;
    text-decoration: none;
    border-radius: .55rem;
    transition: background .15s;
}

.nav-dropdown a:hover { background: rgba(23,22,71,.06); }
.nav-dropdown a.danger { color: #dc2626; }
.nav-dropdown a.danger:hover { background: rgba(220,38,38,.06); }

/* Mobile nav */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
    color: rgba(255,255,255,.8);
    border-radius: .4rem;
    transition: background .18s;
}

.nav-hamburger:hover { background: rgba(255,255,255,.1); }
.nav-hamburger svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

.nav-mobile-menu {
    display: none;
    flex-direction: column;
    gap: .25rem;
    padding: .75rem 1.5rem 1rem;
    background: rgba(16,15,54,.96);
    border-top: 1px solid rgba(255,255,255,.07);
}

.nav-mobile-menu.open { display: flex; }

.nav-mobile-menu a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    padding: .6rem .8rem;
    border-radius: .6rem;
    font-size: .9rem;
    font-weight: 500;
    transition: background .18s, color .18s;
}

.nav-mobile-menu a:hover { color: var(--gold); background: rgba(255,255,255,.07); }

@media (max-width: 767px) {
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
}

/* ── HERO ────────────────────────────────────────────────────── */
.kuti-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(5rem, 12vw, 9rem);
    color: #fff;
    text-align: center;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(239,75,11,.32) 0%, transparent 45%),
        radial-gradient(ellipse at 15% 80%, rgba(244,197,28,.12) 0%, transparent 40%),
        linear-gradient(150deg, var(--navy-dark) 0%, var(--navy) 60%, #201b65 100%);
}

.kuti-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 52px 52px;
}

.kuti-hero::after {
    content: '';
    position: absolute;
    z-index: -1;
    right: -6rem;
    bottom: -16rem;
    width: 36rem;
    aspect-ratio: 1;
    border: 1px solid rgba(244,197,28,.2);
    border-radius: 50%;
    box-shadow: 0 0 0 3rem rgba(244,197,28,.04), 0 0 0 6rem rgba(244,197,28,.025);
    pointer-events: none;
}

.hero-eyebrow {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.25rem;
}

.hero-heading {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.08;
    text-wrap: balance;
    color: #fff;
    margin: 0 auto 1.25rem;
    max-width: 18ch;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,.72);
    max-width: 52ch;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-sub strong { color: var(--gold); }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .85rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .9rem 2rem;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

.hero-btn:hover { transform: translateY(-2px); }

.hero-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    box-shadow: 0 8px 24px rgba(239,75,11,.38);
}
.hero-btn-primary:hover { box-shadow: 0 12px 32px rgba(239,75,11,.52); }

.hero-btn-secondary {
    color: #fff;
    background: rgba(255,255,255,.12);
    border: 1.5px solid rgba(255,255,255,.3);
    backdrop-filter: blur(10px);
}
.hero-btn-secondary:hover { background: rgba(255,255,255,.18); }

.hero-btn-ghost {
    color: rgba(255,255,255,.55);
    background: transparent;
    border: 1.5px solid rgba(255,255,255,.18);
    cursor: not-allowed;
}

.hero-btn svg {
    width: 18px; height: 18px;
    stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round;
}

/* ── ELECTION BANNER ─────────────────────────────────────────── */
.election-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    margin: -2.5rem 0 2rem;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(14px);
    flex-wrap: wrap;
}

.election-banner-live {
    background: rgba(16,185,129,.1);
    border: 1px solid rgba(16,185,129,.3);
}

.election-banner-expired {
    background: rgba(245,158,11,.09);
    border: 1px solid rgba(245,158,11,.28);
}

.election-banner-scheduled {
    background: rgba(100,116,139,.1);
    border: 1px solid rgba(100,116,139,.25);
}

.election-banner-info { display: flex; align-items: center; gap: .9rem; }

.banner-icon-wrap {
    width: 44px; height: 44px; border-radius: .75rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.banner-icon-wrap svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.election-banner-live .banner-icon-wrap { background: rgba(16,185,129,.18); color: #10b981; }
.election-banner-expired .banner-icon-wrap { background: rgba(245,158,11,.18); color: #d97706; }
.election-banner-scheduled .banner-icon-wrap { background: rgba(100,116,139,.15); color: #64748b; }

.banner-title {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: .15rem;
}

.election-banner-live .banner-title { color: #059669; }
.election-banner-expired .banner-title { color: #b45309; }
.election-banner-scheduled .banner-title { color: #475569; }

.banner-body { font-size: .9rem; color: var(--ink); }

.banner-badge {
    padding: .3rem .85rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.badge-live { background: rgba(16,185,129,.18); color: #059669; border: 1px solid rgba(16,185,129,.3); animation: pulse 2s ease-in-out infinite; }
.badge-closed { background: rgba(245,158,11,.15); color: #b45309; border: 1px solid rgba(245,158,11,.25); }
.badge-scheduled { background: rgba(100,116,139,.12); color: #475569; border: 1px solid rgba(100,116,139,.2); }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.55} }

/* ── FEATURE CARDS ───────────────────────────────────────────── */
.features-section {
    padding: 5rem 0;
}

.features-heading {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -.02em;
    margin-bottom: .5rem;
}

.features-sub {
    text-align: center;
    color: var(--muted);
    font-size: .95rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 2rem 1.75rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(23,22,71,.05);
    transition: transform .22s ease, box-shadow .22s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(23,22,71,.12);
}

.feature-icon-wrap {
    width: 68px;
    height: 68px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.feature-icon-navy { background: rgba(23,22,71,.1); color: var(--navy); }
.feature-icon-orange { background: rgba(239,75,11,.1); color: var(--orange); }
.feature-icon-gold { background: rgba(244,197,28,.18); color: #b8890e; }

.feature-icon-wrap svg {
    width: 30px; height: 30px;
    stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round;
}

.feature-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .5rem;
}

.feature-desc {
    font-size: .875rem;
    color: var(--muted);
    line-height: 1.65;
}

/* ── AUTH PAGES (login, signup, otp…) ────────────────────────── */
.brand-auth {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(ellipse at 85% 10%, rgba(244,197,28,.12) 0%, transparent 40%),
        radial-gradient(ellipse at 15% 85%, rgba(239,75,11,.18) 0%, transparent 42%),
        linear-gradient(150deg, #0c0b2a 0%, var(--navy) 55%, #1b1752 100%);
}

.brand-auth::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 52px 52px;
}

/* Portal logo header on auth pages */
.brand-portal {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
    color: #fff;
    text-align: left;
}

.brand-portal img {
    width: 3.25rem;
    height: 3.25rem;
    object-fit: contain;
    background: #fff;
    border: 2px solid var(--gold);
    border-radius: .7rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.3);
}

.brand-portal strong {
    display: block;
    font-size: .92rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.brand-portal span {
    display: block;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: .18rem;
}

/* Auth card */
.login-container {
    width: min(100%, 58rem);
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 1.75rem;
    box-shadow: 0 40px 100px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06) inset;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: authCardIn .5s cubic-bezier(.22,.61,.36,1) both;
}

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(28px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

.login-header {
    padding: 2.25rem 2rem;
    color: #fff;
    text-align: center;
    background:
        radial-gradient(ellipse at 85% 15%, rgba(239,75,11,.38) 0%, transparent 50%),
        linear-gradient(155deg, var(--navy-dark) 0%, var(--navy) 100%);
    position: relative;
    overflow: hidden;
}

.login-header::after {
    content: '';
    position: absolute;
    width: 260px; height: 260px;
    border-radius: 50%;
    border: 1px solid rgba(244,197,28,.18);
    bottom: -110px; right: -60px;
    box-shadow: 0 0 0 40px rgba(244,197,28,.04);
    pointer-events: none;
}

.school-logo {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
    border: 2px solid var(--gold);
    border-radius: .9rem;
    background: rgba(255,255,255,.12);
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
    display: block;
    margin: 0 auto .75rem;
}

/* Side image for split cards */
.login-side-img {
    background:
        radial-gradient(ellipse at 80% 20%, rgba(239,75,11,.38) 0%, transparent 48%),
        linear-gradient(145deg, var(--navy-dark), var(--navy));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-side-img::after {
    content: '';
    position: absolute;
    width: 320px; height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(244,197,28,.15);
    bottom: -120px; right: -80px;
    box-shadow: 0 0 0 50px rgba(244,197,28,.04);
    pointer-events: none;
}

/* Form controls */
.form-control {
    width: 100%;
    min-height: 2.9rem;
    padding: .5rem .9rem;
    font-family: inherit;
    font-size: .9rem;
    color: var(--ink);
    background: #f8f7fb;
    border: 1.5px solid var(--border);
    border-radius: .75rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    appearance: none;
}

.form-control:focus {
    background: #fff;
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(239,75,11,.11);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .6rem 1.4rem;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    border: none;
    border-radius: .75rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform .18s, box-shadow .18s, background .18s;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    box-shadow: 0 5px 18px rgba(239,75,11,.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 26px rgba(239,75,11,.48);
    color: #fff;
}

.btn-primary:active { transform: translateY(0); }

/* ── FOOTER ──────────────────────────────────────────────────── */
body > footer,
.site-footer {
    background: rgba(10,9,35,.92) !important;
    border-top: 1px solid rgba(244,197,28,.2);
    padding: 1.4rem 1rem;
    text-align: center;
    color: rgba(255,255,255,.48);
    font-size: .8rem;
}

body > footer a,
.site-footer a {
    color: var(--gold);
    text-decoration: none;
    transition: opacity .15s;
}

body > footer a:hover,
.site-footer a:hover { opacity: .75; text-decoration: underline; }

.brand-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    margin-top: .6rem;
    color: rgba(255,255,255,.6);
    font-size: .82rem;
}

.brand-footer img {
    width: 2.75rem;
    height: 2.75rem;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--gold);
    border-radius: .45rem;
}

.brand-footer p { margin: 0; }
.brand-footer strong { color: var(--gold); }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .25rem 1.25rem;
    margin-top: .6rem;
}

/* ── TABLE STYLES (for member-facing pages) ──────────────────── */
.table { --bs-table-bg: transparent; }

.table thead th {
    color: var(--navy);
    background: #f7f2e8;
    border-bottom-color: var(--border);
    font-size: .76rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ── UTILITIES ───────────────────────────────────────────────── */
.container { max-width: 1200px; margin-inline: auto; padding-inline: 1.25rem; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-auto { margin-top: auto; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-btn { width: 100%; max-width: 340px; justify-content: center; }
    .kuti-hero { padding-block: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
