:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #17202a;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: #0969da; text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
  height: 58px; padding: 0 24px; display: flex; align-items: center;
  justify-content: space-between; background: #16212e; color: white;
}
.brand { color: white; font-weight: 700; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 28px auto 60px; }
.page-heading { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 18px; }
h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: 0; }
p { margin: 0; color: #657180; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metrics > div { background: white; border: 1px solid #dfe4ea; border-radius: 6px; padding: 16px; }
.metrics span { color: #657180; display: block; font-size: 13px; }
.metrics strong { display: block; margin-top: 6px; font-size: 25px; }
.toolbar, .import-panel, .table-wrap, .message, .login-panel {
  background: white; border: 1px solid #dfe4ea; border-radius: 6px;
}
.toolbar { padding: 12px; margin-bottom: 12px; }
.filter-form { display: grid; grid-template-columns: minmax(180px, 1fr) 180px auto; gap: 8px; }
input, select, textarea, button, .button {
  min-height: 38px; border: 1px solid #c8d0da; border-radius: 5px; padding: 8px 11px;
  background: white; color: #17202a; font: inherit; letter-spacing: 0;
}
textarea { resize: vertical; }
button, .button { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.button:hover { text-decoration: none; }
.primary { background: #1769aa; border-color: #1769aa; color: white; }
.icon-button { min-width: 38px; background: transparent; color: white; border-color: #506174; font-size: 18px; }
.import-panel { margin-bottom: 12px; padding: 0; }
.import-panel summary { cursor: pointer; padding: 13px 15px; font-weight: 600; }
.stack-form { display: grid; gap: 8px; padding: 0 15px 15px; }
.stack-form label { font-size: 13px; font-weight: 600; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid #edf0f3; vertical-align: top; }
th { color: #4c5968; background: #fafbfc; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
.muted { color: #6d7885; max-width: 260px; }
.empty { color: #77818c; text-align: center; padding: 30px; }
.pagination { display: flex; justify-content: flex-end; gap: 14px; align-items: center; margin-top: 14px; }
.back { display: inline-block; margin-bottom: 18px; }
.message { padding: 22px; }
.message dl { display: grid; grid-template-columns: 70px 1fr; gap: 7px 12px; margin: 18px 0; }
.message dt { color: #6d7885; }
.message dd { margin: 0; overflow-wrap: anywhere; }
.message pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f7f8fa; padding: 16px; border: 1px solid #e4e8ed; border-radius: 5px; line-height: 1.55; }
.login-panel { width: min(420px, 100%); margin: 12vh auto 0; padding: 24px; }
.login-panel .stack-form { padding: 22px 0 0; }
.alert { margin-top: 16px; padding: 10px 12px; background: #fff1f0; border: 1px solid #ffccc7; color: #a8071a; border-radius: 5px; }
@media (max-width: 700px) {
  .topbar { padding: 0 16px; }
  .shell { width: min(100% - 20px, 1180px); margin-top: 18px; }
  .metrics { grid-template-columns: 1fr; }
  .filter-form { grid-template-columns: 1fr; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  th, td { min-width: 130px; }
}
