/* Auth Pages Styles - Modern Polished Theme */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 50%, #C7D2FE 100%);
    min-height: 100vh;
    color: #0f172a;
    line-height: 1.6;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.04),
        0 10px 20px rgba(0, 0, 0, 0.06),
        0 20px 40px rgba(0, 0, 0, 0.08);
}

.auth-card.wide {
    max-width: 520px;
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.auth-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 8px;
}

.auth-header p {
    color: #64748B;
    font-size: 15px;
}

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

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

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.form-group input {
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    color: #1a1a2e;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3B82F6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.form-hint {
    font-size: 12px;
    color: #6b7280;
}

.form-error {
    font-size: 13px;
    color: #ef4444;
    display: none;
}

.form-error.global-error {
    text-align: center;
    padding: 12px;
    background: rgba(239, 68, 68, 0.08);
    border-radius: 8px;
    margin-top: 10px;
}

/* Form Row */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row > .form-group {
    flex: 1;
}

.form-row.between {
    justify-content: space-between;
    align-items: center;
}

/* Password Input */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #9ca3af;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #374151;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Password Requirements */
.password-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.requirement {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.requirement .indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d5db;
    transition: background 0.2s;
}

.requirement.met {
    color: #10b981;
}

.requirement.met .indicator {
    background: #10b981;
}

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

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3B82F6;
}

.forgot-link {
    font-size: 14px;
    color: #3B82F6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #2563EB;
    text-decoration: underline;
}

/* Button */
.auth-button {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.auth-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
}

.auth-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

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

.auth-button.secondary {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #374151;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.auth-button.secondary:hover:not(:disabled) {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
}

.auth-footer p {
    font-size: 14px;
    color: #6b7280;
}

.auth-footer a {
    color: #3B82F6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: #2563EB;
    text-decoration: underline;
}

/* Terms */
.auth-terms {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    margin-top: 20px;
}

.auth-terms a {
    color: #6b7280;
    text-decoration: none;
}

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

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

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

.auth-divider span {
    padding: 0 15px;
    font-size: 12px;
    color: #9ca3af;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.trust-badges .badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.trust-badges .badge svg {
    width: 16px;
    height: 16px;
    stroke: #9ca3af;
}

/* Success Message */
.success-message {
    text-align: center;
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon svg {
    width: 32px;
    height: 32px;
    stroke: #10b981;
}

.success-icon.large {
    width: 80px;
    height: 80px;
}

.success-icon.large svg {
    width: 40px;
    height: 40px;
}

.success-message h2 {
    font-size: 20px;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.success-message p {
    color: #6b7280;
    font-size: 14px;
}

.success-message .hint {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 15px;
}

/* State Containers */
.state-container {
    text-align: center;
    padding: 20px 0;
}

.state-container h2 {
    font-size: 20px;
    color: #1a1a2e;
    margin: 15px 0 10px;
}

.state-container p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 5px;
}

.state-container .auth-button {
    margin-top: 25px;
}

/* Icons */
.error-icon,
.info-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-icon {
    background: rgba(239, 68, 68, 0.1);
}

.error-icon svg {
    width: 32px;
    height: 32px;
    stroke: #ef4444;
}

.info-icon {
    background: rgba(59, 130, 246, 0.1);
}

.info-icon svg {
    width: 32px;
    height: 32px;
    stroke: #3b82f6;
}

/* Loading Spinner */
.loading-spinner,
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3B82F6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.loading-spinner.large {
    width: 40px;
    height: 40px;
    border-width: 3px;
    margin: 0 auto;
}

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

/* OAuth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #64748b;
    font-size: 14px;
}

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

.auth-divider span {
    padding: 0 16px;
}

/* Google Sign-In Button */
.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #1e293b;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.google-signin-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.google-signin-btn svg {
    flex-shrink: 0;
}

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

    .form-row {
        flex-direction: column;
    }

    .password-requirements {
        grid-template-columns: 1fr;
    }

    .trust-badges {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}
