/* 2FA Setup Page Styles */
body.qcc-auth .auth-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.qcc-auth .auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

body.qcc-auth .auth-background-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e2f49 0%, #F85647 100%);
}

body.qcc-auth .auth-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 47, 73, 0.8);
}

body.qcc-auth .auth-container {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    padding: 2rem 0;
}

/* Auth Card */
body.qcc-auth .auth-card {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

body.qcc-auth .auth-card-body {
    padding: 3rem 2.5rem;
}

/* Security Badge */
body.qcc-auth .setup-2fa-security-badge {
    margin-bottom: 2rem;
}

body.qcc-auth .security-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #F85647 0%, #e74536 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(248, 86, 71, 0.3);
}

body.qcc-auth .security-title {
    color: #1e2f49;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

body.qcc-auth .security-subtitle {
    font-size: 1rem;
    line-height: 1.5;
}

/* Wizard Progress */
body.qcc-auth .wizard-progress {
    margin-bottom: 3rem;
}

body.qcc-auth .wizard-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    position: relative;
}

body.qcc-auth .wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

body.qcc-auth .wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

body.qcc-auth .step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

body.qcc-auth .step-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-align: center;
    transition: color 0.3s ease;
}

body.qcc-auth .wizard-step.active .step-circle {
    background: #F85647;
    color: white;
}

body.qcc-auth .wizard-step.active .step-label {
    color: #F85647;
    font-weight: 600;
}

body.qcc-auth .wizard-step.completed .step-circle {
    background: #28a745;
    color: white;
}

body.qcc-auth .wizard-step.completed .step-label {
    color: #28a745;
}

body.qcc-auth .step-check {
    font-size: 0.75rem;
}

/* Step Content */
body.qcc-auth .wizard-content {
    min-height: 400px;
}

body.qcc-auth .step-header {
    margin-bottom: 2rem;
}

body.qcc-auth .step-title {
    color: #1e2f49;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

body.qcc-auth .step-description {
    font-size: 1rem;
    line-height: 1.5;
}

/* App Options */
body.qcc-auth .app-options {
    margin-bottom: 2rem;
}

body.qcc-auth .app-option {
    border: 2px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
}

body.qcc-auth .app-option:hover {
    border-color: #F85647;
    box-shadow: 0 4px 15px rgba(248, 86, 71, 0.1);
}

body.qcc-auth .app-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: #6c757d;
}

body.qcc-auth .app-name {
    color: #1e2f49;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

body.qcc-auth .app-description {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

body.qcc-auth .app-links .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
}

/* QR Code Section */
body.qcc-auth .qr-code-section {
    text-align: center;
}

body.qcc-auth .qr-code-container {
    max-width: 500px;
    margin: 0 auto;
}

body.qcc-auth .qr-code-display {
    position: relative;
    margin-bottom: 2rem;
}

body.qcc-auth .qr-code-image {
    width: 200px;
    height: 200px;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    margin: 0 auto;
    display: block;
}

body.qcc-auth .qr-code-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body.qcc-auth .instruction-list {
    text-align: left;
    padding-left: 1rem;
}

body.qcc-auth .instruction-list li {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #495057;
}

body.qcc-auth .manual-setup-content {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

body.qcc-auth .manual-code {
    text-align: left;
}

/* Code Input */
body.qcc-auth .code-input-container {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 0 auto 1rem;
}

body.qcc-auth .code-input {
    width: 3rem;
    height: 3rem;
    border: 2px solid #ced4da;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    background: #fff;
    transition: all 0.3s ease;
}

body.qcc-auth .code-input:focus {
    outline: none;
    border-color: #F85647;
    box-shadow: 0 0 0 3px rgba(248, 86, 71, 0.1);
    transform: scale(1.05);
}

body.qcc-auth .code-input.is-invalid {
    border-color: #dc3545;
    animation: shake 0.5s ease-in-out;
}

body.qcc-auth .code-input:not(:placeholder-shown) {
    border-color: #28a745;
    color: #1e2f49;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Backup Codes */
body.qcc-auth .backup-codes-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

body.qcc-auth .backup-codes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

body.qcc-auth .backup-code-item {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
}

body.qcc-auth .backup-code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #1e2f49;
    background: transparent;
    border: none;
}

body.qcc-auth .copy-code {
    padding: 0.25rem;
    font-size: 0.75rem;
    color: #6c757d;
}

body.qcc-auth .copy-code:hover {
    color: #F85647;
}

/* Form Elements */
body.qcc-auth .btn-primary {
    background-color: #F85647;
    border-color: #F85647;
    font-weight: 500;
    padding: 0.75rem 2rem;
}

body.qcc-auth .btn-primary:hover {
    background-color: #e74536;
    border-color: #e74536;
}

body.qcc-auth .btn-primary:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
}

body.qcc-auth .btn-success {
    font-weight: 500;
    padding: 0.75rem 2rem;
}

/* Step Actions */
body.qcc-auth .step-actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Progress Actions */
body.qcc-auth .progress-actions {
    opacity: 0.7;
}

body.qcc-auth .progress-actions .btn-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.875rem;
}

body.qcc-auth .progress-actions .btn-link:hover {
    color: #F85647;
}

/* Success Modal */
body.qcc-auth .success-icon {
    font-size: 4rem;
    color: #28a745;
}

body.qcc-auth .modal-title {
    color: #1e2f49;
    font-weight: 600;
}

/* Loading Overlay */
body.qcc-auth .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

body.qcc-auth .loading-spinner {
    text-align: center;
}

body.qcc-auth .loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    body.qcc-auth .auth-card-body {
        padding: 2rem 1.5rem;
    }

    body.qcc-auth .security-title {
        font-size: 1.5rem;
    }

    body.qcc-auth .wizard-steps {
        gap: 1rem;
    }

    body.qcc-auth .wizard-steps::before {
        left: 10%;
        right: 10%;
    }

    body.qcc-auth .step-label {
        font-size: 0.7rem;
    }

    body.qcc-auth .code-input {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    body.qcc-auth .code-input-container {
        gap: 0.5rem;
    }

    body.qcc-auth .qr-code-image,
    body.qcc-auth .qr-code-overlay {
        width: 150px;
        height: 150px;
    }

    body.qcc-auth .backup-codes-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    body.qcc-auth .auth-card-body {
        padding: 1.5rem 1rem;
    }

    body.qcc-auth .app-option {
        padding: 1rem;
    }

    body.qcc-auth .app-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    body.qcc-auth .step-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    body.qcc-auth .step-actions .btn {
        width: 100%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    body.qcc-auth .step-circle,
    body.qcc-auth .code-input,
    body.qcc-auth .app-option,
    body.qcc-auth .auth-card {
        transition: none;
    }

    body.qcc-auth .code-input:focus {
        transform: none;
    }

    body.qcc-auth .code-input.is-invalid {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    body.qcc-auth .auth-card {
        border: 2px solid #000;
    }

    body.qcc-auth .code-input {
        border-width: 3px;
    }

    body.qcc-auth .security-icon {
        border: 2px solid #fff;
    }

    body.qcc-auth .backup-code-item {
        border-width: 2px;
    }
}