
/* ============================================
           3D LOGIN PAGE - PARTICLE DISSOLUTION & LIGHT ASSEMBLY
           ============================================ */

* {
    box-sizing: border-box;
}

/* Ensure a stable background from the very first paint */
html {
    background-color: var(--page-bg-immediate, #0b0b0f);
}

body {
    background: var(--auth-bg);
    background-color: var(--page-bg-immediate, #0b0b0f);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* While preloading, keep content hidden with a loading overlay */
html.auth-theme-preload body {
    opacity: 0;
}

/* Smooth fade-in when theme is ready */
body {
    transition: opacity 0.3s ease-in;
}

html:not(.auth-theme-preload) body {
    opacity: 1;
}

/* Avoid animations/transitions before theme variables are applied */
.auth-theme-preload *,
.auth-theme-preload *::before,
.auth-theme-preload *::after {
    transition: none !important;
    animation: none !important;
}

.login-scene {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1;
    overflow: hidden;
    perspective: 2000px;
}

/* Animated gradient orbs in background */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
    animation: orbFloat 20s ease-in-out infinite;
    pointer-events: none;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--auth-primary-gradient);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--auth-success-gradient);
    bottom: -150px;
    right: -150px;
    animation-delay: -10s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--pink-gradient);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
    opacity: 0.2;
}

@@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 50px) scale(0.95);
    }

    75% {
        transform: translate(40px, 30px) scale(1.05);
    }
}

/* ============================================
           3D CARD CONTAINER WITH PERSPECTIVE
           ============================================ */

.card-3d-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    perspective: 2000px;
}

/* Card Transitions - Fade and Scale */
.card-3d-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

    /* Parallax transform applied via JS */
    .card-3d-wrapper.parallax-active {
        will-change: transform;
    }

/* Glass Card */
.login-glass-card {
    position: relative;
    width: 100%;
    background: var(--auth-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 32px;
    border: 1px solid var(--auth-border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: box-shadow 0.5s ease, border-color 0.5s ease, opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: scale(1) translateY(0);
}

    .login-glass-card.dissolved {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
        pointer-events: none;
    }

    /* Depth layers for 3D effect - Top gradient border */
    .login-glass-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 5px;
        background: var(--auth-primary-gradient);
        border-radius: 32px 32px 0 0;
        transition: background 0.5s ease;
        z-index: 10;
    }

    .login-glass-card.surveyor-mode::before {
        background: var(--auth-success-gradient);
    }

    /* Floating shadow layer */
    .login-glass-card::after {
        content: '';
        position: absolute;
        top: 10px;
        left: 5%;
        right: 5%;
        bottom: -20px;
        background: var(--auth-primary-gradient);
        border-radius: 32px;
        filter: blur(30px);
        opacity: 0.3;
        z-index: -1;
        transform: translateZ(-50px);
        transition: background 0.5s ease, opacity 0.3s ease;
    }

    .login-glass-card.surveyor-mode::after {
        background: var(--auth-success-gradient);
    }

/* ============================================
           PARTICLE DISSOLUTION EFFECT CONTAINER
           ============================================ */

.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    contain: strict;
}

/* Card states during particle animation */
.login-glass-card.particle-hidden {
    opacity: 0 !important;
    pointer-events: none;
}

/* Card materializing state - blur to clarity */
.login-glass-card.materializing {
    opacity: 0;
    filter: blur(12px);
    transform: scale(0.99);
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), filter 1s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

    .login-glass-card.materializing.reveal {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }

/* ============================================
           CARD HEADER
           ============================================ */

.login-header {
    padding: 2.5rem 2.5rem 0;
    text-align: center;
    position: relative;
}

/* 3D Icon Container */
.login-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.login-icon {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    position: absolute;
    top: 0;
    left: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

    .login-icon.admin-icon {
        background: var(--auth-primary-gradient);
        box-shadow: 0 20px 40px -10px rgba(102, 126, 234, 0.5), 0 10px 20px -5px rgba(118, 75, 162, 0.3);
    }

    .login-icon.surveyor-icon {
        background: var(--auth-success-gradient);
        box-shadow: 0 20px 40px -10px rgba(86, 171, 47, 0.5), 0 10px 20px -5px rgba(168, 224, 99, 0.3);
    }

/* Icon Transition */
.login-icon-wrapper .admin-icon,
.login-icon-wrapper .surveyor-icon {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Pulsing glow ring */
.icon-glow-ring {
    position: absolute;
    inset: -12px;
    border-radius: 36px;
    border: 2px solid;
    opacity: 0.4;
    animation: glowPulse 2s ease-in-out infinite;
    pointer-events: none;
}

.admin-icon ~ .icon-glow-ring {
    border-color: #667eea;
}

.surveyor-icon ~ .icon-glow-ring {
    border-color: #56ab2f;
}

@@keyframes glowPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
        filter: blur(0px);
    }

    50% {
        transform: scale(1.15);
        opacity: 0.1;
        filter: blur(2px);
    }
}

/* Orbiting particles around icon */
.orbit-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: orbitParticle 4s linear infinite;
}

    .orbit-particle:nth-child(1) {
        animation-delay: 0s;
    }

    .orbit-particle:nth-child(2) {
        animation-delay: -1s;
    }

    .orbit-particle:nth-child(3) {
        animation-delay: -2s;
    }

    .orbit-particle:nth-child(4) {
        animation-delay: -3s;
    }

