/* =====================================================================
   LOGIN — STANDALONE PRE-AUTH SCREEN
   No topbar, no rail, no workspace chip. The page is its own room: a
   single centred sign-in card on the portal's dark surface, with the
   ambient aurora wash rendered behind it.
===================================================================== */

.login-body {
    overflow: auto !important;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
    background: var(--color-bg);
}

.login {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
}

.login__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--color-text-strong);
}
.login__brand-wordmark {
    /* Mask-image wordmark with the multi-stop brand gradient. The mask
     * gives us the glyph shape; background carries the colour ramp so
     * a theme swap (any of --accent / --gradient-brand) retints the
     * wordmark automatically. */
    display: inline-block;
    width: 122px;
    height: 22px;
    background: var(--gradient-brand);
    -webkit-mask: url("/static/assets/logo-wordmark.svg") no-repeat center / contain;
            mask: url("/static/assets/logo-wordmark.svg") no-repeat center / contain;
}
.login__brand-slash {
    color: var(--fg-dim);
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    transform: translateY(-1px);
    user-select: none;
}
.login__brand-tag {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    color: var(--fg-muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.login__card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.login__head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.login__title {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text-strong);
    letter-spacing: -0.015em;
    margin: 0;
    line-height: 1.25;
}
.login__subtitle {
    font-size: 13px;
    color: var(--fg-muted);
    line-height: 1.55;
    margin: 0;
}

.login__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login__label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.login__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-strong);
    font-family: var(--font-mono);
}
.login__pw-wrap {
    position: relative;
}
.login__pw-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--fg-muted);
    cursor: pointer;
    transition: color var(--dur-hover) var(--ease-out),
                background var(--dur-hover) var(--ease-out);
}
.login__pw-toggle:hover {
    color: var(--color-text-strong);
    background: var(--color-surface-2);
}
.login__pw-toggle svg {
    /* flex-shrink: 0 is load-bearing — the icon is the only flex child of
       the button, and its auto min-width otherwise collapses to 0 (Blink
       flex min-size behaviour for inline SVGs sized only via viewBox),
       which renders the reveal control invisible. */
    flex-shrink: 0;
    width: 15px; height: 15px;
}

/* Row that holds "Keep me signed in" + "Forgot password?". Stacks
   the checkbox on the left and the link on the right, with subtle
   vertical alignment so they share a baseline. */
.login__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
}
.login__forgot-link {
    font-size: 12.5px;
    color: var(--fg-muted);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--dur-hover);
    display: inline-block;
    padding: 4px 0;
}
.login__forgot-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.login__hint {
    display: block;
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--fg-muted);
    line-height: 1.45;
}

.login__remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 12.5px;
    color: var(--fg-muted);
    margin-top: 0;
}
.login__remember input {
    appearance: none;
    width: 14px; height: 14px;
    border: 1px solid var(--color-border-strong);
    border-radius: 3px;
    background: var(--color-surface-2);
    cursor: pointer;
    position: relative;
    transition: border-color var(--dur-hover), background var(--dur-hover);
}
.login__remember input:hover {
    border-color: var(--fg-muted);
}
.login__remember input:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.login__remember input:checked::after {
    content: "";
    position: absolute;
    top: 1px; left: 4px;
    width: 4px; height: 8px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.login__submit {
    width: 100%;
    justify-content: center;
    padding: 11px 14px;
    font-size: 14px;
    margin-top: 6px;
}
/* Inline SVG inside the submit button doesn't carry a class, so the
 * global `.btn .icon` size rule doesn't apply. Pin it to 14px here. */
.login__submit svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.login__foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}
.login__foot-text {
    font-size: 12.5px;
    color: var(--fg-muted);
    text-align: center;
    line-height: 1.5;
}
.login__foot-text a {
    color: var(--color-text-strong);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border-strong);
    padding-bottom: 1px;
}
.login__foot-text a:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent);
}
.login__version {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--fg-dim);
    letter-spacing: var(--tracking-wide);
}
.login__version-dot {
    display: inline-block;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--ok);
    margin-right: 6px;
    vertical-align: 1px;
    box-shadow: 0 0 0 3px rgba(48, 178, 121, 0.18);
}
