:root {
    --bg: #f6f7f9;
    --text: #1f2933;
    --muted: #68727f;
    --line: #d9dee5;
    --panel: #ffffff;
    --accent: #126b68;
    --danger: #a63a3a;
}

* {
    box-sizing: border-box;
}

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

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

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

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

.topbar nav {
    display: flex;
    flex: 1;
    gap: 16px;
}

.page {
    margin: 0 auto;
    max-width: 1180px;
    padding: 28px;
}

h1 {
    font-size: 28px;
    margin: 0 0 22px;
}

h2 {
    font-size: 18px;
    margin: 0 0 14px;
}

button,
.button {
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    padding: 8px 12px;
}

.secondary {
    background: #ffffff;
    color: var(--accent);
}

.notice,
.error,
.panel,
.auth-box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 18px;
}

.error {
    border-color: var(--danger);
    color: var(--danger);
}

.auth-box {
    margin: 10vh auto 0;
    max-width: 420px;
}

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

label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

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

input,
select {
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    min-height: 38px;
    padding: 7px 9px;
    width: 100%;
}

.filters,
.title-row,
.panel-head {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.title-row,
.panel-head {
    justify-content: space-between;
}

.filters select {
    max-width: 240px;
}

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

.metrics div {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.metrics strong {
    display: block;
    font-size: 30px;
}

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

.table-wrap {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow-x: auto;
}

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

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

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

.badge {
    border-radius: 999px;
    color: #ffffff;
    display: inline-block;
    min-width: 64px;
    padding: 3px 8px;
    text-align: center;
}

.badge.high {
    background: #a63a3a;
}

.badge.medium {
    background: #9a6a14;
}

.badge.low {
    background: #557084;
}

.actions,
.inline-form {
    align-items: center;
    display: flex;
    gap: 8px;
}

.actions form {
    margin: 0;
}

dl {
    display: grid;
    gap: 10px 18px;
    grid-template-columns: 140px 1fr;
    margin: 0;
}

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

pre {
    background: #f1f3f5;
    border: 1px solid var(--line);
    border-radius: 6px;
    max-height: 520px;
    overflow: auto;
    padding: 14px;
    white-space: pre-wrap;
}

@media (max-width: 760px) {
    .topbar,
    .filters,
    .title-row,
    .panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar nav,
    .metrics {
        grid-template-columns: 1fr;
    }

    .metrics {
        display: grid;
    }

    dl {
        grid-template-columns: 1fr;
    }
}
