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

        :root {
            --primary: #4361ee;
            --secondary: #3f37c9;
            --accent: #4895ef;
            --success: #4cc9f0;
            --dark: #1e293b;
            --light: #f8fafc;
            --gray: #64748b;
            --danger: #f72585;
            --gradient-bg: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            --gradient-btn: linear-gradient(90deg, var(--primary), var(--accent));
            --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
            --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
            --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
            --border-radius: 16px;
            --orbit-size: 120px;
        }

        body.signin-page {
            font-family: 'Inter', sans-serif;
            background: var(--gradient-bg);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
            position: relative;
            overflow: hidden;
            color: var(--dark);
        }

        body.signin-page::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
            z-index: -1;
            animation: rotate 25s linear infinite;
        }

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

        .container {
            width: 100%;
            max-width: 420px;
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(12px);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-lg);
            overflow: hidden;
            position: relative;
            z-index: 10;
            transition: var(--transition);
        }

        .logo {
            text-align: center;
            padding: 35px 20px 25px;
            position: relative;
            margin-bottom: 10px;
        }

        .logo-orbit {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: var(--orbit-size);
            height: var(--orbit-size);
            border: 2px solid rgba(67, 97, 238, 0.2);
            border-radius: 50%;
            animation: orbit 15s linear infinite;
            z-index: -1;
        }

        .logo-orbit::before {
            content: '';
            position: absolute;
            top: 5px;
            right: 5px;
            width: 12px;
            height: 12px;
            background: var(--primary);
            border-radius: 50%;
            box-shadow: 0 0 10px var(--primary);
        }

        @keyframes orbit {
            0% { transform: translate(-50%, -50%) rotate(0deg); }
            100% { transform: translate(-50%, -50%) rotate(360deg); }
        }

        .app-logo {
            width: 60px;
            height: 60px;
            margin: 0 auto 15px;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            border-radius: 16px;
            display: flex;
            justify-content: center;
            align-items: center;
            box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
            position: relative;
            z-index: 2;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4); }
            70% { box-shadow: 0 0 0 10px rgba(67, 97, 238, 0); }
            100% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0); }
        }

        .app-logo svg {
            width: 32px;
            height: 32px;
            fill: white;
        }

        .logo h1 {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--dark);
            margin-top: 8px;
            background: linear-gradient(to right, var(--primary), var(--accent));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            letter-spacing: -0.5px;
        }

        .wrapper {
            padding: 30px;
            position: relative;
            min-height: 380px;
            transition: opacity 0.5s ease, transform 0.5s ease;
        }

        .wrapper:not(.active) {
            position: absolute;
            width: 100%;
            opacity: 0;
            pointer-events: none;
            transform: translateY(20px);
        }

        .wrapper.active {
            opacity: 1;
            pointer-events: all;
            transform: translateY(0);
            position: relative;
            z-index: 10;
        }

        form h2 {
            font-size: 1.75rem;
            font-weight: 700;
            margin-bottom: 30px;
            text-align: center;
            color: var(--dark);
            position: relative;
            display: inline-block;
            left: 50%;
            transform: translateX(-50%);
        }

        form h2::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 50px;
            height: 4px;
            background: var(--gradient-btn);
            border-radius: 2px;
        }

        form h1 {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 10px;
            text-align: center;
            color: var(--dark);
        }

        form p {
            text-align: center;
            color: var(--primary);
            margin-bottom: 25px;
            font-weight: 500;
        }

        .input-box {
            position: relative;
            margin-bottom: 25px;
            height: 50px;
        }

        .input-box .happy {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 18px;
            color: var(--gray);
            z-index: 2;
            width: 20px;
            display: flex;
            justify-content: center;
            transition: var(--transition);
        }

        .input-box .happy svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }

        .input-box .joy {
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.85);
            border: 1px solid rgba(0, 0, 0, 0.08);
            border-radius: 12px;
            padding: 0 20px 0 45px;
            font-family: 'Inter', sans-serif;
            font-size: 16px;
            color: var(--dark);
            transition: var(--transition);
            box-shadow: var(--shadow-sm);
        }

        .input-box .joy:focus {
            outline: none;
            border-color: rgba(67, 97, 238, 0.3);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
        }

        .input-box .joy:focus + .happy,
        .input-box .joy:not(:placeholder-shown) + .happy {
            color: var(--primary);
        }

        .remember-forget {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 15px 0 25px;
            font-size: 14px;
        }

        .remember-forget label {
            display: flex;
            align-items: center;
            cursor: pointer;
            color: var(--gray);
        }

        .remember-forget input[type="checkbox"] {
            margin-right: 8px;
            width: 16px;
            height: 16px;
            cursor: pointer;
            accent-color: var(--primary);
        }

        .remember-forget a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 500;
            transition: var(--transition);
            position: relative;
            padding-bottom: 2px;
        }

        .remember-forget a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 1.5px;
            background: var(--primary);
            transition: var(--transition);
        }

        .remember-forget a:hover::after {
            width: 100%;
        }

        .btn {
            width: 100%;
            padding: 14px;
            border: none;
            border-radius: 50px;
            background: var(--gradient-btn);
            color: white;
            font-family: 'Inter', sans-serif;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
            position: relative;
            overflow: hidden;
            margin-top: 5px;
        }

        .btn::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.7s;
        }

        .btn:hover::after {
            left: 100%;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(67, 97, 238, 0.55);
        }

        .btn:active {
            transform: translateY(1px);
        }

        .bottom-nav {
            display: flex;
            justify-content: space-between;
            margin-top: 25px;
            padding-top: 20px;
            border-top: 1px solid rgba(0, 0, 0, 0.08);
        }

        .nav-item {
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
            font-size: 15px;
            padding: 8px 15px;
            border-radius: 50px;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            flex: 1;
            margin: 0 5px;
            text-align: center;
            position: relative;
        }

        .nav-item.active {
            background: rgba(67, 97, 238, 0.1);
            color: var(--primary);
            box-shadow: 0 4px 10px rgba(67, 97, 238, 0.15);
        }

        .nav-item:hover:not(.active) {
            background: rgba(0, 0, 0, 0.03);
            transform: translateY(-1px);
        }

        .nav-item svg {
            width: 18px;
            height: 18px;
            margin-right: 6px;
            fill: currentColor;
        }

        .particles {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: -1;
        }

        .particle {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.6);
            animation: float 15s infinite linear;
        }

        @keyframes float {
            0% {
                transform: translateY(0) translateX(0) rotate(0deg);
                opacity: 1;
            }
            100% {
                transform: translateY(-100vh) translateX(100px) rotate(720deg);
                opacity: 0;
            }
        }

        @media (max-width: 480px) {
            .container {
                margin: 15px;
                border-radius: 20px;
            }
            
            .logo {
                padding: 25px 15px 20px;
            }
            
            .logo h1 {
                font-size: 1.6rem;
            }
            
            .wrapper {
                padding: 25px 20px;
            }
            
            form h2 {
                font-size: 1.6rem;
            }
            
            .input-box {
                height: 48px;
            }
            
            .btn {
                padding: 13px;
            }
            
            .bottom-nav {
                flex-direction: column;
                gap: 12px;
                align-items: center;
            }
            
            .nav-item {
                width: 100%;
                max-width: 250px;
            }
        }

