:root {
    --command-bg: #06121f;
    --command-panel: rgba(12, 29, 45, 0.92);
    --command-line: rgba(148, 176, 198, 0.16);
    --command-muted: #91a5b7;
    --command-text: #f2f7fa;
    --command-green: #2fe6a6;
    --command-green-dark: #0b9f75;
    --command-blue: #56a8ff;
}

html,
body.nexus-login-page {
    min-height: 100%;
}

html:has(body.nexus-login-page) {
    overflow-x: hidden;
}

body.nexus-login-page {
    margin: 0;
    color: var(--command-text);
    background: var(--command-bg);
    font-family: "Segoe UI", Inter, Arial, sans-serif;
    overflow-x: hidden;
}

body.nexus-login-page .nexus-wrap {
    min-height: 100vh;
    min-height: 100svh;
    padding: 0;
}

body.nexus-login-page .nexus-wrap > .content {
    min-height: inherit;
}

body.nexus-login-page > .nexus-foot {
    display: none;
}

body.nexus-login-page a {
    color: inherit;
}

.command-login,
.command-login * {
    box-sizing: border-box;
}

.command-login {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(20px, 3vw, 42px) clamp(20px, 5vw, 74px) 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 48%, rgba(47, 230, 166, 0.08), transparent 34%),
        linear-gradient(135deg, rgba(6, 18, 31, 0.98), rgba(8, 25, 40, 0.96));
}

.command-grid {
    position: absolute;
    z-index: -3;
    inset: 0;
    opacity: 0.38;
    background-image:
        linear-gradient(rgba(94, 132, 159, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(94, 132, 159, 0.09) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to right, #000, rgba(0, 0, 0, 0.22));
}

.command-glow {
    position: absolute;
    z-index: -2;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0.5;
}

.command-glow-one {
    top: -260px;
    left: 28%;
    border: 1px solid rgba(86, 168, 255, 0.32);
    box-shadow: 0 0 110px rgba(86, 168, 255, 0.12), inset 0 0 100px rgba(86, 168, 255, 0.05);
}

.command-glow-two {
    right: -280px;
    bottom: -210px;
    border: 1px solid rgba(47, 230, 166, 0.35);
    box-shadow: 0 0 130px rgba(47, 230, 166, 0.12), inset 0 0 90px rgba(47, 230, 166, 0.05);
}

.command-header,
.command-footer,
.command-layout {
    width: min(1280px, 100%);
    margin-inline: auto;
}

.command-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.command-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--command-text);
    text-decoration: none;
}

.command-brand:hover,
.command-brand:focus {
    color: var(--command-text);
    text-decoration: none;
}

.command-brand-mark {
    display: grid;
    grid-template-columns: repeat(2, 10px);
    gap: 4px;
    padding: 9px;
    border: 1px solid rgba(47, 230, 166, 0.42);
    border-radius: 12px;
    background: rgba(47, 230, 166, 0.06);
    box-shadow: 0 0 25px rgba(47, 230, 166, 0.08);
}

.command-brand-mark span {
    width: 10px;
    height: 10px;
    border: 2px solid var(--command-green);
    border-radius: 3px;
}

.command-brand-mark span:nth-child(2),
.command-brand-mark span:nth-child(3) {
    background: var(--command-green);
}

.command-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.command-brand-copy strong {
    font-size: 18px;
    letter-spacing: 0.14em;
}

.command-brand-copy small {
    margin-top: 6px;
    color: var(--command-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.24em;
}

.command-system-status {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 9px 13px;
    border: 1px solid rgba(47, 230, 166, 0.2);
    border-radius: 8px;
    background: rgba(8, 30, 38, 0.58);
}

.command-system-status > span:last-child {
    display: flex;
    flex-direction: column;
}

.command-system-status small {
    color: var(--command-muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.command-system-status strong {
    margin-top: 3px;
    color: var(--command-green);
    font-size: 10px;
    letter-spacing: 0.08em;
}

.command-status-pulse {
    position: relative;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--command-green);
    box-shadow: 0 0 14px rgba(47, 230, 166, 0.85);
}

.command-status-pulse::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(47, 230, 166, 0.3);
    border-radius: inherit;
    animation: command-pulse 2.2s ease-out infinite;
}

.command-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.7fr);
    align-items: center;
    gap: clamp(42px, 7vw, 104px);
    flex: 1;
    padding-block: clamp(34px, 6vh, 76px);
}

