:root {
  --blue: #2291dc; --blue-dark: #1479bd; --blue-soft: #e8f4fc; --orange: #f28b2d;
  --green: #269866; --red: #d85858; --amber: #d89a21; --ink: #23313f; --muted: #788694;
  --line: #e4eaf0; --page: #f4f7fb; --surface: #fff;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink); background: var(--page);
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; min-width: 1100px; background: var(--page); }
button, input, select { font: inherit; }
button, select, input[type="checkbox"] { cursor: pointer; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.admin-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 3; width: 228px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fff; }
.sidebar-brand { height: 64px; display: flex; align-items: center; gap: 11px; padding: 0 20px; border-bottom: 1px solid var(--line); font-size: 15px; }
.brand-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 7px; color: var(--blue); background: var(--blue-soft); }
.brand-icon svg { width: 20px; height: 20px; }.brand-icon.small { width: 27px; height: 27px; }.brand-icon.small svg { width: 17px; height: 17px; }
.sidebar-nav { flex: 1; padding: 18px 10px; }.nav-label { display: block; padding: 9px 12px 6px; color: #9aa6b1; font-size: 11px; }
.nav-item { min-height: 43px; margin: 3px 0; display: flex; align-items: center; gap: 11px; padding: 0 14px; border-radius: 7px; color: #63717e; text-decoration: none; font-size: 13px; }
.nav-item svg { width: 17px; height: 17px; }.nav-item.active { color: var(--blue-dark); background: var(--blue-soft); font-weight: 600; }.nav-item.static { cursor: default; }
.sidebar-foot { min-height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 20px; border-top: 1px solid var(--line); font-size: 12px; }
.workspace { min-height: 100vh; margin-left: 228px; }.topbar { position: sticky; top: 0; z-index: 2; height: 64px; display: flex; align-items: center; gap: 15px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.topbar h1 { margin: 0; display: flex; align-items: center; gap: 9px; font-size: 16px; }.topbar h1 > span, .panel-heading h2 > span { width: 3px; height: 20px; display: inline-block; border-radius: 2px; background: var(--orange); }
.agent-state { margin-left: auto; display: flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 4px; color: #6f7f8c; background: #f2f5f7; font-size: 12px; }.agent-state i { width: 7px; height: 7px; border-radius: 50%; background: #9da8b0; }.agent-state[data-state="online"] { color: #187b50; background: #e6f5ed; }.agent-state[data-state="online"] i { background: var(--green); }.agent-state[data-state="offline"] { color: #a34a4a; background: #faeeee; }.agent-state[data-state="offline"] i { background: var(--red); }
.icon-button { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: #778591; background: #fff; }.icon-button svg { width: 17px; height: 17px; }
.main-content { width: min(1320px, calc(100% - 44px)); margin: 0 auto; padding: 24px 0 52px; }
.welcome-strip { min-height: 92px; display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border: 1px solid #e2ebf3; border-radius: 7px; background: #eef6fd; }
.welcome-strip h2 { margin: 0; font-size: 20px; }.welcome-strip h2 b { color: var(--blue); }.welcome-strip p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }.system-badge { padding: 4px 9px; border-radius: 4px; color: #fff; background: var(--green); font-size: 11px; font-weight: 600; }
.summary-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }.summary-item { min-height: 88px; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 4px 14px rgba(34,53,69,.04); }.summary-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 10px; font-weight: 700; }.summary-icon.blue { color: #238bd0; background: #e7f3fb; }.summary-icon.cyan { color: #218aa9; background: #e5f5f8; }.summary-icon.green { color: #23865e; background: #e8f6ef; }.summary-icon.orange { color: #db7c23; background: #fff1e5; }.summary-item p { margin: 0 0 5px; color: var(--muted); font-size: 11px; }.summary-item strong { font-size: 15px; }
.content-panel { margin-top: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 4px 16px rgba(34,53,69,.035); }.panel-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 15px; border-bottom: 1px solid #edf1f4; }.panel-heading h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; }.panel-heading h2 > span { height: 16px; }.panel-heading p { margin: 5px 0 0 11px; color: var(--muted); font-size: 11px; }.query-progress { color: var(--muted); font-size: 11px; }
.query-form { margin-top: 18px; display: grid; grid-template-columns: 200px minmax(360px, 1fr) 132px; align-items: end; gap: 12px; }.field { display: grid; gap: 7px; }.field > span { color: #667481; font-size: 12px; }.field input, .field select, .login-field input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #cfd8df; border-radius: 6px; outline: 0; color: var(--ink); background: #fff; }.field input:focus, .field select:focus, .login-field input:focus { border-color: #59afe6; box-shadow: 0 0 0 3px rgba(34,145,220,.12); }
.primary-button { height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 6px; color: #fff; background: var(--blue); font-weight: 600; }.primary-button:hover { background: var(--blue-dark); }.primary-button:disabled { cursor: wait; opacity: .65; }.primary-button svg { width: 17px; height: 17px; }
.query-options { min-height: 32px; margin-top: 11px; display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 11px; }.switch-row { display: inline-flex; align-items: center; gap: 8px; }.switch-row input { position: absolute; opacity: 0; }.switch { position: relative; width: 34px; height: 19px; border-radius: 10px; background: #b6c0c7; }.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .15s; }.switch-row input:checked + .switch { background: var(--blue); }.switch-row input:checked + .switch::after { transform: translateX(15px); }
.results-panel { min-height: 270px; }.results-heading { margin-bottom: 15px; }.count-badge { padding: 4px 8px; border-radius: 4px; color: var(--blue-dark); background: var(--blue-soft); font-size: 11px; font-weight: 600; }.message { min-height: 155px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: #96a2ac; background: #fafcfd; font-size: 12px; }.message svg { width: 27px; height: 27px; }.message[data-kind="error"] { color: var(--red); background: #fff8f8; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 5px; }table { width: 100%; min-width: 1050px; border-collapse: collapse; font-size: 12px; }th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }th { color: #657482; background: #f7f9fb; font-size: 11px; }tbody tr:last-child td { border-bottom: 0; }tbody tr:hover { background: #fafcff; }.cell-main,.cell-sub { display: block; }.cell-sub { margin-top: 3px; color: var(--muted); font-size: 10px; }.state-pill,.source-pill { display: inline-flex; padding: 4px 7px; border-radius: 4px; font-size: 10px; font-weight: 600; }.state-pill { color: #187a50; background: #e7f5ed; }.state-pill[data-tone="amber"] { color: #9e6a10; background: #fff3db; }.state-pill[data-tone="blue"] { color: #237ab1; background: #e8f3fa; }.source-pill { color: #657481; background: #eef2f5; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 40px; background: #f3f6fa; }.login-panel { width: 420px; padding: 36px 32px 31px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 16px 38px rgba(45,65,82,.11); text-align: center; }.login-icon { width: 64px; height: 64px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 16px; color: var(--blue); background: var(--blue-soft); }.login-icon svg { width: 38px; height: 38px; }.login-panel h1 { margin: 0; font-size: 20px; }.login-panel > p { margin: 7px 0 25px; color: #8a96a1; font-size: 13px; }.login-field { display: grid; gap: 7px; text-align: left; }.login-field > span { color: #687683; font-size: 12px; }.login-field input { height: 48px; background: #f6f8fb; }.login-button { width: 100%; height: 48px; margin-top: 16px; box-shadow: 0 8px 18px rgba(34,145,220,.18); }.login-error { min-height: 18px; margin-top: 9px; color: var(--red); font-size: 11px; text-align: left; }
