@font-face {
    font-family: Marcellus;
    src: url("Marcellus-Regular.ttf") format("truetype");
    font-display: swap;
}
:root {
    color-scheme: light;
    --navy: #102941;
    --ink: #122b42;
    --text-muted: #4c687f;
    --lime: #b9df55;
    --border: #dbe6ef;
    --paper: #f3f7fa;
    --white: #fff;
    font-family: Marcellus, serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.5; }
button, input, select, textarea, ::placeholder { font: inherit; }
h1, h2, p, form, dl, dd { margin: 0; }
h1 { font-size: clamp(1.95rem, 3vw, 2.7rem); line-height: 1.12; font-weight: normal; }
h2 { font-size: 1.18rem; font-weight: normal; }
p, dd { overflow-wrap: anywhere; }
a { color: #204e77; text-underline-offset: 0.2em; }
button, .button {
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
    background: var(--navy); color: var(--white); border: 1px solid var(--navy);
    border-radius: 9px; padding: 0.5rem 0.85rem; min-height: 42px; cursor: pointer;
}
button:hover, .button:hover { filter: brightness(1.12); }
.secondary { background: var(--white); color: var(--ink); border-color: var(--border); }
:focus-visible { outline: 3px solid #267eb2; outline-offset: 3px; }
input, select {
    width: 100%; min-width: 0; min-height: 42px; padding: 0.45rem 0.65rem;
    border: 1px solid #b6c9d8; border-radius: 8px; color: var(--ink); background: var(--white);
}
label { display: grid; gap: 0.25rem; }
small { font-size: 0.82rem; }
.sr-only, .skip:not(:focus) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 2; top: 0.75rem; left: 0.75rem; padding: 0.5rem; background: var(--white); }
.layout { display: grid; grid-template-columns: 242px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    background: var(--navy); color: var(--white); padding: 1.35rem 0.75rem;
    position: sticky; top: 0; max-height: 100vh; align-self: start; min-height: 100vh; overflow: auto;
}
.brand { display: block; padding: 0.55rem 0.65rem 1.35rem; }
.brand img, .entry-logo { display: block; width: 100%; height: auto; }
.sections { display: grid; gap: 1.15rem; }
.nav-group { display: grid; gap: 0.22rem; }
.sections a {
    display: grid; grid-template-columns: 1.1rem minmax(0, 1fr); gap: 0.75rem; align-items: center;
    border-left: 3px solid transparent; color: #f1f7fd; line-height: 1.22;
    padding: 0.6rem 0.63rem; min-height: 42px; border-radius: 9px; text-decoration: none;
}
.sections a:hover, .sections a[aria-current] { background: #203a52; }
.sections a[aria-current] { border-left-color: var(--lime); }
.nav-icon { text-align: center; color: #d0e3f5; font-size: 1.1rem; }
.sections a[aria-current] .nav-icon { color: var(--lime); }
.group-title {
    color: #a4bfd6; text-transform: uppercase; font-size: .67rem; letter-spacing: .12em;
    margin: 0 0 0.25rem 0.8rem;
}
.nav-pending { display: block; margin-top: 0.1rem; color: #b9cddd; font-size: 0.71rem; }
.topbar {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    background: #fff; padding: 0.75rem clamp(1rem, 3.2vw, 3rem); border-bottom: 1px solid var(--border);
}
.topbar > span { color: var(--text-muted); }
.workspace main { width: min(100%, 1500px); margin: auto; padding: clamp(1rem, 3.2vw, 3rem); }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.page-header p { margin-top: 0.45rem; color: var(--text-muted); }
.shield { width: 70px; height: 70px; object-fit: contain; }
.card {
    background: var(--white); border: 1px solid var(--border); border-radius: 15px;
    padding: clamp(0.9rem, 2vw, 1.45rem); min-width: 0;
}
.card + .card { margin-top: 1rem; }
.card h2 + p, .card dl + p, .card p + p, .card p + a { margin-top: 0.7rem; }
.card-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.7rem; align-items: center; margin-bottom: 0.65rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.metrics .card, .dashboard-grid .card { margin-top: 0; }
.metric { display: grid; align-content: space-between; gap: 0.35rem; border-top: 3px solid #a9ca48; }
.metric h2 { font-size: 1rem; color: var(--text-muted); }
.metric strong { font-size: 2rem; font-weight: normal; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; }
.incident-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.65rem; padding: 0.7rem 0; }
.incident-item + .incident-item { border-top: 1px solid var(--border); }
.incident-item p, .muted { color: var(--text-muted); }
.incident-icon { padding: 0.3rem 0.55rem; color: #911e2b; background: #fbe7e9; border-radius: 9px; }
.message { padding: 0.7rem 0.85rem; border-radius: 9px; background: #fff1d7; color: #764905; margin-bottom: 0.75rem; }
.message.bad, .pill.bad { background: #fbe7e9; color: #911e2b; }
.message.good, .pill.good { background: #eaf4dc; color: #37530c; }
.pill { display: inline-block; border-radius: 1rem; background: #eaf0f5; color: #34526b; padding: 0.13rem 0.5rem; font-size: 0.82rem; }
.form-row { display: grid; grid-template-columns: 1fr 2fr 0.9fr auto; gap: 0.75rem; align-items: end; }
.filter, .actions, .pager { display: flex; gap: 0.6rem; }
.pager { margin-top: 1rem; }
.actions { flex-wrap: wrap; }
.table-wrap { overflow-x: auto; margin-top: 0.7rem; }
table { width: 100%; min-width: 570px; border-collapse: collapse; text-align: left; }
td, th { padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
thead { background: var(--paper); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
.wrap { max-width: 280px; overflow-wrap: anywhere; }
.record-url { display: block; font-weight: normal; color: var(--text-muted); }
.connector-form { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin-top: 0.75rem; }
.connector-form label { flex: 1 1 240px; max-width: 450px; }
.connector-import button { margin-top: 0.75rem; }
.connector-choice { display: flex; align-items: center; gap: 0.6rem; }
.connector-choice input { width: 1.2rem; height: 1.2rem; min-height: 0; flex: 0 0 auto; margin: 0; }
.settings { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0.75rem; margin: 1rem 0; }
.settings dd { color: var(--text-muted); }
.entry { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.entry-card { width: min(100%, 480px); background: white; border: 1px solid var(--border); border-radius: 16px; padding: clamp(1.25rem, 5vw, 2.25rem); }
.entry-logo { width: min(100%, 235px); margin-bottom: 1.55rem; }
.entry-card h1 { font-size: 2rem; }
.entry-card p, .stack { margin-top: 1rem; }
.stack { display: grid; gap: 0.85rem; }
@media (max-width: 1120px) {
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: static; min-height: 0; max-height: none; padding: 0.65rem 1rem; }
    .brand { width: min(65%, 200px); padding: 0.4rem 0 0.7rem; }
    .sections { display: flex; align-items: start; gap: 0.8rem; overflow-x: auto; padding: 0.2rem 0.2rem 0.65rem; }
    .nav-group { flex: 0 0 172px; }
    .sections a:focus-visible { outline-offset: -2px; }
    .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
    .shield { width: 48px; height: 48px; }
}
@media (max-width: 400px) {
    .metrics { gap: 0.6rem; }
    .form-row { grid-template-columns: minmax(0, 1fr); }
}
