/* =========================================================
   auth.css — Authentication pages styling
   ========================================================= */

/* ── Wrapper ─────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #eef0fe 0%, #f2f5fb 50%, #e8f3fb 100%);
    padding: var(--space-6);
    position: relative;
    overflow: hidden;
}

/* Decorative background blobs */
.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(114, 124, 245, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    bottom: -15%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(114, 124, 245, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Card ─────────────────────────────────────── */
.auth-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(114, 124, 245, 0.12), 0 0 0 1px rgba(114, 124, 245, 0.06);
    padding: var(--space-8);
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
    animation: authCardIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card.register-card {
    max-width: 580px;
}

/* ── Logo ─────────────────────────────────────── */
.auth-logo {
    text-align: center;
    margin-bottom: var(--space-6);
}

.auth-logo-icon {
    display: inline-flex;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius);
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.75rem;
    box-shadow: 0 8px 20px -4px rgba(114, 124, 245, 0.4);
    margin-bottom: var(--space-3);
}

.auth-logo h1 {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.04em;
}

.auth-logo h1 span {
    color: var(--color-primary);
}

.auth-logo p {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin-top: 4px;
}

/* ── Headings ─────────────────────────────────── */
.auth-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
}

/* ── Form Groups ──────────────────────────────── */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    font-size: var(--text-base);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: var(--color-surface);
    color: var(--color-text);
    min-height: 46px;
    font-family: var(--font-main);
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(114, 124, 245, 0.12);
    background: var(--color-surface);
}

.form-control.is-invalid {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.invalid-feedback {
    color: var(--color-danger);
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

/* ── Form grid (register) ─────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

/* ── Section divider ──────────────────────────── */
.form-divider {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: var(--space-6) 0 var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* ── Remember row ─────────────────────────────── */
.remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    color: var(--color-text-muted);
    user-select: none;
}

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

/* ── Buttons ──────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    font-family: var(--font-heading);
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    box-shadow: 0 6px 16px -4px rgba(114, 124, 245, 0.4);
    border: none;
}

.btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -5px rgba(114, 124, 245, 0.4);
}

/* ── Alerts ───────────────────────────────────── */
.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    border-left: 4px solid;
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
}

.alert-success {
    background: #f0fdf4;
    border-color: var(--color-success);
    color: #15803d;
}

.alert-danger {
    background: #fff1f2;
    border-color: var(--color-danger);
    color: #be123c;
}

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

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

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