:root {
  color-scheme: light;
  --ink: #18342f;
  --muted: #61746f;
  --teal: #087b69;
  --line: #dce5e1;
  --soft: #f4f7f5;
  --red: #ad4a41;
  --amber: #937421;
  font:
    15px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--soft);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #cad8d2;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 0.45rem 0.9rem;
  font-weight: 550;
}
button:hover {
  background: #eaf2ee;
}
button:disabled {
  cursor: wait;
  opacity: 0.58;
}
button.primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
button.primary:hover {
  background: #076957;
}
button.danger {
  color: var(--red);
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #62bfae;
  outline-offset: 3px;
}
[hidden],
.sprite {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(1.65rem, 2.8vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 1.13rem;
  line-height: 1.45;
}
h3 {
  font-size: 0.98rem;
  margin: 1.4rem 0 0.6rem;
}
p + p {
  margin-top: 0.7rem;
}
small,
.muted {
  color: var(--muted);
  font-size: 0.87rem;
}
.boot,
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}
.login {
  padding: 20px;
  background:
    radial-gradient(ellipse at top left, #deede7, transparent 60%), #f3f6f4;
}
.login-card {
  width: min(100%, 420px);
  padding: 34px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 44px #123e3110;
}
.login-card h1 {
  font-size: 1.65rem;
  margin: 30px 0 18px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 700;
  letter-spacing: 0.045em;
  font-size: 1.2rem;
}
.full {
  width: 100%;
}
.shell {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: #173d35;
  color: #e9f4ef;
  padding: 28px 15px 18px;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  padding: 0 10px;
}
.sidebar nav {
  margin-top: 42px;
  display: grid;
  gap: 5px;
}
.sidebar a,
.exit {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #c6d9d2;
  padding: 10px 13px;
  border-radius: 7px;
  font-weight: 520;
}
.sidebar a:hover,
.exit:hover {
  background: #214e43;
}
.sidebar a[aria-current="page"] {
  background: #2d5a4e;
  color: white;
  box-shadow: inset 3px 0 #84d5b8;
}
.sidebar svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 19px;
  height: 19px;
}
.exit {
  margin-top: auto;
  border: 0;
  background: none;
  font-size: 0.92rem;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 59px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 0 clamp(20px, 4vw, 52px);
  font-size: 0.88rem;
  color: var(--muted);
}
.slash {
  margin: 0 10px;
  color: #a4b2aa;
}
.topbar strong {
  color: var(--ink);
}
.role {
  display: flex;
  align-items: center;
  gap: 6px;
}
.role i {
  width: 7px;
  height: 7px;
  border-radius: 100%;
  background: #329778;
}
.content {
  max-width: 1380px;
  margin: 0 auto;
  padding: 32px clamp(20px, 4vw, 52px) 60px;
}
.page-title,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.page-title {
  margin: 4px 0 24px;
}
.panel-head {
  margin-bottom: 15px;
}
.panel,
.metrics article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.panel {
  padding: 22px;
  margin-bottom: 16px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.metrics article {
  padding: 17px 19px;
}
.metrics p {
  font-size: 0.9rem;
  color: var(--muted);
}
.metrics strong {
  font:
    600 clamp(1.7rem, 3vw, 2.3rem)/1.5 ui-monospace,
    SFMono-Regular,
    monospace;
  letter-spacing: -0.06em;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(300px, 1.35fr);
  gap: 16px;
}
.overview-grid .panel {
  min-width: 0;
}
.model-name {
  font-family: ui-monospace, monospace;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}
.model-name + p {
  margin-top: 10px;
}
.text-link {
  color: var(--teal);
  font-weight: 600;
  display: inline-block;
  margin-top: 12px;
}
.distribution {
  display: flex;
  overflow: hidden;
  gap: 0;
  background: #edf1ee;
  height: 11px;
  border-radius: 8px;
}
.distribution span {
  flex: 0;
}
.safe {
  background: #5ca48b;
}
.nsfw {
  background: #c16c60;
}
.review {
  background: #d5ac5b;
}
.errors {
  background: #83918d;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.86rem;
}
.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}
.audit-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}
.audit-line span {
  overflow-wrap: anywhere;
}
.audit-line:last-child {
  border: 0;
}
.empty {
  padding: 18px 0;
  color: var(--muted);
}
.form-panel {
  max-width: 820px;
}
.form-panel > h2 {
  margin-bottom: 12px;
}
form {
  display: grid;
  gap: 15px;
}
form small {
  margin-top: -10px;
}
form button {
  justify-self: start;
}
label {
  display: grid;
  gap: 5px;
  font-weight: 550;
  font-size: 0.92rem;
}
input {
  width: 100%;
  min-width: 0;
  border: 1px solid #c8d4ce;
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}
input:focus {
  outline: 2px solid #80c2af;
  outline-offset: 1px;
}
.two-fields {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}
.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  background: #e7f3ed;
  color: #256952;
  font-size: 0.78rem;
  white-space: nowrap;
}
.tag.warn {
  background: #fbf0d6;
  color: #765614;
}
.tag.off {
  background: #eef0ef;
  color: #64726c;
}
.tag.blocked {
  background: #f8e9e6;
  color: var(--red);
}
#message,
.error {
  padding: 9px 12px;
  border-radius: 7px;
}
#message {
  background: #e4f3eb;
  margin-bottom: 15px;
}
#message.error,
.error {
  background: #fbece8;
  color: #8b322a;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
td.mono,
code,
pre,
#secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
td.mono {
  font-size: 0.81rem;
}
.actions,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.actions button {
  padding: 4px 9px;
  font-size: 0.82rem;
}
.dialog-actions {
  margin-top: 18px;
}
.definitions {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 15px;
  font-size: 0.9rem;
}
.definitions dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.definitions dt {
  font-weight: 600;
}
pre {
  margin: 12px 0;
  padding: 15px;
  border-radius: 8px;
  background: #eff4f1;
  overflow: auto;
  line-height: 1.6;
  font-size: 0.86rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
dialog {
  width: min(470px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 24px;
  color: var(--ink);
  box-shadow: 0 20px 80px #0b322a30;
}
dialog::backdrop {
  background: #1b382f61;
}
.close {
  padding: 0 9px;
  font-size: 1.25rem;
  border: 0;
}
.result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 950px) {
  .shell {
    grid-template-columns: 175px minmax(0, 1fr);
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .content {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (max-width: 690px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
  }
  .sidebar .brand {
    padding: 0;
    font-size: 1rem;
  }
  .sidebar .brand img {
    width: 29px;
    height: 29px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    margin: 12px -2px 0;
    gap: 3px;
  }
  .sidebar a {
    flex: 0 0 auto;
    padding: 6px 8px;
    gap: 5px;
    font-size: 0.84rem;
  }
  .sidebar a[aria-current="page"] {
    box-shadow: inset 0 -2px #84d5b8;
  }
  .sidebar svg {
    width: 15px;
    height: 15px;
  }
  .exit {
    position: absolute;
    top: 8px;
    right: 12px;
  }
  .topbar {
    height: 42px;
  }
  .content {
    padding: 20px 14px 45px;
  }
  .page-title {
    margin: 2px 0 16px;
  }
  .panel {
    padding: 15px;
  }
  .metrics {
    gap: 9px;
  }
  .metrics article {
    padding: 12px 14px;
  }
  .two-fields {
    grid-template-columns: 1fr;
  }
  .definitions {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .definitions dd {
    margin-bottom: 7px;
  }
  .panel-head {
    flex-wrap: wrap;
  }
  .audit-line {
    grid-template-columns: 1fr;
  }
}
