@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --auth-bg: #07111f;
    --auth-bg-secondary: #0b2140;
    --auth-surface: rgba(255, 255, 255, 0.94);
    --auth-surface-border: rgba(0, 85, 184, 0.12);
    --auth-text: #0d1b2d;
    --auth-muted: #5a6880;
    --auth-primary: #0055b8;
    --auth-primary-strong: #003f8c;
    --auth-accent: #ff6b00;
    --auth-accent-soft: rgba(255, 107, 0, 0.16);
    --auth-cyan: #47d7ff;
    --auth-shadow: 0 30px 80px rgba(3, 10, 22, 0.32);
    --auth-radius: 28px;
}

* {
    box-sizing: border-box;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    font-family: 'IBM Plex Sans', sans-serif;
    color: var(--auth-text);
    background:
        radial-gradient(circle at top left, rgba(71, 215, 255, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(255, 107, 0, 0.22), transparent 30%),
        linear-gradient(140deg, #050b15 0%, #08162a 42%, #0b2140 100%);
    position: relative;
    overflow-x: hidden;
}

body.auth-page::before,
body.auth-page::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body.auth-page::before {
    background:
        linear-gradient(rgba(71, 215, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(71, 215, 255, 0.08) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 92%);
}

body.auth-page::after {
    background: linear-gradient(120deg, rgba(0, 85, 184, 0.05), rgba(255, 107, 0, 0.03));
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 540px) minmax(360px, 1fr);
    align-items: stretch;
    gap: 24px;
    padding: 28px;
}

.auth-panel {
    position: relative;
    border-radius: var(--auth-radius);
    overflow: hidden;
}

.auth-panel--form {
    container-type: size;
    container-name: auth-form-panel;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 255, 0.93));
    border: 1px solid var(--auth-surface-border);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(16px);
}

.auth-panel--visual {
    container-type: size;
    container-name: auth-visual-panel;
    background:
        linear-gradient(180deg, rgba(9, 22, 42, 0.92), rgba(4, 11, 22, 0.96)),
        linear-gradient(145deg, rgba(0, 85, 184, 0.55), rgba(255, 107, 0, 0.18));
    border: 1px solid rgba(71, 215, 255, 0.14);
    box-shadow: var(--auth-shadow);
    color: #f2f7ff;
}

.auth-panel--visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 18%, rgba(71, 215, 255, 0.18), transparent 18%),
        radial-gradient(circle at 78% 72%, rgba(255, 107, 0, 0.2), transparent 22%),
        linear-gradient(rgba(71, 215, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(71, 215, 255, 0.06) 1px, transparent 1px);
    background-size: auto, auto, 44px 44px, 44px 44px;
    opacity: 0.9;
}

.auth-panel-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 44px 42px;
}

.auth-panel-inner--announcement {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: clamp(12px, 1.6vmin, 18px);
    overflow: hidden;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
    justify-content: center;
}

.auth-logo img {
    height: 58px;
    width: auto;
}

.auth-logo-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-logo-title,
.auth-hero h1,
.auth-visual-copy h2,
.auth-announcement-caption {
    font-family: 'Space Grotesk', sans-serif;
}

.auth-logo-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-logo-subtitle {
    color: var(--auth-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(0, 85, 184, 0.08);
    color: var(--auth-primary-strong);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.auth-pill::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--auth-cyan), var(--auth-primary));
    box-shadow: 0 0 16px rgba(71, 215, 255, 0.75);
}

.auth-hero {
    max-width: 420px;
    margin-bottom: 28px;
}

