/* ============================================
   SecureVote - Online Voting System
   Premium Light Theme with Green Accents (Nigeria-inspired)
   ============================================ */

:root {
    --dark-navy: #F5FAF7;
    --dark-navy-light: #FFFFFF;
    --dark-navy-lighter: #E8F0EB;
    --royal-blue: #158443;
    --royal-blue-light: #1DA855;
    --royal-blue-dark: #0F6633;
    --emerald: #22C55E;
    --emerald-light: #4ADE80;
    --emerald-dark: #16A34A;
    --white: #FFFFFF;
    --light-gray: #F3F4F6;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --border-color: rgba(15, 23, 42, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-bg-light: rgba(15, 23, 42, 0.02);
    --glass-border: rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.06);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 20px rgba(21, 132, 67, 0.15);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--dark-navy);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

.display-font {
    font-family: 'Playfair Display', serif;
}

/* Background */
.bg-dark-navy {
    background-color: var(--dark-navy) !important;
}

/* ============================================
   GLASSMORPHISM COMPONENTS
   ============================================ */

.navbar-glass {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    transition: var(--transition);
}

.navbar-glass.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: var(--shadow);
}

.card-glass {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card-glass:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(21, 132, 67, 0.3);
    transform: translateY(-2px);
}

.card-glass-light {
    background: var(--glass-bg-light) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.dropdown-menu-glass {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-menu-glass .dropdown-item {
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    transition: var(--transition);
}

.dropdown-menu-glass .dropdown-item:hover {
    background: rgba(21, 132, 67, 0.15);
    color: var(--royal-blue-light);
}

.alert-glass {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
}

.form-control-glass {
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control-glass:focus {
    background: rgba(15, 23, 42, 0.06) !important;
    border-color: var(--royal-blue);
    box-shadow: 0 0 0 3px rgba(21, 132, 67, 0.2);
    color: var(--text-primary);
}

.form-control-glass::placeholder {
    color: var(--text-muted);
}

.form-select-glass {
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
}

.form-select-glass option {
    background-color: #FFFFFF;
    color: var(--text-primary);
}

.footer-glass {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
}

/* ============================================
   NAVIGATION
   ============================================ */

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--royal-blue), var(--emerald));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--royal-blue), var(--emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(15, 23, 42, 0.04);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--royal-blue), var(--emerald));
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border);
}

.nav-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--royal-blue), var(--emerald));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #EF4444, #DC2626);
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid var(--dark-navy);
}

.notification-dropdown {
    width: 360px;
    max-height: 480px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.notification-item:hover {
    background: rgba(15, 23, 42, 0.04);
}

.notification-item.unread {
    background: rgba(21, 132, 67, 0.08);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.notification-icon.bg-success { background: rgba(34, 197, 94, 0.15); color: var(--emerald); }
.notification-icon.bg-info { background: rgba(59, 130, 246, 0.15); color: var(--royal-blue-light); }
.notification-icon.bg-warning { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.notification-icon.bg-danger { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.notification-icon.bg-security { background: rgba(139, 92, 246, 0.15); color: #8B5CF6; }

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--royal-blue), var(--royal-blue-dark));
    box-shadow: 0 4px 14px rgba(21, 132, 67, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--royal-blue-light), var(--royal-blue));
    box-shadow: 0 6px 20px rgba(21, 132, 67, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--emerald-light), var(--emerald));
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
    transform: translateY(-1px);
}

.btn-outline-light {
    border: 1.5px solid rgba(15, 23, 42, 0.12);
    color: var(--text-primary);
}

.btn-outline-light:hover {
    background: rgba(15, 23, 42, 0.07);
    border-color: rgba(15, 23, 42, 0.18);
}

.btn-glass {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-glass:hover {
    background: rgba(15, 23, 42, 0.07);
    border-color: rgba(15, 23, 42, 0.12);
}

/* ============================================
   FLASH MESSAGES
   ============================================ */

.flash-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
}

