:root {
    color-scheme: light;
    --ink: #171717;
    --muted: #5c625f;
    --line: #d9ddd8;
    --paper: #fbfbf8;
    --surface: #ffffff;
    --accent: #0f766e;
    --accent-strong: #115e59;
    --danger-bg: #fff1f2;
    --danger-ink: #9f1239;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

a:hover {
    text-decoration: underline;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px clamp(18px, 4vw, 48px);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.brand {
    color: var(--ink);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0;
}

.nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

.nav form {
    margin: 0;
}

.nav button {
    border: 0;
    background: transparent;
    color: var(--accent-strong);
    cursor: pointer;
    padding: 0;
}

.user-name {
    color: var(--muted);
}

.page {
    width: min(1120px, calc(100vw - 32px));
    margin: 34px auto 64px;
}

.hero {
    max-width: 760px;
    padding: 52px 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-strong);
    font-weight: 700;
}

h1,
h2 {
    margin: 0 0 14px;
    line-height: 1.1;
    letter-spacing: 0;
}

h1 {
    font-size: clamp(2.2rem, 7vw, 4.5rem);
}

h2 {
    font-size: 1.25rem;
}

p {
    color: var(--muted);
    line-height: 1.6;
}

.panel {
    margin-bottom: 22px;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.narrow {
    max-width: 560px;
}

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

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

.button,
button.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 9px 14px;
    font-weight: 700;
    cursor: pointer;
}

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

.button.secondary {
    background: white;
    color: var(--accent-strong);
}

.form {
    display: grid;
    gap: 16px;
}

.form.inline {
    display: flex;
}

label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-weight: 650;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"] {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 11px 12px;
    background: white;
    color: var(--ink);
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.checks {
    display: grid;
    gap: 10px;
}

.notice {
    margin-bottom: 18px;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    padding: 12px 14px;
    background: #ecfdf5;
    color: #065f46;
}

.errors {
    margin-bottom: 18px;
    border: 1px solid #fecdd3;
    border-radius: 6px;
    padding: 12px 14px;
    background: var(--danger-bg);
    color: var(--danger-ink);
}

.errors p {
    margin: 0;
    color: var(--danger-ink);
}

.table-wrap {
    overflow-x: auto;
}

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

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

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.search {
    display: flex;
    gap: 8px;
    min-width: min(420px, 100%);
}

.details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 10px 18px;
}

.details dt {
    font-weight: 800;
}

.details dd {
    margin: 0;
    color: var(--muted);
}

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

.pagination {
    margin-top: 18px;
}

@media (max-width: 720px) {
    .topbar,
    .section-head,
    .search {
        align-items: stretch;
        flex-direction: column;
    }

    .nav {
        justify-content: flex-start;
    }
}
