:root {
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-blue: #2563eb;
    --auth-border: #e2e8f0;
}

* { box-sizing: border-box; }

body.auth-page {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    font-family: 'Inter', Arial, sans-serif;
    color: var(--auth-ink);
    background: radial-gradient(circle at 15% 15%, rgba(37, 99, 235, .08), transparent 28rem), #f8fafc;
}

.auth-shell {
    width: min(100%, 1000px);
    min-height: 600px;
    display: grid;
    grid-template-columns: 5fr 7fr;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, .12);
}

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    color: #fff;
    background: linear-gradient(150deg, #06101f 0%, #0d1d36 55%, #162b4a 100%);
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(56, 189, 248, .16) 0%, rgba(37, 99, 235, .12) 50%, transparent 72%);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.auth-brand-name { position: relative; z-index: 1; display: flex; align-items: center; gap: .8rem; font-size: 1.35rem; font-weight: 700; }
.auth-brand-name i, .auth-brand-copy i { color: var(--auth-blue); }
.auth-brand-logo-frame,
.auth-mobile-brand-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
}
.auth-brand-logo-frame { width: 46px; height: 46px; border-radius: 13px; }
.auth-mobile-brand-frame { width: 42px; height: 42px; border-radius: 12px; }
.auth-brand-logo-frame img,
.auth-mobile-brand-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.auth-brand-logo-frame.is-dark-logo {
    background: #040d1a;
    box-shadow: 0 10px 22px -8px rgba(2, 10, 24, .8), 0 0 0 1px rgba(148, 197, 255, .22);
}
.auth-brand-logo-frame.is-light-logo {
    background: #fff;
    padding: 4px;
    box-shadow: 0 8px 18px -6px rgba(2, 10, 24, .45);
}
.auth-brand-logo-frame.is-transparent-logo {
    background: rgba(255, 255, 255, .08);
    padding: 4px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .16);
}
.auth-brand-logo-frame.is-light-logo img,
.auth-brand-logo-frame.is-transparent-logo img,
.auth-mobile-brand-frame.is-light-logo img,
.auth-mobile-brand-frame.is-transparent-logo img { object-fit: contain; }
.auth-mobile-brand-bar {
    display: none;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.1rem;
}
.auth-mobile-brand-frame.is-dark-logo {
    background: #040d1a;
    box-shadow: 0 8px 18px -6px rgba(15, 23, 42, .35), 0 0 0 1px rgba(15, 23, 42, .10);
}
.auth-mobile-brand-frame.is-light-logo,
.auth-mobile-brand-frame.is-transparent-logo {
    background: #f8fafc;
    padding: 4px;
    border: 1px solid #e2e8f0;
}
.auth-mobile-brand-name { color: var(--auth-ink); font-size: 1rem; font-weight: 700; letter-spacing: -.02em; }
.auth-brand-copy h1 { max-width: 12ch; margin: 0 0 1.5rem; font-size: 2rem; line-height: 1.2; letter-spacing: -.025em; }
.auth-brand-copy p { display: flex; gap: .75rem; color: #cbd5e1; line-height: 1.6; }
.auth-brand-copy i { margin-top: .3rem; }
.auth-copyright { color: #94a3b8; font-size: .84rem; }

.auth-form-panel { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 4rem 3.5rem; }
.auth-header { margin-bottom: 1.5rem; }
.auth-header h2 { margin: 0 0 .55rem; font-size: 1.45rem; line-height: 1.2; letter-spacing: -.02em; }
.auth-header p { max-width: 58ch; margin: 0; color: var(--auth-muted); line-height: 1.6; }
.auth-label { display: block; margin-bottom: .5rem; color: #475569; font-size: .7rem; font-weight: 700; letter-spacing: .04em; }
.auth-field { position: relative; display: flex; align-items: center; }
.auth-field > i { position: absolute; inset-inline-start: 1rem; color: #94a3b8; }
.auth-input { width: 100%; min-height: 46px; padding: .75rem 1rem .75rem 2.75rem; border: 1.5px solid var(--auth-border); border-radius: 12px; background: #f8fafc; color: #1e293b; font-size: 1rem; }
.auth-input:focus { border-color: var(--auth-blue); outline: 0; background: #fff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .1); }
.auth-button { width: 100%; min-height: 46px; border: 1px solid var(--auth-blue); border-radius: 999px; background: var(--auth-blue); color: #fff; font-weight: 700; box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .65); }
.auth-button:hover, .auth-button:focus-visible { background: #2563eb; border-color: #2563eb; }
.auth-button:focus-visible, .auth-back:focus-visible { outline: 4px solid rgba(37, 99, 235, .18); outline-offset: 2px; }
.auth-button:disabled { cursor: wait; opacity: .78; }
.auth-back { display: inline-flex; align-items: center; gap: .45rem; color: var(--auth-blue); font-weight: 600; text-decoration: none; text-underline-offset: 3px; }
.auth-back:hover { text-decoration: underline; }
.auth-alert { display: flex; align-items: flex-start; gap: .65rem; margin-bottom: 1rem; padding: .8rem 1rem; border-radius: 12px; font-size: .84rem; line-height: 1.5; }
.auth-alert-error { background: #fef2f2; color: #991b1b; }
.auth-alert-info { background: #eff6ff; color: #185f9d; }
.auth-validation { display: block; margin-top: .35rem; color: #b91c1c; font-size: .84rem; }
.validation-summary-valid { display: none; }
.auth-rules { margin: .65rem 0 0; padding-inline-start: 1.15rem; color: var(--auth-muted); font-size: .7rem; line-height: 1.6; }
.auth-actions { margin-top: 1.5rem; }
.auth-secondary { margin-top: 1.25rem; text-align: center; }

@media (max-width: 991.98px) {
    body.auth-page { padding: 1rem; }
    .auth-shell { width: min(100%, 480px); min-height: 0; display: block; border-radius: 16px; }
    .auth-brand { display: none; }
    .auth-mobile-brand-bar { display: flex; }
    .auth-form-panel { padding: 3rem 2rem; }
}

@media (max-width: 575.98px) {
    body.auth-page { display: block; padding: 0; background: #fff; }
    .auth-shell { width: 100%; min-height: 100vh; border-radius: 0; box-shadow: none; }
    .auth-form-panel { min-height: 100vh; padding: 2rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
body { font-weight: 400; }
