:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #17202a;
    --muted: #65717f;
    --line: #d9dee5;
    --primary: #126b5b;
    --primary-dark: #0d4f44;
    --accent: #b45f06;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, sans-serif;
}

a {
    color: var(--primary);
    text-decoration: none;
}

.topbar {
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 32px;
}

.brand {
    color: var(--text);
    font-weight: 700;
}

.topbar nav {
    align-items: center;
    display: flex;
    gap: 18px;
}

.topbar form {
    margin: 0;
}

button,
.button {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    min-height: 40px;
    padding: 0 14px;
}

.button.primary,
button.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.button.primary:hover,
button.primary:hover {
    background: var(--primary-dark);
}

.shell {
    margin: 0 auto;
    max-width: 1120px;
    padding: 36px 24px;
}

.page-heading {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-heading h1,
.guest-hero h1 {
    font-size: 36px;
    line-height: 1.1;
    margin: 0;
}

.page-heading p,
.guest-hero p {
    color: var(--muted);
    margin: 8px 0 0;
}

.eyebrow {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.panel,
.table-panel,
.form-panel,
.empty-state,
.guest-hero {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}

.metric-grid,
.detail-grid,
.form-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metric {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.label {
    color: var(--muted);
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px;
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.form-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compact-form {
    border: 0;
    padding: 0;
}

input,
textarea {
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    padding: 10px 12px;
    width: 100%;
}

label {
    font-weight: 650;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.detail-grid {
    margin-bottom: 18px;
}

.stack-item {
    border-top: 1px solid var(--line);
    padding: 14px 0;
}

.stack-item:first-of-type {
    border-top: 0;
}

.guest-hero dl {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 24px 0 0;
}

.guest-hero dt {
    color: var(--muted);
    font-size: 13px;
}

.guest-hero dd {
    margin: 4px 0 0;
    font-weight: 700;
}

.validation,
span.field-validation-error {
    color: #a12626;
}

.success {
    color: var(--primary);
    font-weight: 700;
}

@media (max-width: 700px) {
    .topbar,
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar {
        padding: 18px 24px;
    }
}
