:root {
  color-scheme: light;
  --ink: #182d3b;
  --muted: #526775;
  --primary: #176c64;
  --border: #d5e0e4;
  --paper: #fff;
  --bg: #f2f6f5;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
header {
  background: #172e3a;
  color: white;
  padding: 28px max(24px, calc((100vw - 1200px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
h1 {
  font-size: 28px;
  margin: 3px 0;
}
h2 {
  font-size: 23px;
  margin: 0 0 14px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: #a7cfca;
}
main {
  max-width: 1200px;
  margin: 26px auto;
  padding: 0 24px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin: 20px 0;
}
.narrow {
  max-width: 560px;
  margin: 45px auto;
}
nav,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
button {
  font: inherit;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 18px;
  cursor: pointer;
  background: var(--primary);
  color: white;
}
button:hover {
  filter: brightness(0.93);
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
.secondary {
  background: #e8efee;
  color: var(--ink);
  border-color: var(--border);
}
.danger {
  background: #a43434;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}
input,
select {
  font: inherit;
  padding: 10px;
  border: 1px solid #b5c7cd;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  width: 100%;
}
input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid #88ccc2;
  outline-offset: 2px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  align-items: end;
}
.notice {
  border-left: 4px solid var(--primary);
  background: #e3f0ed;
  padding: 12px 16px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
progress {
  width: 100%;
  height: 14px;
  margin: 18px 0;
  accent-color: var(--primary);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.badge {
  background: #e3efeb;
  padding: 5px 10px;
  border-radius: 6px;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.stat {
  background: var(--bg);
  border-radius: 7px;
  padding: 12px 16px;
  min-width: 115px;
}
.stat strong {
  display: block;
  font-size: 24px;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
  margin: 20px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  text-align: left;
}
th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  background: var(--bg);
  white-space: nowrap;
}
td button {
  font-size: 12px;
  padding: 6px 10px;
  margin: 2px;
}
td p {
  margin: 0;
}
.filters {
  margin-top: 28px;
}
#message {
  padding: 10px 0;
  color: #a22b2b;
  white-space: pre-wrap;
}
.success {
  color: var(--primary) !important;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 850px;
  width: 90%;
  padding: 28px;
}
dialog::backdrop {
  background: #172e3a88;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
}
footer {
  text-align: center;
  padding: 22px;
  color: var(--muted);
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  main {
    padding: 0 12px;
  }
  .card {
    padding: 18px;
  }
  header {
    padding: 20px;
  }
  h1 {
    font-size: 22px;
  }
  .section-title {
    align-items: start;
    flex-direction: column;
  }
}
