:root {
    --auth-teal: #19bcbf;
    --auth-teal-dark: #0f9699;
    --auth-ink: #17232e;
    --auth-muted: #71808d;
    --auth-line: #dfe7eb;
    --auth-soft: #f4f8f9;
    --auth-danger: #b42318;
    --auth-card: #ffffff;
    --auth-input: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
        sans-serif;
    color: var(--auth-ink);
    background: var(--auth-soft);
}

.auth-page {
    min-width: 320px;
    background: #06151b;
}

.auth-backdrop {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(
            ellipse at 50% 44%,
            rgba(28, 86, 94, .44) 0,
            rgba(11, 39, 46, .28) 34%,
            transparent 66%
        ),
        radial-gradient(
            circle at 18% 16%,
            rgba(25, 188, 191, .09),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #071b22 0,
            #0a2830 46%,
            #06151b 100%
        );
}

.auth-backdrop::before,
.auth-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
}

.auth-backdrop::before {
    background:
        repeating-linear-gradient(
            115deg,
            rgba(255, 255, 255, .018) 0,
            rgba(255, 255, 255, .018) 1px,
            transparent 1px,
            transparent 84px
        );
    opacity: .72;
}

.auth-backdrop::after {
    background: linear-gradient(
        90deg,
        rgba(2, 11, 15, .28),
        transparent 28%,
        transparent 72%,
        rgba(2, 11, 15, .28)
    );
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 5vw, 72px);
}

.auth-card {
    width: min(1080px, 100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, .92fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .46);
    border-radius: 22px;
    background: var(--auth-card);
    box-shadow:
        0 34px 90px rgba(2, 13, 19, .34),
        0 8px 24px rgba(2, 13, 19, .14);
}

.auth-form-panel {
    display: flex;
    align-items: center;
    padding: clamp(38px, 6vw, 76px);
}

.auth-form-content {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--auth-ink);
}

.brand-mark,
.mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.brand-mark {
    width: 50px;
    height: 58px;
    filter: drop-shadow(0 8px 15px rgba(4, 75, 79, .24));
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mark {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: var(--auth-teal);
    color: #fff;
    box-shadow: 0 9px 24px rgba(25, 188, 191, .24);
    font-size: 1.15rem;
    font-weight: 900;
}

.brand-lockup strong,
.brand-lockup small {
    display: block;
}

.brand-lockup strong {
    font-size: .98rem;
    letter-spacing: .01em;
}

.brand-lockup small {
    margin-top: 2px;
    color: var(--auth-muted);
    font-size: .69rem;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-heading {
    margin-top: 46px;
}

.auth-heading h1 {
    margin: 10px 0 12px;
    font-size: clamp(2rem, 3.3vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -.045em;
}

.auth-heading h1 span {
    color: var(--auth-teal-dark);
}

.auth-heading > p:last-child {
    margin: 0;
    color: var(--auth-muted);
    font-size: .98rem;
}

.eyebrow {
    color: var(--auth-teal);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.auth-indicators {
    display: flex;
    gap: 7px;
    margin: 26px 0 28px;
    padding: 0;
    list-style: none;
}

.auth-indicators li {
    width: 20px;
    height: 4px;
    border-radius: 999px;
    background: #cfdbde;
}

.auth-indicators li.active {
    width: 42px;
    background: var(--auth-teal);
}

.form-group + .form-group {
    margin-top: 19px;
}

.form-group label {
    display: block;
    margin: 0 0 8px;
    color: #344552;
    font-size: .79rem;
    font-weight: 750;
}

.input-wrap {
    position: relative;
}

.input-wrap > i {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 1;
    color: #84929c;
    font-size: .92rem;
    pointer-events: none;
    transform: translateY(-50%);
}

.input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 46px;
    border: 1px solid #d1dde1;
    border-radius: 10px;
    outline: none;
    background: var(--auth-input);
    color: var(--auth-ink);
    font: inherit;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background-color .18s ease;
}

.input-wrap input::placeholder {
    color: #a5b0b7;
}

.input-wrap:focus-within > i {
    color: var(--auth-teal-dark);
}

.input-wrap input:focus {
    border-color: var(--auth-teal);
    box-shadow: 0 0 0 3px rgba(25, 188, 191, .13);
}

.sign-in-button {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
    border: 0;
    border-radius: 10px;
    background: var(--auth-teal);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(25, 188, 191, .2);
    transition:
        background-color .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.sign-in-button:hover {
    background: #15aaad;
    box-shadow: 0 15px 28px rgba(25, 188, 191, .25);
    transform: translateY(-1px);
}

.sign-in-button:focus-visible {
    outline: 3px solid rgba(25, 188, 191, .3);
    outline-offset: 3px;
}

.auth-signout {
    margin-top: 14px;
    text-align: center;
}

.auth-signout button {
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    font: inherit;
    font-size: .78rem;
    font-weight: 750;
}

.auth-signout button:hover,
.auth-signout button:focus-visible {
    color: var(--auth-teal-dark);
    text-decoration: underline;
}

.security-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 23px 0 0;
    color: var(--auth-muted);
    font-size: .75rem;
    line-height: 1.5;
}

.security-note i {
    margin-top: 2px;
    color: var(--auth-teal-dark);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: -8px 0 20px;
    padding: 12px 14px;
    border: 1px solid #f0c5c1;
    border-radius: 9px;
    background: #fff2f0;
    color: var(--auth-danger);
    font-size: .84rem;
    line-height: 1.45;
}

.alert i {
    margin-top: 2px;
}

.auth-image-panel {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: #09161d;
    color: #fff;
}

.auth-image-panel > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: saturate(.94) contrast(1.03);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(4, 8, 18, .08) 12%,
            rgba(4, 10, 18, .28) 48%,
            rgba(4, 13, 18, .92) 100%
        ),
        linear-gradient(
            90deg,
            rgba(4, 12, 18, .26),
            transparent 48%
        );
}

.panel-brand {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 1;
    width: 62px;
    height: 72px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 15px;
    background: rgba(3, 13, 21, .5);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .2);
    backdrop-filter: blur(10px);
}

