/* Authentication Pages Styles */

/* Auth page layout */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1a1a2e;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.auth-logo .logo-icon {
    font-size: 1.5rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px 0;
}

.auth-header p {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
}

/* Form styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.form-group input::placeholder {
    color: #aaa;
}

/* Password input with toggle */
.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    flex: 1;
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 1.25rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.password-toggle:hover {
    opacity: 1;
}

/* Password strength indicator */
.password-strength {
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-meter {
    height: 100%;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
    border-radius: 2px;
}

.password-strength-meter.weak {
    background: #f44336;
}

.password-strength-meter.medium {
    background: #ff9800;
}

.password-strength-meter.strong {
    background: #4CAF50;
}

.password-strength-text {
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
}

/* Form row */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Links */
.text-link {
    color: #4CAF50;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.text-link:hover {
    color: #388E3C;
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #388E3C;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

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

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-full {
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 2px solid #4CAF50;
    color: #4CAF50;
}

.btn-outline:hover {
    background: #4CAF50;
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Error/Success messages */
.form-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    border: 1px solid #ef9a9a;
}

.form-error.success,
.form-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #a5d6a7;
}

/* Auth footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.auth-footer p {
    color: #666;
    font-size: 0.875rem;
    margin: 0;
}

.auth-footer a {
    color: #4CAF50;
    font-weight: 600;
    text-decoration: none;
}

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

/* MFA section */
.mfa-header {
    text-align: center;
    margin-bottom: 24px;
}

.mfa-header h2 {
    font-size: 1.25rem;
    color: #1a1a2e;
    margin: 0 0 8px 0;
}

.mfa-header p {
    color: #666;
    margin: 0;
    font-size: 0.875rem;
}

.mfa-options {
    text-align: center;
    margin-top: 16px;
}

.mfa-code-input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 8px;
    font-family: monospace;
}

/* Verification status */
.verification-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.verification-status.pending {
    background: #fff3e0;
    color: #e65100;
}

.verification-status.verified {
    background: #e8f5e9;
    color: #2e7d32;
}

.verification-status .status-icon {
    font-size: 1.5rem;
}

/* Info box */
.info-box {
    background: #e3f2fd;
    color: #1565c0;
    padding: 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    border: 1px solid #90caf9;
    margin-bottom: 20px;
}

.info-box.warning {
    background: #fff3e0;
    color: #e65100;
    border-color: #ffcc80;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    color: #999;
    font-size: 0.875rem;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 24px;
}

.back-link:hover {
    color: #4CAF50;
}

/* Loading state */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 24px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Settings specific styles */
.settings-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.settings-section h2 {
    font-size: 1.25rem;
    color: #1a1a2e;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-label span {
    font-weight: 500;
    color: #333;
}

.settings-label small {
    color: #666;
    font-size: 0.813rem;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #4CAF50;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* QR Code display */
.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    background: #f9f9f9;
    border-radius: 12px;
    margin: 20px 0;
}

.qr-code-container img {
    max-width: 200px;
    border-radius: 8px;
}

.manual-entry {
    margin-top: 16px;
    text-align: center;
}

.manual-entry code {
    display: block;
    background: #e0e0e0;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.875rem;
    margin-top: 8px;
    word-break: break-all;
}

/* Backup codes display */
.backup-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.backup-codes code {
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: monospace;
    text-align: center;
    font-size: 0.875rem;
}

.backup-codes-warning {
    background: #fff3e0;
    color: #e65100;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.813rem;
    margin-top: 16px;
}