.auth-hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(2.4rem, 3.2vw, 3.6rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.auth-hero p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.auth-alerts {
    margin-bottom: 18px;
}

.auth-alerts .alert,
.auth-errors,
.auth-field-errors {
    border-radius: 16px;
    font-size: 0.94rem;
}

.auth-errors {
    list-style: none;
    margin: 0 0 18px;
    padding: 12px 16px;
    background: rgba(220, 53, 69, 0.08);
    color: #b42318;
}

.auth-field-errors {
    margin: 6px 0 0;
    color: #b42318;
}

.auth-field-help {
    margin: 6px 0 0;
    color: var(--auth-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-action-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form--aux {
    margin-top: 14px;
}

.auth-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--auth-text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-form input[type='text'],
.auth-form input[type='password'],
.auth-form input[type='email'] {
    width: 100%;
    border: 1px solid rgba(0, 85, 184, 0.14);
    border-radius: 18px;
    background: rgba(243, 247, 253, 0.95);
    padding: 16px 18px;
    font-size: 1rem;
    color: var(--auth-text);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.auth-password-control {
    position: relative;
    width: 100%;
}

.auth-password-control .auth-password-input {
    padding-right: 3.2rem;
}

.auth-form button.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 24px;
    height: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8b97a8;
    box-shadow: none;
    cursor: pointer;
    transform: translateY(-50%);
    opacity: 0.85;
    line-height: 0;
    transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.auth-form button.auth-password-toggle:hover,
.auth-form button.auth-password-toggle:focus {
    background: transparent;
    border-color: transparent;
    color: #5f6b7a;
    opacity: 1;
    transform: translateY(-50%) scale(1.02);
}

.auth-form button.auth-password-toggle:focus {
    outline: none;
    box-shadow: none;
}

.auth-form button.auth-password-toggle:active {
    transform: translateY(-50%) scale(0.98);
}

.auth-form button.auth-password-toggle .auth-password-toggle__icon {
    width: 16px;
    height: 16px;
    display: block;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-form input[type='text']:focus,
.auth-form input[type='password']:focus,
.auth-form input[type='email']:focus {
    outline: none;
    border-color: rgba(0, 85, 184, 0.55);
    box-shadow: 0 0 0 4px rgba(0, 85, 184, 0.12);
    transform: translateY(-1px);
}

.auth-form button {
    width: 100%;
    border: 0;
    border-radius: 18px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--auth-accent) 0%, #ff8740 100%);
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: none;
    transition: transform 160ms ease, filter 160ms ease;
}

.auth-form button:hover,
.auth-form button:focus {
    transform: translateY(-2px);
    filter: saturate(1.05);
}

.auth-form button:focus {
    outline: 3px solid rgba(0, 85, 184, 0.18);
    outline-offset: 3px;
}

.auth-inline-note {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
}

.auth-note-card {
    border-radius: 18px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(0, 85, 184, 0.07), rgba(0, 85, 184, 0.02));
    border: 1px solid rgba(0, 85, 184, 0.09);
}

.auth-note-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--auth-primary-strong);
    font-weight: 700;
}

.auth-note-card p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.auth-footer {
    margin-top: 24px;
    font-size: 0.95rem;
    color: var(--auth-muted);
}

.auth-footer a {
    color: var(--auth-primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer a:hover,
.auth-footer a:focus {
    color: var(--auth-accent);
}

.auth-visual-copy {
    max-width: 560px;
    margin-bottom: 28px;
}

.auth-kicker {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--auth-cyan);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.auth-visual-copy h2 {
    margin: 0 0 14px;
    font-size: clamp(2.6rem, 3.6vw, 4.4rem);
    line-height: 0.92;
    letter-spacing: -0.06em;
}

.auth-visual-copy p {
    margin: 0;
    max-width: 520px;
    color: rgba(242, 247, 255, 0.8);
    font-size: 1.05rem;
    line-height: 1.7;
}

.auth-announcement-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.auth-announcement {
    margin: 0;
    padding: 0;
}

.auth-announcement--single {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 1.4vmin, 16px);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(12, 29, 55, 0.52), rgba(7, 18, 34, 0.58));
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.auth-announcement img {
    display: block;
    width: 100%;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.auth-announcement--single img {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 18px;
    object-fit: contain;
    object-position: center;
}

.auth-announcement-caption {
    margin: 10px 4px 0;
    color: rgba(242, 247, 255, 0.82);
    font-size: 0.95rem;
    font-weight: 600;
}

.auth-announcement-copy {
    margin: 4px 4px 0;
    color: rgba(242, 247, 255, 0.62);
    font-size: 0.88rem;
    line-height: 1.55;
}

.auth-panel-signature {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-panel-signature strong {
    display: block;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--auth-cyan);
}

.auth-panel-signature span {
    color: rgba(242, 247, 255, 0.74);
    font-size: 0.93rem;
}

.auth-status-chip {
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

@media (min-width: 1121px) {
    body.auth-page {
        height: 100dvh;
        overflow: hidden;
    }

    .auth-shell {
        grid-template-columns: minmax(360px, 540px) minmax(420px, 1fr);
        gap: clamp(16px, 2vmin, 24px);
        padding: clamp(16px, 2.4vmin, 28px);
        height: 100dvh;
        min-height: 100dvh;
        overflow: hidden;
    }

    .auth-panel {
        min-height: 0;
    }

    .auth-panel-inner {
        display: flex;
        flex-direction: column;
        overflow: auto;
        scrollbar-gutter: stable;
        padding: clamp(22px, 3.8dvh, 44px) clamp(24px, 2.5vw, 42px);
    }

    .auth-panel-inner--announcement {
        overflow: hidden;
        padding: clamp(12px, 1.8vmin, 18px);
    }

    .auth-logo {
        gap: clamp(10px, 1.1vmin, 14px);
        margin-bottom: clamp(18px, 2.8dvh, 30px);
    }

    .auth-logo img {
        height: clamp(46px, 8.2dvh, 75px);
    }

    .auth-logo-title {
        font-size: clamp(1rem, 0.94rem + 0.24vw, 1.1rem);
    }

    .auth-logo-subtitle {
        font-size: clamp(0.74rem, 0.7rem + 0.14vw, 0.82rem);
        letter-spacing: clamp(0.12em, 0.08em + 0.18vw, 0.18em);
    }

    .auth-pill {
        padding: clamp(6px, 1dvh, 8px) clamp(12px, 1vw, 14px);
        font-size: clamp(0.74rem, 0.7rem + 0.14vw, 0.82rem);
    }

    .auth-hero,
    .auth-visual-copy {
        margin-bottom: clamp(18px, 2.8dvh, 28px);
    }

    .auth-hero h1 {
        margin: clamp(10px, 1.8dvh, 18px) 0 clamp(10px, 1.4dvh, 14px);
        font-size: clamp(2rem, 1.65rem + 1.2vw, 3.4rem);
    }

    .auth-hero p,
    .auth-visual-copy p,
    .auth-announcement-copy,
    .auth-note-card p,
    .auth-inline-status p {
        line-height: clamp(1.4, 1.32 + 0.25vw, 1.65);
    }

    .auth-hero p,
    .auth-visual-copy p {
        font-size: clamp(0.94rem, 0.9rem + 0.14vw, 1.02rem);
    }

    .auth-alerts {
        margin-bottom: clamp(14px, 2dvh, 18px);
    }

    .auth-form {
        gap: clamp(14px, 2dvh, 20px);
    }

    .auth-field label {
        margin-bottom: clamp(6px, 0.8dvh, 8px);
    }

    .auth-form input[type='text'],
    .auth-form input[type='password'],
    .auth-form input[type='email'],
    .auth-form button,
    .auth-secondary-link {
        min-height: clamp(48px, 7dvh, 56px);
        padding-top: clamp(12px, 1.7dvh, 16px);
        padding-bottom: clamp(12px, 1.7dvh, 16px);
    }

    .auth-inline-note,
    .auth-announcement-stack {
        gap: clamp(10px, 1.6dvh, 18px);
    }

    .auth-note-card {
        padding: clamp(12px, 1.8dvh, 14px) clamp(14px, 1.3vw, 16px);
    }

    .auth-footer,
    .auth-panel-signature {
        margin-top: auto;
    }

    .auth-footer {
        margin-top: clamp(16px, 2.2dvh, 24px);
    }

    .auth-kicker {
        margin-bottom: clamp(10px, 1.6dvh, 16px);
        font-size: clamp(0.74rem, 0.7rem + 0.16vw, 0.82rem);
    }

    .auth-visual-copy h2 {
        margin: 0 0 clamp(10px, 1.5dvh, 14px);
        font-size: clamp(2.2rem, 1.78rem + 1.5vw, 4.2rem);
    }

    .auth-announcement-stack .auth-announcement img {
        max-height: clamp(140px, 24dvh, 240px);
        object-fit: cover;
    }

    .auth-announcement--single img {
        object-fit: contain;
        max-height: none;
    }

    .auth-announcement-caption {
        margin-top: clamp(8px, 1.1dvh, 10px);
    }

    .auth-announcement-copy {
        margin-top: clamp(2px, 0.5dvh, 4px);
        font-size: clamp(0.8rem, 0.76rem + 0.14vw, 0.88rem);
    }

    .auth-panel-signature {
        gap: clamp(12px, 1.6vw, 16px);
        margin-top: clamp(18px, 2.2dvh, 24px);
        padding-top: clamp(16px, 2dvh, 22px);
    }

    .auth-panel-signature span {
        font-size: clamp(0.88rem, 0.84rem + 0.1vw, 0.93rem);
    }

    .auth-status-chip {
        padding: clamp(8px, 1.1dvh, 10px) clamp(12px, 0.95vw, 14px);
        font-size: clamp(0.74rem, 0.7rem + 0.12vw, 0.78rem);
    }
}

@container auth-form-panel (max-height: 760px) {
    .auth-logo,
    .auth-hero {
        margin-bottom: 16px;
    }

    .auth-hero h1 {
        font-size: clamp(1.8rem, 1.5rem + 1.1vw, 2.5rem);
        margin: 10px 0 8px;
    }

    .auth-hero p {
        line-height: 1.4;
    }

    .auth-form {
        gap: 14px;
    }

    .auth-form input[type='text'],
    .auth-form input[type='password'],
    .auth-form input[type='email'],
    .auth-form button,
    .auth-secondary-link {
        min-height: 46px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .auth-inline-note {
        margin-top: 4px;
        gap: 10px;
    }

    .auth-note-card {
        padding: 12px 14px;
    }

    .auth-note-card p {
        font-size: 0.84rem;
        line-height: 1.4;
    }

    .auth-footer {
        margin-top: 14px;
    }
}

@container auth-form-panel (max-height: 680px) {
    .auth-logo,
    .auth-hero,
    .auth-alerts {
        margin-bottom: 12px;
    }
}

@container auth-visual-panel (max-height: 760px) {
    .auth-visual-copy {
        margin-bottom: 16px;
    }

    .auth-visual-copy h2 {
        font-size: clamp(2rem, 1.7rem + 1.2vw, 3rem);
        margin-bottom: 10px;
    }

    .auth-visual-copy p,
    .auth-announcement-copy {
        line-height: 1.4;
    }

    .auth-announcement-stack {
        gap: 10px;
    }

    .auth-announcement-stack .auth-announcement img {
        max-height: 170px;
    }

    .auth-announcement--single img {
        height: 100%;
        max-height: none;
    }

    .auth-panel-signature {
        margin-top: 16px;
        padding-top: 16px;
    }
}

@container auth-visual-panel (max-height: 680px) {
    .auth-announcement-copy {
        font-size: 0.8rem;
    }
}

@media (max-width: 1120px) {
    body.auth-page {
        min-height: 100vh;
        height: auto;
        overflow-y: auto;
    }

    .auth-shell {
        height: auto;
        min-height: auto;
        overflow: visible;
        grid-template-columns: 1fr;
        align-items: start;
    }

    .auth-panel {
        height: auto;
        min-height: 0;
    }

    .auth-panel--form,
    .auth-panel--visual {
        container-type: normal;
    }

    .auth-panel-inner {
        display: block;
        height: auto;
        overflow: visible;
        scrollbar-gutter: auto;
    }

    .auth-panel-inner--announcement {
        display: flex;
    }

    .auth-panel--visual {
        min-height: 420px;
    }

    .auth-announcement--single {
        min-height: 360px;
        aspect-ratio: 4 / 5;
    }
}

@media (max-width: 760px) {
    .auth-shell {
        padding: 16px;
    }

    .auth-panel-inner {
        padding: 28px 22px;
    }

    .auth-announcement-stack,
    .auth-inline-note {
        grid-template-columns: 1fr;
    }

    .auth-announcement--single img {
        max-height: none;
    }

    .auth-hero h1 {
        font-size: 2.2rem;
    }

    .auth-visual-copy h2 {
        font-size: 2.5rem;
    }

    .auth-panel--visual {
        min-height: auto;
    }
}

.auth-action-stack form {
    margin: 0;
}

.auth-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    border-radius: 18px;
    border: 1px solid rgba(0, 85, 184, 0.16);
    background: rgba(255, 255, 255, 0.48);
    color: var(--auth-primary-strong);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

button.auth-secondary-link {
    appearance: none;
}

.auth-secondary-link:hover,
.auth-secondary-link:focus {
    color: var(--auth-accent);
    border-color: rgba(255, 107, 0, 0.26);
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.08);
}

.auth-secondary-link:focus {
    outline: 3px solid rgba(0, 85, 184, 0.14);
    outline-offset: 3px;
}

.auth-inline-status {
    border-radius: 20px;
    padding: 18px 20px;
    background: linear-gradient(180deg, rgba(0, 85, 184, 0.08), rgba(0, 85, 184, 0.03));
    border: 1px solid rgba(0, 85, 184, 0.1);
}

.auth-inline-status strong {
    display: block;
    margin-bottom: 6px;
    color: var(--auth-primary-strong);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.auth-inline-status p {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.65;
}