.command-layout::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 8%;
    bottom: 8%;
    left: 58%;
    width: 1px;
    background: linear-gradient(transparent, rgba(86, 168, 255, 0.22), transparent);
}

.command-intro {
    max-width: 700px;
}

.command-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    color: var(--command-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
}

.command-kicker::before {
    content: "";
    width: 34px;
    height: 1px;
    background: var(--command-green);
    box-shadow: 0 0 10px rgba(47, 230, 166, 0.7);
}

.command-kicker span {
    color: var(--command-green);
}

.command-intro h1 {
    margin: 0;
    color: var(--command-text);
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 650;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.command-intro h1 em {
    color: transparent;
    font-style: normal;
    background: linear-gradient(90deg, var(--command-green), #69c6ff);
    -webkit-background-clip: text;
    background-clip: text;
}

.command-lede {
    max-width: 590px;
    margin: 24px 0 30px;
    color: #a9bbc9;
    font-size: clamp(15px, 1.35vw, 18px);
    line-height: 1.7;
}

.command-capabilities {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.command-capabilities article {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 72px;
    padding: 12px;
    border: 1px solid rgba(123, 155, 179, 0.16);
    border-radius: 10px;
    background: rgba(10, 26, 40, 0.54);
}

.capability-icon {
    display: grid;
    flex: 0 0 35px;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 8px;
    color: var(--command-green);
    background: rgba(47, 230, 166, 0.08);
}

.capability-icon svg {
    width: 20px;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.command-capabilities article > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.command-capabilities strong {
    color: #e8f2f6;
    font-size: 11px;
}

.command-capabilities small {
    margin-top: 3px;
    overflow: hidden;
    color: #7f95a7;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-auth-panel {
    position: relative;
    width: 100%;
    max-width: 470px;
    justify-self: end;
    padding: clamp(26px, 3vw, 40px);
    overflow: hidden;
    border: 1px solid rgba(127, 163, 187, 0.25);
    border-radius: 18px;
    background: linear-gradient(155deg, rgba(16, 39, 58, 0.96), rgba(8, 25, 40, 0.94));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36), inset 0 1px rgba(255, 255, 255, 0.035);
}

.command-auth-panel::before,
.command-auth-panel::after {
    content: "";
    position: absolute;
    width: 46px;
    height: 46px;
    pointer-events: none;
}

.command-auth-panel::before {
    top: 11px;
    left: 11px;
    border-top: 1px solid rgba(47, 230, 166, 0.45);
    border-left: 1px solid rgba(47, 230, 166, 0.45);
    border-radius: 8px 0 0;
}

.command-auth-panel::after {
    right: 11px;
    bottom: 11px;
    border-right: 1px solid rgba(86, 168, 255, 0.35);
    border-bottom: 1px solid rgba(86, 168, 255, 0.35);
    border-radius: 0 0 8px;
}

.command-auth-scan {
    position: absolute;
    top: 0;
    right: 20%;
    left: 20%;
    height: 1px;
    opacity: 0.7;
    background: linear-gradient(90deg, transparent, var(--command-green), transparent);
    box-shadow: 0 0 16px rgba(47, 230, 166, 0.75);
    animation: command-scan 6s ease-in-out infinite;
}

.command-auth-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.command-auth-heading p {
    margin: 0 0 7px;
    color: var(--command-green);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.22em;
}

.command-auth-heading h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 650;
    letter-spacing: -0.03em;
}

.command-lock {
    display: grid;
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    place-items: center;
    border: 1px solid rgba(47, 230, 166, 0.2);
    border-radius: 10px;
    color: var(--command-green);
    background: rgba(47, 230, 166, 0.05);
}

.command-lock svg {
    width: 21px;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
}

.command-auth-help {
    margin: 13px 0 27px;
    color: var(--command-muted);
    font-size: 13px;
    line-height: 1.55;
}

.command-field {
    margin-bottom: 19px;
}

.command-field label {
    display: block;
    margin-bottom: 8px;
    color: #c2d0da;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.command-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    height: 50px;
    border: 1px solid rgba(129, 162, 184, 0.23);
    border-radius: 9px;
    background: rgba(3, 15, 26, 0.62);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.command-input-wrap:focus-within {
    border-color: rgba(47, 230, 166, 0.62);
    background: rgba(3, 15, 26, 0.82);
    box-shadow: 0 0 0 3px rgba(47, 230, 166, 0.08);
}

.command-input-wrap > span {
    display: grid;
    flex: 0 0 47px;
    width: 47px;
    place-items: center;
    color: #668398;
}

.command-input-wrap > span svg {
    width: 18px;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.command-input-wrap input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 46px 0 0;
    border: 0;
    outline: 0;
    color: #f7fbfd;
    background: transparent;
    font: inherit;
    font-size: 14px;
}

.command-input-wrap input::placeholder {
    color: #5f7688;
}

.command-input-wrap input:-webkit-autofill,
.command-input-wrap input:-webkit-autofill:hover,
.command-input-wrap input:-webkit-autofill:focus {
    border: 0;
    -webkit-text-fill-color: #f7fbfd;
    caret-color: #f7fbfd;
    box-shadow: 0 0 0 1000px #071b2b inset;
    transition: background-color 9999s ease-in-out 0s;
}

.command-field.has-error .command-input-wrap {
    border-color: #ff7185;
}

.command-field-error {
    margin: 6px 0 0;
    color: #ff8b9b;
    font-size: 11px;
}

.command-password-toggle {
    position: absolute;
    right: 3px;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    outline: 0;
    color: #7e96a8;
    background: transparent;
    cursor: pointer;
}

.command-password-toggle:hover,
.command-password-toggle:focus-visible {
    color: var(--command-green);
}

.command-password-toggle svg {
    width: 18px;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.command-password-toggle .eye-closed,
.command-password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.command-password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

.command-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 4px 0 23px;
    color: var(--command-muted);
    font-size: 11px;
}

.command-form-options a {
    color: #8ecaff;
    font-weight: 650;
    text-decoration: none;
}

.command-form-options a:hover,
.command-form-options a:focus {
    color: var(--command-green);
    text-decoration: none;
}

.command-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}

.command-checkbox input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.command-checkbox > span {
    position: relative;
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    border: 1px solid #526e82;
    border-radius: 4px;
    background: rgba(3, 15, 26, 0.6);
}

.command-checkbox input:checked + span {
    border-color: var(--command-green);
    background: var(--command-green);
}

.command-checkbox input:checked + span::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 4px;
    width: 5px;
    height: 8px;
    border-right: 2px solid #063625;
    border-bottom: 2px solid #063625;
    transform: rotate(45deg);
}

.command-checkbox input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(47, 230, 166, 0.16);
}

