:root {
  color-scheme: light;
  --ink: #20252a;
  --muted: #747b80;
  --line: #d9d9d2;
  --paper: #f3f2ed;
  --panel: #fffefa;
  --accent: #d65b39;
  --accent-dark: #a9432b;
  --ok: #2c7c5c;
  --blue: #3f6f91;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: flex; flex-direction: column; padding: 30px clamp(20px, 6vw, 96px) 22px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 10px; letter-spacing: .17em; font-weight: 750; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(36px, 5vw, 58px); line-height: .98; letter-spacing: -.025em; font-weight: 650; }
h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1; letter-spacing: -.025em; font-weight: 650; }
h3 { font-size: 17px; line-height: 1.15; font-weight: 650; }
.subtitle { margin-top: 11px; color: var(--muted); font-size: 13px; }
.connection { display: flex; align-items: center; gap: 11px; min-width: 160px; padding-top: 4px; }
.connection-copy { display: grid; gap: 3px; }
.connection-copy strong { font-size: 13px; font-weight: 650; }
.connection-copy small { color: var(--muted); font-size: 11px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #a8aaa5; box-shadow: 0 0 0 5px rgba(168,170,165,.16); }
.dot.online { background: var(--ok); box-shadow: 0 0 0 5px rgba(44,124,92,.14); }
.dot.error { background: var(--accent); box-shadow: 0 0 0 5px rgba(214,91,57,.14); }
.overview { display: grid; grid-template-columns: minmax(320px, .86fr) minmax(460px, 1.14fr); gap: clamp(30px, 8vw, 120px); align-items: stretch; padding: clamp(34px, 6vh, 72px) 0 34px; border-bottom: 1px solid var(--line); }
.status-lead { display: flex; flex-direction: column; justify-content: space-between; min-height: 170px; }
.status-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.status-badge, .command-state { width: max-content; padding: 6px 9px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.status-badge.online, .command-state.success { color: var(--ok); border-color: rgba(44,124,92,.35); }
.status-badge.busy { color: var(--accent-dark); border-color: rgba(214,91,57,.35); }
.status-badge.offline, .command-state.failed { color: var(--accent-dark); border-color: rgba(214,91,57,.38); }
.status-description { max-width: 34em; padding-top: 24px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.muted { color: var(--muted); font-size: 11px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); align-content: center; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.metric { min-height: 108px; display: grid; align-content: center; gap: 7px; padding: 18px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric span { color: var(--muted); font-size: 11px; }
.metric strong { min-height: 28px; font-size: 25px; font-weight: 620; letter-spacing: -.02em; }
.metric small { color: var(--muted); font-size: 11px; }
.operation-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr); gap: clamp(30px, 8vw, 120px); padding: 44px 0 52px; }
.controls-panel { min-width: 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.compact-heading { align-items: baseline; }
.section-note { color: var(--muted); font-size: 11px; }
.action-group, .mode-list { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 18px; }
.mode-heading { margin-top: 42px; }
.action, .mode { min-height: 42px; padding: 0 16px; border: 1px solid var(--ink); color: var(--ink); background: transparent; transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease; }
.action:hover, .mode:hover { transform: translateY(-2px); color: #fff; background: var(--ink); }
.mode.active { color: #fff; border-color: var(--blue); background: var(--blue); }
.action-primary { border-color: var(--accent); color: #fff; background: var(--accent); }
.action-primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.action-danger { border-color: rgba(214,91,57,.55); color: var(--accent-dark); }
.action-danger:hover { border-color: var(--accent); background: var(--accent); }
.mode-list .mode { min-width: 120px; }
.plan-list .mode { border-color: var(--blue); color: var(--blue); }
.plan-list .mode:hover { background: var(--blue); }
.plan-list .mode.active { color: #fff; border-color: var(--blue); background: var(--blue); }
.activity-panel { border-left: 1px solid var(--line); padding-left: clamp(24px, 4vw, 54px); }
.activity-section + .activity-section { margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line); }
.command-result { min-height: 47px; margin-top: 16px; padding: 13px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.45; }
.command-result.pending { color: var(--blue); }
.command-result.success { color: var(--ok); }
.command-result.error { color: var(--accent-dark); }
.command-meta { color: var(--muted); font-size: 10px; line-height: 1.45; }
.event-list { display: grid; gap: 0; margin: 15px 0 0; padding: 0; list-style: none; }
.event-item { position: relative; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 11px; align-items: start; min-height: 47px; padding: 2px 0 14px; }
.event-item:not(:last-child)::after { content: ""; position: absolute; top: 13px; bottom: 0; left: 4px; width: 1px; background: var(--line); }
.event-marker { position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 3px; border: 2px solid var(--paper); border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.event-marker.error { background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.event-marker.success { background: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.event-item strong { display: block; font-size: 12px; font-weight: 620; }
.event-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.event-item time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.event-empty { padding: 15px 0; color: var(--muted); font-size: 12px; }
.developer-settings { padding: 16px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.developer-settings summary { cursor: pointer; }
.developer-grid { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; padding-top: 14px; }
.developer-grid label { display: grid; gap: 6px; font-weight: 700; }
.developer-grid input { width: min(270px, 75vw); height: 34px; border: 1px solid var(--line); padding: 0 10px; color: var(--ink); background: var(--panel); }
.config-button { height: 34px; padding: 0 14px; border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.config-button:hover { color: #fff; background: var(--ink); }
.footer { display: flex; justify-content: space-between; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
@media (max-width: 880px) {
  .overview, .operation-layout { grid-template-columns: 1fr; gap: 34px; }
  .activity-panel { border-left: 0; border-top: 1px solid var(--line); padding: 30px 0 0; }
}
@media (max-width: 620px) {
  .shell { padding: 20px 18px 16px; }
  .topbar { flex-direction: column; gap: 19px; }
  h1 { font-size: 39px; }
  .overview { padding: 40px 0 34px; }
  .metric { min-height: 98px; padding: 15px; }
  .metric strong { font-size: 21px; }
  .action, .mode { flex: 1 1 calc(50% - 9px); }
  .mode-list .mode { min-width: 0; }
  .footer { flex-direction: column; }
}
