:root {
  --ink: #13232c;
  --ink-soft: #52626c;
  --accent: #82ce20;
  --accent-dark: #315c10;
  --accent-soft: #eef8df;
  --line: #dde5de;
  --paper: #fff;
  --background: #f4f7f3;
  --danger: #9e2634;
  --danger-bg: #fceff0;
  --radius: 14px;
  color: var(--ink);
  background: var(--background);
  font: 16px/1.5 Aptos, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent-dark); text-underline-offset: .19em; }
a:hover { color: #193306; }
a, button, summary, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #467918; outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: fixed; top: -4rem; left: 1rem; z-index: 10; background: white; padding: .7rem; }
.skip:focus { top: .5rem; }
.layout { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; gap: 2.35rem; padding: 2rem 1.2rem; color: white; background: var(--ink); }
.brand { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; font-size: 1.13rem; font-weight: 750; line-height: 1.2; }
.brand:hover { color: inherit; }
.brand img { width: 40px; height: 40px; }
.brand small { display: block; color: #b8c7c8; font-size: .82rem; font-weight: 500; margin-top: .24rem; }
.navigation { display: flex; flex-direction: column; gap: .3rem; }
.navigation a { display: flex; align-items: center; gap: .65rem; min-height: 44px; padding: .58rem .75rem; color: #dbe4e5; text-decoration: none; border-radius: 8px; }
.navigation a:hover { background: #253943; }
.navigation a[aria-current="page"] { background: #2b3f31; color: #c5f38c; box-shadow: inset 3px 0 #82ce20; font-weight: 650; }
.navigation svg { width: 19px; height: 19px; flex: none; }
.nav-label { color: #adbdbe; font-size: .82rem; font-weight: 650; margin: 0 0 .36rem .75rem; }
.sidebar :focus-visible { outline-color: #a2e851; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #3b4a54; padding: 1rem .75rem 0; }
.sidebar-bottom span { display: block; color: #b8c7c8; font-size: .87rem; overflow-wrap: anywhere; }
.sidebar-bottom button { color: white; background: transparent; border-color: #53636d; margin-top: .7rem; }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem clamp(1rem, 3vw, 2.65rem); min-height: 61px; border-bottom: 1px solid var(--line); background: white; }
.topbar span { font-size: .9rem; color: var(--ink-soft); }
main { padding: clamp(1rem, 3vw, 2.65rem); max-width: 1500px; margin: auto; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.45rem; }
.eyebrow { color: var(--accent-dark); margin: 0 0 .25rem; font-weight: 700; font-size: .87rem; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.045em; }
h2 { font-size: 1.18rem; letter-spacing: -.02em; }
h3 { font-size: 1rem; }
p { margin: .4rem 0 .8rem; }
.page-head p:last-child, .section-head p:last-child { margin-bottom: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
button, .button {
  display: inline-flex; gap: .45rem; align-items: center; justify-content: center; min-height: 44px;
  padding: .55rem .95rem; border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
  font: inherit; font-weight: 650; background: white; text-decoration: none; cursor: pointer; text-align: center;
}
button:hover, .button:hover { border-color: #9bb486; color: var(--ink); background: #f6faef; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); }
button.primary:hover, .button.primary:hover { background: #96dc3d; }
button:disabled { opacity: .65; cursor: wait; }
.panel, .metric { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.panel { padding: clamp(.9rem, 2.1vw, 1.4rem); }
.stack { display: grid; gap: 1rem; min-width: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.metric { padding: 1rem; }
.metric strong { display: block; font-size: 1.75rem; letter-spacing: -.035em; line-height: 1.2; margin-top: .25rem; }
.metric span { font-size: .88rem; color: var(--ink-soft); font-weight: 650; }
.metric.alert { border-color: #e8c2bf; }
.metric.alert strong { color: var(--danger); }
.section-head { margin-bottom: .8rem; }
.section-head.with-actions { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; padding: .17rem .53rem; border-radius: 30px; font-size: .82rem; font-weight: 675; background: #ecf1f3; color: #344a57; }
.pill.green { color: #315510; background: var(--accent-soft); }
.pill.red { color: var(--danger); background: var(--danger-bg); }
.pill.gold { color: #6b4b06; background: #fff2cc; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th { color: var(--ink-soft); font-size: .82rem; font-weight: 700; }
td, th { border-bottom: 1px solid var(--line); padding: .65rem .48rem; vertical-align: top; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
td a { font-weight: 650; }
.record-list { display: grid; gap: .7rem; list-style: none; margin: 0; padding: 0; }
.record-list > li { padding: .85rem; border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.record-list h3 a { font-weight: 750; text-decoration: none; }
.record-list h3 a:hover { text-decoration: underline; }
.record-list p { margin: .25rem 0; }
.record-top { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: .45rem; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr)); gap: .8rem; align-items: start; }
label { display: grid; gap: .3rem; min-width: 0; font-size: .9rem; font-weight: 650; }
label:has(textarea), label.wide { grid-column: 1 / -1; }
input, textarea, select {
  min-height: 44px; width: 100%; min-width: 0; padding: .54rem .63rem; font: inherit;
  color: var(--ink); border: 1px solid #bac8bf; border-radius: 7px; background: white;
}
select { appearance: none; padding-right: 1.7rem; background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23344a57' stroke-width='1.5'/%3E%3C/svg%3E") right .45rem center no-repeat; }
textarea { min-height: 88px; resize: vertical; }
input[type="checkbox"] { accent-color: var(--accent-dark); width: 1.08rem; min-height: 0; height: 1.08rem; margin: .1rem 0; }
.check { display: flex; align-items: flex-start; gap: .55rem; min-height: 37px; }
form { min-width: 0; }
.form-body { display: grid; gap: .85rem; }
form [data-message]:empty { display: none; }
.notice, .error { border-radius: 8px; padding: .65rem .8rem; margin: .5rem 0; }
.notice { background: var(--accent-soft); color: #284709; }
.error { background: var(--danger-bg); color: var(--danger); }
summary { cursor: pointer; font-weight: 700; min-height: 40px; padding: .48rem 0; }
details > .form-body, details > .stack { margin-top: .45rem; }
.compact { margin-top: .45rem; font-size: .9rem; }
.compact summary { color: var(--accent-dark); }
dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .7rem 1rem; margin: .8rem 0 0; }
dt { color: var(--ink-soft); font-size: .83rem; font-weight: 650; }
dd { margin: .12rem 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.timeline { list-style: none; padding: 0 0 0 .85rem; margin: .4rem 0 0 .35rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: .25rem 0 .95rem; overflow-wrap: anywhere; }
.timeline li::before { content: ''; position: absolute; left: -1.14rem; top: .63rem; border-radius: 50%; background: var(--accent); width: .46rem; height: .46rem; }
.timeline li p { white-space: pre-wrap; margin: .16rem 0; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.4rem; background: radial-gradient(ellipse at 85% 20%, #d4eaba, transparent 60%), var(--background); }
.login main { width: min(100%, 470px); padding: clamp(1rem, 4vw, 2.2rem); }
.login .brand { margin-bottom: 1.35rem; }
.login .brand small { color: var(--ink-soft); }
.token { width: 100%; font-family: ui-monospace, monospace; }
@media (max-width: 870px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { gap: .8rem; padding: .75rem 1rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .sidebar-top { grid-column: 1; }
  .sidebar nav { grid-column: 1 / -1; grid-row: 2; }
  .sidebar-bottom { grid-column: 2; grid-row: 1; margin: 0; padding: 0; border: 0; align-self: center; }
  .sidebar-bottom strong, .sidebar-bottom span, .nav-label { display: none; }
  .sidebar-bottom button { margin: 0; }
  .navigation { flex-direction: row; overflow-x: auto; padding: .16rem 0; }
  .navigation a { white-space: nowrap; }
  .navigation a[aria-current="page"] { box-shadow: inset 0 -3px #82ce20; }
}
@media (max-width: 640px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding-block: .55rem; min-height: 45px; }
  .topbar span:first-child { display: none; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: .75rem; }
  .metric strong { font-size: 1.45rem; }
  .navigation a { gap: .35rem; padding-inline: .6rem; font-size: .9rem; }
}

.pagination { margin-top: .7rem; }
.pagination span { margin-inline-end: auto; }