.flash-container .alert {
    animation: slideIn 0.4s ease-out;
    margin-bottom: 0.75rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(21, 132, 67, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--royal-blue-light), var(--emerald-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.hero-image-wrapper {
    position: relative;
}

.hero-image {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.hero-image-glow {
    position: absolute;
    top: -20px;
    right: -20px;
    bottom: -20px;
    left: -20px;
    background: linear-gradient(135deg, rgba(21, 132, 67, 0.2), rgba(34, 197, 94, 0.15));
    border-radius: calc(var(--radius-xl) + 20px);
    filter: blur(40px);
    z-index: 0;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.section-padding {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: rgba(21, 132, 67, 0.1);
    border: 1px solid rgba(21, 132, 67, 0.2);
    border-radius: 100px;
    color: var(--royal-blue-light);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.feature-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    height: 100%;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--royal-blue), var(--emerald));
    transform: scaleX(0);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.feature-icon.blue {
    background: rgba(21, 132, 67, 0.15);
    color: var(--royal-blue-light);
}

.feature-icon.green {
    background: rgba(34, 197, 94, 0.15);
    color: var(--emerald);
}

.feature-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: #8B5CF6;
}

.feature-icon.orange {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ============================================
   STATS CARDS
   ============================================ */

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(21, 132, 67, 0.2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.stat-change.positive { color: var(--emerald); }
.stat-change.negative { color: #EF4444; }

/* ============================================
   TABLES
   ============================================ */

.table-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-glass thead th {
    background: rgba(15, 23, 42, 0.03);
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    white-space: nowrap;
}

.table-glass tbody td {
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    vertical-align: middle;
}

.table-glass tbody tr:hover td {
    background: rgba(15, 23, 42, 0.02);
}

.table-glass tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   BADGES
   ============================================ */

.badge-glass {
    padding: 0.375rem 0.875rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-secondary);
}

.badge-draft { background: rgba(100, 116, 139, 0.15); color: #64748B; }
.badge-published { background: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.badge-active { background: rgba(34, 197, 94, 0.15); color: var(--emerald); }
.badge-closed { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.badge-archived { background: rgba(75, 85, 99, 0.15); color: #6B7280; }

/* ============================================
   PAGINATION
   ============================================ */

.pagination-glass .page-link {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.pagination-glass .page-link:hover {
    background: rgba(21, 132, 67, 0.1);
    border-color: var(--royal-blue);
    color: var(--royal-blue-light);
}

.pagination-glass .page-item.active .page-link {
    background: linear-gradient(135deg, var(--royal-blue), var(--royal-blue-dark));
    border-color: var(--royal-blue);
    color: white;
}

.pagination-glass .page-item.disabled .page-link {
    background: transparent;
    border-color: var(--glass-border);
    color: var(--text-muted);
}

/* ============================================
   FOOTER
   ============================================ */

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--royal-blue-light);
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    margin-right: 0.5rem;
}

.social-link:hover {
    background: var(--royal-blue);
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-navy);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-navy-lighter);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   LOADING
   ============================================ */

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(21, 132, 67, 0.2);
    border-top-color: var(--royal-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        padding: 1rem;
        border-radius: var(--radius-lg);
        margin-top: 0.75rem;
        border: 1px solid var(--glass-border);
    }

    .hero-section {
        min-height: auto;
        padding: 120px 0 60px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .section-padding {
        padding: 4rem 0;
    }

    .notification-dropdown {
        width: 300px;
    }
}

@media (max-width: 767.98px) {
    .flash-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-padding {
        padding: 3rem 0;
    }

    .result-bar-info {
        min-width: 90px;
    }

    .result-bar-percentage {
        font-size: 0.75rem;
    }

    .receipt-code {
        font-size: 0.85rem;
        letter-spacing: 0.03em;
        word-break: break-all;
        padding: 0.75rem;
    }
}

/* ============================================
   AUTH PAGES
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(21, 132, 67, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.auth-card-wide {
    max-width: 540px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo .brand-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    margin: 0 auto 1rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 2rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.dashboard-subtitle {
    color: var(--text-secondary);
}

.sidebar-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: sticky;
    top: 90px;
}

.admin-sidebar-col {
    flex: 0 0 auto;
    width: 300px;
}

@media (min-width: 992px) {
    .admin-sidebar-col {
        flex: 0 0 260px;
        width: 260px;
        max-width: 260px;
    }
}

.sidebar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, rgba(21, 132, 67, 0.15), rgba(21, 132, 67, 0.05));
    color: var(--royal-blue-light) !important;
    border: 1px solid rgba(21, 132, 67, 0.2);
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
}

/* ============================================
   ELECTION CARDS
   ============================================ */

.election-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.election-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(21, 132, 67, 0.3);
}

.election-card-header {
    padding: 1.5rem 1.5rem 0;
}

.election-card-body {
    padding: 1rem 1.5rem;
    flex: 1;
}

.election-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.election-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.election-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.election-card-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   CANDIDATE CARDS
   ============================================ */

.candidate-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.candidate-card:hover {
    border-color: rgba(21, 132, 67, 0.4);
    box-shadow: var(--shadow-lg);
}

.candidate-card.selected {
    border-color: var(--emerald);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3), var(--shadow-lg);
}

.candidate-card-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.candidate-card-body {
    padding: 1.25rem;
}

.candidate-card-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.candidate-card-party {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.candidate-card-select {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: var(--transition);
}

.candidate-card.selected .candidate-card-select {
    background: var(--emerald);
    border-color: var(--emerald);
    color: white;
}

/* ============================================
   VOTING SCREEN
   ============================================ */

.voting-section {
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
}

.voting-header {
    text-align: center;
    margin-bottom: 3rem;
}

.voting-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.voting-header p {
    color: var(--text-secondary);
}

.position-section {
    margin-bottom: 3rem;
}

.position-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.position-title .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
}

.position-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ============================================
   RESULTS
   ============================================ */

.results-header {
    text-align: center;
    margin-bottom: 3rem;
}

.results-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.results-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.result-position-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.result-position-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.result-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.result-bar-info {
    min-width: 140px;
}

.result-bar-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.result-bar-party {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.result-bar-track {
    flex: 1;
    height: 32px;
    background: rgba(15, 23, 42, 0.04);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.result-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 1s ease-out;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.75rem;
}

.result-bar-fill.winner {
    background: linear-gradient(90deg, var(--emerald), var(--emerald-light));
}

.result-bar-fill:not(.winner) {
    background: linear-gradient(90deg, var(--royal-blue), var(--royal-blue-light));
}

.result-bar-percentage {
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
}

.result-bar-votes {
    min-width: 80px;
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================
   CHARTS
   ============================================ */

.chart-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    height: 400px;
}

.chart-container-sm {
    height: 300px;
}

/* ============================================
   QR CODE
   ============================================ */

.qr-code-container {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    display: inline-block;
    box-shadow: var(--shadow-lg);
}

/* ============================================
   RECEIPT
   ============================================ */

.receipt-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.receipt-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px dashed var(--glass-border);
}

.receipt-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
}

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

.receipt-label {
    color: var(--text-muted);
}

.receipt-value {
    font-weight: 600;
}

.receipt-code {
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    background: rgba(21, 132, 67, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    margin: 1.5rem 0;
    color: var(--royal-blue-light);
    font-weight: 700;
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: rgba(15, 23, 42, 0.03);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--text-muted);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* ============================================
   ERROR PAGES
   ============================================ */

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--royal-blue), var(--emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.error-text {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 2rem;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-gradient {
    background: linear-gradient(135deg, var(--royal-blue-light), var(--emerald-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-blue {
    background: linear-gradient(135deg, var(--royal-blue), var(--royal-blue-dark));
}

.bg-gradient-green {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
}

.border-gradient {
    border-image: linear-gradient(135deg, var(--royal-blue), var(--emerald)) 1;
}

.glow-blue {
    box-shadow: 0 0 20px rgba(21, 132, 67, 0.2);
}

.glow-green {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-4px);
}