.auth-page {
    min-height: calc(100vh - 140px);
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 60%, #faf5ff 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 48px 16px;
    position: relative; overflow: hidden;
}
.auth-page::before {
    content: ''; position: absolute;
    width: 560px; height: 560px; border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,.07) 0%, transparent 70%);
    top: -180px; right: -80px; pointer-events: none;
}
.auth-page::after {
    content: ''; position: absolute;
    width: 360px; height: 360px; border-radius: 50%;
    background: radial-gradient(circle, rgba(168,85,247,.05) 0%, transparent 70%);
    bottom: -100px; left: -80px; pointer-events: none;
}

.auth-card {
    width: 100%; max-width: 440px;
    background: #fff; border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.09), 0 1px 3px rgba(0,0,0,.05);
    padding: 44px 40px;
    position: relative; z-index: 1;
}

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

.auth-brand {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    font-size: 18px; font-weight: 800; color: #1e1b4b;
    text-decoration: none; margin-bottom: 32px; letter-spacing: -.3px;
}
.auth-brand-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex; align-items: center; justify-content: center;
}

.auth-form-title {
    font-size: 22px; font-weight: 800; color: #0f172a;
    letter-spacing: -.5px; margin-bottom: 4px; text-align: center;
}
.auth-form-sub {
    font-size: 13.5px; color: #64748b; margin-bottom: 28px; text-align: center;
}
.auth-form-sub a { color: #4f46e5; font-weight: 600; text-decoration: none; }
.auth-form-sub a:hover { text-decoration: underline; }

.auth-field { margin-bottom: 16px; }
.auth-field-label {
    font-size: 12.5px; font-weight: 600; color: #374151;
    margin-bottom: 6px; display: block;
}
.auth-field-input-wrap { position: relative; }
.auth-field-input-wrap i {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    color: #9ca3af; font-size: 15px; pointer-events: none;
}
.auth-input {
    width: 100%; padding: 11px 14px 11px 40px;
    border: 1.5px solid #e5e7eb; border-radius: 10px;
    font-size: 14px; color: #111827; background: #f9fafb; outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.auth-input:focus {
    border-color: #6366f1; background: #fff;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.auth-input--purple:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}
.auth-input.is-invalid { border-color: #ef4444; background: #fff; }
.auth-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.auth-input--has-toggle { padding-right: 40px; }
.invalid-feedback { font-size: 12px; color: #ef4444; margin-top: 5px; display: block; }

.auth-field-input-wrap .auth-pw-toggle {
    position: absolute; left: auto; right: 12px;
    top: 50%; transform: translateY(-50%);
    color: #9ca3af; font-size: 15px;
    pointer-events: auto; cursor: pointer;
}
.auth-field-input-wrap .auth-pw-toggle:hover { color: #6366f1; }

.auth-pw-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.auth-pw-row a { font-size: 12px; color: #6366f1; text-decoration: none; font-weight: 500; }
.auth-pw-row a:hover { text-decoration: underline; }

.auth-remember { display: flex; align-items: center; gap: 8px; margin: 4px 0 20px; }
.auth-remember input { width: 15px; height: 15px; accent-color: #6366f1; cursor: pointer; }
.auth-remember label { font-size: 13px; color: #4b5563; cursor: pointer; }

.auth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.auth-submit {
    width: 100%; padding: 12px; border: none; border-radius: 10px; cursor: pointer;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff; font-size: 14.5px; font-weight: 700;
    box-shadow: 0 4px 14px rgba(79,70,229,.3);
    transition: all .2s; display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 6px;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,70,229,.4); filter: brightness(1.06); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { opacity: .75; cursor: not-allowed; transform: none; filter: none; box-shadow: 0 4px 14px rgba(79,70,229,.2); }

.auth-submit-loading { display: flex; align-items: center; gap: 8px; }

.auth-spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    animation: auth-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-terms {
    font-size: 12px; color: #94a3b8; text-align: center;
    margin-top: 14px; line-height: 1.6;
}
.auth-terms a { color: #4f46e5; text-decoration: none; }
.auth-terms a:hover { text-decoration: underline; }

.auth-alert {
    border-radius: 10px; padding: 11px 14px;
    font-size: 13px; margin-bottom: 20px;
    display: flex; align-items: center; gap: 8px;
}
.auth-alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.auth-alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.auth-alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

@media (max-width: 480px) {
    .auth-page { padding: 24px 12px; }
    .auth-card { padding: 36px 24px; }
    .auth-field-row { grid-template-columns: 1fr; gap: 0; }
}
