:root {
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: #1e2b41;
  background: #f4f6fa;
  font-size: 14px;
  --primary: #315bb8;
  --line: #dfe5ef;
  --muted: #55657f;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { outline-offset: 4px; }
button { padding: 8px 13px; border-radius: 7px; border: 1px solid var(--line); background: white; color: #253654; cursor: pointer; }
button:hover { background: #edf2fd; }
button.primary { color: white; background: var(--primary); border-color: var(--primary); }
button.primary:hover { background: #254b9d; }
button.danger { color: #9c2c42; }
button:disabled { opacity: .55; cursor: wait; }
a { color: var(--primary); }
.shell { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #182842; color: #d3ddec; padding: 22px 14px; }
.brand { font-size: 21px; font-weight: 720; letter-spacing: .4px; }
.sidebar .brand { padding: 0 11px 18px; color: white; }
small, .muted { color: var(--muted); }
.menu-label { margin: 17px 9px 6px; font-size: 11px; color: #a2b3d0; }
nav a { display: block; color: #cbd8ec; padding: 8px 11px; margin: 2px 0; text-decoration: none; border-radius: 7px; }
nav a:hover, nav a.active { color: white; background: #294b80; }
.top { background: white; border-bottom: 1px solid var(--line); min-height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; gap: 10px; }
.top nav, .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.content { padding: 27px 30px 42px; max-width: 1550px; margin: auto; }
.head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
h1 { font-size: 25px; margin: 0; }
h2 { font-size: 17px; margin: 0; }
.panel { background: white; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th { background: #eef2f8; color: #41536f; font-weight: 600; white-space: nowrap; }
td, th { padding: 12px 14px; border-bottom: 1px solid #e9edf4; }
td { max-width: 400px; word-break: break-word; }
td button { font-size: 12px; padding: 4px 8px; }
tr:last-child td { border-bottom: 0; }
.empty, .loading { padding: 46px 20px; color: var(--muted); text-align: center; }
.pager { padding: 10px 14px; display: flex; gap: 9px; justify-content: flex-end; align-items: center; border-top: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 22px; }
.card { border: 1px solid var(--line); padding: 18px; background: white; border-radius: 10px; }
.card strong { display: block; margin-top: 6px; font-size: 28px; color: #254d9c; }
.card .muted { font-size: 12px; }
.login { margin: 12vh auto 0; padding: 27px; width: min(440px, calc(100% - 32px)); }
.login h1 { margin: 8px 0 18px; }
.login button { width: 100%; margin-top: 14px; }
.error { color: #9b2338; white-space: pre-wrap; }
.error:empty { display: none; }
dialog { width: min(670px, calc(100% - 28px)); max-height: 87vh; border: 1px solid var(--line); border-radius: 12px; padding: 0; color: inherit; }
dialog::backdrop { background: #15243c80; }
.dialog-head, .dialog-foot { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dialog-head { border-bottom: 1px solid var(--line); }
.dialog-foot { border-top: 1px solid var(--line); justify-content: flex-end; }
.dialog-body { padding: 17px 18px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; font-size: 13px; }
input, select, textarea { border: 1px solid #cbd5e4; border-radius: 6px; background: white; color: inherit; padding: 8px; width: 100%; min-width: 0; }
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox] { width: 17px; accent-color: var(--primary); }
.field:has(input[type=checkbox]) { flex-direction: row; align-items: center; }
#notice { position: fixed; bottom: 20px; right: 20px; max-width: min(500px, 92vw); background: #223e6e; color: white; padding: 12px 18px; border-radius: 8px; z-index: 10; }
#notice:empty { display: none; }
.status { padding: 3px 7px; border-radius: 5px; background: #e4ecfd; color: #284b91; white-space: nowrap; }
.status.failed { color: #9b2e40; background: #fbe7eb; }
.status.succeeded, .status.success { color: #176044; background: #dff5e9; }
.toolbar { padding: 12px 14px; display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); }
.toolbar input, .toolbar select { max-width: 270px; }
pre { white-space: pre-wrap; word-break: break-word; }
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { padding: 12px; }
  .sidebar .brand { padding: 0 2px 5px; }
  .menu-label { display: none; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .sidebar nav a { padding: 6px 8px; }
  .content, .top { padding-left: 14px; padding-right: 14px; }
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
