        * {
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            margin: 0;
            padding: 0;
        }

        :root {
            --primary-color: #2563eb;
            --primary-hover: #1d4ed8;
            --secondary-color: #06b6d4;
            --success-color: #10b981;
            --error-color: #ef4444;
            --warning-color: #f59e0b;
            --text-primary: #0f172a;
            --text-secondary: #64748b;
            --text-muted: #94a3b8;
            --background: #ffffff;
            --surface: #f8fafc;
            --border: #e2e8f0;
            --shadow: 0 4px 12px rgba(0,0,0,0.05);
            --shadow-hover: 0 8px 20px rgba(0,0,0,0.08);
            --radius: 12px;
        }

        .dark {
            --text-primary: #ffffff;
            --text-secondary: #b0b0b0;
            --background: #181818;
            --surface: #2a2a2a;
            --border: #404040;
            --shadow: 0 2px 10px rgba(0,0,0,0.2);
            --gradient-bg: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        }

        html, body {
            height: 100%;
            margin: 0;
            padding: 0;
            overflow-x: hidden;
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
            padding-left: env(safe-area-inset-left);
            padding-right: env(safe-area-inset-right);
        }

        * {
            box-sizing: border-box;
        }

        body {
            background: var(--gradient-bg);
            color: var(--text-primary);
            line-height: 1.4;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-rendering: optimizeLegibility;
        }

        .particle {
            position: fixed;
            width: 3px;
            height: 3px;
            background: rgba(255,255,255,0.4);
            border-radius: 50%;
            pointer-events: none;
            z-index: 1;
            animation: float 6s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0; }
            10% { opacity: 1; }
            90% { opacity: 1; }
            100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
        }

        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        /* ===== VOTER INTERFACE - PREMIUM REDESIGN ===== */
        #voterInterface {
            min-height: 100vh;
            background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 30%, #f1f5f9 100%);
        }

        /* Rich dark header - Ultra Modern */
        .header {
            background: linear-gradient(135deg,#0f172a 0%,#1e3a5f 40%,#312e81 75%,#4f46e5 100%);
            color: white;
            text-align: center;
            padding: 20px 16px 24px;
            position: relative;
            overflow: hidden;
        }

        .header::after {
            content: '';
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at 15% 30%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 85% 70%, rgba(255,255,255,0.08) 0%, transparent 50%);
            pointer-events: none;
        }
        
        .header::before {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 40px;
            background: radial-gradient(ellipse at center bottom, rgba(255,255,255,0.06), transparent);
            pointer-events: none;
        }

        .header-content {
            position: relative;
            z-index: 2;
            max-width: 480px;
            margin: 0 auto;
        }

        .header-icon {
            width: 48px;
            height: 48px;
            margin: 0 auto 10px;
            background: linear-gradient(135deg,rgba(255,255,255,0.2) 0%,rgba(255,255,255,0.08) 100%);
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid rgba(255,255,255,0.25);
            box-shadow: 0 8px 20px rgba(0,0,0,0.3),0 0 0 4px rgba(255,255,255,0.08);
            position: relative;
            z-index: 2;
        }
        
        .header-icon::before {
            content: '';
            position: absolute;
            inset: -2px;
            background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
            border-radius: 14px;
            opacity: 0;
            transition: opacity 0.3s;
        }
        
        .header-icon:hover::before {
            opacity: 1;
        }

        .header-icon svg { 
            width: 24px; 
            height: 24px; 
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
        }

        .header h1 {
            font-size: 1.35rem;
            margin-bottom: 4px;
            font-weight: 800;
            letter-spacing: -0.5px;
            text-shadow: 0 2px 12px rgba(0,0,0,0.3);
            position: relative;
            z-index: 2;
        }

        .header p {
            font-size: 0.85rem;
            opacity: 0.8;
            font-weight: 500;
            letter-spacing: 0.3px;
            position: relative;
            z-index: 2;
        }

        /* Main Content Card */
        .content {
            padding: 0;
            background: transparent;
            max-width: 520px;
            width: 100%;
            margin: 0 auto 20px;
            position: relative;
            z-index: 10;
        }

        /* Compact Instructions - Modern */
        .instructions {
            background: transparent;
            border: none;
            padding: 0;
            margin-bottom: 12px;
            position: relative;
            z-index: 1;
        }

        .instructions-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            background: linear-gradient(135deg,rgba(79,70,229,0.08),rgba(124,58,237,0.08));
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid rgba(79,70,229,0.15);
            box-shadow: 0 2px 8px rgba(79,70,229,0.08);
        }

        .instructions-header:hover { 
            background: linear-gradient(135deg,rgba(79,70,229,0.12),rgba(124,58,237,0.12));
            transform: translateY(-2px);
            box-shadow: 0 4px 16px rgba(79,70,229,0.15);
        }

        .instructions-header h3 {
            color: #4338ca;
            font-size: 0.85rem;
            font-weight: 700;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .toggle-icon {
            font-size: 0.7rem;
            color: #6366f1;
            transition: transform 0.3s ease;
            font-weight: 700;
        }

        .instructions-header.active .toggle-icon { transform: rotate(180deg); }

        .instructions-content {
            display: none;
            padding: 12px 14px 6px;
            animation: slideDown 0.3s ease;
        }
        
        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .instructions-content.active {
            display: block;
        }

        .instructions-content ul {
            list-style: none;
            padding: 0;
            margin: 0;
            display: grid;
            gap: 8px;
            counter-reset: steps;
        }

        .instructions-content li {
            padding: 0;
            font-size: 0.9rem;
            color: #475569;
            display: flex;
            align-items: center;
            gap: 12px;
            line-height: 1.5;
            counter-increment: steps;
        }

        .instructions-content li::before {
            content: counter(steps);
            width: 28px;
            height: 28px;
            min-width: 28px;
            background: linear-gradient(135deg,#4f46e5,#7c3aed);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            font-weight: 800;
            color: white;
            box-shadow: 0 2px 8px rgba(79,70,229,0.3);
        }

        /* Voting Time Display -- Ultra Modern */
        .status-message {
            margin: 0 0 12px 0;
            position: relative;
            z-index: 1;
        }

        .status-message h3 {
            color: #1e3a5f;
            font-size: 0.8rem;
            font-weight: 700;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .voting-time-card {
            background: linear-gradient(135deg,rgba(99,102,241,0.08) 0%,rgba(139,92,246,0.08) 100%);
            border: 2px solid rgba(99,102,241,0.18);
            border-radius: 12px;
            padding: 10px 12px;
            box-shadow: 0 4px 16px rgba(99,102,241,0.12);
            position: relative;
            overflow: hidden;
        }
        .voting-time-card::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -30%;
            width: 120px;
            height: 120px;
            background: radial-gradient(circle, rgba(99,102,241,0.08), transparent);
            border-radius: 50%;
            pointer-events: none;
        }

        #countdownTimer { 
            margin-top: 8px; 
            padding-top: 8px; 
            border-top: 2px solid rgba(99,102,241,0.15); 
        }

        .voting-status-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 5px 12px;
            border-radius: 16px;
            font-size: 0.75rem;
            font-weight: 700;
            margin-bottom: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            letter-spacing: 0.3px;
        }

        .voting-status-badge.open {
            background: linear-gradient(135deg,rgba(16,185,129,0.15),rgba(5,150,105,0.15));
            color: #047857;
            border: 2px solid rgba(16,185,129,0.3);
        }

        .voting-status-badge.closed {
            background: linear-gradient(135deg,rgba(239,68,68,0.15),rgba(220,38,38,0.15));
            color: #b91c1c;
            border: 2px solid rgba(239,68,68,0.3);
        }

        .voting-status-badge .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            animation: statusPulse 2s ease-in-out infinite;
        }

        .voting-status-badge.open .status-dot {
            background: #10b981;
            box-shadow: 0 0 8px #10b981;
        }

        .voting-status-badge.closed .status-dot {
            background: #ef4444;
            box-shadow: 0 0 8px #ef4444;
        }

        @keyframes statusPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        /* Compact Countdown - Ultra Modern */
        .countdown-timer { 
            margin-top: 8px; 
            padding: 0; 
            background: transparent; 
            border: none; 
        }

        .countdown-label-header {
            font-size: 0.7rem;
            color: #64748b;
            font-weight: 700;
            margin-bottom: 8px;
            text-align: center;
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }

        .countdown-display { 
            display: flex; 
            justify-content: center; 
            gap: 6px; 
        }

        .countdown-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            flex: 1;
            max-width: 52px;
        }

        .countdown-value {
            font-size: 1.2rem;
            font-weight: 800;
            color: #1e3a5f;
            background: white;
            padding: 6px 3px;
            border-radius: 8px;
            text-align: center;
            box-shadow: 0 2px 6px rgba(0,0,0,0.12), 0 0 0 2px rgba(99,102,241,0.1) inset;
            width: 100%;
            position: relative;
            overflow: hidden;
        }
        .countdown-value::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, #667eea, #764ba2);
        }

        .countdown-label {
            font-size: 0.6rem;
            color: #94a3b8;
            margin-top: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 700;
        }

        .countdown-message {
            font-size: 0.75rem;
            font-weight: 700;
            text-align: center;
            margin-top: 8px;
            color: #4f46e5;
            letter-spacing: 0.3px;
        }

        /* Login field with prefix icon - Enhanced */
        .login-field {
            position: relative;
            margin-bottom: 14px;
        }

        .login-field .field-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            width: 18px;
            height: 18px;
            color: #94a3b8;
            pointer-events: none;
            transition: all 0.3s ease;
            z-index: 2;
        }

        .login-field input {
            width: 100%;
            padding: 14px 16px 14px 44px;
            border: 2px solid #e2e8f0;
            border-radius: 12px;
            font-size: 16px;
            background: linear-gradient(135deg, #fafbfc, #f8fafc);
            color: #1e293b;
            -webkit-appearance: none;
            appearance: none;
            transition: all 0.3s ease;
            box-sizing: border-box;
            font-weight: 500;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            min-height: 48px;
        }

        .login-field input:focus {
            border-color: #6366f1;
            outline: none;
            box-shadow: 0 4px 16px rgba(99,102,241,0.2), 0 0 0 4px rgba(99,102,241,0.1);
            background: white;
            transform: translateY(-2px);
        }

        .login-field input:focus ~ .field-icon,
        .login-field:focus-within .field-icon { 
            color: #6366f1;
            transform: translateY(-50%) scale(1.1);
        }

        .login-field input::placeholder { 
            color: #b0bec5; 
            font-size: 0.95rem;
            font-weight: 400;
        }

        .field-label {
            display: block;
            font-size: 0.85rem;
            font-weight: 700;
            color: #475569;
            margin-bottom: 8px;
            letter-spacing: 0.3px;
            text-transform: uppercase;
        }

        /* Modern Form Styles */
        #loginForm {
            margin-top: 10px;
        }

        .form-group {
            margin-bottom: 12px;
            animation: fadeInUp 0.45s ease forwards;
            opacity: 0;
        }

        .form-group:nth-child(1) { animation-delay: 0.05s; }
        .form-group:nth-child(2) { animation-delay: 0.12s; }
        .form-group:nth-child(3) { animation-delay: 0.19s; }

        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .form-group label {
            display: block;
            margin-bottom: 7px;
            font-weight: 600;
            color: #334155;
            font-size: 0.82rem;
            display: flex;
            align-items: center;
            gap: 6px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

        .form-group label svg {
            width: 15px;
            height: 15px;
            color: #6366f1;
        }

        .form-group input[type="text"],
        .form-group input[type="password"],
        .form-group input[type="date"],
        .form-group input[type="time"] {
            width: 100%;
            padding: 14px 16px;
            border: 1.5px solid #e2e8f0;
            border-radius: 11px;
            font-size: 16px;
            background: #f8fafc;
            color: #1e293b;
            -webkit-appearance: none;
            appearance: none;
            transition: all 0.2s ease;
            box-sizing: border-box;
            min-height: 48px;
        }

        .form-group input:focus {
            border-color: #6366f1;
            outline: none;
            box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
            background: white;
        }

        .form-group input::placeholder { color: #b0bec5; }

        /* Modern Primary Button - Ultra Enhanced */
        .btn {
            background: linear-gradient(135deg,#4f46e5 0%,#7c3aed 60%,#4f46e5 100%);
            background-size: 200% 200%;
            animation: btnGradient 5s ease infinite;
            color: white;
            padding: 14px 28px;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            width: 100%;
            text-align: center;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            box-shadow: 0 6px 20px rgba(79,70,229,0.35);
            letter-spacing: 0.3px;
            min-height: 48px;
            -webkit-tap-highlight-color: transparent;
        }
        
        .btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255,255,255,0.2);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }
        
        .btn:hover::before {
            width: 300px;
            height: 300px;
        }

        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 32px rgba(79,70,229,0.45);
        }

        .btn:active {
            transform: translateY(-1px);
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
        }

        @keyframes btnGradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .btn.secondary {
            background: white;
            color: #475569;
            border: 2px solid #e2e8f0;
            font-weight: 600;
            box-shadow: 0 4px 12px rgba(0,0,0,0.06);
        }

        .btn.secondary:hover {
            background: #f8fafc;
            border-color: #cbd5e1;
            box-shadow: 0 6px 20px rgba(0,0,0,0.1);
        }

        .btn svg {
            width: 20px;
            height: 20px;
            position: relative;
            z-index: 1;
        }

        .btn.success { 
            background: linear-gradient(135deg, #10b981 0%, #059669 100%); 
            box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
        }
        .btn.success:hover {
            box-shadow: 0 12px 32px rgba(16, 185, 129, 0.45);
        }
        
        .btn.warning { 
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
        }
        .btn.warning:hover {
            box-shadow: 0 12px 32px rgba(245, 158, 11, 0.45);
        }
        
        .btn.danger { 
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
        }
        .btn.danger:hover {
            box-shadow: 0 12px 32px rgba(239, 68, 68, 0.45);
        }

        .btn.success, .btn.warning, .btn.danger {
            animation: none;
        }

        /* Error State */
        .error {
            color: #dc2626;
            margin-top: 16px;
            text-align: center;
            font-weight: 500;
            font-size: 0.9rem;
            padding: 14px;
            background: rgba(220,38,38,0.08);
            border-radius: 10px;
            border-left: none;
            animation: shake 0.5s ease;
        }

        @keyframes shake {
            0%, 20%, 40%, 60%, 80%, 100% { transform: translateX(0); }
            10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
        }

        .hidden { display: none !important; }

        .position-title {
            text-align: center;
            margin-bottom: 24px;
            color: var(--primary-color);
            font-size: 1.8rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .candidate-list {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            margin-top: 16px;
            justify-content: center;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        .candidate-card {
            background: var(--background);
            border: 3px solid var(--border);
            border-radius: 16px;
            padding: 14px;
            cursor: pointer;
            text-align: center;
            position: relative;
            overflow: hidden;
            transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
            box-shadow: 0 4px 16px rgba(0,0,0,0.1);
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .candidate-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        }

        .candidate-card.selected {
            border-color: var(--primary-color);
            background: linear-gradient(135deg, rgba(93,92,222,0.08), rgba(93,92,222,0.15));
            box-shadow: 0 6px 20px rgba(93,92,222,0.25);
        }

        .candidate-card.selected::after {
            content: '✓';
            position: absolute;
            top: 10px;
            right: 10px;
            background: var(--primary-color);
            color: white;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            font-weight: bold;
            animation: checkmark 0.3s ease;
            box-shadow: 0 3px 10px rgba(37,99,235,0.4);
        }

        @keyframes checkmark {
            0% { transform: scale(0); }
            100% { transform: scale(1); }
        }

        .candidate-image {
            width: 100%;
            height: 260px;
            max-width: 100%;
            border-radius: 12px 12px 0 0;
            margin: -14px -14px 10px;
            width: calc(100% + 28px);
            object-fit: cover;
            object-position: center top;
            border: none;
            border-bottom: 2px solid var(--border);
            background-color: var(--surface);
            display: block;
            box-shadow: none;
        }
        
        .candidate-image-large {
            width: 180px;
            height: 220px;
            max-width: 100%;
            max-height: 240px;
            object-fit: cover;
            object-position: center center;
            image-rendering: -webkit-optimize-contrast;
            image-rendering: crisp-edges;
        }
        
        .result-card .candidate-image {
            width: 120px;
            height: 140px;
            object-fit: cover;
            object-position: center center;
            image-rendering: -webkit-optimize-contrast;
            image-rendering: crisp-edges;
        }
        
        .unopposed-candidate-image {
            width: 220px;
            height: 280px;
            max-width: 85vw;
            object-fit: cover;
            object-position: center top;
            border-radius: 16px;
            border: 4px solid var(--border);
            box-shadow: 0 8px 24px rgba(0,0,0,0.2);
        }
        
        .candidate-image-placeholder {
            width: 140px;
            height: 165px;
            border-radius: 12px;
            background: linear-gradient(135deg, #1e3a5f 0%, #4f46e5 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 3.5rem;
            font-weight: bold;
            margin: 0 auto 16px;
        }
        
        .unopposed-candidate-image-placeholder {
            width: 220px;
            height: 280px;
            border-radius: 16px;
            background: linear-gradient(135deg, #1e3a5f 0%, #4f46e5 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 5rem;
            font-weight: bold;
            margin: 0 auto 20px;
        }

        .candidate-info h3 { color: var(--text-primary); margin-bottom: 6px; font-size: 1.1rem; font-weight: 600; }
        .candidate-info p { color: var(--text-secondary); font-size: 0.9rem; }
        .candidate-info input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

        .loading-spinner {
            display: inline-block;
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255,255,255,0.3);
            border-top: 2px solid currentColor;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        /* Full Page Loading Overlay - Professional Design */
        @keyframes loaderAutoHide {
            to { opacity: 0; visibility: hidden; pointer-events: none; }
        }

        .page-loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #1e3a5f 0%, #312e81 30%, #4f46e5 70%, #5b21b6 100%);
            background-size: 400% 400%;
            /* CSS failsafe: auto-hide after 3 s even if JS is broken */
            animation: gradientShift 15s ease infinite, loaderAutoHide 0.6s ease-out 3s forwards;
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
            padding: 20px;
        }

        .page-loader::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: 
                radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(79, 70, 229, 0.1) 0%, transparent 40%);
            pointer-events: none;
        }

        .page-loader::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: 
                linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
            background-size: 60px 60px;
            pointer-events: none;
        }

        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .page-loader.hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            display: none;
        }

        /* Resume prompt */
        .resume-prompt { position: fixed; inset: 0; display:flex;align-items:center;justify-content:center; z-index:10010; background: rgba(2,6,23,0.45); }
        .resume-prompt.hidden { display:none; }
        .resume-prompt-card { background: #fff; padding:20px 22px; border-radius:12px; max-width:420px; text-align:center; box-shadow:0 20px 50px rgba(2,6,23,0.3); }
        .resume-prompt-card h3 { margin:0 0 8px 0; font-size:1.1rem; }
        .resume-prompt-card p { color:var(--text-secondary); margin:0 0 12px 0; }

        /* Reusable admin dialog */
        .app-dialog { position: fixed; inset: 0; display:flex;align-items:center;justify-content:center; z-index:10020; background: rgba(2,6,23,0.5); padding:16px; }
        .app-dialog.hidden { display:none; }
        .app-dialog-card { width:100%; max-width:500px; background:var(--surface); border:1px solid var(--border); border-radius:14px; box-shadow:0 22px 50px rgba(2,6,23,0.28); padding:20px; }
        .app-dialog-card h3 { margin:0 0 8px 0; font-size:1.08rem; color:var(--text-primary); }
        .app-dialog-card p { margin:0 0 14px 0; color:var(--text-secondary); line-height:1.5; }
        .app-dialog-input { width:100%; padding:12px; border:2px solid var(--border); border-radius:var(--radius); background:var(--background); color:var(--text-primary); font-size:0.95rem; margin:8px 0 0 0; }
        .app-dialog-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:14px; }

        /* Glassmorphism Container */
        .page-loader-content {
            position: relative;
            z-index: 10;
            width: 100%;
            max-width: 420px;
            background: rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 24px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
            padding: 40px 32px;
            text-align: center;
            animation: cardFadeIn 0.8s ease-out;
        }

        @keyframes cardFadeIn {
            from {
                opacity: 0;
                transform: translateY(30px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        /* Logo Styles */
        .page-loader-logo-container {
            margin-bottom: 24px;
            animation: logoPulse 3s ease-in-out infinite;
        }

        @keyframes logoPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.02); }
        }

        .page-loader-logo {
            width: 90px;
            height: 90px;
            margin: 0 auto;
            background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 
                0 10px 40px rgba(0, 0, 0, 0.2),
                inset 0 2px 4px rgba(255, 255, 255, 0.8);
            position: relative;
            overflow: hidden;
        }

        .page-loader-logo img {
            width: 55px;
            height: 55px;
            object-fit: contain;
            position: relative;
            z-index: 1;
        }

        .page-loader-university-name {
            font-size: 13px;
            font-weight: 600;
            color: #ffffff;
            margin-top: 12px;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        /* Tagline */
        .page-loader-tagline {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-bottom: 28px;
            font-size: 12px;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.85);
            letter-spacing: 1.5px;
            text-transform: uppercase;
        }

        .page-loader-tagline-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .page-loader-tagline-icon {
            width: 5px;
            height: 5px;
            border-radius: 50%;
        }

        .page-loader-tagline-icon.secure { background: #06b6d4; box-shadow: 0 0 8px #06b6d4; }
        .page-loader-tagline-icon.transparent { background: #8b5cf6; box-shadow: 0 0 8px #8b5cf6; }
        .page-loader-tagline-icon.reliable { background: #10b981; box-shadow: 0 0 8px #10b981; }
        .page-loader-tagline-icon.democratic { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }

        .page-loader-tagline-divider {
            width: 3px;
            height: 3px;
            background: rgba(255, 255, 255, 0.5);
            border-radius: 50%;
        }

        /* Main Title */
        .page-loader-text {
            color: #ffffff;
            font-size: 22px;
            font-weight: 700;
            letter-spacing: -0.5px;
            margin-bottom: 6px;
        }

        .page-loader-subtext {
            color: rgba(255, 255, 255, 0.65);
            font-size: 13px;
            margin-bottom: 28px;
        }

        /* Loading Animation */
        .page-loader-spinner-container {
            margin-bottom: 24px;
        }

        .page-loader-spinner {
            position: relative;
            width: 70px;
            height: 70px;
            margin: 0 auto;
        }

        .page-loader-spinner svg {
            transform: rotate(-90deg);
            width: 70px;
            height: 70px;
        }

        .page-loader-spinner-bg {
            fill: transparent;
            stroke: rgba(255, 255, 255, 0.1);
            stroke-width: 4;
        }

        .page-loader-spinner-progress {
            fill: transparent;
            stroke: url(#pageLoaderGradient);
            stroke-width: 4;
            stroke-linecap: round;
            stroke-dasharray: 198;
            stroke-dashoffset: 198;
            animation: progressAnimation 2.5s ease-in-out infinite;
        }

        @keyframes progressAnimation {
            0% { stroke-dashoffset: 198; }
            50% { stroke-dashoffset: 49; }
            100% { stroke-dashoffset: 198; }
        }

        .page-loader-spinner-center {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 10px;
            height: 10px;
            background: #06b6d4;
            border-radius: 50%;
            box-shadow: 0 0 15px #06b6d4, 0 0 30px rgba(6, 182, 212, 0.4);
            animation: centerPulse 2s ease-in-out infinite;
        }

        @keyframes centerPulse {
            0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
            50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.7; }
        }

        /* Status Message */
        .page-loader-status {
            font-size: 14px;
            font-weight: 500;
            color: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 20px;
        }

        .page-loader-status-icon {
            width: 6px;
            height: 6px;
            background: #06b6d4;
            border-radius: 50%;
            animation: statusBlink 1.5s ease-in-out infinite;
        }

        @keyframes statusBlink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }

        .page-loader-dots {
            display: inline-flex;
            gap: 3px;
        }

        .page-loader-dots span {
            width: 3px;
            height: 3px;
            background: rgba(255, 255, 255, 0.7);
            border-radius: 50%;
            animation: dotBounce 1.4s ease-in-out infinite;
        }

        .page-loader-dots span:nth-child(1) { animation-delay: -0.32s; }
        .page-loader-dots span:nth-child(2) { animation-delay: -0.16s; }
        .page-loader-dots span:nth-child(3) { animation-delay: 0s; }

        @keyframes dotBounce {
            0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
            40% { transform: scale(1.2); opacity: 1; }
        }

        /* Security Badge */
        .page-loader-security {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            background: rgba(6, 182, 212, 0.15);
            border: 1px solid rgba(6, 182, 212, 0.3);
            border-radius: 20px;
            padding: 5px 12px;
            margin-top: 20px;
            font-size: 10px;
            font-weight: 600;
            color: #06b6d4;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        .page-loader-security svg {
            width: 10px;
            height: 10px;
        }

        /* Footer */
        .page-loader-footer {
            margin-top: 24px;
            padding-top: 18px;
            border-top: 1px solid rgba(255, 255, 255, 0.15);
        }

        .page-loader-footer-text {
            font-size: 10px;
            font-weight: 400;
            color: rgba(255, 255, 255, 0.55);
            line-height: 1.6;
            letter-spacing: 0.3px;
        }

        .page-loader-footer-text span {
            color: rgba(255, 255, 255, 0.75);
        }

        /* Responsive */
        @media (max-width: 480px) {
            .page-loader-content {
                padding: 28px 20px;
                border-radius: 18px;
            }

            .page-loader-logo {
                width: 70px;
                height: 70px;
            }

            .page-loader-logo img {
                width: 42px;
                height: 42px;
            }

            .page-loader-text {
                font-size: 18px;
            }

            .page-loader-spinner {
                width: 56px;
                height: 56px;
            }

            .page-loader-spinner svg {
                width: 56px;
                height: 56px;
            }
        }

        /* Reduced Motion */
        @media (prefers-reduced-motion: reduce) {
            .page-loader, .page-loader *, .page-loader *::before, .page-loader *::after {
                animation: none !important;
            }
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background-color: var(--border);
            border-radius: 4px;
            margin-bottom: 24px;
            overflow: hidden;
        }

        .progress {
            height: 100%;
            background: linear-gradient(135deg, #1e3a5f 0%, #4f46e5 100%);
            background-size: 200% 200%;
            animation: gradientShift 4s ease infinite;
            border-radius: 4px;
            transition: width 0.5s ease;
        }

        .success-message {
            background: linear-gradient(135deg, rgba(76,175,80,0.1), rgba(76,175,80,0.15));
            border: 1px solid var(--success-color);
            border-radius: var(--radius);
            padding: 32px 20px;
            text-align: center;
            margin: 24px 0;
            animation: celebration 1s ease;
        }

        @keyframes celebration {
            0% { transform: scale(0.9); opacity: 0; }
            50% { transform: scale(1.02); }
            100% { transform: scale(1); opacity: 1; }
        }

        .success-icon {
            font-size: 4rem;
            animation: bounce 2s ease-in-out infinite;
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-20px); }
            60% { transform: translateY(-12px); }
        }

        @keyframes pulse {
            0% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.7; transform: scale(1.05); }
            100% { opacity: 1; transform: scale(1); }
        }

        .vote-summary {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 24px;
            margin: 24px 0;
        }

        .vote-summary h3 { color: var(--primary-color); margin-bottom: 20px; text-align: center; font-size: 1.3rem; }

        .summary-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            margin-bottom: 8px;
            background: var(--background);
            border-radius: 6px;
            border-left: 3px solid var(--primary-color);
        }

        .clickable-summary-item {
            cursor: pointer;
            border: 2px solid var(--border);
            border-left: 3px solid var(--primary-color);
            transition: background 0.2s;
        }

        .clickable-summary-item:hover { background: var(--surface); }

        .summary-content { display: flex; justify-content: space-between; align-items: center; flex: 1; }

        .summary-position {
            font-weight: 700;
            font-size: 1.1rem;
            color: var(--primary-color);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 4px;
        }

        .summary-candidate { font-weight: 500; color: var(--text-secondary); }
        .edit-icon { margin-left: 16px; font-size: 1.1rem; opacity: 0.7; }
        .clickable-summary-item:hover .edit-icon { opacity: 1; }

        .status-message {
            background: linear-gradient(135deg, rgba(33,150,243,0.1), rgba(33,150,243,0.15));
            border: 1px solid var(--secondary-color);
            border-radius: var(--radius);
            padding: 20px;
            text-align: center;
            margin: 24px 0;
            color: var(--secondary-color);
            font-size: 1.1rem;
        }

        .countdown-timer {
            margin-top: 0;
            padding: 0;
            background: transparent;
            border-radius: 0;
            border: none;
        }

        .countdown-display {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 12px;
        }

        .countdown-item { display: flex; flex-direction: column; align-items: center; min-width: unset; flex: 1; max-width: 70px; }

        .countdown-value {
            font-size: 1.75rem;
            font-weight: 700;
            color: #1e3a5f;
            background: white;
            padding: 12px 8px;
            border-radius: 12px;
            border: none;
            min-width: unset;
            text-align: center;
            box-shadow: 0 4px 12px rgba(0,0,0,0.06);
            width: 100%;
        }

        .countdown-label {
            font-size: 0.7rem;
            color: #64748b;
            margin-top: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 600;
        }

        .countdown-message { font-size: 0.9rem; font-weight: 600; text-align: center; margin-top: 16px; }

        .navigation-context {
            background: linear-gradient(135deg, rgba(33,150,243,0.1), rgba(33,150,243,0.15));
            border: 1px solid var(--secondary-color);
            border-radius: var(--radius);
            padding: 12px 20px;
            margin-bottom: 16px;
            text-align: center;
            color: var(--secondary-color);
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        /* ===== RESULTS DISPLAY -- PREMIUM ===== */
        .results-page { max-width: 640px; margin: 0 auto; padding: 0 14px 32px; }

        .results-stats-row {
            display: grid;
            grid-template-columns: repeat(4,1fr);
            gap: 10px;
            margin-bottom: 28px;
        }

        .results-stat {
            background: white;
            border-radius: 14px;
            padding: 14px 10px;
            text-align: center;
            box-shadow: 0 2px 12px rgba(30,58,95,0.09);
            border: 1px solid rgba(99,102,241,0.1);
        }

        .results-stat-value {
            font-size: 1.6rem;
            font-weight: 800;
            line-height: 1;
            margin-bottom: 4px;
            background: linear-gradient(135deg,#1e3a5f,#4f46e5);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .results-stat-label {
            font-size: 0.68rem;
            color: #94a3b8;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: .4px;
        }

        .results-turnout-bar {
            height: 6px;
            background: #e2e8f0;
            border-radius: 99px;
            overflow: hidden;
            margin-top: 8px;
        }

        .results-turnout-fill {
            height: 100%;
            background: linear-gradient(90deg,#4f46e5,#7c3aed);
            border-radius: 99px;
            transition: width 1s ease;
        }

        .position-block {
            background: white;
            border-radius: 18px;
            margin-bottom: 16px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(30,58,95,0.08);
            border: 1px solid rgba(99,102,241,0.1);
        }

        .position-block-header {
            background: linear-gradient(135deg,#1e3a5f 0%,#312e81 60%,#4f46e5 100%);
            padding: 12px 18px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .position-block-title {
            color: white;
            font-size: 0.9rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .6px;
            flex: 1;
        }

        .position-total-badge {
            background: rgba(255,255,255,0.15);
            color: rgba(255,255,255,0.9);
            border-radius: 20px;
            padding: 2px 9px;
            font-size: 0.72rem;
            font-weight: 600;
        }

        .candidate-row {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            border-bottom: 1px solid #f1f5f9;
            position: relative;
        }

        .candidate-row:last-child { border-bottom: none; }

        .candidate-row.winner {
            background: linear-gradient(135deg,rgba(16,185,129,0.05) 0%,rgba(99,102,241,0.04) 100%);
        }

        .candidate-row-avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            object-fit: cover;
            object-position: center top;
            flex-shrink: 0;
            border: 2px solid #e2e8f0;
        }

        .candidate-row-avatar-placeholder {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: linear-gradient(135deg,#4f46e5,#7c3aed);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            flex-shrink: 0;
        }

        .candidate-row.winner .candidate-row-avatar,
        .candidate-row.winner .candidate-row-avatar-placeholder {
            border-color: #10b981;
            box-shadow: 0 0 0 2px rgba(16,185,129,0.25);
        }

        .candidate-row-info { flex: 1; min-width: 0; }

        .candidate-row-name {
            font-size: 0.88rem;
            font-weight: 700;
            color: #1e293b;
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .winner-crown {
            font-size: 0.85rem;
            flex-shrink: 0;
        }

        .candidate-bar-wrap {
            height: 6px;
            background: #f1f5f9;
            border-radius: 99px;
            overflow: hidden;
        }

        .candidate-bar-fill {
            height: 100%;
            border-radius: 99px;
            background: linear-gradient(90deg,#4f46e5,#7c3aed);
            transition: width 1s ease .2s;
        }

        .candidate-row.winner .candidate-bar-fill {
            background: linear-gradient(90deg,#10b981,#059669);
        }

        .candidate-row-votes {
            text-align: right;
            flex-shrink: 0;
        }

        .candidate-vote-count {
            font-size: 1rem;
            font-weight: 800;
            color: #1e293b;
            line-height: 1;
        }

        .candidate-vote-pct {
            font-size: 0.7rem;
            color: #94a3b8;
            font-weight: 600;
            margin-top: 2px;
        }

        /* Unopposed (YES/NO) */
        .unopposed-block {
            padding: 16px;
            display: flex;
            gap: 14px;
            align-items: center;
        }

        .unopposed-img {
            width: 56px;
            height: 64px;
            border-radius: 10px;
            object-fit: cover;
            object-position: center top;
            flex-shrink: 0;
            border: 2px solid #e2e8f0;
        }

        .unopposed-img-placeholder {
            width: 56px;
            height: 64px;
            border-radius: 10px;
            background: linear-gradient(135deg,#4f46e5,#7c3aed);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            flex-shrink: 0;
        }

        .unopposed-name {
            font-size: 0.95rem;
            font-weight: 700;
            color: #1e293b;
            margin-bottom: 8px;
        }

        .unopposed-bars { flex: 1; }

        .unopposed-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
        .unopposed-bar-label { font-size: 0.72rem; font-weight: 600; width: 26px; flex-shrink: 0; }
        .unopposed-bar-track { flex: 1; height: 8px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
        .unopposed-bar-yes { height: 100%; background: linear-gradient(90deg,#10b981,#059669); border-radius: 99px; transition: width 1s ease .2s; }
        .unopposed-bar-no  { height: 100%; background: linear-gradient(90deg,#ef4444,#dc2626); border-radius: 99px; transition: width 1s ease .2s; }
        .unopposed-bar-count { font-size: 0.72rem; font-weight: 700; color: #475569; width: 24px; text-align: right; flex-shrink: 0; }

        .results-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .result-card {
            background: var(--background);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 20px;
            text-align: center;
        }

        .votes-count { font-size: 1.3rem; font-weight: bold; color: var(--primary-color); margin: 12px 0; }
        .position-results { margin-bottom: 32px; }

        /* ===== FOOTER ===== */
        .footer {
            background: linear-gradient(135deg,#0f172a 0%,#1e3a5f 50%,#312e81 100%);
            color: rgba(255,255,255,0.7);
            text-align: center;
            padding: 16px 20px;
            margin-top: 24px;
        }

        .footer-content { max-width: 600px; margin: 0 auto; }
        .footer h3 { margin-bottom: 4px; font-size: 0.88rem; font-weight: 600; color: rgba(255,255,255,0.85); }
        .footer p { font-size: 0.75rem; margin-bottom: 2px; }

        /* ===== ADMIN ACCESS BUTTON (Hidden - Use Ctrl+Alt+L to access) ===== */
        .admin-access {
            display: block; /* Visible for testing - access via clicking or Ctrl+Alt+L */
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1000;
        }

        .admin-access-btn {
            background: rgba(108,117,125,0.85);
            color: white;
            border: none;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            cursor: pointer;
            font-size: 18px;
            backdrop-filter: blur(10px);
            transition: background 0.2s;
        }

        .admin-access-btn:hover { background: rgba(108,117,125,1); }

        /* ===== ADMIN INTERFACE -- FULL SCREEN FIXED ===== */
        #adminInterface {
            position: fixed;
            inset: 0;
            background: #f5f7fb;
            z-index: 900;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        /* Page container - centered with max-width */
        .admin-page-container {
            max-width: 1280px;
            margin: 0 auto;
            width: 100%;
            padding: 0 20px;
        }

        /* Admin login panel */
        #adminLoginForm {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 32px;
            overflow-y: auto;
        }

        #adminLoginForm > div:first-child {
            text-align: center;
            margin-bottom: 32px;
        }

        /* Admin dashboard wrapper */
        #adminDashboard {
            display: flex;
            flex-direction: column;
            height: 100%;
            overflow: hidden;
        }

        /* Admin top bar */
        .admin-topbar {
            flex-shrink: 0;
            background: #1e3a5f;
            color: #ffffff;
            padding: 0 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid rgba(0,0,0,0.12);
            height: 64px;
            box-sizing: border-box;
            box-shadow: 0 6px 18px rgba(9,30,66,0.12);
        }

        .admin-topbar .system-title {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .admin-topbar .system-title img {
            width: 32px;
            height: 32px;
            border-radius: 6px;
        }

        .admin-topbar h1 {
            font-size: 1rem;
            font-weight: 600;
            margin: 0;
            color: #ffffff;
        }

        .admin-topbar p {
            font-size: 0.75rem;
            color: rgba(255,255,255,0.85);
            margin: 0;
        }

        .admin-topbar .logout-btn {
            background: transparent;
            color: #ef4444;
            border: 1px solid #ef4444;
            padding: 6px 14px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: 500;
            transition: all 0.2s;
        }

        .admin-topbar .logout-btn:hover {
            background: #ef4444;
            color: white;
        }

        .login-logo {
            width: auto;
            height: 80px;
            max-height: 80px;
            max-width: 48%;
            object-fit: contain;
            margin-bottom: 8px;
            border-radius: 12px;
            box-shadow: 0 6px 18px rgba(37, 99, 235, 0.14);
            animation: adminLogoZoom 2.2s ease-in-out infinite;
            transition: transform 0.14s ease, box-shadow 0.12s ease;
            transform-origin: center center;
            cursor: pointer;
        }

        .login-logo:hover {
            transform: scale(1.04);
            box-shadow: 0 8px 20px rgba(37, 99, 235, 0.16);
        }

        @keyframes adminLogoZoom {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.04); }
        }

        .sidebar-toggle {
            display: none; /* shown only inside admin topbar */
            background: rgba(255,255,255,0.08);
            color: white;
            border: none;
            padding: 8px 12px;
            font-size: 1.1rem;
            border-radius: 8px;
            cursor: pointer;
            margin-right: 10px;
            backdrop-filter: blur(6px);
        }

        .sidebar-toggle:hover {
            background: #4A49CC;
        }

        @media (max-width: 768px) {
            .sidebar-toggle {
                display: block;
            }
            .admin-sidebar {
                position: fixed;
                top: var(--admin-topbar-h, 64px);
                left: 0;
                height: calc(100% - var(--admin-topbar-h, 64px));
                width: 80%;
                max-width: 320px;
                transform: translateX(-100%);
                transition: transform 0.3s ease;
                z-index: 1002;
                box-shadow: 0 8px 24px rgba(2,6,23,0.35);
                /* Override any max-height from tablet media query */
                max-height: none !important;
            }
            .admin-sidebar.open {
                transform: translateX(0);
            }
            /* Backdrop behind sliding sidebar */
            .sidebar-backdrop {
                position: fixed;
                inset: var(--admin-topbar-h, 64px) 0 0 0;
                background: rgba(2,6,23,0.45);
                z-index: 1001;
                opacity: 0;
                transition: opacity 0.2s ease;
                pointer-events: none;
            }
            .sidebar-backdrop.visible { opacity: 1; pointer-events: auto; }
            /* Prevent body scrolling when sidebar open */
            body.sidebar-open { overflow: hidden; }
            .admin-topbar {
                padding: 0 16px;
            }
            .admin-topbar h1 {
                font-size: 1rem;
            }
        }

        /* show toggle when inside admin topbar */
        .admin-topbar .sidebar-toggle { display: inline-block; }

        /* Collapsed sidebar state (desktop) */
        .admin-sidebar.collapsed {
            width: 72px;
            padding-top: 8px;
        }

        .admin-sidebar.collapsed .sidebar-scroll { padding: 6px 6px; }
        .admin-sidebar.collapsed .nav-group-title { display: none; }
        .admin-sidebar.collapsed .sidebar-btn { justify-content: center; padding: 10px 6px; }
        .admin-sidebar.collapsed .sidebar-btn span { display: none; }
        .admin-sidebar.collapsed .sidebar-btn .sb-icon { margin: 0; }

        /* Setup-complete success card (shown after wizard step 7 SMS send) */
        #wizardSetupComplete { display: none; }
        #wizardSetupComplete.show { display: block; }

        /* Admin buttons -- compact, not full-width, no voter-size padding */
        #adminDashboard .btn {
            width: auto;
            min-width: 0;
            min-height: 36px;
            padding: 8px 16px;
            font-size: 0.875rem;
            border-radius: 8px;
            margin-top: 0;
            animation: none;
            box-shadow: 0 2px 6px rgba(79,70,229,0.18);
        }
        #adminDashboard .btn:hover:not(:disabled) {
            box-shadow: 0 4px 12px rgba(79,70,229,0.28);
            transform: translateY(-1px);
        }
        /* Keep a sensible minimum-width for labelled action buttons */
        #adminDashboard .admin-action-bar .btn,
        #adminDashboard .admin-card .btn {
            min-width: 110px;
        }

        .admin-topbar h1 {
            font-size: 1.4rem;
            font-weight: 700;
            margin: 0;
        }

        .admin-topbar p {
            font-size: 0.85rem;
            opacity: 0.6;
            margin: 0;
        }

        /* Admin body: sidebar + content */
        .admin-body {
            display: flex;
            flex: 1;
            overflow: hidden;
            min-height: 0;
        }

        /* ===== SIDEBAR ===== */
        .admin-sidebar {
            width: 220px;
            flex-shrink: 0;
            background: #1e3a5f;
            color: #e6eef8;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            padding-top: 12px;
            box-shadow: 2px 0 8px rgba(2,6,23,0.12);
        }

        .sidebar-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 8px 10px;
        }

        /* Custom scrollbar */
        .sidebar-scroll::-webkit-scrollbar { width: 4px; }
        .sidebar-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
        .sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
        .sidebar-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.35); }

        .nav-group { margin-bottom: 8px; }

        .nav-group-title {
            color: rgba(230,238,248,0.85);
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin: 6px 0 6px 8px;
            font-weight: 700;
        }

        .sidebar-btn {
            width: 100%;
            color: rgba(230,238,248,0.95);
            border-radius: 8px;
            cursor: pointer;
            text-align: left;
            font-size: 0.95rem;
            transition: background 0.18s ease, transform 0.12s ease;
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 6px;
            padding: 8px 10px;
            border: none;
            background: transparent;
        }

        .sidebar-btn:hover {
            background: rgba(255,255,255,0.04);
            transform: translateX(4px);
        }

        .sidebar-btn.active {
            background: linear-gradient(90deg, rgba(93,92,222,0.95), rgba(6,182,212,0.9));
            color: white;
            box-shadow: 0 6px 18px rgba(37,99,235,0.12);
        }

        .sb-icon {
            width: 34px;
            height: 34px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.95rem;
            flex-shrink: 0;
            background: rgba(255,255,255,0.06);
            color: rgba(230,238,248,0.95);
        }

        .sidebar-btn.active .sb-icon {
            background: rgba(255,255,255,0.2);
            color: white;
        }

        .sidebar-footer {
            flex-shrink: 0;
            padding: 12px;
            border-top: 1px solid #1e293b;
            text-align: center;
        }

        .sidebar-footer p { color: #64748b; font-size: 0.7rem; margin: 0; }

        /* ===== WIZARD BANNER ===== */
        .wizard-banner {
            background: linear-gradient(135deg, #1e3a5f 0%, #4f46e5 100%);
            color: white;
            padding: 12px 18px;
            border-radius: var(--radius);
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 0.95rem;
        }
        .wizard-banner span:first-child {
            background: rgba(255,255,255,0.2);
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 700;
            white-space: nowrap;
        }

        /* ===== WIZARD PROGRESS STEPPER ===== */
        #wizardProgressTracker {
            background: var(--surface);
            border-bottom: 1px solid var(--border);
            padding: 12px 20px;
            overflow-x: auto;
            flex-shrink: 0;
        }
        .wpt-inner {
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 540px;
            gap: 0;
            margin: 0 auto;
            max-width: 860px;
        }
        .wpt-step { display:flex; flex-direction:column; align-items:center; gap:4px; }
        .wpt-num {
            width: 28px; height: 28px; border-radius: 50%;
            background: var(--border); color: var(--text-secondary);
            font-size: 0.75rem; font-weight: 700;
            display: flex; align-items: center; justify-content: center;
            transition: background .3s, color .3s, box-shadow .3s;
        }
        .wpt-label { font-size: 0.65rem; color: var(--text-secondary); text-align:center; white-space:nowrap; font-weight:500; transition:color .3s; }
        .wpt-conn { flex:1; height:2px; background:var(--border); min-width:16px; margin: 0 3px 18px; transition:background .3s; }
        .wpt-step.wpt-done .wpt-num  { background:var(--success-color); color:#fff; }
        .wpt-step.wpt-done .wpt-num::after { content:'✔'; }
        .wpt-step.wpt-done .wpt-num span { display:none; }
        .wpt-step.wpt-done .wpt-label { color:var(--success-color); font-weight:600; }
        .wpt-step.wpt-done + .wpt-conn { background:var(--success-color); }
        .wpt-step.wpt-active .wpt-num { background:var(--primary-color); color:#fff; box-shadow:0 0 0 4px rgba(99,102,241,.25); }
        .wpt-step.wpt-active .wpt-label { color:var(--primary-color); font-weight:700; }

        /* Voter election welcome screen -- redesigned */
        .voter-welcome-election {
            text-align: center;
            padding: 0 0 28px;
            max-width: 480px;
            margin: 0 auto;
        }
        .vwe-hero {
            background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 45%, #312e81 80%, #4f46e5 100%);
            border-radius: 20px;
            padding: 36px 28px 32px;
            margin-bottom: 20px;
            position: relative;
            overflow: hidden;
        }
        .vwe-hero::before {
            content: '';
            position: absolute;
            top: -40px; right: -40px;
            width: 180px; height: 180px;
            background: rgba(255,255,255,0.04);
            border-radius: 50%;
        }
        .vwe-hero::after {
            content: '';
            position: absolute;
            bottom: -50px; left: -30px;
            width: 150px; height: 150px;
            background: rgba(255,255,255,0.03);
            border-radius: 50%;
        }
        .vwe-badge {
            display: inline-flex; align-items: center; gap: 6px;
            background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18);
            border-radius: 20px; padding: 5px 14px;
            font-size: 0.72rem; font-weight: 700; color: rgba(255,255,255,0.85);
            letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px;
        }
        .vwe-hero h2 {
            color: #fff;
            font-size: 1.55rem;
            font-weight: 800;
            margin: 0 0 10px;
            line-height: 1.2;
            position: relative; z-index: 1;
        }
        .vwe-greeting {
            display: inline-flex; align-items: center; gap: 8px;
            background: rgba(255,255,255,0.1); border-radius: 30px;
            padding: 6px 14px 6px 8px;
            font-size: 0.88rem; font-weight: 600; color: rgba(255,255,255,0.9);
            position: relative; z-index: 1;
        }
        .vwe-greeting-avatar {
            width: 26px; height: 26px; border-radius: 50%;
            background: rgba(255,255,255,0.2);
            display: flex; align-items: center; justify-content: center;
            font-size: 0.8rem;
        }
        .vwe-schedule-grid {
            display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px;
        }
        .vwe-schedule-item {
            background: var(--surface); border: 1px solid var(--border);
            border-radius: 12px; padding: 12px 14px; text-align: left;
        }
        .vwe-schedule-item .vsi-label {
            font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
            letter-spacing: .06em; color: var(--text-muted); margin-bottom: 4px;
        }
        .vwe-schedule-item .vsi-value {
            font-size: 0.85rem; font-weight: 600; color: var(--text-primary);
        }
        .vwe-schedule-item.open .vsi-label { color: #10b981; }
        .vwe-schedule-item.open .vsi-value { color: #059669; }
        .vwe-schedule-item.close .vsi-label { color: #ef4444; }
        .vwe-countdown {
            background: var(--surface); border: 1px solid var(--border);
            border-radius: 16px; padding: 18px 16px 14px; margin-bottom: 18px;
        }
        .vwe-countdown-label {
            font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
            letter-spacing: .08em; color: var(--text-muted); margin-bottom: 12px;
        }
        .vwe-proceed-btn {
            width: 100%;
            padding: 15px 20px;
            font-size: 1rem;
            font-weight: 700;
            border-radius: 14px;
            background: linear-gradient(135deg, #2563eb, #4f46e5);
            color: white;
            border: none;
            cursor: pointer;
            display: flex; align-items: center; justify-content: center; gap: 10px;
            transition: opacity .2s, transform .1s;
            box-shadow: 0 4px 16px rgba(79,70,229,0.35);
        }
        .vwe-proceed-btn:hover { opacity: .92; transform: translateY(-1px); }
        .vwe-proceed-btn:active { transform: translateY(0); }

        /* ===== SECTION CONTENT LAYOUTS ===== */

        /* Side-by-side: narrow form card (fixed) + wide list card (grows) */
        .cards-split {
            display: grid;
            grid-template-columns: minmax(0, 380px) 1fr;
            gap: 20px;
            align-items: start;
        }

        /* Side-by-side: two equal columns */
        .cards-split-equal {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            align-items: start;
        }

        @media (max-width: 980px) {
            .cards-split, .cards-split-equal {
                grid-template-columns: 1fr;
            }
        }

        /* ===== ADMIN MAIN CONTENT ===== */
        .admin-main {
            flex: 1;
            overflow-y: auto;
            background: var(--background);
            padding: 24px 28px;
            min-width: 0;
            margin-top: 0;
            position: relative;
            z-index: 1;
            width: 100%;
            box-sizing: border-box;
            display: flex;
            justify-content: center;
            align-items: flex-start;
        }

        .admin-main::-webkit-scrollbar { width: 6px; }
        .admin-main::-webkit-scrollbar-track { background: var(--surface); }
        .admin-main::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

        /* Admin section panels */
        .admin-section { 
            display: none; 
            padding: 0 0 32px 0;
            max-width: 1100px;
            margin: 0;
            width: 100%;
        }
        .admin-section.active { 
            display: block; 
            width: 100%;
            max-width: 1100px;
        }

        .admin-section h2 {
            font-size: 1.4rem;
            margin-bottom: 20px;
            color: #0f172a;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* Welcome card */
        .welcome-card {
            text-align: center;
            padding: 60px 40px;
            background: linear-gradient(135deg, rgba(93,92,222,0.05), rgba(139,92,246,0.05));
            border-radius: 16px;
            border: 2px dashed rgba(93,92,222,0.2);
        }

        .welcome-card .wc-icon {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, #1e3a5f, #8B5CF6);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
            font-size: 2.5rem;
            box-shadow: 0 8px 25px rgba(93,92,222,0.3);
        }

        .welcome-card h2 { color: var(--text-primary); font-size: 1.6rem; margin-bottom: 10px; }
        .welcome-card p { color: var(--text-secondary); font-size: 1rem; max-width: 380px; margin: 0 auto; }

        /* Stats grid - 4 cards in one row */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0,1fr));
            gap: 16px;
            margin: 4px 0 18px 0;
        }

        /* Modern Statistics Card */
        .stat-card {
            background: #ffffff;
            border: 1px solid rgba(15,23,42,0.04);
            border-radius: 12px;
            padding: 16px 18px;
            text-align: center;
            box-shadow: 0 10px 30px rgba(2,6,23,0.06);
            transition: transform 0.22s ease, box-shadow 0.22s ease;
        }

        .stat-card:hover {
            transform: translateY(-6px) scale(1.01);
            box-shadow: 0 20px 40px rgba(2,6,23,0.12);
        }

        .stat-card .stat-icon {
            width: 44px;
            height: 44px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 10px;
            font-size: 1.25rem;
        }

        .stat-card .stat-icon.voters { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
        .stat-card .stat-icon.candidates { background: rgba(16, 185, 129, 0.1); color: #10b981; }
        .stat-card .stat-icon.positions { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
        .stat-card .stat-icon.votes { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }

        .stat-value { 
            font-size: 1.75rem; 
            font-weight: 700; 
            color: #0f172a; 
            margin-bottom: 6px;
            line-height: 1.15;
        }
        .stat-label { 
            color: #64748b; 
            font-size: 0.85rem; 
            text-transform: uppercase; 
            letter-spacing: 0.5px;
            font-weight: 500;
        }

        /* Live charts */
        /* ---- Live monitoring: custom HTML bar charts ---- */
        .live-election-title {
            text-align: center; font-size: 1.25rem; font-weight: 800;
            padding: 14px 20px; background: var(--primary-color); color: white;
            border-radius: var(--radius); margin-bottom: 6px;
            letter-spacing: 0.01em;
        }
        .live-election-subtitle {
            text-align: center; font-size: 0.82rem; color: var(--text-secondary);
            margin-bottom: 20px;
        }
        .live-positions-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 18px; margin-top: 4px;
        }
        .live-position-card {
            background: var(--surface); border: 1px solid var(--border);
            border-radius: var(--radius); overflow: hidden;
        }
        .live-position-header {
            background: var(--primary-color); color: white;
            font-weight: 700; font-size: 0.95rem;
            padding: 9px 14px; text-align: center;
        }
        .live-candidate-row {
            display: flex; align-items: center; gap: 10px;
            padding: 9px 12px; border-bottom: 1px solid var(--border);
        }
        .live-candidate-row:last-of-type { border-bottom: none; }
        .live-cand-row-leading { background: rgba(79,70,229,0.05); }
        .live-cand-photo {
            width: 42px; height: 42px; border-radius: 50%;
            object-fit: cover; flex-shrink: 0;
            border: 2px solid var(--border);
        }
        .live-cand-photo-placeholder {
            width: 42px; height: 42px; border-radius: 50%;
            background: var(--surface); border: 2px solid var(--border);
            display: flex; align-items: center; justify-content: center;
            font-size: 1.15rem; flex-shrink: 0;
        }
        .live-cand-info { flex: 1; min-width: 0; }
        .live-cand-name {
            font-weight: 600; font-size: 0.85rem; margin-bottom: 5px;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .live-bar-wrap { height: 9px; background: var(--border); border-radius: 5px; overflow: hidden; }
        .live-bar { height: 100%; border-radius: 5px; transition: width 0.6s ease; }
        .live-cand-stats { text-align: right; min-width: 46px; flex-shrink: 0; }
        .live-cand-votes-num { font-size: 1.05rem; font-weight: 700; line-height: 1.1; }
        .live-cand-votes-pct { font-size: 0.7rem; color: var(--text-secondary); }
        .live-position-footer {
            padding: 5px 12px 8px; font-size: 0.75rem;
            color: var(--text-secondary); text-align: right;
        }
        /* Rotation bar */
        .live-rotation-bar {
            background: var(--surface); border: 1px solid var(--border);
            border-radius: var(--radius); padding: 12px 18px;
            margin-bottom: 16px;
        }
        .live-rotation-top {
            display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px;
        }
        .live-rotation-label {
            flex: 1; font-weight: 700; font-size: 1rem; min-width: 160px;
        }
        .live-rotation-dots { display: flex; gap: 7px; align-items: center; }
        .live-dot {
            width: 11px; height: 11px; border-radius: 50%;
            background: var(--border); cursor: pointer;
            transition: background 0.2s, transform 0.2s;
        }
        .live-dot:hover { transform: scale(1.3); }
        .live-dot.active { background: var(--primary-color); }
        .live-rotation-progress-track {
            height: 4px; background: var(--border);
            border-radius: 2px; overflow: hidden;
        }
        .live-rotation-progress-fill {
            height: 100%; background: var(--primary-color); width: 0%;
        }

        /* Card containers in admin */
        .admin-card {
            background: #ffffff;
            border: 1px solid rgba(15,23,42,0.06);
            border-radius: 14px;
            padding: 20px 22px;
            margin-bottom: 20px;
            box-shadow: 0 2px 8px rgba(2,6,23,0.05), 0 8px 24px rgba(2,6,23,0.04);
            transition: box-shadow 0.2s ease;
        }
        .admin-card:hover {
            box-shadow: 0 4px 12px rgba(2,6,23,0.07), 0 12px 32px rgba(2,6,23,0.06);
        }

        .admin-card h3 { 
            color: #0f172a; 
            margin: 0 0 16px 0;
            font-size: 1.02rem;
            font-weight: 700;
            padding-bottom: 12px;
            border-bottom: 1px solid #f1f5f9;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* Unified Empty State */
        .empty-state {
            text-align: center;
            padding: 48px 24px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        }

        .empty-state .empty-icon {
            width: 80px;
            height: 80px;
            margin: 0 auto 20px;
            background: rgba(37, 99, 235, 0.1);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            color: #2563eb;
        }

        .empty-state h3 {
            font-size: 1.25rem;
            color: #0f172a;
            margin-bottom: 8px;
            font-weight: 600;
        }

        .empty-state p {
            color: #64748b;
            font-size: 0.95rem;
            max-width: 400px;
            margin: 0 auto 24px;
            line-height: 1.6;
        }

        .empty-state .empty-actions {
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .empty-state .empty-actions .btn {
            padding: 10px 20px;
            font-size: 0.9rem;
        }

        /* Official results sheet */
        .results-sheet {
            background: white !important;
            color: black !important;
            padding: 30px !important;
            font-family: 'Times New Roman', serif !important;
            font-size: 12px !important;
            line-height: 1.3 !important;
        }

        .official-header {
            text-align: center;
            margin-bottom: 20px;
            border-bottom: 2px solid #000;
            padding-bottom: 15px;
        }

        .official-header h1 { font-size: 18px !important; font-weight: bold; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
        .official-header h2 { display: block !important; width: 100%; font-size: 16px !important; font-weight: 800 !important; text-align: center !important; margin-bottom: 6px; }
        .official-header .subtitle { font-size: 11px !important; font-style: italic; margin-top: 8px; }

        .election-details {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin: 20px 0;
            padding: 15px;
            border: 1px solid #000;
            background-color: #f9f9f9;
            font-size: 11px !important;
        }

        .election-details h3 { font-size: 12px !important; margin-bottom: 8px; border-bottom: 1px solid #000; padding-bottom: 3px; }
        .election-details p { margin: 3px 0; }

        .results-table { width: 100% !important; border-collapse: collapse; margin: 15px 0; font-size: 10px !important; }
        .results-table th, .results-table td { border: 1px solid #000 !important; padding: 6px 8px !important; text-align: left; vertical-align: top; }
        .results-table th { background-color: #e8e8e8 !important; font-weight: bold; text-align: center; }
        .results-table .position-header { background-color: #d4d4d4 !important; font-weight: bold; text-align: center; font-size: 11px !important; }
        .results-table .leading-row { background-color: #fff2cc !important; font-weight: bold; }
        .results-table .total-row { border-top: 2px solid #000 !important; font-weight: bold; background-color: #f0f0f0 !important; }
        .results-table .position-summary-row { background-color: var(--primary-color) !important; color: white !important; font-weight: bold; padding: 12px; }

        .signature-section { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
        .signature-box { border: 1px solid #000; height: 60px; background-color: #fff; margin-bottom: 25px; }
        .signature-label { font-weight: bold; font-size: 10px; text-transform: uppercase; margin-top: -20px; display: block; }

        .certification-text {
            margin: 25px 0;
            padding: 15px;
            border: 1px solid #000;
            background-color: #f5f5f5;
            font-style: italic;
            text-align: justify;
            font-size: 10px !important;
            line-height: 1.4;
        }

        .official-seal {
            margin-top: 40px;
            text-align: center;
            border: 2px double #000;
            padding: 20px;
            background-color: #f9f9f9;
        }

        .official-seal h3 { font-size: 12px !important; margin-bottom: 8px; text-transform: uppercase; }

        /* ===== SETUP GUIDE CARD ===== */
        .setup-guide-card {
            background: linear-gradient(135deg, rgba(79,70,229,0.06) 0%, rgba(6,182,212,0.04) 100%);
            border: 2px dashed rgba(79,70,229,0.25);
            border-radius: 18px;
            padding: 32px 28px;
            margin-bottom: 24px;
        }
        .setup-guide-header {
            display: flex;
            align-items: center;
            gap: 18px;
            margin-bottom: 28px;
        }
        .setup-guide-icon {
            width: 64px;
            height: 64px;
            background: linear-gradient(135deg, #4f46e5, #06b6d4);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            flex-shrink: 0;
            box-shadow: 0 8px 24px rgba(79,70,229,0.28);
        }
        .setup-guide-header h3 { font-size: 1.3rem; font-weight: 800; color: #0f172a; margin: 0 0 6px 0; }
        .setup-guide-header p  { font-size: 0.92rem; color: #64748b; margin: 0; }
        .setup-steps-flow {
            display: flex;
            align-items: flex-start;
            gap: 4px;
            flex-wrap: wrap;
        }
        .setup-step-node {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            background: #ffffff;
            border: 1px solid rgba(15,23,42,0.06);
            border-radius: 12px;
            padding: 14px 16px;
            flex: 1;
            min-width: 140px;
            box-shadow: 0 2px 8px rgba(2,6,23,0.05);
            transition: box-shadow 0.2s;
        }
        .setup-step-node:hover { box-shadow: 0 6px 18px rgba(79,70,229,0.1); }
        .ssn-num {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background: linear-gradient(135deg, #4f46e5, #06b6d4);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            font-size: 0.88rem;
            flex-shrink: 0;
        }
        .ssn-title { font-size: 0.88rem; font-weight: 700; color: #0f172a; margin-bottom: 3px; }
        .ssn-desc  { font-size: 0.75rem; color: #64748b; line-height: 1.4; }
        .setup-step-arrow {
            align-self: center;
            font-size: 1.2rem;
            color: #cbd5e1;
            padding: 0 2px;
            flex-shrink: 0;
        }
        @media (max-width: 900px) {
            .setup-steps-flow { flex-direction: column; }
            .setup-step-arrow { transform: rotate(90deg); align-self: flex-start; margin-left: 14px; }
        }

        /* ===== ADMIN ENHANCEMENTS ===== */

        /* Professional section page header */
        .admin-section-header {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 24px 0 18px 0;
            margin-bottom: 20px;
            border-bottom: 1px solid rgba(15,23,42,0.07);
        }
        .admin-section-icon {
            width: 52px;
            height: 52px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            flex-shrink: 0;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .admin-section-icon.indigo  { background: linear-gradient(135deg,#4f46e5,#7c3aed); }
        .admin-section-icon.navy    { background: linear-gradient(135deg,#1e3a5f,#0f172a); }
        .admin-section-icon.cyan    { background: linear-gradient(135deg,#06b6d4,#0891b2); }
        .admin-section-icon.green   { background: linear-gradient(135deg,#10b981,#059669); }
        .admin-section-icon.amber   { background: linear-gradient(135deg,#f59e0b,#d97706); }
        .admin-section-icon.red     { background: linear-gradient(135deg,#ef4444,#dc2626); }
        .admin-section-title        { flex: 1; }
        .admin-section-title h2     { font-size: 1.45rem; font-weight: 800; color: #0f172a; margin: 0 0 4px 0; display:block; }
        .admin-section-title p      { font-size: 0.88rem; color: #64748b; margin: 0; }

        /* Inline status badges */
        .a-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .a-badge.voted    { background:rgba(16,185,129,0.12); color:#059669; border:1px solid rgba(16,185,129,0.25); }
        .a-badge.pending  { background:rgba(245,158,11,0.12); color:#b45309; border:1px solid rgba(245,158,11,0.3); }
        .a-badge.active   { background:rgba(79,70,229,0.12);  color:#4f46e5; border:1px solid rgba(79,70,229,0.25); }
        .a-badge.inactive { background:rgba(100,116,139,0.1); color:#64748b; border:1px solid rgba(100,116,139,0.2); }
        .a-badge.sent     { background:rgba(6,182,212,0.12);  color:#0891b2; border:1px solid rgba(6,182,212,0.25); }
        .a-badge.error    { background:rgba(239,68,68,0.1);   color:#dc2626; border:1px solid rgba(239,68,68,0.2); }

        /* Admin tables (used in JS-rendered content) */
        .admin-table-wrapper {
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            margin: 12px 0;
        }
        
        .admin-table {
            width: 100%;
            min-width: 600px; /* Ensure table doesn't get too narrow */
            border-collapse: collapse;
            font-size: 0.88rem;
        }
        .admin-table th {
            background: #f8fafc;
            color: #475569;
            font-weight: 700;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 10px 14px;
            text-align: left;
            border-bottom: 2px solid #e2e8f0;
        }
        .admin-table td {
            padding: 12px 14px;
            border-bottom: 1px solid #f1f5f9;
            color: #1e293b;
            vertical-align: middle;
        }
        .admin-table tr:last-child td { border-bottom: none; }
        .admin-table tr:hover td { background: #f8fafc; }
        .admin-table td .btn { margin: 0; }

        /* Action bar -- flex-row of buttons */
        .admin-action-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            align-items: center;
            margin: 14px 0 6px 0;
        }

        /* Card accent -- coloured left-border for differentiated cards */
        .admin-card.accent-indigo { border-left: 4px solid #4f46e5; }
        .admin-card.accent-green  { border-left: 4px solid #10b981; }
        .admin-card.accent-amber  { border-left: 4px solid #f59e0b; }
        .admin-card.accent-red    { border-left: 4px solid #ef4444; }
        .admin-card.accent-cyan   { border-left: 4px solid #06b6d4; }

        /* Info row in admin card header */
        .admin-card-meta {
            display: flex;
            gap: 18px;
            flex-wrap: wrap;
            margin-bottom: 16px;
            padding-bottom: 14px;
            border-bottom: 1px solid #f1f5f9;
        }
        .admin-card-meta-item {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .admin-card-meta-label {
            font-size: 0.7rem;
            color: #94a3b8;
            text-transform: uppercase;
            font-weight: 700;
            letter-spacing: 0.5px;
        }
        .admin-card-meta-value {
            font-size: 1.05rem;
            font-weight: 700;
            color: #0f172a;
        }

        /* ===== RESPONSIVE ===== */
        /* Tablet only (769px – 900px): stacked layout with slim sidebar-as-bar */
        @media (min-width: 769px) and (max-width: 900px) {
            .admin-body { flex-direction: column; }

            .admin-sidebar {
                width: 100%;
                max-height: 220px;
                flex-shrink: 0;
            }

            .sidebar-scroll { padding: 10px; }

            .sidebar-btn { padding: 8px 10px; font-size: 0.8rem; margin-bottom: 4px; }
            .sb-icon { width: 26px; height: 26px; font-size: 0.8rem; }

            .nav-group { margin-bottom: 10px; }
            .nav-group-title { font-size: 0.6rem; margin-bottom: 4px; }

            .admin-main { 
                padding: 16px; 
                width: 100%;
            }
            .admin-section { padding: 0 0 24px 0; }
        }

        /* Mobile topbar compaction (≤ 640px) */
        @media (max-width: 640px) {
            .admin-topbar {
                height: auto;
                min-height: 56px;
                padding: 8px 12px;
                flex-wrap: wrap;
                gap: 6px;
            }
            .admin-topbar h1 { font-size: 0.95rem; }
            .admin-topbar p  { display: none; }
            #adminTopbarControls {
                gap: 6px;
                flex-wrap: nowrap;
            }
            #adminTopbarControls > label { display: none; }
            #liveRefreshSelect { display: none; }
            #electionSelect {
                max-width: 130px;
                font-size: 0.75rem;
                padding: 5px 4px;
            }
            #createElectionBtn {
                padding: 5px 8px;
                font-size: 0.85rem;
            }
            .admin-topbar .logout-btn {
                padding: 5px 10px;
                font-size: 0.75rem;
            }
        }

        @media (max-width: 768px) {
            .header { padding: 24px 16px 20px; }
            .header h1 { font-size: 1.6rem; }
            .header p { font-size: 1rem; }
            .header-icon { width: 60px; height: 60px; }
            .header-icon svg { width: 28px; height: 28px; }
            .content { padding: 0; }
            .candidate-list { 
                grid-template-columns: repeat(2, 1fr);
                gap: 14px;
                max-width: 100%;
            }
            .candidate-card {
                padding: 14px;
                border-radius: 14px;
                overflow: hidden;
            }
            .candidate-image { 
                height: 200px;
                width: calc(100% + 28px);
                margin: -14px -14px 10px;
                border-radius: 10px 10px 0 0;
                object-fit: cover;
                object-position: center top;
                border: none;
                border-bottom: 2px solid var(--border);
            }
            .candidate-info h3 {
                font-size: 0.95rem;
            }
            .candidate-info p {
                font-size: 0.82rem;
            }
            .live-charts-grid { grid-template-columns: 1fr; }
            .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
            .stat-card { padding: 16px; }
            .stat-value { font-size: 1.5rem; }
            .stat-card .stat-icon { width: 40px; height: 40px; font-size: 1.2rem; }
            .results-grid { grid-template-columns: 1fr; }
            .election-details, .signature-section { grid-template-columns: 1fr; gap: 12px; }
            
            /* Unopposed candidate image - mobile */
            .unopposed-candidate-image {
                width: 100%;
                max-width: 280px;
                height: auto;
                aspect-ratio: 4/5;
            }
            .unopposed-candidate-image-placeholder {
                width: 100%;
                max-width: 280px;
                height: 200px;
            }
            
            /* Form elements - mobile optimized */
            .form-group input[type="text"],
            .form-group input[type="password"],
            .form-group input[type="date"],
            .form-group input[type="time"] {
                padding: 14px 16px;
                font-size: 16px; /* Prevents iOS zoom */
            }
            
            /* Button improvements - mobile */
            .btn {
                padding: 16px 20px;
                min-height: 52px;
                font-size: 1rem;
            }
            
            /* Navigation context - mobile */
            .navigation-context {
                padding: 10px 14px;
                font-size: 0.85rem;
            }
            
            /* Vote summary - mobile */
            .vote-summary {
                padding: 16px;
            }
            .summary-item {
                padding: 10px;
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
            .summary-content {
                flex-direction: column;
                align-items: flex-start;
                gap: 4px;
            }
            .summary-position {
                font-size: 0.95rem;
            }
            .summary-candidate {
                font-size: 0.9rem;
            }
            .edit-icon {
                margin-left: 0;
            }
        }

        @media (max-width: 480px) {
            .header { padding: 20px 12px 16px; }
            .header h1 { font-size: 1.4rem; }
            .header-icon { width: 52px; height: 52px; }
            .header-icon svg { width: 24px; height: 24px; }
            .content { padding: 0; }
            .position-title { font-size: 1.3rem; word-wrap: break-word; }
            .vwe-schedule-grid { grid-template-columns: 1fr; }
            .vwe-hero { padding: 28px 18px 24px; }
            .vwe-hero h2 { font-size: 1.25rem; }
            .btn { padding: 14px 16px; min-height: 48px; font-size: 14px; }
            .stats-grid { grid-template-columns: 1fr; }
            /* Mobile: sidebar is a drawer (handled by JS toggleSidebar), do NOT stack */
            .admin-main { padding: 12px; }
            .admin-section { padding: 0 0 16px 0; }
            /* Candidate list: single column on tiny screens */
            /* NOTE: the MOBILE-NATIVE APP block below overrides these with !important */
            .candidate-list { grid-template-columns: 1fr; max-width: 320px; }

            .countdown-display { gap: 6px; }
            .countdown-value { font-size: 1.3rem; padding: 8px 6px; }
            .countdown-label { font-size: 0.65rem; }
            
            /* OTP Screen Mobile Optimization */
            #otpInput {
                font-size: 1.8rem !important;
                padding: 16px 12px !important;
                letter-spacing: 0.6em !important;
            }
            #otpTimer {
                font-size: 0.95rem !important;
                padding: 10px 16px !important;
            }
            .btn svg {
                width: 18px !important;
                height: 18px !important;
            }
            
            /* Admin Section Mobile Enhancements */
            .admin-section-header {
                flex-direction: column;
                align-items: flex-start;
                padding: 16px 0 12px 0;
            }
            .admin-section-icon {
                width: 44px;
                height: 44px;
                font-size: 1.2rem;
            }
            .admin-section-title h2 { font-size: 1.2rem; }
            .admin-section-title p { font-size: 0.82rem; }
            
            /* Admin Cards Mobile */
            .admin-card { padding: 16px 14px; margin-bottom: 16px; }
            .admin-card h3 { font-size: 0.95rem; padding-bottom: 10px; margin-bottom: 12px; }
            
            /* Set Voting Time Form - Make Single Column on Mobile */
            #votingTimeForm > div > div[style*="grid-template-columns:repeat(2,1fr)"],
            div[style*="display:grid;grid-template-columns:repeat(2,1fr)"] {
                grid-template-columns: 1fr !important;
                gap: 12px !important;
            }
            
            /* Voting Times Container Cards - Mobile Optimization */
            #votingTimesContainer > div {
                padding: 12px !important;
            }
            #votingTimesContainer [style*="font-size:0.95rem"] {
                font-size: 0.88rem !important;
            }
            #votingTimesContainer [style*="font-size:0.8rem"] {
                font-size: 0.75rem !important;
            }
            
            /* Admin Countdown Timer Mobile */
            .admin-countdown {
                font-size: 0.8rem !important;
                flex-wrap: wrap;
            }
            
            /* Election Selection List Mobile */
            #electionCheckboxList {
                max-height: 180px !important;
            }
            
            /* Admin Action Bar Mobile */
            .admin-action-bar {
                flex-direction: column;
                gap: 8px;
            }
            .admin-action-bar .btn {
                width: 100%;
            }
            
            /* Wizard Banner Mobile */
            .wizard-banner {
                padding: 10px 14px;
                font-size: 0.85rem;
                flex-direction: column;
                gap: 8px;
                text-align: center;
            }
            .wizard-banner span:first-child {
                font-size: 0.75rem;
            }
            
            /* Admin Table Mobile Scrolling */
            .admin-table {
                font-size: 0.8rem;
            }
            .admin-table th,
            .admin-table td {
                padding: 8px 10px;
            }
            
            /* Election Picker Cards Mobile - Voter Interface */
            #votingTimeContent a[style*="display:flex"] {
                padding: 12px 12px !important;
                gap: 10px !important;
            }
            #votingTimeContent [style*="font-size:0.88rem"] {
                font-size: 0.82rem !important;
            }
            #votingTimeContent [style*="font-size:1.2rem"] {
                font-size: 1.1rem !important;
            }
            
            /* Status Badges Mobile */
            .a-badge {
                font-size: 0.7rem;
                padding: 2px 8px;
            }
            
            /* Form Groups Mobile */
            .form-group input,
            .form-group select,
            .form-group textarea {
                font-size: 16px !important; /* Prevent zoom on iOS */
            }
            
            /* Live Position Grid Mobile */
            .live-positions-grid {
                grid-template-columns: 1fr !important;
            }
            
            /* Stats Grid Already 1fr - Ensure proper spacing */
            .stat-card {
                padding: 14px;
            }
            .stat-value {
                font-size: 1.4rem;
            }
        }

        /* ===== MOBILE-NATIVE APP EXPERIENCE ===== */
        @media (max-width: 480px) {
            /* Full-width app-like layout */
            #voterInterface {
                min-height: 100vh;
                min-height: 100dvh;
            }
            .content {
                margin: 0 0 0 0;
                max-width: 100%;
            }

            /* Candidate cards — large, tappable, native feel */
            .candidate-list {
                grid-template-columns: 1fr !important;
                gap: 14px;
                padding: 0;
                max-width: 100%;
            }
            .candidate-card {
                padding: 0;
                border-radius: 16px;
                border-width: 2px;
                box-shadow: 0 2px 12px rgba(0,0,0,0.08);
                overflow: hidden;
                -webkit-tap-highlight-color: transparent;
                transition: border-color 0.15s, box-shadow 0.15s;
            }
            .candidate-card .candidate-info {
                padding: 14px 16px 16px;
            }
            .candidate-card .candidate-info h3 {
                font-size: 1.05rem;
                font-weight: 700;
            }
            .candidate-image {
                height: 280px !important;
                width: 100% !important;
                margin: 0 !important;
                border-radius: 14px 14px 0 0;
                border-bottom: 2px solid var(--border);
            }
            .candidate-card.selected {
                border-color: var(--primary-color);
                box-shadow: 0 0 0 3px rgba(93,92,222,0.2), 0 4px 16px rgba(93,92,222,0.15);
            }
            .candidate-card.selected::after {
                top: 12px;
                right: 12px;
                width: 32px;
                height: 32px;
                font-size: 18px;
                box-shadow: 0 4px 12px rgba(37,99,235,0.4);
            }

            /* Position title — app-like */
            .position-title {
                font-size: 1.2rem !important;
                text-align: center;
                padding: 8px 0 4px;
            }

            /* Progress bar — thicker on mobile */
            .progress-bar {
                height: 6px;
                border-radius: 3px;
            }

            /* Voting buttons — sticky bottom nav like native apps */
            #votingArea > div[style*="display:grid"] {
                position: sticky;
                bottom: 0;
                z-index: 50;
                background: var(--background);
                padding: 12px 0 max(12px, env(safe-area-inset-bottom));
                border-top: 1px solid var(--border);
                margin: 16px -16px 0;
                padding-left: 16px;
                padding-right: 16px;
                box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
            }

            /* Vote confirmation — full width */
            #voteConfirmation {
                padding: 0;
            }
            .vote-summary {
                border-radius: 12px;
            }
            #voteConfirmation > div[style*="display:grid"] {
                position: sticky;
                bottom: 0;
                z-index: 50;
                background: var(--background);
                padding: 12px 0 max(12px, env(safe-area-inset-bottom));
                border-top: 1px solid var(--border);
                box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
            }

            /* Unopposed — better mobile display */
            .unopposed-candidate-image {
                width: 100%;
                max-width: 240px;
                height: auto;
                aspect-ratio: 3/4;
            }

            /* Thank you screen — centered nicely */
            .success-message {
                padding: 40px 20px;
            }
            .success-icon {
                font-size: 4rem;
            }
        }

        /* Touch devices */
        @media (hover: none) and (pointer: coarse) {
            .btn:hover { transform: none; }
            .candidate-card:hover { transform: none; }
            .candidate-card { min-height: 0; }
            .candidate-card:active { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(93,92,222,0.25); transform: scale(0.98); }
            .btn { min-height: 48px; min-width: 44px; }
            
            /* OTP Input - Better touch target */
            #otpInput {
                min-height: 56px;
                touch-action: manipulation;
            }
            #otpVerifyButton {
                min-height: 48px;
            }
            
            /* Ensure tables are scrollable on touch devices */
            .admin-table-wrapper,
            div[style*="overflow-x:auto"] {
                -webkit-overflow-scrolling: touch;
            }
            
            /* All interactive elements need minimum touch targets */
            button, a, input, select, .candidate-card {
                min-height: 44px;
                min-width: 44px;
            }
        }

        /* iOS fixes */
        @supports (-webkit-touch-callout: none) {
            input[type="text"], input[type="password"], input[type="date"], input[type="time"] {
                -webkit-appearance: none;
                appearance: none;
                font-size: 16px !important;
            }
            /* OTP Input on iOS - ensure readable size */
            #otpInput {
                -webkit-appearance: none;
                appearance: none;
                font-size: 1.8rem !important;
            }
            /* Fix iOS button rendering */
            .btn {
                -webkit-appearance: none;
                appearance: none;
            }
            /* Fix iOS select dropdown */
            select {
                -webkit-appearance: none;
                appearance: none;
            }
        }

        /* Android fixes */
        @supports not (-webkit-touch-callout: none) {
            input[type="text"], input[type="password"], input[type="date"], input[type="time"] {
                font-size: 16px;
            }
        }

        /* Landscape mobile */
        @media (max-height: 500px) and (orientation: landscape) {
            .header { padding: 8px 12px; }
            .header h1 { font-size: 1.2rem; }
            /* Do NOT limit sidebar height here — the drawer CSS handles mobile sidebar */
        }

        /* Extra small devices (iPhone SE, small Android) */
        @media (max-width: 375px) {
            .header { padding: 16px 10px 12px; }
            .header h1 { font-size: 1.2rem; }
            .header p { font-size: 0.75rem; }
            .header-icon { width: 44px; height: 44px; }
            .header-icon svg { width: 20px; height: 20px; }
            .content { padding: 0 8px; }
            .btn { padding: 12px 14px; font-size: 0.9rem; min-height: 44px; }
            .candidate-list { grid-template-columns: 1fr; gap: 12px; }
            .candidate-card { padding: 12px; }
            .candidate-image { height: 180px; }
            .login-field input { padding: 12px 14px 12px 40px; font-size: 0.95rem; }
            #otpInput { font-size: 1.6rem; padding: 14px 12px; }
        }

        /* Large phones (iPhone Pro Max, large Android) */
        @media (min-width: 414px) and (max-width: 480px) {
            .header { padding: 22px 16px 18px; }
            .header h1 { font-size: 1.5rem; }
            .candidate-list { grid-template-columns: repeat(2, 1fr); }
        }

        /* Tablets (iPad, Android tablets) */
        @media (min-width: 768px) and (max-width: 1024px) {
            .header { padding: 28px 24px 32px; }
            .header h1 { font-size: 1.8rem; }
            .content { max-width: 680px; }
            .candidate-list { grid-template-columns: repeat(3, 1fr); }
        }

        /* Fix horizontal overflow on all mobile devices */
        @media (max-width: 1024px) {
            * {
                max-width: 100%;
                box-sizing: border-box;
            }
            .content {
                width: 100%;
                max-width: 100%;
                padding: 0 12px;
            }
            img, svg, canvas {
                max-width: 100%;
                height: auto;
            }
        }

        /* Print */
        @media print {
            body { background: white !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
            /* Hide all UI elements */
            .btn, .footer, .header, .admin-access, .admin-sidebar, .sidebar-scroll, .sidebar-btn, .sidebar-footer, .nav-group-title, .particle, .admin-topbar, #particles, #voterInterface { display: none !important; }
            /* Override display for print - don't hide parent containers */
            #adminInterface { display: block !important; }
            #adminDashboard { display: flex !important; height: auto !important; }
            .admin-body { display: flex !important; height: auto !important; }
            .admin-main { display: block !important; overflow: visible !important; height: auto !important; padding: 20px; }
            /* Show official results - override admin-section display: none */
            .admin-section { display: none !important; }
            #officialResultsSheet { display: block !important; visibility: visible !important; }
            .results-sheet { display: block !important; box-shadow: none !important; }
            .signature-section { display: grid !important; grid-template-columns: 1fr 1fr !important; }
            .signature-box { border: 2px solid #000 !important; height: 80px !important; margin-bottom: 30px !important; }
            * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
        }

        /* ===== DEVELOPER PANEL ===== */
        #devPanelOverlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 99999;
            background: rgba(0,0,0,0.75);
            backdrop-filter: blur(6px);
            align-items: center;
            justify-content: center;
        }
        #devPanelOverlay.open { display: flex; }
        #devPanel {
            background: #0f172a;
            color: #e2e8f0;
            border: 1px solid #334155;
            border-radius: 16px;
            width: min(760px, 95vw);
            max-height: 88vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 25px 60px rgba(0,0,0,0.7);
        }
        #devPanel .dev-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 18px 24px 14px;
            border-bottom: 1px solid #1e293b;
            flex-shrink: 0;
        }
        #devPanel .dev-header h2 { font-size: 1.1rem; font-weight: 700; color: #38bdf8; margin: 0; display: block !important; width: auto !important; text-align: left !important; flex: none !important; }
        #devPanel .dev-badge { font-size: 0.7rem; background: #dc2626; color: #fff; padding: 2px 8px; border-radius: 20px; font-weight: 700; letter-spacing: 1px; margin-left: 10px; }
        #devPanel .dev-tabs { display: flex; gap: 4px; padding: 12px 24px 0; flex-shrink: 0; }
        #devPanel .dev-tab { padding: 7px 20px; border-radius: 8px 8px 0 0; font-size: 0.85rem; font-weight: 600; cursor: pointer; border: 1px solid transparent; border-bottom: none; color: #94a3b8; background: transparent; transition: all .2s; }
        #devPanel .dev-tab.active { background: #1e293b; color: #38bdf8; border-color: #334155; }
        #devPanel .dev-body { flex: 1; overflow-y: auto; padding: 24px; background: #1e293b; }
        #devPanel .dev-section-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: #64748b; margin: 0 0 12px; font-weight: 700; }
        #devPanel .dev-field { margin-bottom: 18px; }
        #devPanel .dev-field label { display: block; font-size: 0.82rem; color: #94a3b8; margin-bottom: 6px; font-weight: 600; }
        #devPanel .dev-input { width: 100%; background: #0f172a; border: 1px solid #334155; border-radius: 8px; color: #e2e8f0; padding: 10px 14px; font-size: 0.9rem; font-family: monospace; box-sizing: border-box; outline: none; }
        #devPanel .dev-input:focus { border-color: #38bdf8; box-shadow: 0 0 0 2px rgba(56,189,248,.15); }
        #devPanel .dev-btn { padding: 9px 20px; border-radius: 8px; border: none; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: all .2s; }
        #devPanel .dev-btn-primary { background: #38bdf8; color: #0f172a; }
        #devPanel .dev-btn-primary:hover { background: #7dd3fc; }
        #devPanel .dev-btn-danger  { background: #dc2626; color: #fff; }
        #devPanel .dev-btn-danger:hover  { background: #ef4444; }
        #devPanel .dev-btn-secondary { background: #334155; color: #e2e8f0; }
        #devPanel .dev-btn-secondary:hover { background: #475569; }
        #devPanel .dev-btn-success { background: #16a34a; color: #fff; }
        #devPanel .dev-btn-success:hover { background: #22c55e; }
        #devPanel .dev-hint { font-size: 0.76rem; color: #64748b; margin-top: 5px; }
        #devPanel .dev-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 12px; }
        #devPanel .dev-stat-card { background: #0f172a; border: 1px solid #334155; border-radius: 10px; padding: 12px; text-align: center; }
        #devPanel .dev-stat-card .num { font-size: 1.5rem; font-weight: 800; color: #38bdf8; }
        #devPanel .dev-stat-card .lbl { font-size: 0.72rem; color: #64748b; margin-top: 3px; text-transform: capitalize; }
        #devPanel .dev-divider { border: none; border-top: 1px solid #334155; margin: 20px 0; }
        #devPanel .dev-danger-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        #devPanel .dev-status-msg { font-size: 0.83rem; margin-top: 10px; padding: 8px 12px; border-radius: 6px; }
        #devPanel .dev-status-ok  { background: rgba(22,163,74,.2); color: #4ade80; border: 1px solid rgba(22,163,74,.3); }
        #devPanel .dev-status-err { background: rgba(220,38,38,.2); color: #f87171; border: 1px solid rgba(220,38,38,.3); }
        .close-dev-btn { background: none; border: none; color: #64748b; font-size: 1.4rem; cursor: pointer; line-height: 1; }
        .close-dev-btn:hover { color: #e2e8f0; }

        /* ===== DRAG AND DROP STYLES ===== */
        .draggable-candidate {
            cursor: move;
            transition: all 0.2s ease;
        }
        .draggable-candidate:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
        }
        .draggable-candidate.dragging {
            opacity: 0.5;
            transform: scale(0.95);
        }
        .draggable-candidate.drag-over {
            border-top: 3px solid var(--primary-color) !important;
        }
        .drag-handle {
            cursor: grab;
            color: var(--text-secondary);
            font-size: 1.2rem;
            padding: 0 8px;
            user-select: none;
        }
        .drag-handle:active {
            cursor: grabbing;
        }
