* , *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); background: var(--paper-050); color: var(--text-on-light-hi); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }

/* -------- Left: brand panel -------- */
.auth-brand { position: relative; background: radial-gradient(120% 100% at 15% 0%, #1c1730 0%, var(--ink-950) 60%); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; color: var(--text-on-dark-hi); }
.auth-brand::before { content: ''; position: absolute; top: -15%; right: -20%; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(255,107,71,0.25), transparent 65%); }
.auth-brand__logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 20px; font-weight: 600; position: relative; z-index: 2; }
.auth-brand__logo-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--ember-400), var(--ember-600)); display: flex; align-items: center; justify-content: center; font-family: var(--font-body); font-weight: 800; color: #fff; }

.auth-brand__content { position: relative; z-index: 2; max-width: 440px; }
.auth-brand__content h1 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 34px); font-weight: 500; line-height: 1.2; margin-bottom: 18px; }
.auth-brand__content p { color: var(--text-on-dark-lo); font-size: 15.5px; line-height: 1.6; }

.auth-brand__preview { position: relative; z-index: 2; background: var(--ink-850); border: 1px solid var(--ink-700); border-radius: var(--radius-lg); padding: 18px; margin-top: 34px; box-shadow: var(--shadow-lifted); }
.auth-brand__stat-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.auth-brand__stat-row:last-child { margin-bottom: 0; }
.auth-brand__stat-label { font-size: 12.5px; color: var(--text-on-dark-lo); }
.auth-brand__stat-value { font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; color: var(--text-on-dark-hi); }
.auth-brand__stat-value.pos { color: var(--positive-500); }

.auth-brand__foot { position: relative; z-index: 2; font-size: 12.5px; color: var(--ink-400); }

/* -------- Right: form panel -------- */
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card__head { margin-bottom: 32px; }
.auth-card__head h2 { font-family: var(--font-display); font-size: 28px; font-weight: 500; margin: 0 0 8px; }
.auth-card__head p { color: var(--text-on-light-lo); font-size: 14.5px; }
.auth-card__head a { color: var(--ember-600); font-weight: 600; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--text-on-light-hi); }
.field input { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--paper-300); background: var(--paper-000); font-size: 15px; font-family: inherit; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.field input:focus { outline: none; border-color: var(--ember-500); box-shadow: 0 0 0 4px var(--ember-050); }
.field input.is-invalid { border-color: var(--negative-500); }
.field-error { display: block; margin-top: 6px; font-size: 12.5px; color: var(--negative-500); min-height: 16px; }
.field__row { display: flex; align-items: center; justify-content: space-between; }
.field__check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-on-light-lo); }
.field__check input { width: auto; }
.field__forgot { font-size: 13px; color: var(--ember-600); font-weight: 600; }

.auth-submit { width: 100%; padding: 13px; border-radius: var(--radius-pill); border: none; background: var(--ember-500); color: #fff; font-weight: 700; font-size: 15px; box-shadow: var(--shadow-glow-ember); transition: background var(--dur-fast), transform var(--dur-fast); position: relative; }
.auth-submit:hover { background: var(--ember-600); transform: translateY(-1px); }
.auth-submit:disabled { opacity: 0.7; cursor: default; transform: none; }
.auth-submit .spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; animation: spin 0.7s linear infinite; margin-right: 8px; }
.auth-submit.is-loading .spinner { display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-alert { display: none; margin-bottom: 18px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--negative-100); color: var(--negative-500); font-size: 13.5px; font-weight: 600; }
.auth-alert.is-visible { display: block; animation: shake 0.3s ease; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0; color: var(--text-on-light-lo); font-size: 12.5px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--paper-300); }

.auth-footer-link { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-on-light-lo); }
.auth-footer-link a { color: var(--ember-600); font-weight: 600; }

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
}
