:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --panel: #ffffff;
    --text: #20242c;
    --muted: #697386;
    --line: #dde2ea;
    --brand: #1769e0;
    --ok: #0f8a5f;
    --warn: #9a6700;
    --bad: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 28px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar strong {
    display: block;
    font-size: 18px;
}

.topbar span,
.muted,
.hint,
small {
    color: var(--muted);
}

.topbar nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

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

a:hover {
    text-decoration: underline;
}

.layout {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 56px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    margin-bottom: 18px;
}

h1,
h2 {
    margin: 0 0 16px;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 19px;
}

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

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

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

textarea {
    resize: vertical;
}

button {
    width: fit-content;
    border: 0;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
}

.button-link {
    display: inline-block;
    width: fit-content;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    padding: 10px 16px;
    font-weight: 700;
}

.button-link:hover {
    text-decoration: none;
}

button.small {
    padding: 7px 10px;
    font-size: 13px;
}

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

.notice {
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: #eef6ff;
    color: #164c96;
    border: 1px solid #c9ddfb;
}

.notice.error {
    background: #fff1f0;
    color: var(--bad);
    border-color: #ffd1cc;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.stats div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.stats span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.stats strong {
    font-size: 20px;
}

.meta {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 10px 18px;
}

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

.meta dd {
    margin: 0;
}

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

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

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

th {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

td small {
    display: block;
    margin-top: 5px;
}

.status {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 13px;
    background: #eef1f5;
    color: #394150;
    white-space: nowrap;
}

.status.synced {
    background: #eaf8f1;
    color: var(--ok);
}

.status.partial,
.status.pending,
.status.unsupported {
    background: #fff7e6;
    color: var(--warn);
}

.status.error {
    background: #fff1f0;
    color: var(--bad);
}

.empty {
    color: var(--muted);
    text-align: center;
}

code {
    background: #eef1f5;
    border-radius: 4px;
    padding: 2px 5px;
}

@media (max-width: 760px) {
    .topbar,
    .split {
        display: block;
    }

    .topbar nav {
        margin-top: 12px;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .meta {
        grid-template-columns: 1fr;
    }
}
