:root {
    color: #172033;
    background: #f4f7fb;
    font-family: var(--font-family-ui, Tahoma, Arial, system-ui, -apple-system, sans-serif);
    font-synthesis: none;
}

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

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 15% 0%, rgb(18 111 104 / 0.14), transparent 34rem),
        linear-gradient(145deg, #f8fafc, #edf3f8);
    color: #172033;
}

button,
input {
    font: inherit;
}

:focus-visible {
    outline: 3px solid rgb(18 111 104 / 0.32);
    outline-offset: 2px;
}

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

.login-card {
    width: min(100%, 460px);
    padding: 34px;
    border: 1px solid #e3e8ef;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgb(16 36 62 / 0.12);
}

.login-card__header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}

.login-card__mark {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(145deg, #16857c, #0b5c57);
    box-shadow: 0 10px 24px rgb(18 111 104 / 0.22);
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 23px;
    font-weight: 800;
}

.login-card__eyebrow {
    margin: 0 0 4px;
    color: #126f68;
    direction: ltr;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: right;
}

.login-card h1 {
    margin: 0;
    font-size: clamp(25px, 5vw, 32px);
    line-height: 1.35;
}

.login-card__header p:last-child {
    margin: 8px 0 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.8;
}

.login-alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #fac5c5;
    border-radius: 12px;
    background: #fff1f1;
    color: #9e2525;
    font-size: 13px;
    line-height: 1.7;
}

form {
    display: grid;
    gap: 20px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field label {
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.form-field input {
    width: 100%;
    min-height: 48px;
    padding: 10px 13px;
    border: 1px solid #cfd7e3;
    border-radius: 12px;
    background: #ffffff;
    color: #172033;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field input:hover {
    border-color: #9facbd;
}

.form-field input:focus {
    border-color: #126f68;
    box-shadow: 0 0 0 3px rgb(18 111 104 / 0.12);
    outline: none;
}

button[type="submit"] {
    position: relative;
    min-height: 50px;
    cursor: pointer;
    border: 0;
    border-radius: 13px;
    background: #126f68;
    color: #ffffff;
    font-weight: 700;
    transition: background-color 150ms ease, transform 150ms ease;
}

button[type="submit"]:hover:not(:disabled) {
    background: #0b5752;
    transform: translateY(-1px);
}

button[type="submit"]:disabled {
    cursor: wait;
    opacity: 0.72;
}

form.is-submitting button[type="submit"] {
    pointer-events: none;
    cursor: wait;
    opacity: 0.72;
}

.submit-pending {
    display: none;
}

.setup-details {
    display: grid;
    gap: 12px;
    margin: 0 0 24px;
}

.setup-details > div {
    padding: 12px 14px;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    background: #f8fafc;
}

.setup-details dt {
    color: #667085;
    font-size: 12px;
}

.setup-details dd {
    margin: 4px 0 0;
    font-weight: 700;
}

.manual-key {
    overflow-wrap: anywhere;
    color: #0b5752;
    font-family: var(--font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    letter-spacing: 0.08em;
}

.setup-cancel-form {
    margin-top: 14px;
}

.secondary-button {
    width: 100%;
    min-height: 46px;
    cursor: pointer;
    border: 1px solid #cfd7e3;
    border-radius: 13px;
    background: #ffffff;
    color: #344054;
    font-weight: 700;
}

form.is-submitting [data-manager-login-label] {
    display: none;
}

form.is-submitting .submit-pending {
    display: inline;
}

@media (max-width: 520px) {
    .login-shell {
        align-items: start;
        padding: 20px 14px;
    }

    .login-card {
        margin-top: 7vh;
        padding: 26px 20px;
        border-radius: 18px;
    }

    .login-card__header {
        gap: 12px;
    }

    .login-card__mark {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }
}

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