body.operator-auth {
    box-sizing: border-box;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    padding: clamp(16px, 4vw, 56px);
    place-items: center;
    background: var(--theme-bg);
    color: var(--theme-text);
    font-family: var(--ui-font, system-ui, sans-serif);
}

.operator-auth *, .operator-auth *::before, .operator-auth *::after {
    box-sizing: border-box;
}

.operator-auth-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
    width: min(100%, 1040px);
    min-height: 550px;
    overflow: hidden;
    border: 1px solid var(--theme-border);
    border-radius: var(--ui-radius, 16px);
    background: var(--theme-panel);
    animation: operator-auth-enter 220ms var(--ui-ease, ease-out) both;
}

.operator-auth-intro {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: clamp(28px, 4vw, 52px);
    overflow: hidden;
    background: var(--theme-nav);
    color: var(--theme-text);
}

.operator-auth:has(#homeBackground:not([hidden])) .operator-auth-shell {
    background: transparent;
}

.operator-auth:has(#homeBackground:not([hidden])) .operator-auth-intro {
    background: color-mix(in srgb, var(--theme-nav) 55%, transparent);
}

.operator-auth:has(#homeBackground:not([hidden])) .operator-auth-panel {
    background: color-mix(in srgb, var(--theme-panel) 55%, transparent);
}

.operator-auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 17px;
    font-weight: 560;
    letter-spacing: -.018em;
}

.operator-auth-brand .operator-mark {
    --ui-mark-size: 36px;
}

.operator-auth-theme {
    position: absolute;
    z-index: 2;
    inset-block-start: 14px;
    inset-inline-end: 14px;
    width: 36px;
    height: 36px;
    padding: 0;
}

.operator-auth-theme span {
    display: none;
}

.operator-auth-intro-copy {
    position: relative;
    z-index: 1;
    margin-block-end: clamp(144px, 17vw, 220px);
}

.operator-auth-intro-copy .operator-auth-heading {
    margin: 0;
    color: var(--theme-text);
    font-size: clamp(34px, 4.4vw, 60px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.045em;
}

.operator-auth-intro-copy p {
    max-width: 37ch;
    margin: 20px 0 0;
    color: var(--theme-muted);
    font-size: 15px;
    line-height: 1.45;
}

.operator-auth-panel {
    display: grid;
    min-width: 0;
    align-content: center;
    padding: clamp(28px, 4.5vw, 60px);
    background: var(--theme-panel);
}

.operator-auth-panel h1 {
    margin: 0 0 28px;
    color: var(--theme-text);
    font-size: clamp(26px, 2.8vw, 35px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -.038em;
}

.operator-auth-form {
    display: grid;
    gap: 18px;
}

.operator-auth-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.operator-auth-field label {
    color: var(--theme-text);
    font-size: 12px;
    font-weight: 550;
    letter-spacing: .1em;
    line-height: 1.35;
    text-transform: uppercase;
}

.operator-auth-field input,
.operator-auth-reveal,
.operator-auth-submit {
    font: inherit;
    transition: background-color var(--ui-fast, 140ms), border-color var(--ui-fast, 140ms),
        color var(--ui-fast, 140ms), filter var(--ui-fast, 140ms), transform var(--ui-fast, 140ms);
}

.operator-auth-field input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid var(--ui-control-line);
    border-radius: 6px;
    background: var(--theme-bg);
    color: var(--theme-text);
    font-size: 16px;
}

.operator-auth-field input:hover {
    border-color: var(--theme-muted);
}

.operator-auth :is(input, button):focus-visible {
    outline: 2px solid var(--theme-accent);
    outline-offset: 3px;
}

.operator-auth-field input[aria-invalid="true"] {
    border-color: var(--ui-danger);
}

.operator-auth-password {
    position: relative;
}

.operator-auth-password input {
    padding-inline-end: 96px;
}

.operator-auth-reveal {
    position: absolute;
    inset: 4px 5px 4px auto;
    padding: 0 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--theme-text);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.operator-auth-reveal:hover {
    background: var(--theme-hover);
}

.operator-auth-submit {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--theme-accent);
    color: var(--ui-action-ink);
    font-weight: 600;
    cursor: pointer;
}

.operator-auth-submit:hover:not(:disabled) {
    filter: brightness(1.07);
}

.operator-auth-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.operator-auth-submit:disabled {
    border-color: var(--theme-border);
    background: var(--theme-bg);
    color: var(--theme-muted);
    cursor: wait;
}

.operator-auth-spinner {
    display: none;
    width: 14px;
    height: 14px;
    flex: none;
    border: 2px solid currentColor;
    border-inline-end-color: transparent;
    border-radius: 50%;
}

.operator-auth-submit:disabled .operator-auth-spinner {
    display: inline-block;
    animation: operator-auth-spin 700ms linear infinite;
}

.operator-auth-error:not(:empty) {
    padding: 10px 12px;
    border: 1px solid var(--ui-danger);
    border-radius: 6px;
    background: var(--ui-status-danger-surface);
    color: var(--ui-danger);
    font-size: 14px;
    line-height: 1.4;
}

.operator-auth-error:empty,
.operator-auth-announcement {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@keyframes operator-auth-enter {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes operator-auth-spin {
    to { transform: rotate(1turn); }
}

@media (max-width: 720px) {
    .operator-auth-shell {
        grid-template-columns: minmax(0, 1fr);
        width: min(100%, 450px);
        min-height: 0;
    }

    .operator-auth-intro {
        padding: 20px clamp(18px, 5vw, 32px);
    }

    .operator-auth-intro-copy {
        display: none;
    }

    .operator-auth-panel {
        padding: clamp(20px, 5vw, 32px);
    }

    :root[data-theme="night"] .operator-auth:has(#homeBackground:not([hidden])) .operator-auth-register {
        color: color-mix(in srgb, var(--theme-muted) 60%, var(--theme-text));
    }

    :root[data-theme="night"] .operator-auth:has(#homeBackground:not([hidden])) .operator-auth-register a {
        color: color-mix(in srgb, var(--theme-accent) 72%, var(--theme-text));
    }
}

@media (prefers-reduced-motion: reduce) {
    .operator-auth-shell,
    .operator-auth-submit:disabled .operator-auth-spinner {
        animation: none;
    }

    .operator-auth :is(input, button) {
        transition: none;
    }

    .operator-auth-submit:active:not(:disabled) {
        transform: none;
    }
}
.operator-auth-register { color: var(--ui-muted); margin: 18px 0 0; font-size: .875rem; }
.operator-auth-register a { color: var(--ui-accent); text-underline-offset: 3px; }
.operator-auth-register a:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 3px; }
