:root {
    color-scheme: light;
    --bg: #f3f7f5;
    --card: #ffffff;
    --ink: #17231d;
    --muted: #607067;
    --line: #dce7e1;
    --green: #087f5b;
    --green-dark: #066447;
    --blue: #1877f2;
    --red: #b42318;
    --amber: #9a6700;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
}

button,
input {
    font: inherit;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem max(1.25rem, calc((100vw - 980px) / 2));
    background: var(--card);
    border-bottom: 1px solid var(--line);
}

.topbar form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page {
    width: min(980px, calc(100% - 2rem));
    margin: 2rem auto;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1.1fr 0.9fr;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: 0 12px 35px rgba(22, 55, 39, 0.07);
}

.hero h1,
.login-card h1 {
    margin: 0.25rem 0 0.75rem;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    line-height: 1.05;
}

.hero > p,
.login-card > p,
#status-message {
    color: var(--muted);
    line-height: 1.6;
}

.eyebrow {
    margin: 0;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.registration-controls {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f7faf8;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.registration-controls label:not(.checkbox-row),
.login-card label {
    display: block;
    margin: 0.9rem 0 0.35rem;
    font-weight: 700;
}

.checkbox-row {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    font-weight: 700;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.75rem;
    border: 1px solid #b9c8c0;
    border-radius: 8px;
    background: white;
}

input:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(24, 119, 242, 0.25);
    outline-offset: 2px;
}

small {
    display: block;
    margin-top: 0.45rem;
    color: var(--muted);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

button {
    min-height: 42px;
    padding: 0.65rem 1rem;
    border-radius: 9px;
    border: 0;
    cursor: pointer;
    font-weight: 750;
}

button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.primary {
    background: var(--blue);
    color: white;
}

.primary:hover:not(:disabled) {
    background: #0f62cf;
}

.secondary {
    background: #e9f0ec;
    color: var(--ink);
}

.small {
    min-height: 34px;
    padding: 0.4rem 0.7rem;
}

.status-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.status-heading h2 {
    margin: 0;
}

.badge {
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.badge.neutral {
    background: #edf1ef;
}

.badge.working {
    background: #fff3cd;
    color: var(--amber);
}

.badge.success {
    background: #dff7ea;
    color: var(--green-dark);
}

.badge.error,
.alert.error {
    background: #fee4e2;
    color: var(--red);
}

.result-grid {
    display: grid;
    gap: 0;
    margin: 1.25rem 0 0;
}

.result-grid div {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--line);
}

dt {
    color: var(--muted);
}

dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

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

.login-card {
    width: min(440px, 100%);
}

.login-card button {
    width: 100%;
    margin-top: 1.25rem;
}

.alert {
    padding: 0.75rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.customer-page {
    grid-template-columns: 0.8fr 1.2fr;
}

.resource-list {
    display: grid;
    gap: 0.75rem;
}

.resource-list article {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.resource-list span {
    color: var(--muted);
}

.resource-list code {
    overflow-wrap: anywhere;
    color: var(--green-dark);
}

@media (max-width: 760px) {
    .page {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
    }

    .signed-in {
        display: none;
    }
}
