/* ═══════════════════════════════════════════════════════
   AUTH PAGE STYLES
   ═══════════════════════════════════════════════════════ */

.auth-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    width: 100%;
    padding: 2rem;
    border: 1px solid var(--border);
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo .logo-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--background);
    padding: 0.25rem;
    border-radius: var(--radius);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: calc(var(--radius) - 4px);
    transition: all 0.2s;
}

.auth-tab.active {
    background: var(--primary);
    color: white;
}

.auth-tab:hover:not(.active) {
    background: var(--surface-light);
    color: var(--text);
}

/* Form Containers */
.auth-form-container {
    display: none;
}

.auth-form-container.active {
    display: block;
}

.auth-form-container h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.auth-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input[type="email"],
.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--text);
}

/* Password Strength Meter */
.password-strength-meter {
    height: 4px;
    background: var(--background);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
    background: var(--error);
}

.strength-bar.weak {
    width: 25%;
    background: var(--error);
}

.strength-bar.fair {
    width: 50%;
    background: var(--warning);
}

.strength-bar.good {
    width: 75%;
    background: #3b82f6;
}

.strength-bar.strong {
    width: 100%;
    background: var(--success);
}

/* Password Requirements */
.password-requirements {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--background);
    border-radius: calc(var(--radius) - 4px);
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.requirement.met {
    color: var(--success);
}

.requirement.met .req-icon {
    color: var(--success);
}

.req-icon {
    font-size: 0.75rem;
    transition: all 0.2s;
}

.requirement.met .req-icon::before {
    content: '✓';
    font-weight: bold;
}

/* Generated Password */
.generated-password {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.generated-password input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--success);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.generated-password button {
    padding: 0.75rem 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.generated-password button:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Checkbox */
.checkbox-group {
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.checkbox-label input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
}

.checkbox-text {
    color: var(--text-muted);
    line-height: 1.5;
}

.checkbox-text a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* Forgot Password Link */
.forgot-password-link {
    display: block;
    margin-top: 0.5rem;
    color: var(--primary);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Auth Divider */
.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    position: relative;
    background: var(--surface);
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Secure Notice */
.secure-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius);
    color: var(--success);
    font-size: 0.85rem;
}

/* Success Message */
#successMessage {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

#successMessage h2 {
    margin-bottom: 1rem;
}

#successMessage p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        padding: 1.5rem;
    }

    .auth-logo h1 {
        font-size: 1.25rem;
    }

    .auth-tabs {
        gap: 0.25rem;
    }

    .auth-tab {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
}

/* Button Link Style */
.btn-link {
    background: none !important;
    border: none !important;
    color: var(--primary) !important;
    text-decoration: none;
    padding: 0.75rem !important;
}

.btn-link:hover {
    color: var(--primary-dark) !important;
    text-decoration: underline !important;
}