.panel-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-content {
    position: absolute;
    right: clamp(26px, 4vw, 48px);
    bottom: clamp(30px, 5vw, 54px);
    left: clamp(26px, 4vw, 48px);
}

.image-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #76e3e5;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.image-content h2 {
    max-width: 420px;
    margin: 14px 0 12px;
    color: #fff;
    font-size: clamp(2rem, 3.1vw, 2.8rem);
    line-height: 1.04;
    letter-spacing: -.045em;
    text-shadow: 0 3px 16px rgba(0, 0, 0, .34);
}

.image-content > p {
    max-width: 370px;
    margin: 0;
    color: rgba(231, 242, 244, .8);
    font-size: .9rem;
    line-height: 1.55;
}

.system-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(4, 17, 22, .48);
    color: rgba(255, 255, 255, .82);
    backdrop-filter: blur(10px);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .04em;
}

.system-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #36d07d;
    box-shadow: 0 0 0 4px rgba(54, 208, 125, .14);
}

.account-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 32px;
}

.account-card {
    width: min(100%, 460px);
    padding: 44px;
    border: 1px solid var(--auth-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(24, 45, 55, .09);
}

.account-card {
    width: min(100%, 640px);
}

.account-card h1 {
    margin: 22px 0 6px;
    font-size: 2rem;
    letter-spacing: -.035em;
}

.muted {
    color: var(--auth-muted);
}

.account-card input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #cfdadf;
    border-radius: 9px;
    font: inherit;
    outline: none;
}

.account-card input:focus {
    border-color: var(--auth-teal);
    box-shadow: 0 0 0 3px rgba(25, 188, 191, .14);
}

.account-card button {
    width: 100%;
    height: 48px;
    margin-top: 24px;
    border: 0;
    border-radius: 9px;
    background: var(--auth-teal);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.account-card button:hover {
    background: #15aaad;
}

.account-card h2 {
    margin: 28px 0 12px;
    font-size: 1rem;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 6px 10px;
    border-radius: 999px;
    background: #e9fafa;
    color: #087f82;
    font-size: .8rem;
    font-weight: 800;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-weight: 750;
}

.status span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #18a957;
}

code {
    color: #087f82;
}

@media (prefers-color-scheme: dark) {
    :root {
        --auth-ink: #e7f0f2;
        --auth-muted: #93a5ad;
        --auth-line: #2a3c44;
        --auth-soft: #0e1920;
        --auth-card: #111f27;
        --auth-input: #0e1a21;
    }

    .auth-card {
        border-color: rgba(255, 255, 255, .1);
    }

    .form-group label {
        color: #c9d6da;
    }

    .input-wrap input {
        border-color: #33464e;
    }

    .auth-indicators li {
        background: #41545b;
    }

    .alert {
        border-color: #693c39;
        background: #321d1d;
        color: #ffaaa3;
    }

    .account-card {
        background: var(--auth-card);
    }
}

@media (max-width: 900px) {
    .auth-wrapper {
        padding: 24px;
    }

    .auth-card {
        grid-template-columns: minmax(0, 1fr) 340px;
    }

    .auth-form-panel {
        padding: 44px;
    }
}

@media (max-width: 760px) {
    .auth-wrapper {
        padding: 18px;
    }

    .auth-card {
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .auth-image-panel {
        display: none;
    }

    .auth-form-panel {
        min-height: calc(100vh - 36px);
        padding: clamp(30px, 8vw, 48px);
    }

    .auth-heading {
        margin-top: 38px;
    }
}

@media (max-width: 430px) {
    .auth-wrapper {
        padding: 0;
    }

    .auth-card {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .auth-form-panel {
        min-height: 100vh;
        padding: 28px 24px;
    }

    .auth-heading {
        margin-top: 34px;
    }

    .auth-heading h1 {
        font-size: 2rem;
    }
}