/* Spinner inside buttons */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ================= MODAL OVERLAY ================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

/* Show */
.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}


/* ================= MODAL CARD ================= */
.modal-card {
    background: #ffffff;
    border-radius: 14px;
     padding: 32px 28px;
    width: 100%;
    max-width: 420px;
    text-align: center;

    box-shadow:
        0 -10px 40px rgba(0, 0, 0, 0.15);

    transform: translateY(100%);
    opacity: 1;
    transition:
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Slide-up app motion */
.modal-overlay.show .modal-card {
    transform: translateY(0);
}

/* ================= DRAG INDICATOR ================= */
.modal-card::before {
    content: "";
    width: 42px;
    height: 4px;
    background: #cbd5f5;
    border-radius: 999px;
    display: block;
    margin: 0 auto 18px;
}

/* ================= ICON ================= */
.modal-icon {
    width: 58px;
    height: 58px;
    margin: 4px auto 16px;
    color: #16a34a;
    animation: popIcon 0.4s ease-out;
}

.modal-icon svg {
    width: 100%;
    height: 100%;
}

/* ================= TEXT ================= */
.modal-card h2 {
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.modal-card p {
    font-size: 14.5px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 22px;
}

/* ================= BUTTON ================= */
.modal-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #1558B0, #2563eb);
    color: #fff;
    cursor: pointer;
    transition:
        transform 0.12s ease,
        box-shadow 0.2s ease;
}

.modal-btn:active {
    transform: scale(0.97);
    box-shadow: 0 10px 25px rgba(21, 88, 176, 0.35);
}

/* ================= CLOSE BUTTON ================= */
.close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 1.3rem;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: #0f172a;
}

/* ================= ERROR VARIANT ================= */
.modal-card.error .modal-icon {
    color: #dc2626;
}

.modal-card.error .modal-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* 2FA Verification Styles */
.verify-subtitle {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 24px;
    text-align: center;
}

.code-input-box input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.code-timer {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(67, 97, 238, 0.05);
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--gray);
    transition: all 0.3s ease;
}

.code-timer.active {
    display: flex;
}

.code-timer.warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning);
}

.code-timer svg {
    flex-shrink: 0;
}

.code-timer strong {
    color: var(--primary);
    font-weight: 700;
}

.code-timer.warning strong {
    color: var(--warning);
}

.verify-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.verify-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
}

.verify-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.divider-dot {
    color: var(--light-gray);
    font-size: 1.2rem;
}

.back-to-login {
    margin-top: 24px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--dark);
    padding: 12px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
    color: white;
    border-color: transparent;
}

.toast.error {
    background: var(--danger);
    color: white;
    border-color: transparent;
}

.toast.warning {
    background: var(--warning);
    color: white;
    border-color: transparent;
}

/* Spinner for loading states */
.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;
}

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

/* Responsive adjustments */
@media (max-width: 480px) {
    .code-input-box input {
        font-size: 1.3rem;
        letter-spacing: 0.3rem;
    }
    
    .verify-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .divider-dot {
        display: none;
    }
}
