/* ============================================
   Jobber AI — Authentication Pages Styles
   Login, Register, Password Reset
   ============================================ */

/* ── Auth Layout ── */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: var(--space-8) var(--space-4) var(--space-12);
    background: #F8FAFC;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Subtle decorative glow */
.auth-page::before,
.auth-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.auth-page::before {
    width: 450px;
    height: 450px;
    background: rgba(79, 70, 229, 0.08);
    top: -120px;
    right: -120px;
}

.auth-page::after {
    width: 400px;
    height: 400px;
    background: rgba(2, 132, 199, 0.06);
    bottom: -100px;
    left: -100px;
}


/* ── Auth Container ── */
.auth-container {
    width: 100%;
    max-width: 540px;
    margin: auto 0;
    position: relative;
    z-index: 1;
    animation: scaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}


/* ── Auth Card ── */
.auth-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-xl);
}


/* ── Auth Header ── */
.auth-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    text-decoration: none;
}

.auth-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    box-shadow: var(--shadow-glow);
}

.auth-logo-text {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-primary);
}

.auth-header h1 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-2);
}

.auth-header p {
    color: var(--text-muted);
    font-size: var(--text-sm);
}


/* ── Auth Form ── */
.auth-form .form-group {
    margin-bottom: var(--space-5);
}

.auth-form .form-input {
    padding: var(--space-4);
    font-size: var(--text-sm);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
}

.auth-form .form-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.12);
}

.auth-form .input-icon-wrapper .form-input {
    padding-left: var(--space-12);
}

.auth-form .input-icon-wrapper .input-icon {
    left: var(--space-4);
    font-size: var(--text-xl);
}


/* ── Password Toggle ── */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: var(--text-lg);
    padding: var(--space-1);
    transition: color var(--transition-fast);
}

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


/* ── Password Strength ── */
.password-strength {
    display: flex;
    gap: var(--space-1);
    margin-top: var(--space-2);
}

.strength-bar {
    flex: 1;
    height: 3px;
    background: var(--border-subtle);
    border-radius: var(--radius-full);
    transition: background var(--transition-base);
}

.strength-bar.weak { background: var(--danger); }
.strength-bar.fair { background: var(--warning); }
.strength-bar.good { background: var(--info); }
.strength-bar.strong { background: var(--success); }

.strength-label {
    font-size: var(--text-xs);
    margin-top: var(--space-1);
    color: var(--text-dim);
    text-align: right;
}


/* ── Remember & Forgot ── */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
}

.auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.auth-remember span {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.auth-forgot {
    font-size: var(--text-sm);
    color: var(--primary);
    font-weight: 500;
}

.auth-forgot:hover {
    color: var(--primary-light);
    text-decoration: underline;
}


/* ── Submit Button ── */
.auth-submit {
    width: 100%;
    padding: var(--space-4);
    font-size: var(--text-base);
    font-weight: 600;
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-6);
}

.auth-submit .spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
}


/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.auth-divider span {
    font-size: var(--text-xs);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}


/* ── Auth Footer ── */
.auth-footer {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}


/* ── Auth Alert Messages ── */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    margin-bottom: var(--space-5);
    animation: slideInUp 0.3s ease;
}

.auth-alert-icon {
    font-size: var(--text-xl);
    flex-shrink: 0;
    line-height: 1;
}

.auth-alert-success {
    background: var(--success-light);
    border: 1px solid rgba(0, 196, 140, 0.3);
    color: var(--success);
}

.auth-alert-error {
    background: var(--danger-light);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: var(--danger);
}

.auth-alert-warning {
    background: var(--warning-light);
    border: 1px solid rgba(255, 184, 0, 0.3);
    color: var(--warning);
}


/* ── Responsive ── */
@media (max-width: 480px) {
    .auth-page {
        padding: var(--space-4);
        align-items: flex-start;
        padding-top: var(--space-12);
    }

    .auth-card {
        padding: var(--space-6);
        border-radius: var(--radius-xl);
    }

    .auth-header h1 {
        font-size: var(--text-xl);
    }

    .auth-options {
        flex-direction: column;
        gap: var(--space-3);
        align-items: flex-start;
    }
}
