:root {
    --bg: #f4f6f7;
    --surface: #ffffff;
    --text: #1b2733;
    --muted: #607080;
    --line: #d8e0e6;
    --primary: #097d75;
    --primary-dark: #075f59;
    --accent: #c2410c;
    --success: #166534;
    --warning: #9a3412;
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

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

a {
    color: var(--primary-dark);
    font-weight: 650;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.app-bar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 28px;
    min-height: 68px;
    padding: 10px 24px;
}

.brand {
    align-items: center;
    color: var(--text);
    display: inline-flex;
    gap: 12px;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: var(--primary);
    border-radius: 6px;
    color: #ffffff;
    display: inline-flex;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    width: 42px;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.top-nav {
    display: flex;
    gap: 8px;
}

.top-nav a {
    border-radius: 6px;
    color: var(--text);
    padding: 8px 10px;
}

.top-nav a:hover {
    background: #eef2f3;
    text-decoration: none;
}

.page {
    margin: 0 auto;
    max-width: 1480px;
    padding: 24px;
}

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

.page-heading h1 {
    font-size: 30px;
    line-height: 1.15;
    margin: 0;
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.heading-note {
    color: var(--muted);
    font-weight: 600;
    margin: 8px 0 0;
    max-width: 920px;
}

.summary-row,
.actions,
.toolbar-band,
.search-form,
.update-form,
.table-toolbar,
.pager,
.section-heading {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.summary-row {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    margin-top: 10px;
}

.summary-row span {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
}

.update-form {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
}

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

.form-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    max-width: 240px;
}

label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

input[type="text"],
input[type="password"],
input:not([type]) {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    font: inherit;
    min-height: 38px;
    min-width: 220px;
    padding: 8px 10px;
}

.search-form input[type="text"],
.search-form input:not([type]) {
    min-width: min(520px, 72vw);
}

.button {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 750;
    min-height: 38px;
    padding: 8px 13px;
}

.button:hover {
    background: #eef2f3;
    text-decoration: none;
}

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

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

.button.ghost {
    background: transparent;
}

.button.icon {
    font-size: 18px;
    justify-content: center;
    min-width: 38px;
    padding: 0;
}

.notice,
.toolbar-band,
.data-band {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.notice {
    font-weight: 700;
    padding: 12px 14px;
}

.update-status {
    display: grid;
    gap: 10px;
}

.update-status-header,
.update-status-metrics {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.update-status span,
.update-status-metrics span {
    color: var(--muted);
}

.progress-track {
    background: #edf2f4;
    border: 1px solid var(--line);
    border-radius: 999px;
    height: 14px;
    overflow: hidden;
    width: 100%;
}

.progress-fill {
    background: var(--primary);
    border-radius: inherit;
    height: 100%;
    min-width: 0;
    transition: width 0.25s ease;
}

.update-status.warning .progress-fill {
    background: var(--warning);
}

.is-hidden {
    display: none !important;
}

.notice.success {
    border-color: #9ad7aa;
    color: var(--success);
}

.notice.warning {
    border-color: #f2c19d;
    color: var(--warning);
}

.toolbar-band {
    justify-content: space-between;
    padding: 14px;
}

.toggle {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.result-count,
.pager {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.data-band {
    overflow: hidden;
}

.data-band.split {
    align-items: start;
    display: grid;
    gap: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.data-band.split > div {
    min-width: 0;
    padding: 14px;
}

.data-band.split > div + div {
    border-left: 1px solid var(--line);
}

.table-toolbar,
.section-heading {
    border-bottom: 1px solid var(--line);
    justify-content: space-between;
    padding: 12px 14px;
}

.section-heading h2 {
    font-size: 18px;
    margin: 0;
}

.section-heading span {
    color: var(--muted);
    font-weight: 800;
}

.table-scroll {
    overflow: auto;
}

.detail-table {
    max-height: 62vh;
}

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

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

th {
    background: #f9fafb;
    color: var(--muted);
    font-size: 12px;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 1;
}

mark {
    background: #ffe08a;
    border-radius: 3px;
    color: #1b2733;
    padding: 0 2px;
}

td {
    line-height: 1.35;
}

.muted {
    color: var(--muted);
    font-weight: 650;
}

.state {
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 8px;
}

.state-active {
    background: #ecfdf3;
    border-color: #b7e4c7;
    color: var(--success);
}

.state-muted {
    background: #f1f3f5;
    color: #697586;
}

@media (max-width: 760px) {
    .app-bar,
    .page-heading,
    .toolbar-band {
        align-items: stretch;
        flex-direction: column;
    }

    .page {
        padding: 16px;
    }

    .update-form,
    .search-form {
        align-items: stretch;
        flex-direction: column;
    }

    input[type="text"],
    input[type="password"],
    input:not([type]) {
        min-width: 100%;
    }

    .data-band.split {
        grid-template-columns: 1fr;
    }

    .data-band.split > div + div {
        border-left: 0;
        border-top: 1px solid var(--line);
    }
}
