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

        :root {
            --primary:      #01491b;
            --primary-mid:  #026325;
            --primary-end:  #013314;
            --accent:       #fc9401;
            --accent-light: #FFF1DD;
            --accent-dark:  #C66A00;
            --white:        #FFFFFF;
            --text-dark:    #1A202C;
            --text-muted:   #64748B;
            --text-hint:    #94A3B8;
            --border:       #E2E8F0;
            --success:      #10B981;
            --danger:       #EF4444;
        }

        html, body {
            height: 100%;
            font-family: 'Nunito Sans', sans-serif;
            color: var(--text-dark);
        }

        /* ============================
           FULL PAGE BACKGROUND
        ============================ */
        .login-page {
            min-height: 100vh;
            background: linear-gradient(135deg, #01491b 0%, #026325 70%, #013314 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px 20px;
            position: relative;
            overflow: hidden;
        }

        /* Decorative rings */
        .bg-decor {
            position: absolute;
            inset: 0;
            pointer-events: none;
            overflow: hidden;
        }

        .decor-ring {
            position: absolute;
            border-radius: 50%;
            border: 1px solid rgba(255,255,255,0.05);
        }

        .ring-1 { width: 700px; height: 700px; top: -300px; left: -200px; }
        .ring-2 { width: 500px; height: 500px; top: -100px; right: -200px; border-color: rgba(232,160,32,0.06); }
        .ring-3 { width: 400px; height: 400px; bottom: -150px; left: 10%; }
        .ring-4 { width: 300px; height: 300px; bottom: -80px; right: 15%; border-color: rgba(232,160,32,0.05); }
        .ring-5 { width: 200px; height: 200px; top: 40%; left: 45%; border-color: rgba(255,255,255,0.04); }

        .decor-dot {
            position: absolute;
            width: 4px; height: 4px;
            border-radius: 50%;
            background: rgba(232,160,32,0.5);
            animation: twinkle 3s ease-in-out infinite;
        }

        @keyframes twinkle {
            0%, 100% { opacity: 0.3; transform: scale(1); }
            50%       { opacity: 1;   transform: scale(1.5); }
        }

        /* Grid texture overlay */
        .bg-grid {
            position: absolute;
            inset: 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: 50px 50px;
        }

        /* ============================
           MAIN CONTAINER
        ============================ */
        .login-container {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 1100px;
            display: flex;
            gap: 0;
            border-radius: 28px;
            overflow: hidden;
            box-shadow:
                0 4px 8px rgba(0,0,0,0.1),
                0 16px 48px rgba(0,0,0,0.25),
                0 40px 80px rgba(0,0,0,0.2);
            animation: fadeUp 0.7s ease both;
        }

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

        /* ============================
           LEFT PANEL — BRANDING
        ============================ */
        .panel-left {
            width: 500px;
            flex-shrink: 0;
            background: rgba(255,255,255,0.06);
            backdrop-filter: blur(20px);
            border-right: 1px solid rgba(255,255,255,0.1);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 28px 44px;
            position: relative;
            overflow: hidden;
        }

        .panel-left::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(160deg, rgba(232,160,32,0.04) 0%, transparent 50%);
            pointer-events: none;
        }

        /* Brand */
        .brand {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
            animation: fadeUp 0.6s 0.1s ease both;
        }

        .brand-logo-box {
            width: 160px;
            height: 60px;
            border-radius: 16px;
            background: white;
            border: 1px solid rgba(255,255,255,0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            padding: 10px 16px;
        }

        .brand-logo-box img {
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            object-fit: contain;
            display: block;
        }

        .brand-logo-fallback {
            font-family: 'Nunito', sans-serif;
            font-size: 32px;
            font-weight: 900;
            color: white;
            letter-spacing: 3px;
        }

        .brand-name {
            font-family: 'Outfit', sans-serif;
            font-size: 10px;
            font-weight: 600;
            color: rgba(255,255,255,0.55);
            letter-spacing: 0.3px;
            line-height: 1.5;
            max-width: 340px;
            margin-bottom: 10px;
            text-transform: uppercase;
        }

        .brand-sub {
            font-size: 11px;
            color: rgba(255,255,255,0.32);
            letter-spacing: 1.5px;
            text-transform: uppercase;
            margin-top: 2px;
        }

        /* Headline */
        .left-headline {
            animation: fadeUp 0.6s 0.2s ease both;
        }

        .eyebrow {
            font-size: 11px;
            font-weight: 700;
            color: rgba(232,160,32,0.85);
            text-transform: uppercase;
            letter-spacing: 2px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .eyebrow::before {
            content: '';
            display: inline-block;
            width: 20px; height: 2px;
            background: rgba(232,160,32,0.6);
            border-radius: 2px;
        }

        .headline {
            font-family: 'Outfit', sans-serif;
            font-size: 32px;
            font-weight: 800;
            color: white;
            line-height: 1.18;
            margin-bottom: 16px;
        }

        .headline .gold { color: #fc9401; }

        .headline-desc {
            font-size: 14px;
            color: rgba(255,255,255,0.5);
            line-height: 1.75;
            max-width: 347px;
            margin-bottom: 10px;
        }

        /* Features */
        .features {
            display: flex;
            flex-direction: column;
            gap: 8px;
            animation: fadeUp 0.6s 0.3s ease both;
        }

        .feature {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 9px 14px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 12px;
            transition: all 0.2s;
        }

        .feature:hover {
            background: rgba(255,255,255,0.09);
            border-color: rgba(232,160,32,0.2);
        }

        .feature-icon {
            width: 34px; height: 34px;
            border-radius: 9px;
            background: rgba(232,160,32,0.12);
            border: 1px solid rgba(232,160,32,0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fc9401;
            font-size: 13px;
            flex-shrink: 0;
        }

        .feature-title {
            font-size: 13px;
            font-weight: 700;
            color: rgba(255,255,255,0.85);
        }

        .feature-desc {
            font-size: 11px;
            color: rgba(255,255,255,0.36);
            margin-top: 2px;
        }

        /* Left footer */
        .left-footer {
            font-size: 11px;
            color: rgba(255,255,255,0.22);
            animation: fadeUp 0.6s 0.4s ease both;
            margin-top: 12px;
        }

        .left-footer a {
            color: rgba(232,160,32,0.5);
            text-decoration: none;
        }

        /* ============================
           RIGHT PANEL — FORM
        ============================ */
        .panel-right {
            flex: 1;
            background: white;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 28px 56px;
        }

        .form-wrap {
            width: 100%;
            max-width: 520px;
        }

        /* Card header */
        .form-header { margin-bottom: 14px; }

        .form-header-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 6px;
        }

        .form-title {
            font-family: 'Outfit', sans-serif;
            font-size: 28px;
            font-weight: 800;
            color: var(--primary);
        }

        .secure-badge {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 5px 11px;
            background: #EAF3E7;
            border: 1px solid #A0D0A0;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 700;
            color: var(--primary-mid);
        }

        .form-subtitle {
            font-size: 13.5px;
            color: var(--text-muted);
            line-height: 1.6;
            margin-bottom: 14px;
        }

        .form-divider {
            height: 3px;
            width: 44px;
            background: linear-gradient(90deg, var(--accent), #D4A94F);
            border-radius: 2px;
        }

        /* Fields */
        .login-form { display: flex; flex-direction: column; gap: 11px; }

        .field-label {
            display: block;
            font-size: 11.5px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 8px;
        }

        .field-wrap { position: relative; }

        .field-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-hint);
            font-size: 14px;
            pointer-events: none;
            transition: color 0.2s;
            z-index: 1;
        }

        .field-input {
            width: 100%;
            height: 50px;
            padding: 0 48px;
            border: 1.5px solid var(--border);
            border-radius: 12px;
            font-size: 14.5px;
            font-family: 'Nunito Sans', sans-serif;
            color: var(--text-dark);
            background: #F8FAFC;
            outline: none;
            transition: all 0.2s;
        }

        .field-input::placeholder { color: #C1CEDE; }

        .field-input:focus {
            border-color: var(--primary-mid);
            background: white;
            box-shadow: 0 0 0 3px rgba(26,77,184,0.1);
        }

        .field-input:focus ~ .field-icon { color: var(--primary-mid); }

        .field-toggle {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-hint);
            background: none;
            border: none;
            cursor: pointer;
            font-size: 14px;
            padding: 4px;
            transition: color 0.2s;
            z-index: 1;
        }

        .field-toggle:hover { color: var(--primary); }

        /* Options row */
        .field-options {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .remember {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            font-size: 13.5px;
            color: var(--text-muted);
            user-select: none;
        }

        .check-box {
            width: 18px; height: 18px;
            border-radius: 5px;
            border: 1.5px solid var(--border);
            background: white;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.2s;
        }

        .check-box.on {
            background: var(--primary-mid);
            border-color: var(--primary-mid);
            color: white;
        }

        .check-box i { font-size: 10px; }

        .forgot {
            font-size: 13.5px;
            font-weight: 700;
            color: var(--primary-mid);
            text-decoration: none;
            transition: color 0.2s;
        }

        .forgot:hover { color: var(--primary); }

        /* 2FA notice */
        .notice-2fa {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 10px 16px;
            background: var(--accent-light);
            border: 1px solid rgba(232,160,32,0.25);
            border-left: 3px solid var(--accent);
            border-radius: 12px;
        }

        .notice-icon {
            width: 32px; height: 32px;
            border-radius: 8px;
            background: rgba(232,160,32,0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--accent-dark);
            font-size: 13px;
            flex-shrink: 0;
        }

        .notice-title {
            font-size: 12.5px;
            font-weight: 700;
            color: #92400E;
            margin-bottom: 3px;
        }

        .notice-desc {
            font-size: 11.5px;
            color: #B45309;
            line-height: 1.5;
        }

        /* Error */
        .form-error {
            display: none;
            align-items: center;
            gap: 8px;
            padding: 12px 14px;
            background: #FEF2F2;
            border: 1px solid #FECACA;
            border-left: 3px solid var(--danger);
            border-radius: 10px;
            font-size: 13px;
            color: #991B1B;
        }

        .form-error.show { display: flex; }
        .form-error.info {
            background: #EFF6FF;
            border-color: #BFDBFE;
            border-left-color: #3B82F6;
            color: #1E40AF;
        }

        /* Submit */
        .btn-submit {
            width: 100%;
            height: 52px;
            border-radius: 14px;
            border: none;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
            color: white;
            font-size: 15px;
            font-weight: 700;
            font-family: 'Outfit', sans-serif;
            letter-spacing: 0.4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 4px 18px rgba(13,37,80,0.32), 0 1px 3px rgba(13,37,80,0.15);
            transition: all 0.25s;
            position: relative;
            overflow: hidden;
            margin-top: 4px;
        }

        .btn-submit::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
        }

        .btn-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 28px rgba(13,37,80,0.40), 0 2px 6px rgba(13,37,80,0.18);
        }

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

        .btn-submit.loading .btn-text,
        .btn-submit.loading .btn-icon { opacity: 0; }

        .btn-submit.loading::after {
            content: '';
            position: absolute;
            width: 22px; height: 22px;
            border: 2.5px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
        }

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

        .btn-icon { font-size: 14px; transition: transform 0.25s; position: relative; }
        .btn-text { position: relative; }
        .btn-submit:hover .btn-icon { transform: translateX(4px); }

        /* Footer */
        .form-footer {
            margin-top: 12px;
            padding-top: 10px;
            border-top: 1px solid var(--border);
            text-align: center;
        }

        .footer-note {
            font-size: 12px;
            color: var(--text-hint);
            line-height: 1.7;
            margin-bottom: 14px;
        }

        .footer-note a {
            color: var(--primary-mid);
            font-weight: 700;
            text-decoration: none;
        }

        .footer-note a:hover { text-decoration: underline; }

        .roles-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            flex-wrap: wrap;
        }

        .role-pill {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            border: 1px solid;
        }

        .r-dot { width: 6px; height: 6px; border-radius: 50%; }

        /* Responsive */
        @media (max-width: 820px) {
            .login-container { max-width: 440px; }
            .panel-left { display: none; }
            .panel-right { padding: 40px 36px; }
        }

        @media (max-width: 480px) {
            .panel-right { padding: 28px 22px; }
            .form-header-top { flex-direction: column; align-items: flex-start; gap: 10px; }
        }

        /* ============================
           MODAL — FORGOT PASSWORD
        ============================ */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(10,28,70,0.65);
            backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            padding: 20px;
        }
        .modal-overlay.show { opacity: 1; visibility: visible; }

        .modal-box {
            background: white;
            border-radius: 24px;
            width: 100%;
            max-width: 460px;
            box-shadow: 0 32px 80px rgba(0,0,0,0.28), 0 8px 24px rgba(0,0,0,0.12);
            transform: scale(0.90) translateY(20px);
            transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
            overflow: hidden;
            position: relative;
        }
        .modal-overlay.show .modal-box { transform: scale(1) translateY(0); }

        /* Modal header band */
        .modal-header-band {
            background: linear-gradient(135deg, #01491b 0%, #026325 100%);
            padding: 28px 32px 24px;
            position: relative;
            overflow: hidden;
        }
        .modal-header-band::before {
            content: '';
            position: absolute;
            width: 200px; height: 200px;
            border-radius: 50%;
            border: 1px solid rgba(255,255,255,0.06);
            top: -80px; right: -60px;
        }
        .modal-header-band::after {
            content: '';
            position: absolute;
            width: 120px; height: 120px;
            border-radius: 50%;
            border: 1px solid rgba(232,160,32,0.1);
            bottom: -40px; left: 40px;
        }

        .modal-close {
            position: absolute;
            top: 16px; right: 16px;
            width: 32px; height: 32px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.2);
            background: rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.2s;
            z-index: 1;
        }
        .modal-close:hover { background: rgba(239,68,68,0.8); border-color: transparent; color: white; }

        /* Steps indicator */
        .modal-steps {
            display: flex;
            align-items: center;
            gap: 0;
            margin-bottom: 20px;
            position: relative;
            z-index: 1;
        }
        .step-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .step-circle {
            width: 28px; height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 700;
            font-family: 'Outfit', sans-serif;
            transition: all 0.3s;
            flex-shrink: 0;
        }
        .step-circle.active { background: #fc9401; color: white; }
        .step-circle.done { background: #10B981; color: white; }
        .step-circle.idle { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.5); }
        .step-label {
            font-size: 11px;
            font-weight: 600;
            white-space: nowrap;
            transition: all 0.3s;
        }
        .step-label.active { color: white; }
        .step-label.done { color: rgba(255,255,255,0.6); }
        .step-label.idle { color: rgba(255,255,255,0.35); }
        .step-line {
            flex: 1;
            height: 1.5px;
            background: rgba(255,255,255,0.15);
            margin: 0 10px;
            min-width: 24px;
        }
        .step-line.done { background: rgba(16,185,129,0.6); }

        .modal-header-title {
            font-family: 'Outfit', sans-serif;
            font-size: 22px;
            font-weight: 800;
            color: white;
            margin-bottom: 6px;
            position: relative;
            z-index: 1;
        }
        .modal-header-sub {
            font-size: 13px;
            color: rgba(255,255,255,0.55);
            line-height: 1.5;
            position: relative;
            z-index: 1;
        }
        .modal-header-sub span { color: #fc9401; font-weight: 600; }

        /* Modal body */
        .modal-body { padding: 28px 32px 32px; }

        /* Step panels */
        .step-panel { display: none; }
        .step-panel.active { display: block; }

        /* Field inside modal */
        .modal-field { margin-bottom: 20px; }
        .modal-field-label {
            display: block;
            font-size: 11.5px;
            font-weight: 700;
            color: #475569;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 8px;
        }
        .modal-input {
            width: 100%;
            height: 50px;
            padding: 0 14px 0 44px;
            border: 1.5px solid #E2E8F0;
            border-radius: 12px;
            font-size: 14.5px;
            font-family: 'Nunito Sans', sans-serif;
            color: #1A202C;
            background: #F8FAFC;
            outline: none;
            transition: all 0.2s;
        }
        .modal-input:focus {
            border-color: #026325;
            background: white;
            box-shadow: 0 0 0 3px rgba(26,77,184,0.1);
        }
        .modal-input.error {
            border-color: #EF4444;
            box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
        }
        .modal-input-wrap { position: relative; }
        .modal-input-icon {
            position: absolute;
            left: 14px; top: 50%;
            transform: translateY(-50%);
            color: #94A3B8;
            font-size: 14px;
            pointer-events: none;
        }

        /* OTP inputs */
        .otp-wrap {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin: 8px 0 6px;
        }
        .otp-input {
            width: 52px; height: 60px;
            border: 2px solid #E2E8F0;
            border-radius: 14px;
            text-align: center;
            font-size: 24px;
            font-weight: 700;
            font-family: 'Outfit', sans-serif;
            color: #01491b;
            background: #F8FAFC;
            outline: none;
            transition: all 0.2s;
            caret-color: #026325;
        }
        .otp-input:focus {
            border-color: #026325;
            background: white;
            box-shadow: 0 0 0 3px rgba(26,77,184,0.12);
            transform: scale(1.05);
        }
        .otp-input.filled {
            border-color: #026325;
            background: #EAF3E7;
            color: #01491b;
        }
        .otp-input.error { border-color: #EF4444; background: #FEF2F2; }

        .otp-resend {
            text-align: center;
            font-size: 13px;
            color: #94A3B8;
            margin-top: 14px;
        }
        .otp-resend a {
            color: #026325;
            font-weight: 700;
            text-decoration: none;
            cursor: pointer;
        }
        .otp-resend a:hover { text-decoration: underline; }

        .otp-timer {
            color: #fc9401;
            font-weight: 700;
        }

        /* Password strength */
        .pwd-wrap { position: relative; }
        .pwd-toggle {
            position: absolute;
            right: 14px; top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: #94A3B8;
            cursor: pointer;
            font-size: 14px;
            transition: color 0.2s;
        }
        .pwd-toggle:hover { color: #01491b; }

        .strength-bar-wrap {
            display: flex;
            gap: 4px;
            margin-top: 8px;
        }
        .strength-seg {
            flex: 1;
            height: 4px;
            border-radius: 2px;
            background: #E2E8F0;
            transition: background 0.3s;
        }
        .strength-label {
            font-size: 11.5px;
            font-weight: 600;
            margin-top: 5px;
            height: 16px;
            transition: color 0.3s;
        }

        /* Criteria list */
        .criteria-list {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 6px;
            margin-top: 14px;
        }
        .criteria-item {
            display: flex;
            align-items: center;
            gap: 7px;
            font-size: 12px;
            color: #94A3B8;
            transition: color 0.2s;
        }
        .criteria-item.ok { color: #10B981; }
        .criteria-item.fail { color: #EF4444; }
        .criteria-dot {
            width: 16px; height: 16px;
            border-radius: 50%;
            border: 1.5px solid #E2E8F0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 8px;
            flex-shrink: 0;
            transition: all 0.2s;
        }
        .criteria-item.ok .criteria-dot { background: #D1FAE5; border-color: #10B981; color: #10B981; }
        .criteria-item.fail .criteria-dot { background: #FEE2E2; border-color: #EF4444; color: #EF4444; }

        /* Modal button */
        .modal-btn {
            width: 100%;
            height: 52px;
            border-radius: 14px;
            border: none;
            background: linear-gradient(135deg, #01491b 0%, #026325 100%);
            color: white;
            font-size: 15px;
            font-weight: 700;
            font-family: 'Outfit', sans-serif;
            letter-spacing: 0.3px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 4px 16px rgba(13,37,80,0.28);
            transition: all 0.25s;
            margin-top: 4px;
            position: relative;
            overflow: hidden;
        }
        .modal-btn::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
        }
        .modal-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(13,37,80,0.36); }
        .modal-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
        .modal-btn.loading::after {
            content: '';
            position: absolute;
            width: 20px; height: 20px;
            border: 2.5px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
        }
        .modal-btn.loading span, .modal-btn.loading i { opacity: 0; }

        /* Success state */
        .modal-success-state {
            display: none;
            flex-direction: column;
            align-items: center;
            text-align: center;
            padding: 40px 20px 20px;
        }
        .modal-success-state.show { display: flex; }
        .success-anim {
            width: 72px; height: 72px;
            border-radius: 50%;
            background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
            border: 2px solid #10B981;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            color: #10B981;
            margin-bottom: 20px;
            animation: popIn 0.4s cubic-bezier(0.16,1,0.3,1) both;
        }
        @keyframes popIn {
            from { transform: scale(0.5); opacity: 0; }
            to   { transform: scale(1);   opacity: 1; }
        }
        .success-big-title {
            font-family: 'Outfit', sans-serif;
            font-size: 22px;
            font-weight: 800;
            color: #01491b;
            margin-bottom: 10px;
        }
        .success-big-desc {
            font-size: 14px;
            color: #64748B;
            line-height: 1.65;
            margin-bottom: 24px;
            max-width: 300px;
        }
        .success-close-btn {
            padding: 12px 36px;
            border-radius: 12px;
            border: none;
            background: linear-gradient(135deg, #01491b, #026325);
            color: white;
            font-size: 14px;
            font-weight: 700;
            font-family: 'Outfit', sans-serif;
            cursor: pointer;
            box-shadow: 0 4px 14px rgba(13,37,80,0.25);
        }

        /* ============================
           MODAL 2FA
        ============================ */
        .modal-2fa-overlay {
            position: fixed;
            inset: 0;
            background: rgba(10,28,70,0.65);
            backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 3000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            padding: 20px;
        }
        .modal-2fa-overlay.show { opacity: 1; visibility: visible; }
        .modal-2fa-box {
            background: white;
            border-radius: 24px;
            width: 100%;
            max-width: 440px;
            box-shadow: 0 32px 80px rgba(0,0,0,0.28), 0 8px 24px rgba(0,0,0,0.12);
            transform: scale(0.90) translateY(20px);
            transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
            overflow: hidden;
        }
        .modal-2fa-overlay.show .modal-2fa-box { transform: scale(1) translateY(0); }

        .modal-2fa-header {
            background: linear-gradient(135deg, #01491b 0%, #026325 100%);
            padding: 32px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        .modal-2fa-header::before {
            content: '';
            position: absolute;
            width: 220px; height: 220px;
            border-radius: 50%;
            border: 1px solid rgba(255,255,255,0.06);
            top: -100px; right: -60px;
        }
        .modal-2fa-header::after {
            content: '';
            position: absolute;
            width: 140px; height: 140px;
            border-radius: 50%;
            border: 1px solid rgba(232,160,32,0.1);
            bottom: -60px; left: -30px;
        }
        .modal-2fa-icon-wrap {
            width: 64px; height: 64px;
            border-radius: 18px;
            background: rgba(232,160,32,0.15);
            border: 1.5px solid rgba(232,160,32,0.35);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 16px;
            position: relative;
            z-index: 1;
        }
        .modal-2fa-icon-wrap i {
            font-size: 26px;
            color: #fc9401;
        }
        .modal-2fa-title {
            font-family: 'Outfit', sans-serif;
            font-size: 22px;
            font-weight: 800;
            color: white;
            margin-bottom: 8px;
            position: relative;
            z-index: 1;
        }
        .modal-2fa-sub {
            font-size: 13px;
            color: rgba(255,255,255,0.55);
            line-height: 1.6;
            position: relative;
            z-index: 1;
        }
        .modal-2fa-sub span { color: #fc9401; font-weight: 600; }

        .modal-2fa-body {
            padding: 32px;
        }

        .otp-2fa-label {
            text-align: center;
            font-size: 13px;
            color: #64748B;
            margin-bottom: 20px;
            line-height: 1.6;
        }

        .otp-2fa-wrap {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin-bottom: 8px;
        }

        .otp-2fa-input {
            width: 54px; height: 64px;
            border: 2px solid #E2E8F0;
            border-radius: 14px;
            text-align: center;
            font-size: 26px;
            font-weight: 700;
            font-family: 'Outfit', sans-serif;
            color: #01491b;
            background: #F8FAFC;
            outline: none;
            transition: all 0.2s;
            caret-color: #026325;
        }
        .otp-2fa-input:focus {
            border-color: #026325;
            background: white;
            box-shadow: 0 0 0 3px rgba(26,77,184,0.12);
            transform: scale(1.06);
        }
        .otp-2fa-input.filled {
            border-color: #026325;
            background: #EAF3E7;
        }
        .otp-2fa-input.error {
            border-color: #EF4444;
            background: #FEF2F2;
            animation: shake 0.4s ease;
        }
        @keyframes shake {
            0%,100% { transform: translateX(0); }
            20%      { transform: translateX(-6px); }
            40%      { transform: translateX(6px); }
            60%      { transform: translateX(-4px); }
            80%      { transform: translateX(4px); }
        }

        .otp-2fa-resend {
            text-align: center;
            font-size: 13px;
            color: #94A3B8;
            margin: 14px 0 22px;
        }
        .otp-2fa-resend a {
            color: #026325;
            font-weight: 700;
            text-decoration: none;
            cursor: pointer;
        }
        .otp-2fa-timer { color: #fc9401; font-weight: 700; }

        .modal-2fa-btn {
            width: 100%;
            height: 52px;
            border-radius: 14px;
            border: none;
            background: linear-gradient(135deg, #01491b 0%, #026325 100%);
            color: white;
            font-size: 15px;
            font-weight: 700;
            font-family: 'Outfit', sans-serif;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 4px 16px rgba(13,37,80,0.28);
            transition: all 0.25s;
            position: relative;
            overflow: hidden;
        }
        .modal-2fa-btn::before {
            content: '';
            position: absolute; inset: 0;
            background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
        }
        .modal-2fa-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(13,37,80,0.36); }
        .modal-2fa-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
        .modal-2fa-btn.loading::after {
            content: '';
            position: absolute;
            width: 20px; height: 20px;
            border: 2.5px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
        }
        .modal-2fa-btn.loading span,
        .modal-2fa-btn.loading i { opacity: 0; }

        .modal-2fa-footer {
            text-align: center;
            margin-top: 14px;
            font-size: 12.5px;
            color: #94A3B8;
        }
        .modal-2fa-footer a {
            color: #EF4444;
            font-weight: 700;
            text-decoration: none;
            cursor: pointer;
        }
        .modal-2fa-footer a:hover { text-decoration: underline; }

        /* 2FA success flash */
        .tfa-success-flash {
            display: none;
            flex-direction: column;
            align-items: center;
            text-align: center;
            padding: 8px 0 12px;
        }
        .tfa-success-flash.show { display: flex; }
        .tfa-success-circle {
            width: 64px; height: 64px;
            border-radius: 50%;
            background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
            border: 2px solid #10B981;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 26px;
            color: #10B981;
            margin-bottom: 14px;
            animation: popIn 0.4s cubic-bezier(0.16,1,0.3,1) both;
        }
        .tfa-success-title {
            font-family: 'Outfit', sans-serif;
            font-size: 18px;
            font-weight: 800;
            color: #01491b;
            margin-bottom: 6px;
        }
        .tfa-success-desc {
            font-size: 13px;
            color: #64748B;
            line-height: 1.6;
        }

/* ============================================================
   LIGHTBOX — MODALE 2FA
   ============================================================ */
.lb-2fa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    overflow-y: auto;
    animation: lbOverlayFadeIn 0.25s ease both;
}

@keyframes lbOverlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.lb-2fa-box {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Animation d'entrée — léger rebond élastique */
@keyframes modalSlideIn {
    0%   { transform: scale(0.85) translateY(30px); opacity: 0; }
    60%  { transform: scale(1.02) translateY(-4px); opacity: 1; }
    80%  { transform: scale(0.99) translateY(2px); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
.lb-2fa-header {
    background: linear-gradient(135deg, #01491b 0%, #026325 100%);
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.lb-2fa-header::before {
    content: '';
    position: absolute;
    width: 220px; height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.06);
    top: -100px; right: -60px;
}
.lb-2fa-header::after {
    content: '';
    position: absolute;
    width: 140px; height: 140px;
    border-radius: 50%;
    border: 1px solid rgba(232,160,32,0.1);
    bottom: -60px; left: -30px;
}
.lb-2fa-icon-wrap {
    width: 64px; height: 64px;
    border-radius: 18px;
    background: rgba(232,160,32,0.15);
    border: 1.5px solid rgba(232,160,32,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    position: relative; z-index: 1;
}
.lb-2fa-icon-wrap i { font-size: 26px; color: #fc9401; }
.lb-2fa-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px; font-weight: 800;
    color: white; margin-bottom: 8px;
    position: relative; z-index: 1;
}
.lb-2fa-sub {
    font-size: 13px; color: rgba(255,255,255,0.55);
    line-height: 1.6; position: relative; z-index: 1;
}
.lb-2fa-sub span { color: #fc9401; font-weight: 600; }
.lb-2fa-body { padding: 32px; }
.lb-2fa-label { text-align: center; font-size: 13px; color: #64748B; margin-bottom: 20px; line-height: 1.6; }
.lb-otp-wrap { display: flex; gap: 10px; justify-content: center; margin-bottom: 8px; }
.lb-otp-input {
    width: 54px; height: 64px;
    border: 2px solid #E2E8F0; border-radius: 14px;
    text-align: center; font-size: 26px; font-weight: 700;
    font-family: 'Outfit', sans-serif; color: #01491b;
    background: #F8FAFC; outline: none;
    transition: all 0.2s; caret-color: #026325;
}
.lb-otp-input:focus {
    border-color: #026325; background: white;
    box-shadow: 0 0 0 3px rgba(26,77,184,0.12);
    transform: scale(1.06);
}
.lb-otp-input.filled { border-color: #026325; background: #EAF3E7; }
.lb-otp-input.error  { border-color: #EF4444; background: #FEF2F2; animation: shake 0.4s ease; }
@keyframes shake {
    0%,100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}
.lb-2fa-error {
    text-align: center; font-size: 12.5px; color: #EF4444; font-weight: 600;
    margin-top: 10px; padding: 8px 12px;
    background: #FEF2F2; border-radius: 8px; border: 1px solid #FECACA;
}
.lb-2fa-resend { text-align: center; font-size: 13px; color: #94A3B8; margin: 14px 0 22px; }
.lb-2fa-resend a { color: #026325; font-weight: 700; cursor: pointer; }
.lb-otp-timer { color: #fc9401; font-weight: 700; }
.lb-2fa-btn {
    width: 100%; height: 52px; border-radius: 14px; border: none;
    background: linear-gradient(135deg, #01491b 0%, #026325 100%);
    color: white; font-size: 15px; font-weight: 700;
    font-family: 'Outfit', sans-serif;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    cursor: pointer; position: relative; overflow: hidden;
    box-shadow: 0 4px 16px rgba(13,37,80,0.28);
    transition: all 0.25s;
}
.lb-2fa-btn::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
}
.lb-2fa-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(13,37,80,0.36); }
.lb-2fa-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.lb-2fa-btn.loading span, .lb-2fa-btn.loading i { opacity: 0; }
.lb-2fa-btn.loading::after {
    content: ''; position: absolute;
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: white; border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.lb-2fa-footer { text-align: center; margin-top: 14px; font-size: 12.5px; color: #94A3B8; }
.lb-2fa-footer a { color: #EF4444; font-weight: 700; cursor: pointer; }
.lb-tfa-success { display: none; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 12px; }
.lb-tfa-success.show { display: flex; }
.lb-success-circle {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    border: 2px solid #10B981;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: #10B981; margin-bottom: 14px;
    animation: popIn 0.4s cubic-bezier(0.16,1,0.3,1) both;
}
.lb-success-title { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 800; color: #01491b; margin-bottom: 6px; }
.lb-success-desc  { font-size: 13px; color: #64748B; line-height: 1.6; }

/* ============================================================
   LIGHTBOX — MODALE FORGOT PASSWORD
   ============================================================ */
.lb-forgot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    overflow-y: auto;
    animation: lbOverlayFadeIn 0.25s ease both;
}
.lb-forgot-box {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 32px 80px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.lb-forgot-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 13px; z-index: 1; transition: all 0.2s;
}
.lb-forgot-close:hover { background: rgba(239,68,68,0.8); border-color: transparent; color: white; }
.lb-forgot-header {
    background: linear-gradient(135deg, #01491b 0%, #026325 100%);
    padding: 28px 32px 24px;
    position: relative; overflow: hidden;
}
.lb-forgot-header::before {
    content: ''; position: absolute;
    width: 200px; height: 200px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.06);
    top: -80px; right: -60px;
}
.lb-forgot-header::after {
    content: ''; position: absolute;
    width: 120px; height: 120px; border-radius: 50%;
    border: 1px solid rgba(232,160,32,0.1);
    bottom: -40px; left: 40px;
}
.lb-steps { display: flex; align-items: center; margin-bottom: 20px; position: relative; z-index: 1; margin-top: 20px; }
.lb-step-item { display: flex; align-items: center; gap: 8px; }
.lb-step-circle {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; font-family: 'Outfit', sans-serif;
    transition: all 0.3s; flex-shrink: 0;
}
.lb-step-circle.active { background: #fc9401; color: white; }
.lb-step-circle.done   { background: #10B981; color: white; }
.lb-step-circle.idle   { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.5); }
.lb-step-label { font-size: 11px; font-weight: 600; white-space: nowrap; transition: all 0.3s; }
.lb-step-label.active { color: white; }
.lb-step-label.done   { color: rgba(255,255,255,0.6); }
.lb-step-label.idle   { color: rgba(255,255,255,0.35); }
.lb-step-line { flex: 1; height: 1.5px; background: rgba(255,255,255,0.15); margin: 0 10px; min-width: 24px; }
.lb-step-line.done { background: rgba(16,185,129,0.6); }
.lb-forgot-title {
    font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 800;
    color: white; margin-bottom: 6px; position: relative; z-index: 1;
}
.lb-forgot-sub {
    font-size: 13px; color: rgba(255,255,255,0.55);
    line-height: 1.5; position: relative; z-index: 1;
}
.lb-forgot-sub span { color: #fc9401; font-weight: 600; }
.lb-forgot-body { padding: 28px 32px 32px; }
.lb-step-panel { display: none; }
.lb-step-panel.active { display: block; }
.lb-field { margin-bottom: 20px; }
.lb-field-label {
    display: block; font-size: 11.5px; font-weight: 700;
    color: #475569; text-transform: uppercase;
    letter-spacing: 0.8px; margin-bottom: 8px;
}
.lb-input {
    width: 100%; height: 50px; padding: 0 14px 0 44px;
    border: 1.5px solid #E2E8F0; border-radius: 12px;
    font-size: 14.5px; font-family: 'Nunito Sans', sans-serif;
    color: #1A202C; background: #F8FAFC; outline: none; transition: all 0.2s;
}
.lb-input:focus { border-color: #026325; background: white; box-shadow: 0 0 0 3px rgba(26,77,184,0.1); }
.lb-input.error { border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }
.lb-input-wrap { position: relative; }
.lb-input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94A3B8; font-size: 14px; pointer-events: none; }
.lb-pwd-wrap { position: relative; }
.lb-pwd-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #94A3B8; cursor: pointer; font-size: 14px; }
.lb-otp-resend { text-align: center; font-size: 13px; color: #94A3B8; margin-top: 14px; }
.lb-otp-resend a { color: #026325; font-weight: 700; cursor: pointer; }
.lb-strength-wrap { display: flex; gap: 4px; margin-top: 8px; }
.lb-strength-seg { flex: 1; height: 4px; border-radius: 2px; background: #E2E8F0; transition: background 0.3s; }
.lb-strength-label { font-size: 11.5px; font-weight: 600; margin-top: 5px; height: 16px; }
.lb-criteria-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 14px; }
.criteria-item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #94A3B8; transition: color 0.2s; }
.criteria-item.ok { color: #10B981; }
.criteria-dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #E2E8F0; display: flex; align-items: center; justify-content: center; font-size: 8px; flex-shrink: 0; transition: all 0.2s; }
.criteria-item.ok .criteria-dot { background: #D1FAE5; border-color: #10B981; color: #10B981; }
.lb-btn {
    width: 100%; height: 52px; border-radius: 14px; border: none;
    background: linear-gradient(135deg, #01491b 0%, #026325 100%);
    color: white; font-size: 15px; font-weight: 700; font-family: 'Outfit', sans-serif;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    cursor: pointer; position: relative; overflow: hidden;
    box-shadow: 0 4px 16px rgba(13,37,80,0.28); transition: all 0.25s; margin-top: 4px;
}
.lb-btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%); }
.lb-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(13,37,80,0.36); }
.lb-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.lb-btn.loading span, .lb-btn.loading i { opacity: 0; }
.lb-btn.loading::after { content: ''; position: absolute; width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; }
.lb-btn-back {
    width: 100%; margin-top: 10px; padding: 10px; border-radius: 12px;
    border: 1.5px solid #E2E8F0; background: white; color: #64748B;
    font-size: 13px; font-weight: 600; font-family: 'Nunito Sans', sans-serif; cursor: pointer;
}
.lb-success-state { display: none; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px 20px; }
.lb-success-state.show { display: flex; }
.lb-success-anim {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    border: 2px solid #10B981;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #10B981; margin-bottom: 20px;
    animation: popIn 0.4s cubic-bezier(0.16,1,0.3,1) both;
}
.lb-success-big-title { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 800; color: #01491b; margin-bottom: 10px; }
.lb-success-big-desc  { font-size: 14px; color: #64748B; line-height: 1.65; margin-bottom: 24px; max-width: 300px; }
.lb-success-close {
    padding: 12px 36px; border-radius: 12px; border: none;
    background: linear-gradient(135deg, #01491b, #026325);
    color: white; font-size: 14px; font-weight: 700;
    font-family: 'Outfit', sans-serif; cursor: pointer;
    box-shadow: 0 4px 14px rgba(13,37,80,0.25);
}
