:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #172522;
  background: #f4f6f2;
  font-synthesis: none;
  --muted: #53645d;
  --line: #dce4dc;
  --accent: #14664e;
  --panel: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea { border: 1px solid var(--line); border-radius: 8px; }
button { padding: .58rem .9rem; color: inherit; background: var(--panel); cursor: pointer; white-space: nowrap; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .55; cursor: wait; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: #9a302c; }
input, select, textarea { padding: .6rem .7rem; background: #fff; min-width: 0; color: inherit; }
textarea { width: 100%; resize: vertical; }
:focus-visible { outline: 2px solid #148664; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 4vw, 2.3rem); letter-spacing: -.035em; }
h2 { font-size: 1.18rem; }
h3 { font-size: 1rem; }
a { color: var(--accent); }
small, .muted { color: var(--muted); }
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; gap: 2.25rem; background: #132a24; color: #e4eee8; padding: 1.75rem 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; padding: 0 .45rem; font-weight: 650; white-space: nowrap; }
.mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #d8f1de; color: #145c43; font-weight: 750; }
nav { display: grid; gap: .45rem; }
.sidebar button { color: inherit; background: transparent; text-align: left; border-color: transparent; }
.sidebar button:hover, .sidebar button[aria-current="page"] { background: #29463b; }
.quiet { margin-top: auto; }
.workspace { width: min(100%, 1260px); padding: clamp(1.1rem, 4vw, 3rem); min-width: 0; }
.page-head, .row, .toolbar { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.page-head { justify-content: space-between; margin-bottom: .65rem; }
.feedback { color: #9a302c; min-height: 1.6rem; overflow-wrap: anywhere; font-size: .92rem; }
.stack { display: grid; gap: 1rem; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 1.2rem; min-width: 0; }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.metric { padding: 1rem 1.1rem; display: grid; gap: .55rem; background: #e8efe7; border-radius: 10px; }
.metric strong { font-size: clamp(1.3rem, 3vw, 1.8rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .72rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 650; color: var(--muted); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.identifier { max-width: 240px; overflow-wrap: anywhere; font-family: ui-monospace, monospace; }
.tag { display: inline-flex; background: #edf1ec; border-radius: 20px; padding: .23rem .55rem; white-space: nowrap; font-size: .82rem; }
.tag.online { background: #dff1e3; color: #145634; }
.tag.retrying { background: #f8efce; color: #6d5617; }
.qr { width: 212px; height: 212px; display: block; border: 1px solid var(--line); border-radius: 12px; }
.split { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr); gap: 1rem; align-items: start; }
.record { display: grid; gap: .38rem; width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.record[aria-pressed="true"] { border-color: var(--accent); background: #edf7ef; }
.preview { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message { background: #f1f4f1; padding: .85rem; border-radius: 10px; display: grid; gap: .45rem; min-width: 0; }
.message.assistant { background: #e8f3ea; }
.message p { white-space: pre-wrap; overflow-wrap: anywhere; }
label { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .45rem; color: var(--muted); font-size: .9rem; }
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 1rem; background: linear-gradient(140deg, #132a24 0%, #26483b 52%, #38594a 100%); }
.login-card { display: grid; gap: 1.3rem; width: min(100%, 400px); background: #fff; border: 1px solid #dce4dc; border-radius: 16px; padding: 2rem; }
.login-card label { display: grid; }
.login-card h1 { font-size: 1.7rem; }
@media (max-width: 850px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { flex-direction: row; flex-wrap: wrap; gap: .8rem; padding: .7rem; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .quiet { margin: 0 0 0 auto; }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 500px) {
  .toolbar > * { max-width: 100%; }
  .brand { width: 100%; }
  .sidebar button { padding: .45rem .58rem; font-size: .86rem; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
