:root {
  color-scheme: light;
  --ink: #202b3a;
  --muted: #536376;
  --line: #d6dfeb;
  --paper: #fff;
  --base: #edf1f7;
  --brand: #244ed0;
  --nav: #182b49;
  font-family: Inter, "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--base);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 15px; line-height: 1.55; }
.shell { width: min(1510px, calc(100% - 2.5rem)); margin-inline: auto; }
.masthead { background: var(--nav); color: white; }
.masthead-inner, .identity, .section-header, .form-actions, .pagination, #operator {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.masthead-inner { min-height: 62px; justify-content: space-between; }
.identity strong { font-size: 1.17rem; }
.identity span:last-child { color: #d7e1f3; padding-left: .75rem; border-left: 1px solid #7387a5; }
.mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #dce6ff;
  color: #192e70;
  font-weight: 750;
}
#operator-name { max-width: 24ch; overflow-wrap: anywhere; }
.plain { color: white; border-color: #7387a5; background: transparent; }
main { padding-block: 1.5rem 3rem; }
#workspace { display: grid; grid-template-columns: 178px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.workspace-content { min-width: 0; }
.sections {
  display: grid;
  gap: .3rem;
  padding: .45rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  position: sticky;
  top: 1rem;
}
.sections button {
  border-color: transparent;
  text-align: left;
  color: var(--muted);
  min-height: 42px;
  padding-inline: .8rem;
}
.sections button[aria-pressed=true] { color: #173ba5; border-color: #cfdbfd; background: #edf2ff; font-weight: 700; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.login { width: min(430px, 100%); margin: clamp(2rem, 8vh, 6rem) auto; padding: clamp(1.2rem, 5vw, 2rem); }
.login h1 { margin-bottom: 1.35rem; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(265px, 320px); gap: 1rem; align-items: start; }
.section-header { justify-content: space-between; padding: 1.15rem 1.2rem .95rem; flex-wrap: wrap; }
.section-header > div { min-width: 0; }
.section-header p { margin-top: .22rem; }
.form-panel { padding: 1.1rem 1.2rem; }
h1, h2, p { margin: 0; }
h1 { font-size: 1.48rem; line-height: 1.3; }
h2 { font-size: 1.08rem; }
p, small { color: var(--muted); }
.list-panel > h2 { padding: .95rem 1.2rem .55rem; border-top: 1px solid var(--line); }
.form-panel form + h2 { margin-top: 1.25rem; padding-top: 1.15rem; border-top: 1px solid var(--line); }
.source-help { margin-top: .35rem; }
#draw-source-preview { padding: .55rem .7rem; background: #edf2ff; color: #233972; overflow-wrap: anywhere; }
form { display: grid; gap: .95rem; margin-top: .8rem; }
label { display: grid; gap: .33rem; min-width: 0; font-weight: 600; }
label.check { display: flex; align-items: center; }
small { font-weight: 400; }
input, textarea, select, button { font: inherit; }
input:not([type=checkbox]), textarea, select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #bcc9dd;
  border-radius: 6px;
  color: var(--ink);
  padding: .47rem .65rem;
  background: var(--paper);
}
textarea { resize: vertical; }
input[readonly] { background: #f2f5fa; }
button {
  cursor: pointer;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #bcc9dd;
  border-radius: 6px;
  padding: .4rem .7rem;
  min-height: 36px;
  white-space: nowrap;
}
button:hover { border-color: var(--brand); }
button:disabled { cursor: default; opacity: .6; }
.primary { background: var(--brand); color: white; border-color: var(--brand); font-weight: 700; }
.primary:hover:not(:disabled) { background: #1a3ba8; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.masthead :focus-visible { outline-color: #c9d7ff; }
.table-scroll { overflow: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: .64rem .85rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f3f6fc; color: #3d506a; font-size: .88rem; font-weight: 700; white-space: nowrap; }
tbody tr:nth-child(even) { background: #fafbfd; }
tbody tr:hover { background: #edf2ff; }
tbody tr:last-child td { border-bottom: 0; }
td:last-child { width: 1%; white-space: nowrap; }
td[colspan] { padding-block: 1.05rem; color: var(--muted); white-space: normal; }
.sample { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 10rem; max-width: 34ch; }
.pill { display: inline-block; padding: .13rem .5rem; border-radius: 5px; background: #e2f4eb; color: #175638; white-space: nowrap; font-size: .88rem; }
.pill.inactive { background: #ebeff5; color: #495a71; }
.form-actions { flex-wrap: wrap; }
.pagination { justify-content: flex-end; border-top: 1px solid var(--line); padding: .65rem .85rem; }
.notice { margin-bottom: 1rem; padding: .65rem .85rem; border-left: 3px solid #27845a; background: #e2f4eb; color: #175638; overflow-wrap: anywhere; }
.notice.error { background: #fff0ee; color: #922e27; border-color: #c44f42; }
@media (max-width: 1040px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 690px) {
  .shell { width: calc(100% - 1.25rem); }
  .masthead-inner { flex-wrap: wrap; gap: .45rem; padding-block: .55rem; }
  main { padding-top: .8rem; }
  #workspace { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
  .sections { display: flex; flex-wrap: wrap; position: static; }
  .sections button { flex: none; }
}
