:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --background: #050505;
    --surface: #ffffff;
    --text: #111111;
    --muted: #666666;
    --border: #d6d6d6;
    --focus: #1976d2;
    --danger: #a40000;
}

* {
    box-sizing: border-box;
}

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

body {
    background: var(--background);
    color: var(--text);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.login-card {
    width: min(100%, 29rem);
    padding: clamp(1.75rem, 5vw, 3rem);
    background: var(--surface);
    border: 1px solid #242424;
    border-radius: 0.65rem;
    box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 45%);
}

.slimcd-logo {
    display: block;
    width: min(100%, 18.3rem);
    height: auto;
    margin: 0 auto 2.25rem;
}

.login-heading {
    margin-bottom: 1.75rem;
}

.eyebrow {
    margin: 0 0 0.45rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 7vw, 2.7rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.login-heading p:last-child,
.error-card > p {
    margin: 0.85rem 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.field {
    margin-bottom: 1.15rem;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 650;
}

input {
    width: 100%;
    min-height: 3rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 0.3rem;
    background: #ffffff;
    color: #111111;
    font: inherit;
}

input:focus {
    outline: 3px solid rgb(25 118 210 / 22%);
    border-color: var(--focus);
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 3.1rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    width: 2.35rem;
    min-height: 2.35rem;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0.4rem;
    transform: translateY(-50%);
    border: 0;
    border-radius: 0.3rem;
    background: transparent;
    color: #555555;
    cursor: pointer;
}

.password-toggle:hover {
    background: #eeeeee;
    color: #111111;
}

.password-toggle:focus-visible {
    outline: 3px solid rgb(25 118 210 / 35%);
    outline-offset: 1px;
}

.password-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.password-toggle svg[hidden] {
    display: none;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: -0.1rem 0 1.15rem;
}

.remember-row input[type="checkbox"] {
    width: 1.05rem;
    min-height: 1.05rem;
    margin: 0;
    padding: 0;
    accent-color: #111111;
}

.remember-row label {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
}

.primary-button,
.button-link {
    width: 100%;
    min-height: 3rem;
    display: inline-grid;
    place-items: center;
    margin-top: 0.4rem;
    padding: 0.75rem 1rem;
    border: 1px solid #111111;
    border-radius: 0.3rem;
    background: #111111;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.primary-button:hover,
.button-link:hover {
    background: #303030;
}

.primary-button:focus-visible,
.button-link:focus-visible {
    outline: 3px solid rgb(25 118 210 / 35%);
    outline-offset: 2px;
}

.validation-summary,
.field span {
    color: var(--danger);
    font-size: 0.86rem;
}

.validation-summary:empty,
.field span:empty {
    display: none;
}

.validation-summary ul {
    margin: 0 0 1rem;
    padding-left: 1.15rem;
}

.environment {
    margin: 1.5rem 0 0;
    color: var(--muted);
    font-size: 0.76rem;
    text-align: center;
}

.error-card h1 {
    margin-top: 0.25rem;
}

.error-card .button-link {
    margin-top: 1.5rem;
}

.error-card .request-id {
    margin-top: 1.25rem;
    font-size: 0.75rem;
    overflow-wrap: anywhere;
}

@media (max-width: 32rem) {
    .login-shell {
        padding: 0;
        background: #ffffff;
    }

    .login-card {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }
}