@@keyframes orbitParticle {
    0% {
        transform: rotate(0deg) translateX(55px) rotate(0deg);
        opacity: 0.8;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        transform: rotate(360deg) translateX(55px) rotate(-360deg);
        opacity: 0.8;
    }
}

/* Title with gradient */
.login-title {
    font-size: 2rem;
    font-weight: 800;
    background: var(--auth-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    transition: opacity 0.3s ease, background 0.5s ease;
}

.surveyor-mode .login-title {
    background: var(--auth-success-gradient);
    -webkit-background-clip: text;
    background-clip: text;
}

.login-subtitle {
    font-size: 0.95rem;
    color: var(--auth-muted-color);
    margin-bottom: 0;
    transition: opacity 0.3s ease;
}

/* ============================================
           TOGGLE SWITCH
           ============================================ */

.login-type-toggle {
    display: flex;
    background: var(--auth-input-bg);
    border-radius: 16px;
    padding: 6px;
    margin: 1.5rem 2.5rem;
    position: relative;
    border: 1px solid var(--auth-input-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 50;
}

.toggle-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--auth-muted-color);
    cursor: pointer;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 3;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.toggle-slider-bg {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    border-radius: 12px;
    background: var(--auth-primary-gradient);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1;
    pointer-events: none;
}

.toggle-option i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.toggle-option:hover:not(.active) {
    color: var(--auth-text-color);
}

.toggle-option:hover i {
    transform: scale(1.2) rotate(10deg);
}

.toggle-option.active {
    color: white;
}

.toggle-slider-bg.surveyor-active {
    left: calc(50%);
    background: var(--auth-success-gradient);
}

/* Form Section */
.login-form-section {
    padding: 0 2.5rem 2.5rem;
}

/* Enhanced Form Groups */
.form-group-enhanced {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-label-enhanced {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--auth-text-color);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

    .form-label-enhanced i {
        font-size: 0.9rem;
        opacity: 0.7;
    }

.input-wrapper {
    position: relative;
}

.form-input-enhanced {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 2px solid var(--auth-input-border);
    font-size: 1rem;
    background: var(--auth-input-bg);
    color: var(--auth-text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .form-input-enhanced:focus {
        outline: none;
        border-color: var(--auth-line-color);
        background: var(--auth-card-bg);
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    }

.surveyor-mode .form-input-enhanced:focus {
    border-color: #56ab2f;
    box-shadow: 0 0 0 4px rgba(86, 171, 47, 0.1);
}

.form-input-enhanced::placeholder {
    color: var(--auth-muted-color);
    opacity: 0.5;
}

/* Focus line animation */
.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--auth-primary-gradient);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 0 0 14px 14px;
}

.form-input-enhanced:focus ~ .input-focus-line {
    width: 100%;
}

.surveyor-mode .input-focus-line {
    background: var(--auth-success-gradient);
}

/* Remember Me */
.remember-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.custom-checkbox {
    position: relative;
    width: 22px;
    height: 22px;
}

    .custom-checkbox input {
        position: absolute;
        opacity: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
        z-index: 1;
    }

.checkbox-visual {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    border: 2px solid var(--auth-input-border);
    background: var(--auth-input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .checkbox-visual i {
        font-size: 0.75rem;
        color: white;
        opacity: 0;
        transform: scale(0);
        transition: all 0.2s ease;
    }

.custom-checkbox input:checked ~ .checkbox-visual {
    background: var(--auth-primary-gradient);
    border-color: transparent;
}

.surveyor-mode .custom-checkbox input:checked ~ .checkbox-visual {
    background: var(--auth-success-gradient);
}

.custom-checkbox input:checked ~ .checkbox-visual i {
    opacity: 1;
    transform: scale(1);
}

.remember-label {
    font-size: 0.875rem;
    color: var(--auth-muted-color);
    cursor: pointer;
    user-select: none;
}

/* Forgot Password Link */
.forgot-password-link:hover {
    opacity: 0.8;
    text-decoration: underline !important;
}

/* Submit Button */
.login-submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    background: var(--auth-primary-gradient);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -10px rgba(102, 126, 234, 0.5);
}

.surveyor-mode .login-submit-btn {
    background: var(--auth-success-gradient);
    box-shadow: 0 10px 30px -10px rgba(86, 171, 47, 0.5);
}

.login-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -15px rgba(102, 126, 234, 0.6);
}

.surveyor-mode .login-submit-btn:hover {
    box-shadow: 0 20px 40px -15px rgba(86, 171, 47, 0.6);
}

.login-submit-btn i {
    transition: transform 0.3s ease;
}

.login-submit-btn:hover i {
    transform: translateX(5px);
}

/* Button ripple effect */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Footer */
.login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--auth-border-color);
    margin-top: 0.5rem;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--auth-muted-color);
    margin-bottom: 0.5rem;
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    color: var(--auth-line-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

    .home-link:hover {
        background: rgba(102, 126, 234, 0.1);
        color: var(--auth-line-color);
    }

.surveyor-mode .home-link {
    color: #56ab2f;
}

    .surveyor-mode .home-link:hover {
        background: rgba(86, 171, 47, 0.1);
    }

/* Modern Alert */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin: 0 2.5rem 1rem;
    border-radius: 14px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    animation: alertSlide 0.3s ease;
}

@@keyframes alertSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .alert-icon-wrapper i {
        color: white;
        font-size: 1rem;
    }

.alert-content-wrapper {
    flex: 1;
}

