:root {
  color-scheme: light;
  --ink: #112338;
  --muted: #506175;
  --line: #d8e2eb;
  --blue: #07509e;
  --paper: #fff;
  --canvas: #f4f7fa;
  font-family: Inter, system-ui, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-content { display: flex; align-items: center; justify-content: space-between; margin: auto; max-width: 1040px; padding: 14px 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 1.35rem; font-weight: 730; text-decoration: none; }
.brand img { object-fit: contain; }
main { max-width: 1040px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) 24px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 3vw, 2.3rem); line-height: 1.25; }
h2 { font-size: 1.3rem; margin-bottom: 1rem; }
h3 { font-size: .925rem; margin-top: 1rem; margin-bottom: .35rem; }
p { line-height: 1.6; }
.muted { color: var(--muted); }
.workspace-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.workspace-title p, .login > p { margin-top: .45rem; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.login { max-width: 460px; padding: clamp(20px, 5vw, 36px); margin: 5vh auto 0; }
.login form { display: grid; gap: 10px; margin-top: 24px; }
label { font-size: .9rem; font-weight: 600; }
input, select, textarea, button { font: inherit; }
input, select, textarea {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid #a6b9cb;
  border-radius: 7px;
  padding: .62rem .7rem;
  min-width: 0;
}
textarea { resize: vertical; }
button {
  background: var(--blue);
  color: var(--paper);
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 42px;
  padding: .55rem .95rem;
  font-weight: 650;
  cursor: pointer;
}
button:hover { background: #073b74; }
button.secondary { background: var(--paper); border-color: #a6b9cb; color: var(--ink); }
button.secondary:hover { background: #edf4fb; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #3b84d1; outline-offset: 3px; }
.filters { display: flex; align-items: end; gap: .7rem; flex-wrap: wrap; }
.filters label, #task-form label { display: grid; gap: .35rem; }
.notice { color: var(--muted); margin-top: .7rem; }
.notice:empty { display: none; }
.notice.error { color: #ae2c1f; }
.task-list { display: grid; gap: .65rem; margin: .8rem 0 1rem; }
.task summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 1rem; cursor: pointer; }
.task summary::marker, .task summary::-webkit-details-marker { display: none; }
.task-name { font-weight: 650; overflow-wrap: anywhere; }
.task-meta { display: flex; align-items: center; flex: none; gap: .65rem; font-size: .82rem; }
.badge { background: #e8eff8; color: #174572; border-radius: 20px; padding: 4px 9px; white-space: nowrap; }
.badge[data-status="delivered"] { background: #e6f4ea; color: #1c6039; }
.badge[data-status="failed"], .badge[data-status="blocked"] { background: #fff0dc; color: #794700; }
.task-body { border-top: 1px solid var(--line); padding: 1rem; overflow-wrap: anywhere; }
.task-body p { white-space: pre-wrap; }
.task-body a { display: inline-block; margin-top: .6rem; color: var(--blue); }
.task-test { margin-top: .5rem; }
dialog { width: min(560px, calc(100vw - 28px)); max-height: 92vh; border: 1px solid var(--line); border-radius: 12px; padding: 24px; color: var(--ink); }
dialog::backdrop { background: rgb(13 34 55 / .48); }
#task-form { display: grid; gap: .8rem; }
#task-form h2 { margin-bottom: 0; }
.actions { display: flex; gap: .6rem; justify-content: flex-end; }
@media (max-width: 520px) {
  main, .header-content { padding-left: 16px; padding-right: 16px; }
  .task summary { align-items: flex-start; flex-direction: column; }
  .workspace-title { align-items: flex-start; }
}

:root { --canvas: #f4f6fb; --ink: #14283f; --blue: #145ccc; --line: #d3deeb; font-size: 17px; }
header { border-top: 4px solid var(--blue); }
main { padding-top: 22px; }
.tabs { display:flex; gap:5px; border-bottom:1px solid var(--line); margin-bottom:22px; }
.tabs button { background:transparent; color:var(--muted); border-radius:0; border-bottom:3px solid transparent; }
.tabs button[aria-pressed="true"] { color:var(--blue); border-bottom-color:var(--blue); }
.workspace-title { margin-bottom:15px; }
.workspace-title h1 { font-size:1.65rem; }
.filters { background:#e9eff8; border-radius:10px; padding:10px 14px; }
.filters label { display:flex; align-items:center; gap:8px; }
.task-meta, .badge, label, h3 { font-size:1rem; }
.req-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.requirement .task-body > button { margin:12px 0 0; display:block; }
.requirement .task-body > details { margin:8px 0; }
.task-name,.req-title { font-size:1.08rem; }
#req-form { display:grid; gap:12px; }
#req-form label { display:grid; gap:5px; }
@media(max-width:520px){.req-title { max-width:100%; } .filters { padding:10px; }}

#robot-form, #issued-token { display: grid; gap: .55rem; margin-top: 1rem; }
#robot-list { list-style: none; padding: 0; }
#robot-list li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.header-content .actions { flex-wrap: wrap; }
