:root {
    color-scheme: dark;
    --auth-bg: #081015;
    --auth-panel: rgba(17, 30, 36, 0.92);
    --auth-border: rgba(111, 164, 174, 0.22);
    --auth-text: #eff8f8;
    --auth-muted: #8fa4a9;
    --auth-mint: #21e6bd;
    --auth-turquoise: #18cbd2;
    --auth-blue: #268cff;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--auth-text);
    background: var(--auth-bg);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
    font: inherit;
}

.auth-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(circle at 14% 18%, rgba(33, 230, 189, 0.11), transparent 28%),
        radial-gradient(circle at 83% 82%, rgba(38, 140, 255, 0.1), transparent 26%),
        linear-gradient(135deg, #0b1419 0%, #081015 52%, #0d181e 100%);
}

.auth-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(33, 230, 189, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(33, 230, 189, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(90deg, #000, transparent 74%);
    pointer-events: none;
}

.auth-glow-line {
    position: absolute;
    top: 15%;
    left: -6%;
    width: 54%;
    height: 1px;
    transform: rotate(-13deg);
    background: linear-gradient(90deg, transparent, var(--auth-mint), transparent);
    box-shadow: 0 0 16px rgba(33, 230, 189, 0.42);
    opacity: 0.46;
    pointer-events: none;
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 64px));
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
    align-items: center;
    gap: clamp(48px, 8vw, 116px);
    margin: 0 auto;
    padding: 44px 0;
}

.auth-visual {
    min-width: 0;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--auth-text);
    text-decoration: none;
}

.auth-brand .brand-mark {
    width: 52px;
    height: 52px;
    filter: drop-shadow(0 0 18px rgba(33, 230, 189, 0.16));
}

.auth-brand-name {
    font-size: 25px;
    font-weight: 780;
    line-height: 1;
    letter-spacing: -0.75px;
}

.auth-brand-name span {
    color: var(--auth-mint);
}

.auth-brand-tagline {
    display: block;
    margin-top: 7px;
    color: #82969b;
    font-size: 11px;
    font-weight: 550;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.auth-intro {
    max-width: 600px;
    margin-top: clamp(58px, 9vh, 104px);
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 18px;
    color: var(--auth-mint);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.auth-kicker::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--auth-mint);
    box-shadow: 0 0 9px rgba(33, 230, 189, 0.75);
}

.auth-intro h1 {
    max-width: 580px;
    margin: 0;
    font-size: clamp(42px, 5.2vw, 68px);
    font-weight: 760;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.auth-intro h1 span {
    color: transparent;
    background: linear-gradient(90deg, var(--auth-mint), var(--auth-turquoise), #6cb9ff);
    background-clip: text;
    -webkit-background-clip: text;
}

.auth-intro-text {
    max-width: 520px;
    margin: 24px 0 0;
    color: #94a7ac;
    font-size: 16px;
    line-height: 1.65;
}

.auth-capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 32px;
}

.auth-capability {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(113, 164, 174, 0.19);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    color: #a9babf;
    font-size: 12px;
    font-weight: 560;
}

.auth-capability::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--auth-mint);
    box-shadow: 0 0 8px rgba(33, 230, 189, 0.7);
}

.auth-panel-column {
    width: 100%;
    max-width: 470px;
    justify-self: end;
}

.auth-card {
    position: relative;
    padding: clamp(30px, 4vw, 48px);
    overflow: hidden;
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(26, 43, 50, 0.94), rgba(13, 24, 29, 0.97));
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(18px);
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 32px;
    width: 108px;
    height: 1px;
    background: linear-gradient(90deg, var(--auth-mint), var(--auth-blue));
    box-shadow: 0 0 13px rgba(33, 230, 189, 0.55);
}