.alert-title-text {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--auth-text-color);
    margin-bottom: 0.25rem;
}

.alert-message-text {
    font-size: 0.85rem;
    color: var(--auth-muted-color);
    line-height: 1.4;
}

.alert-close-btn {
    background: none;
    border: none;
    color: var(--auth-muted-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

    .alert-close-btn:hover {
        background: rgba(0, 0, 0, 0.1);
    }

/* ============================================
                   FORM PANEL PARTICLE TRANSITIONS
                   ============================================ */

.login-form-wrapper {
    position: relative;
    min-height: 320px;
}

.form-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: none;
}

    .form-panel.active {
        position: relative;
        opacity: 1;
        pointer-events: auto;
    }

    /* Dissolving into particles effect */
    .form-panel.dissolving {
        animation: particleDissolve 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    /* Assembling from particles effect */
    .form-panel.assembling {
        animation: particleAssemble 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        animation-delay: 0.3s;
    }

@@keyframes particleDissolve {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }

    30% {
        opacity: 0.8;
        transform: scale(1.01) translateY(-5px);
        filter: blur(1px);
    }

    60% {
        opacity: 0.4;
        transform: scale(1.02) translateY(-10px);
        filter: blur(4px);
    }

    100% {
        opacity: 0;
        transform: scale(1.05) translateY(-20px);
        filter: blur(12px);
    }
}

@@keyframes particleAssemble {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
        filter: blur(12px);
    }

    40% {
        opacity: 0.4;
        transform: scale(0.98) translateY(10px);
        filter: blur(4px);
    }

    70% {
        opacity: 0.8;
        transform: scale(0.99) translateY(5px);
        filter: blur(1px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* Staggered element assembly for extra smoothness */
.form-panel.assembling .form-group-enhanced,
.form-panel.assembling .remember-wrapper,
.form-panel.assembling .login-submit-btn,
.form-panel.assembling .login-footer {
    opacity: 0;
    animation: elementMaterialize 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

    .form-panel.assembling .form-group-enhanced:nth-child(2) {
        animation-delay: 0.4s;
    }

    .form-panel.assembling .form-group-enhanced:nth-child(3) {
        animation-delay: 0.5s;
    }

.form-panel.assembling .remember-wrapper {
    animation-delay: 0.6s;
}

.form-panel.assembling .login-submit-btn {
    animation-delay: 0.7s;
}

.form-panel.assembling .login-footer {
    animation-delay: 0.8s;
}

@@keyframes elementMaterialize {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.97);
        filter: blur(4px);
    }

    60% {
        filter: blur(1px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* ============================================
                   RESPONSIVE
                   ============================================ */

@@media (max-width: 576px) {
    .login-scene {
        padding: 1rem;
        padding-top: 5rem;
    }

    .login-glass-card {
        border-radius: 24px;
    }

    .login-header {
        padding: 2rem 1.5rem 0;
    }

    .login-type-toggle {
        margin: 1.5rem 1.5rem;
    }

    .login-form-section {
        padding: 0 1.5rem 2rem;
    }

    .login-alert {
        margin: 0 1.5rem 1rem;
    }

    .toggle-option {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

        .toggle-option span {
            display: none;
        }

        .toggle-option i {
            font-size: 1.25rem;
        }

    .login-icon-wrapper {
        width: 80px;
        height: 80px;
    }

    .login-icon {
        font-size: 2rem;
        border-radius: 22px;
    }
}

/* Reduce motion for accessibility */
@@media (prefers-reduced-motion: reduce) {
    .card-3d-wrapper,
    .form-panel,
    .login-icon,
    .orb {
        animation: none !important;
        transition: opacity 0.3s ease !important;
    }
}

/* Back button override */
.back-to-home-btn {
    top: 1.5rem;
    left: 1.5rem;
}

/* Hide the old toggle container */
.login-toggle-container {
    display: none !important;
}



/* ============================================
                   2FA MODAL - THEME-AWARE & MOBILE RESPONSIVE
                   ============================================ */

/* Modal Dialog */
.twofa-modal-dialog {
    max-width: 480px;
    margin: 1.75rem auto;
}

/* Modal Content */
.twofa-modal-content {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border-color);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

/* Modal Header */
.twofa-modal-header {
    background: var(--auth-primary-gradient);
    color: white;
    border-bottom: none;
    padding: 2rem;
    position: relative;
}

    .twofa-modal-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at top right, rgba(255,255,255,0.2), transparent 60%);
        pointer-events: none;
    }

/* Icon Wrapper */
.twofa-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

    .twofa-icon-wrapper i {
        font-size: 2rem;
    }

    .twofa-icon-wrapper:hover {
        transform: scale(1.05);
        box-shadow: 0 12px 28px rgba(0,0,0,0.3);
    }

/* Modal Title */
.twofa-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
}

.twofa-modal-subtitle {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Modal Body */
.twofa-modal-body {
    padding: 2rem;
    background: var(--auth-card-bg);
}

/* Message Box */
.twofa-message {
    border-radius: 12px;
    background: var(--auth-info-bg, rgba(102, 126, 234, 0.1));
    border: 1px solid var(--auth-info-border, rgba(102, 126, 234, 0.3));
    color: var(--auth-text-primary);
    padding: 1rem;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Form Group */
.twofa-form-group {
    margin-bottom: 1.5rem;
}

/* Label */
.twofa-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--auth-text-primary);
    font-size: 0.95rem;
}

/* Code Input */
.twofa-code-input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    font-family: 'Courier New', monospace;
    padding: 1rem;
    background: var(--auth-input-bg, rgba(255,255,255,0.05));
    border: 2px solid var(--auth-border-color);
    color: var(--auth-text-primary);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
}

    .twofa-code-input:focus {
        outline: none;
        border-color: var(--auth-line-color);
        box-shadow: 0 0 0 4px var(--auth-focus-shadow, rgba(102, 126, 234, 0.1));
        background: var(--auth-input-focus-bg, rgba(255,255,255,0.08));
    }

    .twofa-code-input::placeholder {
        color: var(--auth-text-tertiary, rgba(255,255,255,0.3));
        letter-spacing: 0.5rem;
    }

/* Helper Text */
.twofa-helper-text {
    color: var(--auth-text-secondary);
    margin-top: 0.5rem;
    display: block;
    font-size: 0.875rem;
}

/* Error Alert */
.twofa-error {
    border-radius: 12px;
    margin-bottom: 0;
    background: var(--auth-danger-bg, rgba(220, 53, 69, 0.1));
    border: 1px solid var(--auth-danger-border, rgba(220, 53, 69, 0.3));
    color: var(--auth-danger-text, #dc3545);
    padding: 1rem;
}

/* Modal Footer */
.twofa-modal-footer {
    border-top: 1px solid var(--auth-border-color);
    padding: 1.5rem 2rem;
    gap: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    background: var(--auth-card-bg);
    justify-content: center;
}

/* Button Row - Primary actions */
.twofa-btn-row-primary {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

/* Base Button Styles */
.twofa-btn-cancel,
.twofa-btn-resend,
.twofa-btn-verify {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.twofa-btn-cancel i,
.twofa-btn-resend i,
.twofa-btn-verify i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

/* Cancel Button */
.twofa-btn-cancel {
    flex: 0 1 auto;
    min-width: 100px;
    background: var(--auth-secondary-bg, rgba(108, 117, 125, 0.15));
    border: 2px solid var(--auth-border-color);
    color: var(--auth-text-primary, #6c757d);
}

    .twofa-btn-cancel:hover {
        background: var(--auth-secondary-hover-bg, rgba(108, 117, 125, 0.25));
        border-color: var(--auth-line-color);
        color: var(--auth-text-primary);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }

    .twofa-btn-cancel:hover i {
        transform: rotate(90deg);
    }

    .twofa-btn-cancel:active {
        transform: translateY(0);
    }

/* Resend Button */
.twofa-btn-resend {
    flex: 1 1 auto;
    min-width: 140px;
    background: transparent;
    border: 2px solid var(--auth-line-color, rgba(102, 126, 234, 0.5));
    color: var(--auth-line-color, #667eea);
}

    .twofa-btn-resend::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--auth-line-color, #667eea);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: -1;
    }

    .twofa-btn-resend:hover {
        color: white;
        border-color: var(--auth-line-color, #667eea);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
    }

    .twofa-btn-resend:hover::before {
        opacity: 1;
    }

    .twofa-btn-resend:hover i {
        transform: translateX(3px);
    }

    .twofa-btn-resend:active {
        transform: translateY(0);
    }

    .twofa-btn-resend:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

/* Verify Button */
.twofa-btn-verify {
    flex: 2 1 auto;
    min-width: 160px;
    background: var(--auth-primary-gradient);
    border: none;
    color: white;
    box-shadow: 0 4px 15px var(--auth-primary-shadow, rgba(102, 126, 234, 0.35));
}

    .twofa-btn-verify::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
        transition: left 0.5s ease;
    }

    .twofa-btn-verify:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px var(--auth-primary-shadow, rgba(102, 126, 234, 0.45));
        color: white;
    }

        .twofa-btn-verify:hover::before {
            left: 100%;
        }

    .twofa-btn-verify:hover i {
        transform: scale(1.15);
    }

    .twofa-btn-verify:active {
        transform: translateY(-1px);
    }

    .twofa-btn-verify:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

    .twofa-btn-verify:disabled:hover {
        transform: none;
        box-shadow: none;
    }

    .twofa-btn-verify:disabled:hover::before {
        left: -100%;
    }

/* ============================================
                   MOBILE RESPONSIVE STYLES
                   ============================================ */

@@media (max-width: 768px) {
    .twofa-modal-dialog {
        max-width: calc(100% - 2rem);
        margin: 1rem;
    }

    .twofa-modal-content {
        border-radius: 20px;
    }

    .twofa-modal-header {
        padding: 1.5rem 1rem;
    }

    .twofa-icon-wrapper {
        width: 70px;
        height: 70px;
    }

        .twofa-icon-wrapper i {
            font-size: 1.75rem;
        }

    .twofa-modal-title {
        font-size: 1.25rem;
    }

    .twofa-modal-subtitle {
        font-size: 0.85rem;
    }

    .twofa-modal-body {
        padding: 1.5rem 1rem;
    }

    .twofa-code-input {
        font-size: 1.25rem;
        letter-spacing: 0.4rem;
        padding: 0.875rem;
    }

    .twofa-modal-footer {
        padding: 1.25rem 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.625rem;
    }

    /* Tablet: Cancel small, Resend and Verify share row */
    .twofa-btn-cancel {
        flex: 0 0 auto;
        width: auto;
        min-width: 90px;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .twofa-btn-resend {
        flex: 1 1 auto;
        min-width: 120px;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .twofa-btn-verify {
        flex: 1 1 100%;
        width: 100%;
        padding: 1rem;
        font-size: 0.95rem;
        order: 3;
        margin-top: 0.25rem;
    }
}


@@media (max-width: 480px) {
    .twofa-modal-dialog {
        max-width: calc(100% - 1rem);
        margin: 0.5rem;
    }

    .twofa-modal-content {
        border-radius: 16px;
    }

    .twofa-modal-header {
        padding: 1.25rem 0.875rem;
    }

    .twofa-icon-wrapper {
        width: 60px;
        height: 60px;
    }

        .twofa-icon-wrapper i {
            font-size: 1.5rem;
        }

    .twofa-modal-title {
        font-size: 1.1rem;
    }

    .twofa-modal-subtitle {
        font-size: 0.8rem;
    }

    .twofa-modal-body {
        padding: 1.25rem 0.875rem;
    }

    .twofa-code-input {
        font-size: 1.15rem;
        letter-spacing: 0.35rem;
        padding: 0.75rem;
    }

    .twofa-message,
    .twofa-error {
        font-size: 0.85rem;
        padding: 0.875rem;
    }

    .twofa-helper-text {
        font-size: 0.8rem;
    }

    .twofa-modal-footer {
        padding: 1rem 0.875rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Mobile: Stack all buttons vertically */
    .twofa-btn-verify {
        order: 1;
        width: 100%;
        flex: 1 1 100%;
        padding: 1rem;
        font-size: 0.95rem;
        margin-top: 0;
    }

    .twofa-btn-resend {
        order: 2;
        width: 100%;
        flex: 1 1 100%;
        padding: 0.875rem;
        font-size: 0.875rem;
    }

    .twofa-btn-cancel {
        order: 3;
        width: 100%;
        flex: 1 1 100%;
        padding: 0.75rem;
        font-size: 0.85rem;
        background: transparent;
        border: none;
        color: var(--auth-muted-color, #6c757d);
    }

    .twofa-btn-cancel:hover {
        background: rgba(108, 117, 125, 0.1);
        border: none;
        box-shadow: none;
        transform: none;
    }
}

/* ============================================
                   THEME-SPECIFIC ENHANCEMENTS
                   ============================================ */

/* Dark themes */
[data-theme="neo3d"] .twofa-modal-content,
[data-theme="sakura"] .twofa-modal-content,
[data-theme="forest"] .twofa-modal-content,
[data-theme="arcade"] .twofa-modal-content,
[data-theme="christmas"] .twofa-modal-content,
[data-theme="newyear"] .twofa-modal-content,
[data-theme="cyberpunk"] .twofa-modal-content {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Clean theme - lighter shadow */
[data-theme="clean"] .twofa-modal-content {
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Gold theme - warmer tones */
[data-theme="gold"] .twofa-icon-wrapper {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(218, 165, 32, 0.2));
}

/* Sakura theme - pink accents */
[data-theme="sakura"] .twofa-icon-wrapper {
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.2), rgba(219, 112, 147, 0.2));
}

/* Forest theme - green accents */
[data-theme="forest"] .twofa-icon-wrapper {
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.2), rgba(0, 128, 0, 0.2));
}

/* Christmas theme - red/green */
[data-theme="christmas"] .twofa-icon-wrapper {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), rgba(0, 128, 0, 0.2));
}

/* Cyberpunk theme - cyan/purple */
[data-theme="cyberpunk"] .twofa-icon-wrapper {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 255, 0.2));
}

/* Animation for modal entrance */
.modal.fade .twofa-modal-dialog {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: scale(0.9) translateY(-20px);
}

.modal.show .twofa-modal-dialog {
    transform: scale(1) translateY(0);
}

/* Pulse animation for icon on modal show */
@@keyframes twofa-icon-pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.modal.show .twofa-icon-wrapper {
    animation: twofa-icon-pulse 0.6s ease-out;
}

/* Loading state for buttons */
.twofa-btn-verify:disabled,
.twofa-btn-cancel:disabled {
    pointer-events: none;
}

/* Focus visible for accessibility */
.twofa-code-input:focus-visible {
    outline: 2px solid var(--auth-line-color);
    outline-offset: 2px;
}

.twofa-btn-cancel:focus-visible,
.twofa-btn-verify:focus-visible {
    outline: 2px solid var(--auth-line-color);
    outline-offset: 2px;
}

/* Touch device enhancements */
@@media (hover: none) and (pointer: coarse) {
    .twofa-btn-cancel,
    .twofa-btn-verify {
        min-height: 48px;
    }

    .twofa-code-input {
        min-height: 56px;
        font-size: 1.25rem;
    }
}

/* ============================================
                   ENHANCED NEO3D THEME STYLING
                   ============================================ */

/* Neo3D - Extra 3D effects and better text contrast */
[data-auth-theme="neo3d"] .twofa-modal-content {
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15), inset 0 2px 0 rgba(255, 255, 255, 0.2), inset 0 -2px 10px rgba(0, 0, 0, 0.3);
    transform: translateZ(0);
}

[data-auth-theme="neo3d"] .twofa-modal-header {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-auth-theme="neo3d"] .twofa-modal-title,
[data-auth-theme="neo3d"] .twofa-modal-subtitle {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

[data-auth-theme="neo3d"] .twofa-icon-wrapper {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.15));
}

