:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #172033;
    --muted: #657085;
    --line: #dde3ec;
    --primary: #1769e0;
    --primary-dark: #0f55ba;
    --success: #0f8a54;
    --warning: #9a6513;
    --danger: #bd2536;
}

* {
    box-sizing: border-box;
}

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

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

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

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

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

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto;
}

.hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: end;
    margin-bottom: 22px;
}

.hero h1 {
    max-width: 760px;
    margin: 0 0 12px;
    font-size: 40px;
    line-height: 1.1;
}

.hero p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
}

.eyebrow {
    margin-bottom: 8px !important;
    color: var(--primary) !important;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.metric {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--muted);
}

.grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 20px;
    align-items: start;
}

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

.panel-heading {
    margin-bottom: 18px;
}

.panel-heading h2,
.document h1 {
    margin: 0 0 6px;
}

.panel-heading p,
.document p,
.document li {
    color: var(--muted);
}

label {
    display: block;
    margin: 16px 0 8px;
    font-weight: 700;
}

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

textarea {
    resize: vertical;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    padding: 0 16px;
    font-weight: 700;
    cursor: pointer;
}

.button.primary {
    color: #fff;
    background: var(--primary);
}

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

.button.secondary {
    color: var(--primary);
    background: #e9f1ff;
}

.button.disabled,
.button:disabled {
    cursor: not-allowed;
    color: var(--muted);
    background: #e7ebf1;
}

.page-picker {
    max-height: 260px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.check-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    font-weight: 400;
}

.check-row:last-child {
    border-bottom: 0;
}

.check-row input {
    width: auto;
    margin-top: 3px;
}

.check-row small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.urls {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 10px;
    font-size: 14px;
}

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

.urls dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.manual-sync {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

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

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
}

.badge.success {
    color: var(--success);
    background: #e6f5ee;
}

.badge.failed {
    color: var(--danger);
    background: #fdecef;
}

.alert {
    margin-bottom: 18px;
    border-radius: 8px;
    padding: 12px 14px;
    background: #e9f1ff;
    border: 1px solid #cfe0ff;
}

.alert-error {
    color: var(--danger);
    background: #fdecef;
    border-color: #f7cbd3;
}

.alert-warning {
    color: var(--warning);
    background: #fff5df;
    border-color: #ffe1a6;
}

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

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

@media (max-width: 860px) {
    .topbar,
    .hero,
    .grid {
        grid-template-columns: 1fr;
    }

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

    .hero h1 {
        font-size: 30px;
    }

    .hero-actions {
        flex-wrap: wrap;
    }
}