.auth-card-eyebrow {
    margin: 0 0 10px;
    color: var(--auth-mint);
    font-size: 11px;
    font-weight: 720;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-card h2 {
    margin: 0;
    color: #f5fbfb;
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 730;
    letter-spacing: -0.035em;
}

.auth-card-lead {
    margin: 12px 0 0;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.55;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 22px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 123, 123, 0.28);
    border-radius: 11px;
    background: rgba(180, 48, 48, 0.1);
    color: #ffc4c4;
    font-size: 13px;
    line-height: 1.45;
}

.auth-alert svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin-top: 1px;
}

.auth-form {
    margin-top: 28px;
}

.auth-field + .auth-field {
    margin-top: 18px;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.auth-label {
    color: #cbd8db;
    font-size: 13px;
    font-weight: 620;
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    height: 50px;
    padding: 0 46px 0 44px;
    border: 1px solid rgba(117, 159, 168, 0.26);
    border-radius: 12px;
    outline: none;
    background: rgba(5, 13, 17, 0.52);
    color: #f5fbfb;
    caret-color: var(--auth-mint);
    font-size: 15px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.auth-input::placeholder {
    color: #64787e;
}

.auth-input:hover {
    border-color: rgba(117, 183, 191, 0.42);
}

.auth-input:focus {
    border-color: var(--auth-mint);
    background: rgba(5, 13, 17, 0.72);
    box-shadow: 0 0 0 3px rgba(33, 230, 189, 0.1), 0 0 18px rgba(33, 230, 189, 0.06);
}

.auth-field-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    color: #70868c;
    pointer-events: none;
}

.auth-input-wrap:focus-within .auth-field-icon {
    color: var(--auth-mint);
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    width: 34px;
    height: 34px;
    display: grid;
    padding: 0;
    transform: translateY(-50%);
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #70868c;
    cursor: pointer;
}

.auth-password-toggle:hover {
    background: rgba(255, 255, 255, 0.045);
    color: #c6d6d9;
}

.auth-password-toggle:focus-visible {
    outline: 2px solid var(--auth-mint);
    outline-offset: 1px;
}

.auth-password-toggle svg {
    width: 19px;
    height: 19px;
}

.auth-submit {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
    padding: 12px 18px;
    border: 1px solid rgba(102, 208, 255, 0.3);
    border-radius: 12px;
    background: linear-gradient(105deg, #078f89 0%, #147bc2 58%, #246fe5 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(20, 123, 194, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 15px 32px rgba(20, 123, 194, 0.26), 0 0 22px rgba(33, 230, 189, 0.08);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit:focus-visible {
    outline: 3px solid rgba(33, 230, 189, 0.34);
    outline-offset: 3px;
}

.auth-submit svg {
    width: 18px;
    height: 18px;
}

.auth-access-note {
    margin: 24px 0 0;
    padding-top: 21px;
    border-top: 1px solid rgba(112, 153, 162, 0.15);
    color: #71868c;
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
}

.auth-footer {
    margin: 18px 0 0;
    color: #52666c;
    font-size: 11px;
    text-align: center;
}

@media (max-width: 920px) {
    .auth-shell {
        width: min(560px, calc(100% - 40px));
        grid-template-columns: 1fr;
        gap: 38px;
        padding: 30px 0 42px;
    }

    .auth-visual {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
    }

    .auth-intro {
        margin-top: 0;
    }

    .auth-kicker,
    .auth-intro h1,
    .auth-intro-text,
    .auth-capabilities {
        display: none;
    }

    .auth-panel-column {
        max-width: none;
        justify-self: stretch;
    }
}

@media (max-width: 540px) {
    .auth-shell {
        width: min(100% - 28px, 480px);
        gap: 26px;
        padding-top: 20px;
    }

    .auth-brand .brand-mark {
        width: 44px;
        height: 44px;
    }

    .auth-brand-name {
        font-size: 21px;
    }

    .auth-brand-tagline {
        margin-top: 5px;
        font-size: 9px;
    }

    .auth-card {
        padding: 28px 22px;
        border-radius: 19px;
    }

    .auth-card h2 {
        font-size: 29px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