[data-auth-theme="neo3d"] .twofa-label {
    color: #e0e0e0;
    font-weight: 600;
}

[data-auth-theme="neo3d"] .twofa-code-input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

    [data-auth-theme="neo3d"] .twofa-code-input::placeholder {
        color: rgba(255, 255, 255, 0.4);
    }

    [data-auth-theme="neo3d"] .twofa-code-input:focus {
        background: rgba(255, 255, 255, 0.12);
        border-color: var(--auth-line-color);
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.2);
    }

[data-auth-theme="neo3d"] .twofa-helper-text {
    color: rgba(255, 255, 255, 0.7);
}

[data-auth-theme="neo3d"] .twofa-message {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
    color: #e0e0e0;
}

[data-auth-theme="neo3d"] .twofa-btn-cancel {
    background: rgba(108, 117, 125, 0.25);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

    [data-auth-theme="neo3d"] .twofa-btn-cancel:hover {
        background: rgba(108, 117, 125, 0.35);
        border-color: var(--auth-line-color);
        color: #ffffff;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }

[data-auth-theme="neo3d"] .twofa-btn-resend {
    background: transparent;
    border: 2px solid rgba(34, 211, 238, 0.5);
    color: #22d3ee;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

    [data-auth-theme="neo3d"] .twofa-btn-resend::before {
        background: linear-gradient(135deg, #8b5cf6, #22d3ee);
    }

    [data-auth-theme="neo3d"] .twofa-btn-resend:hover {
        border-color: #22d3ee;
        color: #ffffff;
        box-shadow: 0 4px 15px rgba(34, 211, 238, 0.3);
    }

[data-auth-theme="neo3d"] .twofa-btn-verify {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

    [data-auth-theme="neo3d"] .twofa-btn-verify:hover {
        color: #ffffff !important;
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    }

/* Other dark themes - ensure good text contrast */
[data-auth-theme="sakura"] .twofa-modal-title,
[data-auth-theme="sakura"] .twofa-modal-subtitle,
[data-auth-theme="forest"] .twofa-modal-title,
[data-auth-theme="forest"] .twofa-modal-subtitle,
[data-auth-theme="arcade"] .twofa-modal-title,
[data-auth-theme="arcade"] .twofa-modal-subtitle,
[data-auth-theme="christmas"] .twofa-modal-title,
[data-auth-theme="christmas"] .twofa-modal-subtitle,
[data-auth-theme="cyberpunk"] .twofa-modal-title,
[data-auth-theme="cyberpunk"] .twofa-modal-subtitle {
    color: #ffffff;
}

[data-auth-theme="sakura"] .twofa-label,
[data-auth-theme="forest"] .twofa-label,
[data-auth-theme="arcade"] .twofa-label,
[data-auth-theme="christmas"] .twofa-label,
[data-auth-theme="cyberpunk"] .twofa-label {
    color: #e0e0e0;
}

[data-auth-theme="sakura"] .twofa-code-input,
[data-auth-theme="forest"] .twofa-code-input,
[data-auth-theme="arcade"] .twofa-code-input,
[data-auth-theme="christmas"] .twofa-code-input,
[data-auth-theme="cyberpunk"] .twofa-code-input {
    color: #ffffff;
}

[data-auth-theme="sakura"] .twofa-btn-cancel,
[data-auth-theme="forest"] .twofa-btn-cancel,
[data-auth-theme="arcade"] .twofa-btn-cancel,
[data-auth-theme="christmas"] .twofa-btn-cancel,
[data-auth-theme="cyberpunk"] .twofa-btn-cancel {
    color: #ffffff;
}

[data-auth-theme="sakura"] .twofa-btn-resend,
[data-auth-theme="forest"] .twofa-btn-resend,
[data-auth-theme="arcade"] .twofa-btn-resend,
[data-auth-theme="christmas"] .twofa-btn-resend,
[data-auth-theme="cyberpunk"] .twofa-btn-resend {
    color: var(--auth-line-color, #ffffff);
    border-color: var(--auth-line-color, rgba(255,255,255,0.4));
}

[data-auth-theme="sakura"] .twofa-btn-resend:hover,
[data-auth-theme="forest"] .twofa-btn-resend:hover,
[data-auth-theme="arcade"] .twofa-btn-resend:hover,
[data-auth-theme="christmas"] .twofa-btn-resend:hover,
[data-auth-theme="cyberpunk"] .twofa-btn-resend:hover {
    color: #ffffff;
}

[data-auth-theme="sakura"] .twofa-btn-verify,
[data-auth-theme="forest"] .twofa-btn-verify,
[data-auth-theme="arcade"] .twofa-btn-verify,
[data-auth-theme="christmas"] .twofa-btn-verify,
[data-auth-theme="cyberpunk"] .twofa-btn-verify {
    color: #ffffff !important;
}

/* ============================================
   CLEAN THEME - Light Background with Blue Accents
   ============================================ */

[data-auth-theme="clean"] .twofa-modal-content {
    background: #ffffff !important;
    border: 1px solid rgba(37, 99, 235, 0.2) !important;
    box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.15), 0 0 0 1px rgba(37, 99, 235, 0.1);
}

[data-auth-theme="clean"] .twofa-modal-header {
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%) !important;
}

[data-auth-theme="clean"] .twofa-modal-body {
    background: #ffffff !important;
}

[data-auth-theme="clean"] .twofa-label {
    color: #0f172a !important;
}

[data-auth-theme="clean"] .twofa-label i {
    color: #2563eb !important;
}

[data-auth-theme="clean"] .twofa-code-input {
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

[data-auth-theme="clean"] .twofa-code-input::placeholder {
    color: rgba(15, 23, 42, 0.4) !important;
    -webkit-text-fill-color: rgba(15, 23, 42, 0.4) !important;
}

[data-auth-theme="clean"] .twofa-code-input:focus {
    background: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15) !important;
    color: #0f172a !important;
}

[data-auth-theme="clean"] .twofa-helper-text {
    color: rgba(15, 23, 42, 0.65) !important;
}

[data-auth-theme="clean"] .twofa-message {
    background: rgba(37, 99, 235, 0.1) !important;
    border: 1px solid rgba(37, 99, 235, 0.3) !important;
    color: #0f172a !important;
}

[data-auth-theme="clean"] .twofa-error {
    background: rgba(220, 53, 69, 0.1) !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
    color: #dc3545 !important;
}

[data-auth-theme="clean"] .twofa-modal-footer {
    background: #ffffff !important;
    border-top: 1px solid rgba(37, 99, 235, 0.15) !important;
}

[data-auth-theme="clean"] .twofa-btn-cancel {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    color: #0f172a !important;
}

[data-auth-theme="clean"] .twofa-btn-cancel:hover {
    background: #e9ecef !important;
    border-color: #2563eb !important;
    color: #0f172a !important;
}

[data-auth-theme="clean"] .twofa-btn-resend {
    background: transparent !important;
    border: 1px solid #2563eb !important;
    color: #2563eb !important;
}

[data-auth-theme="clean"] .twofa-btn-resend:hover {
    background: rgba(37, 99, 235, 0.1) !important;
    color: #2563eb !important;
}

[data-auth-theme="clean"] .twofa-btn-verify {
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3) !important;
}

[data-auth-theme="clean"] .twofa-btn-verify:hover {
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4) !important;
    color: #ffffff !important;
}

/* ============================================
   GOLD THEME - Light Background with Gold Accents
   ============================================ */

[data-auth-theme="gold"] .twofa-modal-content {
    background: #ffffff !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    box-shadow: 0 25px 50px -12px rgba(212, 175, 55, 0.2), 0 0 0 1px rgba(212, 175, 55, 0.15);
}

[data-auth-theme="gold"] .twofa-modal-header {
    background: linear-gradient(135deg, #7c5c1a 0%, #d4af37 50%, #f5d76e 100%) !important;
}

[data-auth-theme="gold"] .twofa-modal-body {
    background: #ffffff !important;
}

[data-auth-theme="gold"] .twofa-label {
    color: #111827 !important;
}

[data-auth-theme="gold"] .twofa-label i {
    color: #d4af37 !important;
}

[data-auth-theme="gold"] .twofa-code-input {
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}

[data-auth-theme="gold"] .twofa-code-input::placeholder {
    color: rgba(17, 24, 39, 0.4) !important;
    -webkit-text-fill-color: rgba(17, 24, 39, 0.4) !important;
}

[data-auth-theme="gold"] .twofa-code-input:focus {
    background: #ffffff !important;
    border-color: #d4af37 !important;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15) !important;
    color: #111827 !important;
}

[data-auth-theme="gold"] .twofa-helper-text {
    color: rgba(17, 24, 39, 0.65) !important;
}

[data-auth-theme="gold"] .twofa-message {
    background: rgba(212, 175, 55, 0.1) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    color: #111827 !important;
}

[data-auth-theme="gold"] .twofa-error {
    background: rgba(220, 53, 69, 0.1) !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
    color: #dc3545 !important;
}

[data-auth-theme="gold"] .twofa-modal-footer {
    background: #ffffff !important;
    border-top: 1px solid rgba(212, 175, 55, 0.2) !important;
}

[data-auth-theme="gold"] .twofa-btn-cancel {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    color: #111827 !important;
}

[data-auth-theme="gold"] .twofa-btn-cancel:hover {
    background: #e9ecef !important;
    border-color: #d4af37 !important;
    color: #111827 !important;
}

[data-auth-theme="gold"] .twofa-btn-resend {
    background: transparent !important;
    border: 1px solid #d4af37 !important;
    color: #7c5c1a !important;
}

[data-auth-theme="gold"] .twofa-btn-resend:hover {
    background: rgba(212, 175, 55, 0.1) !important;
    color: #7c5c1a !important;
}

[data-auth-theme="gold"] .twofa-btn-verify {
    background: linear-gradient(135deg, #7c5c1a 0%, #d4af37 50%, #f5d76e 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4) !important;
}

[data-auth-theme="gold"] .twofa-btn-verify:hover {
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5) !important;
    color: #ffffff !important;
}

/* ============================================
   SAKURA THEME - Dark Pink Background
   ============================================ */

[data-auth-theme="sakura"] .twofa-modal-content {
    background: rgba(26, 10, 18, 0.98) !important;
    border: 1px solid rgba(255, 105, 180, 0.35) !important;
    box-shadow: 0 25px 50px -12px rgba(255, 20, 147, 0.4), 0 0 0 1px rgba(255, 105, 180, 0.2);
}

[data-auth-theme="sakura"] .twofa-modal-header {
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 50%, #da70d6 100%) !important;
}

[data-auth-theme="sakura"] .twofa-modal-body {
    background: rgba(26, 10, 18, 0.98) !important;
}

[data-auth-theme="sakura"] .twofa-label {
    color: #fff0f5 !important;
}

[data-auth-theme="sakura"] .twofa-label i {
    color: #ff69b4 !important;
}

[data-auth-theme="sakura"] .twofa-code-input {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 2px solid rgba(255, 105, 180, 0.4) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

[data-auth-theme="sakura"] .twofa-code-input::placeholder {
    color: rgba(255, 240, 245, 0.5) !important;
    -webkit-text-fill-color: rgba(255, 240, 245, 0.5) !important;
}

[data-auth-theme="sakura"] .twofa-code-input:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: #ff69b4 !important;
    box-shadow: 0 0 0 4px rgba(255, 20, 147, 0.25) !important;
    color: #ffffff !important;
}

[data-auth-theme="sakura"] .twofa-helper-text {
    color: rgba(255, 240, 245, 0.7) !important;
}

[data-auth-theme="sakura"] .twofa-message {
    background: rgba(255, 20, 147, 0.15) !important;
    border: 1px solid rgba(255, 105, 180, 0.4) !important;
    color: #fff0f5 !important;
}

[data-auth-theme="sakura"] .twofa-error {
    background: rgba(220, 53, 69, 0.2) !important;
    border: 1px solid rgba(220, 53, 69, 0.4) !important;
    color: #ff6b9d !important;
}

[data-auth-theme="sakura"] .twofa-modal-footer {
    background: rgba(26, 10, 18, 0.98) !important;
    border-top: 1px solid rgba(255, 105, 180, 0.25) !important;
}

[data-auth-theme="sakura"] .twofa-btn-cancel {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 105, 180, 0.4) !important;
    color: #ff69b4 !important;
}

[data-auth-theme="sakura"] .twofa-btn-cancel:hover {
    background: rgba(255, 20, 147, 0.2) !important;
    border-color: #ff1493 !important;
    color: #fff0f5 !important;
}

[data-auth-theme="sakura"] .twofa-btn-resend {
    background: transparent !important;
    border: 1px solid rgba(255, 105, 180, 0.5) !important;
    color: #ff69b4 !important;
}

[data-auth-theme="sakura"] .twofa-btn-resend:hover {
    background: rgba(255, 20, 147, 0.15) !important;
    color: #fff0f5 !important;
}

[data-auth-theme="sakura"] .twofa-btn-verify {
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.5) !important;
}

[data-auth-theme="sakura"] .twofa-btn-verify:hover {
    box-shadow: 0 8px 25px rgba(255, 20, 147, 0.6) !important;
    color: #ffffff !important;
}

/* ============================================
   FOREST THEME - Dark Green Background
   ============================================ */

[data-auth-theme="forest"] .twofa-modal-content {
    background: rgba(10, 26, 15, 0.98) !important;
    border: 1px solid rgba(34, 197, 94, 0.35) !important;
    box-shadow: 0 25px 50px -12px rgba(34, 197, 94, 0.3), 0 0 0 1px rgba(34, 197, 94, 0.2);
}

[data-auth-theme="forest"] .twofa-modal-header {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 50%, #84cc16 100%) !important;
}

[data-auth-theme="forest"] .twofa-modal-body {
    background: rgba(10, 26, 15, 0.98) !important;
}

[data-auth-theme="forest"] .twofa-label {
    color: #e8f5e9 !important;
}

[data-auth-theme="forest"] .twofa-label i {
    color: #22c55e !important;
}

[data-auth-theme="forest"] .twofa-code-input {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 2px solid rgba(34, 197, 94, 0.4) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

[data-auth-theme="forest"] .twofa-code-input::placeholder {
    color: rgba(232, 245, 233, 0.5) !important;
    -webkit-text-fill-color: rgba(232, 245, 233, 0.5) !important;
}

[data-auth-theme="forest"] .twofa-code-input:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25) !important;
    color: #ffffff !important;
}

