:root {
    color-scheme: light;
    --brand: #08769e;
    --brand-strong: #075a7d;
    --brand-bright: #22b8cf;
    --nav: #071522;
    --ink: #132333;
    --muted: #667789;
    --line: #dbe5eb;
    --surface: #ffffff;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 8% 4%, rgba(34, 184, 207, .19), transparent 30%),
        radial-gradient(circle at 92% 94%, rgba(8, 118, 158, .24), transparent 34%),
        linear-gradient(145deg, #071522 0%, #0a1d2d 48%, #07131f 100%);
    color: var(--ink);
    font: 15px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .48;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

.auth-layout {
    position: relative;
    z-index: 1;
    width: min(100%, 1050px);
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(430px, 1fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 42px 100px rgba(0, 0, 0, .42), 0 0 0 1px rgba(7, 21, 34, .08);
}

.auth-intro {
    position: relative;
    isolation: isolate;
    padding: 58px 52px 46px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background:
        radial-gradient(circle at 86% 17%, rgba(34, 184, 207, .28), transparent 28%),
        linear-gradient(155deg, #09283b 0%, #064e6d 55%, #087da4 100%);
}

.auth-intro::before,
.auth-intro::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.auth-intro::before {
    inset: 0;
    opacity: .18;
    background-image:
        linear-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .18) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(135deg, #000, transparent 72%);
}

.auth-intro::after {
    width: 310px;
    height: 310px;
    right: -150px;
    bottom: -150px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(255, 255, 255, .035), 0 0 0 86px rgba(255, 255, 255, .025);
}

.auth-eyebrow,
.auth-kicker {
    margin: 0 0 24px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, .82);
}

.auth-eyebrow span {
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand-bright);
    box-shadow: 0 0 12px rgba(34, 184, 207, .7);
}

.auth-intro h2 {
    max-width: 390px;
    margin: 0;
    font-size: clamp(34px, 3.5vw, 46px);
    line-height: 1.08;
    letter-spacing: -.045em;
}

.auth-intro-lead {
    max-width: 380px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, .75);
    font-size: 16px;
    line-height: 1.68;
}

.auth-features {
    margin: 36px 0 0;
    padding: 0;
    display: grid;
    gap: 14px;
    list-style: none;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255, 255, 255, .9);
    font-size: 14px;
    font-weight: 650;
}

.auth-features li::before {
    content: "✓";
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 7px;
    background: rgba(255, 255, 255, .1);
    color: #7ce6f3;
    font-size: 12px;
}

.auth-intro-status {
    margin: 42px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, .68);
    font-size: 12px;
}

.auth-intro-status span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #74e0ae;
    box-shadow: 0 0 0 4px rgba(116, 224, 174, .13), 0 0 15px rgba(116, 224, 174, .45);
}

.auth-card {
    position: relative;
    z-index: 1;
    padding: 48px 54px 38px;
    background: rgba(255, 255, 255, .985);
}

.auth-card--standalone {
    width: min(100%, 460px);
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 20px;
    box-shadow: 0 34px 85px rgba(0, 0, 0, .38);
}

.auth-logo {
    display: block;
    width: min(100%, 270px);
    height: auto;
    margin: 0 0 34px;
}

.auth-kicker {
    display: none;
    margin-bottom: 10px;
    color: var(--brand);
    letter-spacing: .1em;
}

h1 {
    margin: 0;
    color: var(--ink);
    font-size: 32px;
    line-height: 1.12;
    letter-spacing: -.038em;
}

.lead { margin: 8px 0 28px; color: var(--muted); }

label {
    display: block;
    margin: 16px 0 7px;
    color: #31475a;
    font-size: 13px;
    font-weight: 750;
}

input {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid #c7d4dd;
    border-radius: 9px;
    background: #fbfdfe;
    color: var(--ink);
    font: inherit;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input:hover { border-color: #98adbb; background: #fff; }
input:focus { outline: 0; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(8, 118, 158, .13); }

.password-field { position: relative; }
.password-field input { padding-right: 82px; }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-height: 34px;
    padding: 6px 8px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--brand-strong);
    font: 750 12px/1 inherit;
    cursor: pointer;
}

.password-toggle:hover { background: #edf7fa; }
.password-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.submit-button {
    width: 100%;
    min-height: 49px;
    margin-top: 24px;
    padding: 12px 15px;
    border: 1px solid var(--brand);
    border-radius: 9px;
    background: linear-gradient(115deg, var(--brand-strong), #088ab3);
    color: #fff;
    font: 750 15px/1.2 inherit;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(8, 118, 158, .24);
    transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.submit-button:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 14px 30px rgba(8, 118, 158, .3); }
.submit-button:active { transform: translateY(0); }
.submit-button:focus-visible { outline: 3px solid rgba(34, 184, 207, .38); outline-offset: 2px; }
.submit-button:disabled { cursor: wait; opacity: .88; }
.submit-loading { display: none; align-items: center; justify-content: center; gap: 9px; }
.submit-button.is-loading .submit-label { display: none; }
.submit-button.is-loading .submit-loading { display: inline-flex; }

.button-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .38);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin .72s linear infinite;
}

.error,
.success { margin: 0 0 18px; padding: 11px 12px; border-radius: 8px; }
.error { border: 1px solid #f1c2bd; border-left: 4px solid #b42318; background: #fff0ee; color: #7a271a; }
.success { border: 1px solid #a9dfc4; border-left: 4px solid #168553; background: #edfbf4; color: #11613f; }
.field-hint { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.auth-links { margin: 17px 0 0; text-align: center; }
.auth-links a { color: var(--brand-strong); font-size: 13px; font-weight: 750; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.forgot-link { display: inline-flex; padding: 4px 6px; }

.auth-register {
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.auth-links .register-link {
    min-height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #a7cad8;
    border-radius: 9px;
    background: linear-gradient(180deg, #f8fcfd, #eff8fb);
    color: var(--brand-strong);
    font-size: 14px;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.auth-links .register-link span { font-size: 18px; line-height: 1; transition: transform 150ms ease; }
.auth-links .register-link:hover { border-color: var(--brand); background: #eaf7fb; text-decoration: none; transform: translateY(-1px); }
.auth-links .register-link:hover span { transform: translateX(2px); }

.security {
    margin: 21px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #788895;
    font-size: 11px;
}

.security::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #24a66a;
    box-shadow: 0 0 0 3px rgba(36, 166, 106, .13);
}

@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
    body { padding: 22px; }
    .auth-layout { width: min(100%, 500px); min-height: 0; display: block; border-radius: 20px; }
    .auth-intro { display: none; }
    .auth-card { padding: 44px 48px 36px; }
    .auth-kicker { display: block; }
}

@media (max-width: 520px) {
    body { display: block; padding: 0; background: #fff; }
    body::before { display: none; }
    .auth-layout { width: 100%; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
    .auth-card { min-width: 0; min-height: 100vh; padding: 30px 22px 26px; border: 0; border-radius: 0; box-shadow: none; }
    .auth-layout .auth-card { width: auto; }
    .auth-card--standalone { width: 100%; }
    .auth-logo { width: min(100%, 245px); margin-bottom: 29px; }
    h1 { font-size: 29px; }
    .lead { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; }
}
