/* Custom Login Styles */
body.login {
    background: #fff;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
}

#login {
    padding-top: 50px;
    width: 600px;
    max-width: 90%;
}
.login h1 a {
    background-size: contain;
    width: 320px;
    height: 120px;
}

.login form {
    /* border-radius: 8px; */
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); */
    box-shadow: none;
    border: none;
    border: 1px solid #c3c4c7;
}

.login .button-primary {
    background: #0073aa;
    border-color: #0073aa;
    border-radius: 4px;
    transition: all 0.3s ease;
    float: none;
}

.login .button-primary:hover {
    background: #005177;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

#verify-totp-form {
    margin: 10px 0;
    padding: 10px;
}

/* Two Factor specific styles */
.two-factor-prompt {
    margin-bottom: 16px;
    padding: 12px;
    background: #f1f1f1;
    border-left: 4px solid #0073aa;
}

/* Enhanced Two-Factor Setup Styles */
.two-factor-setup-container { 
    max-width: 500px; 
    margin: 0 auto; 
    padding: 20px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.setup-progress { 
    background: linear-gradient(135deg, #f0f0f1 0%, #e8e9ea 100%);
    padding: 15px 20px; 
    margin-bottom: 25px; 
    border-left: 4px solid #0073aa;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
}

.setup-step { 
    margin-bottom: 25px; 
    padding: 25px; 
    background: #f9f9f9; 
    border-radius: 8px; 
    border-left: 4px solid #0073aa;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.setup-step.completed { 
    border-left-color: #00a32a; 
    background: linear-gradient(135deg, #f7fcf7 0%, #eef8ee 100%);
    animation: completePulse 0.6s ease-out;
    display: none;
}

@keyframes completePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.setup-step h3 { 
    margin: 0 0 15px 0; 
    color: #1d2327; 
    font-size: 18px;
    font-weight: 600;
}

.qr-code-container { 
    text-align: center; 
    margin: 25px 0; 
    padding: 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.qr-code-container:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 16px rgba(0, 115, 170, 0.1);
}

.secret-key { 
    font-family: 'Courier New', Consolas, Monaco, monospace; 
    font-size: 13px; 
    background: linear-gradient(135deg, #f6f7f7 0%, #edeef0 100%);
    padding: 12px 16px; 
    border: 1px solid #c3c4c7; 
    border-radius: 6px;
    margin: 20px 0; 
    word-break: break-all;
    color: #1d2327;
    letter-spacing: 1px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    display: inline-block
}

.verification-form {
    background: #fff;
    padding: 25px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.verification-input { 
    font-size: 28px; 
    letter-spacing: 4px; 
    text-align: center; 
    width: 220px; 
    padding: 15px;
    border: 3px solid #8c8f94;
    border-radius: 8px;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    transition: all 0.3s ease;
    background: #fafafa;
}

.verification-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2);
    outline: none;
    background: #fff;
    transform: scale(1.02);
}

.backup-codes { 
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    padding: 25px; 
    border: 2px solid #e1e5e9; 
    border-radius: 8px; 
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.backup-codes-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
    margin: 20px 0;
}

.backup-code { 
    padding: 12px 16px; 
    background: linear-gradient(135deg, #f6f7f7 0%, #edeef0 100%);
    text-align: center; 
    font-family: 'Courier New', Consolas, Monaco, monospace; 
    font-size: 14px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.backup-code:hover {
    background: linear-gradient(135deg, #edeef0 0%, #e1e5e9 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.setup-actions { 
    text-align: center; 
    margin: 30px 0;
}

.button { 
    margin: 8px;
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.button-primary {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    border-color: #2271b1;
    color: #fff;
}

.button-primary:hover {
    background: linear-gradient(135deg, #135e96 0%, #0f4a7a 100%);
    border-color: #135e96;
}

.button-large {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
}

.success-message { 
    color: #00a32a; 
    font-weight: 600;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f0f6fc 0%, #e8f4f8 100%);
    border-left: 4px solid #00a32a;
    margin: 20px 0;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 2px 8px rgba(0, 163, 42, 0.1);
    animation: slideIn 0.5s ease-out;
}

.error-message { 
    color: #d63638; 
    font-weight: 600;
    padding: 15px 20px;
    background: linear-gradient(135deg, #fcf0f1 0%, #f8e6e7 100%);
    border-left: 4px solid #d63638;
    margin: 20px 0;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 2px 8px rgba(214, 54, 56, 0.1);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

.instructions { 
    line-height: 1.7; 
    color: #50575e;
    margin: 20px 0;
    font-size: 15px;
}

.instructions ul {
    margin-left: 25px;
}

.instructions li {
    margin: 8px 0;
    padding-left: 5px;
}

.security-notice { 
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #f0d500; 
    padding: 20px 25px; 
    border-radius: 8px; 
    margin-bottom: 30px;
    border-left: 6px solid #f0d500;
    box-shadow: 0 4px 16px rgba(240, 213, 0, 0.15);
}

.security-notice h4 { 
    margin: 0 0 12px 0; 
    color: #996800;
    font-size: 16px;
    font-weight: 700;
}

.hidden { 
    display: none !important; 
}

/* Loading animations */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .two-factor-setup-container {
        margin: 10px;
        padding: 15px;
    }
    
    .backup-codes-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .verification-input {
        width: 100%;
        max-width: 220px;
        font-size: 24px;
    }
    
    .setup-step {
        padding: 20px;
    }
    
    .button {
        display: block;
        width: 100%;
        margin: 8px 0;
    }
}

@media (max-width: 480px) {
    .verification-input {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    .secret-key {
        font-size: 11px;
        padding: 10px;
    }
    
    .setup-step h3 {
        font-size: 16px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .two-factor-setup-container {
        background: #2c3338;
        border-color: #50575e;
    }
    
    .setup-step {
        background: #3c434a;
    }
    
    .setup-step h3 {
        color: #f0f0f1;
    }
    
    .instructions {
        color: #b2b9c0;
    }    
    
    .backup-codes {
        background: #2c3338;
        border-color: #50575e;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .setup-step,
    .button,
    .verification-input,
    .backup-code {
        transition: none;
    }
    
    .success-message,
    .error-message {
        animation: none;
    }
    
    .loading::after {
        animation: none;
    }
}