[data-auth-theme="forest"] .twofa-helper-text {
    color: rgba(232, 245, 233, 0.7) !important;
}

[data-auth-theme="forest"] .twofa-message {
    background: rgba(34, 197, 94, 0.15) !important;
    border: 1px solid rgba(34, 197, 94, 0.4) !important;
    color: #e8f5e9 !important;
}

[data-auth-theme="forest"] .twofa-error {
    background: rgba(220, 53, 69, 0.2) !important;
    border: 1px solid rgba(220, 53, 69, 0.4) !important;
    color: #ff6b6b !important;
}

[data-auth-theme="forest"] .twofa-modal-footer {
    background: rgba(10, 26, 15, 0.98) !important;
    border-top: 1px solid rgba(34, 197, 94, 0.25) !important;
}

[data-auth-theme="forest"] .twofa-btn-cancel {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(34, 197, 94, 0.4) !important;
    color: #22c55e !important;
}

[data-auth-theme="forest"] .twofa-btn-cancel:hover {
    background: rgba(34, 197, 94, 0.2) !important;
    border-color: #22c55e !important;
    color: #e8f5e9 !important;
}

[data-auth-theme="forest"] .twofa-btn-resend {
    background: transparent !important;
    border: 1px solid rgba(34, 197, 94, 0.5) !important;
    color: #22c55e !important;
}

[data-auth-theme="forest"] .twofa-btn-resend:hover {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #e8f5e9 !important;
}

[data-auth-theme="forest"] .twofa-btn-verify {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.5) !important;
}

[data-auth-theme="forest"] .twofa-btn-verify:hover {
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.6) !important;
    color: #ffffff !important;
}