.command-submit {
    display: flex;
    width: 100%;
    height: 52px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: 1px solid var(--command-green);
    border-radius: 9px;
    color: #032b1f;
    background: linear-gradient(110deg, var(--command-green), #70f0c3);
    box-shadow: 0 11px 30px rgba(47, 230, 166, 0.16);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.command-submit:hover,
.command-submit:focus-visible {
    color: #032b1f;
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 15px 38px rgba(47, 230, 166, 0.25);
}

.command-submit svg {
    width: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.command-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 19px;
    color: #70889b;
    font-size: 9px;
    letter-spacing: 0.03em;
    text-align: center;
}

.command-security-note > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--command-green);
    box-shadow: 0 0 8px rgba(47, 230, 166, 0.7);
}

.command-security-note i {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #4e687a;
}

.command-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(118, 151, 175, 0.13);
    color: #647d90;
    font-size: 10px;
}

.command-footer p {
    margin: 0;
}

.command-footer strong {
    color: #93a8b7;
    font-weight: 500;
}

.command-footer a {
    color: #b4c5d0;
    font-weight: 700;
    text-decoration: none;
}

.command-suite {
    color: #c6d6df;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.command-suite span {
    margin-right: 7px;
    color: #577184;
    font-size: 8px;
    letter-spacing: 0.16em;
}

