/* CSP Phase E 2026-10-03: extracted from /index.html <style> blocks (group 1/1, 1 block(s)), order kept. Edit here, not in the page. */

        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
            min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
        }
        .login-container {
            background: white; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            width: 100%; max-width: 420px; padding: 40px; animation: slideUp 0.5s ease-out;
        }
        @keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

        .login-header { text-align: center; margin-bottom: 30px; }
        .login-header h1 { color: #1f2937; font-size: 28px; margin-bottom: 8px; font-weight: 700; }
        .login-header p { color: #6b7280; font-size: 14px; }
        .logo { font-size: 48px; margin-bottom: 16px; }

        .form-group { margin-bottom: 20px; }
        .form-group label { display: block; color: #374151; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
        .form-group input {
            width: 100%; padding: 12px 16px; border: 2px solid #e5e7eb;
            border-radius: 8px; font-size: 14px; transition: all 0.2s; outline: none; background: #f9fafb;
        }
        .form-group input:focus { border-color: #3b82f6; background: white; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }

        .btn-login {
            width: 100%; padding: 12px; background: #1e3a5f; color: white;
            border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s;
        }
        .btn-login:hover { background: #2c5282; transform: translateY(-1px); }
        .btn-login:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }

        .forgot-password { text-align: right; margin-bottom: 20px; }
        .forgot-password a { color: #3b82f6; text-decoration: none; font-size: 13px; font-weight: 500; }

        .error-message {
            background: #fef2f2; border: 1px solid #fecaca; color: #dc2626;
            padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; display: none;
        }
        .error-message.show { display: block; }

        .secure-badge { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; color: #6b7280; font-size: 13px; }
        .loading-spinner {
            display: inline-block; width: 16px; height: 16px;
            border: 2px solid rgba(255,255,255,0.3); border-top-color: white;
            border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 8px; vertical-align: middle;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* STEP 2: MFA VERIFY */
        #mfaStep, #mfaSetupStep, #stepUpStep { display: none; }
        .mfa-icon { font-size: 48px; text-align: center; margin-bottom: 16px; }
        .mfa-code-input {
            width: 100%; padding: 16px; border: 2px solid #e5e7eb; border-radius: 8px;
            font-size: 28px; text-align: center; letter-spacing: 10px; font-family: monospace;
            outline: none; background: #f9fafb;
        }
        .mfa-code-input:focus { border-color: #3b82f6; background: white; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
        .mfa-code-input::placeholder { letter-spacing: 6px; font-size: 18px; }
        .mfa-info { background: #eff6ff; border: 1px solid #bfdbfe; padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 13px; color: #1e40af; line-height: 1.5; }
        .mfa-back { display: block; width: 100%; background: none; border: 0; font: inherit; text-align: center; margin-top: 16px; color: #6b7280; font-size: 13px; text-decoration: none; cursor: pointer; }
        .mfa-back:hover { color: #3b82f6; }
        .link-btn { background: none; border: 0; padding: 0; font: inherit; color: #3b82f6; text-decoration: underline; cursor: pointer; }
        .mfa-backup-hint { text-align: center; margin-top: 12px; font-size: 12px; color: #9ca3af; }

        /* STEP 3: MFA SETUP */
        .setup-title { text-align: center; color: #374151; font-weight: 700; font-size: 18px; margin-bottom: 8px; }
        .setup-subtitle { text-align: center; color: #6b7280; font-size: 14px; margin-bottom: 20px; }
        .qr-container { display: flex; justify-content: center; margin-bottom: 20px; }
        .qr-container canvas { border: 4px solid #e5e7eb; border-radius: 12px; padding: 8px; }
        .secret-key-box {
            background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px;
            text-align: center; margin-bottom: 16px; font-family: monospace; font-size: 14px;
            letter-spacing: 2px; color: #374151; word-break: break-all; cursor: pointer; position: relative;
        }
        .secret-key-box:hover { background: #e5e7eb; }
        .secret-key-label { font-family: -apple-system, sans-serif; font-size: 11px; color: #6b7280; letter-spacing: 0; margin-bottom: 4px; font-weight: 600; }
        .backup-codes-box {
            background: #fefce8; border: 1px solid #fde68a; border-radius: 8px; padding: 16px; margin-bottom: 20px;
        }
        .backup-codes-title { font-size: 13px; font-weight: 700; color: #92400e; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
        .backup-codes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px; }
        .backup-code { font-family: monospace; font-size: 13px; color: #78350f; padding: 2px 0; }
        .backup-warning { font-size: 11px; color: #92400e; margin-top: 8px; line-height: 1.4; }
        .step-indicator { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
        .step-dot { width: 8px; height: 8px; border-radius: 50%; background: #e5e7eb; }
        .step-dot.active { background: #3b82f6; }
        .setup-warning { background: #fef3c7; border: 1px solid #fcd34d; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 12px; color: #92400e; line-height: 1.5; }

        /* Modal */
        .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
        .modal.show { display: flex; }
        .modal-content { background: white; border-radius: 12px; padding: 30px; max-width: 400px; width: 90%; }
        .modal-header { margin-bottom: 20px; }
        .modal-header h2 { color: #1f2937; font-size: 20px; }
        .btn-close { background: #e5e7eb; color: #374151; padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; margin-top: 15px; }
    
