:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #181716;
    color: #fafaf9;
    letter-spacing: 0;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: #181716;
}

button,
input {
    font: inherit;
    letter-spacing: 0;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px 20px;
}

.login-panel {
    width: min(100%, 360px);
}

.brand-mark {
    width: 34px;
    height: 34px;
    margin-bottom: 16px;
    background: #f5f5f4;
    -webkit-mask: url("/__canvas_auth/logo.svg") center / contain no-repeat;
    mask: url("/__canvas_auth/logo.svg") center / contain no-repeat;
}

.brand-name {
    margin: 0 0 42px;
    color: #d6d3d1;
    font-size: 15px;
    font-weight: 600;
}

h1 {
    margin: 0 0 28px;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
}

form {
    display: grid;
}

form > label:first-child {
    margin-bottom: 9px;
    color: #d6d3d1;
    font-size: 14px;
    font-weight: 500;
}

#access-key {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    color: #fafaf9;
    background: #22211f;
    border: 1px solid #44403c;
    border-radius: 7px;
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

#access-key:hover {
    border-color: #57534e;
}

#access-key:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.show-key {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: #a8a29e;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
}

.show-key input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #0d9488;
}

.form-status {
    min-height: 20px;
    margin: 18px 0 8px;
    color: #fca5a5;
    font-size: 13px;
    line-height: 20px;
}

.form-status[data-state="success"] {
    color: #5eead4;
}

#submit-button {
    width: 100%;
    height: 44px;
    color: #ffffff;
    background: #0f766e;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 600;
    transition: background 140ms ease, opacity 140ms ease;
}

#submit-button:hover:not(:disabled) {
    background: #0d9488;
}

#submit-button:focus-visible {
    outline: 3px solid rgba(45, 212, 191, 0.35);
    outline-offset: 2px;
}

#submit-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

@media (prefers-color-scheme: light) {
    :root,
    body {
        color-scheme: light;
        color: #1c1917;
        background: #fafaf9;
    }

    .brand-mark {
        background: #1c1917;
    }

    .brand-name,
    form > label:first-child {
        color: #57534e;
    }

    #access-key {
        color: #1c1917;
        background: #ffffff;
        border-color: #d6d3d1;
    }

    #access-key:hover {
        border-color: #a8a29e;
    }

    .show-key {
        color: #78716c;
    }

    .form-status {
        color: #b91c1c;
    }

    .form-status[data-state="success"] {
        color: #0f766e;
    }
}