@keyframes command-pulse {
    0% { transform: scale(0.6); opacity: 0.9; }
    75%, 100% { transform: scale(1.7); opacity: 0; }
}

@keyframes command-scan {
    0%, 100% { transform: translateY(0); opacity: 0.2; }
    50% { transform: translateY(460px); opacity: 0.7; }
}

@media (min-width: 1001px) and (max-height: 800px) {
    .command-login {
        padding-top: 22px;
        padding-bottom: 14px;
    }

    .command-layout {
        padding-block: 22px;
    }

    .command-intro h1 {
        font-size: clamp(44px, 4.4vw, 62px);
    }

    .command-lede {
        margin-block: 18px 22px;
    }

    .command-capabilities article {
        min-height: 62px;
    }

    .command-auth-panel {
        padding: 27px 32px;
    }

    .command-auth-help {
        margin-bottom: 20px;
    }

    .command-field {
        margin-bottom: 15px;
    }

    .command-form-options {
        margin-bottom: 18px;
    }

    .command-security-note {
        margin-top: 14px;
    }

    .command-footer {
        padding-top: 11px;
    }
}

@media (max-width: 1000px) {
    .command-login {
        overflow: visible;
    }

    .command-glow {
        display: none;
    }

    .command-layout {
        grid-template-columns: 1fr;
        gap: 34px;
        padding-block: 52px 36px;
    }

    .command-layout::before {
        display: none;
    }

    .command-intro {
        max-width: 760px;
        text-align: center;
        margin-inline: auto;
    }

    .command-kicker {
        justify-content: center;
    }

    .command-lede {
        margin-inline: auto;
    }

    .command-auth-panel {
        max-width: 540px;
        justify-self: center;
    }
}

@media (max-width: 640px) {
    .command-login {
        padding: 18px 15px 17px;
    }

    .command-header {
        align-items: flex-start;
    }

    .command-brand-copy small {
        max-width: 150px;
        line-height: 1.25;
    }

    .command-system-status {
        padding: 8px;
    }

    .command-system-status small {
        display: none;
    }

    .command-system-status strong {
        max-width: 80px;
        margin: 0;
        font-size: 8px;
        line-height: 1.3;
    }

    .command-layout {
        gap: 28px;
        padding-block: 38px 28px;
    }

    .command-kicker {
        font-size: 9px;
        letter-spacing: 0.16em;
    }

    .command-intro h1 {
        font-size: clamp(34px, 10.5vw, 48px);
    }

    .command-lede {
        margin-block: 18px 24px;
        font-size: 14px;
        line-height: 1.6;
    }

    .command-capabilities {
        grid-template-columns: 1fr;
    }

    .command-capabilities article {
        min-height: 58px;
        text-align: left;
    }

    .command-capabilities small {
        white-space: normal;
    }

    .command-auth-panel {
        padding: 27px 20px 24px;
        border-radius: 14px;
    }

    .command-auth-heading h2 {
        font-size: 27px;
    }

    .command-auth-help {
        margin-bottom: 23px;
    }

    .command-form-options {
        align-items: flex-start;
        font-size: 10px;
    }

    .command-checkbox {
        max-width: 170px;
        line-height: 1.35;
    }

    .command-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 9px;
        line-height: 1.5;
    }
}

@media (max-width: 380px) {
    .command-brand-copy strong {
        font-size: 15px;
    }

    .command-brand-copy small {
        display: none;
    }

    .command-system-status strong {
        display: none;
    }

    .command-system-status {
        border-radius: 50%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .command-status-pulse::after,
    .command-auth-scan {
        animation: none;
    }
}
