
:root{--bg:#f4f6f8;--surface:#fff;--surface-2:#f8fafc;--text:#111827;--muted:#6b7280;--line:#e5e7eb;--accent:#2563eb;--accent-hover:#1d4ed8;--good:#16a34a;--warn:#d97706;--bad:#dc2626;--shadow:0 10px 30px rgba(15,23,42,.06);--radius:18px}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif}
body{min-height:100vh}
button,input,select,textarea{font:inherit}
.app-shell{max-width:1580px;margin:0 auto;padding:34px 28px 48px}
.topbar{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:24px}
.eyebrow{font-size:12px;font-weight:700;letter-spacing:.14em;color:var(--accent);margin-bottom:8px}
h1{font-size:32px;line-height:1.15;margin:0}
.subtitle{margin:10px 0 0;color:var(--muted)}
.header-controls{display:flex;flex-direction:column;align-items:flex-end;gap:12px}
.header-actions-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.top-actions{display:flex;align-items:center;overflow:hidden;border:1px solid var(--line);border-radius:999px;background:var(--surface);box-shadow:0 4px 14px rgba(15,23,42,.04);max-width:100%;flex:0 1 auto;flex-wrap:nowrap}
.btn{border:1px solid var(--line);background:var(--surface);color:var(--text);padding:10px 16px;border-radius:999px;cursor:pointer;font-weight:600}
.btn:hover{background:var(--surface-2)}
.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-hover)}
.top-actions .btn,.top-actions .status-segment{border:0;border-radius:0;background:transparent;color:inherit;text-decoration:none}
.top-actions > * + *{border-left:1px solid var(--line)}
.top-actions .btn-primary{color:var(--accent)}
.top-actions .btn:hover,.top-actions .status-segment:hover{background:var(--surface-2)}
.theme-toggle-standalone{width:44px;height:44px;border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:999px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-size:19px;line-height:1;box-shadow:0 4px 14px rgba(15,23,42,.04);padding:0;flex:0 0 auto}
.theme-toggle-standalone:hover{background:var(--surface-2)}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin-bottom:18px;background:var(--surface);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);overflow:hidden}
.stat-card{padding:20px;background:transparent}
.stat-card + .stat-card{border-left:1px solid var(--line)}
.stat-label{display:block;color:var(--muted);font-size:13px;margin-bottom:8px}
.stat-card strong{font-size:30px;display:block;line-height:1}
.stat-note{display:block;color:var(--muted);font-size:12px;margin-top:10px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.toolbar{display:flex;align-items:flex-end;gap:16px;padding:18px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.search-wrap{flex:1 1 260px;min-width:200px}
.search-wrap label{display:block;font-size:13px;color:var(--muted);margin-bottom:7px}
.search-wrap input{width:100%;height:44px;border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:11px;padding:0 13px;outline:none}
.search-wrap input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(37,99,235,.12)}
/* 每页显示：与搜索框同一行、同样的输入框外观 */
.toolbar .page-size-wrap{flex:0 0 auto;margin-left:auto;display:flex;flex-direction:column;align-items:stretch;gap:7px;padding:0;color:var(--muted);font-size:13px;white-space:nowrap}
.toolbar .page-size-wrap label{display:block;font-size:13px;color:var(--muted)}
.toolbar .page-size-control{display:flex;align-items:center;gap:8px;height:44px;border:1px solid var(--line);background:var(--surface);border-radius:11px;padding:0 13px}
.toolbar .page-size-control select{border:0;background:transparent;color:var(--text);font-weight:700;cursor:pointer;outline:none;padding:0 18px 0 2px}
.toolbar .page-size-control select:focus{color:var(--accent)}
.toolbar .page-size-control:hover,.toolbar .page-size-control:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.status-wrap{color:var(--muted);font-size:13px;white-space:nowrap}
.status-dot{width:9px;height:9px;border-radius:999px;background:#9ca3af}
.status-dot.ok{background:var(--good)}.status-dot.err{background:var(--bad)}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:separate;border-spacing:0;min-width:1580px}
thead th{position:sticky;top:0;background:var(--surface-2);z-index:1;text-align:left;font-size:12px;color:#4b5563;font-weight:700;padding:13px 14px;border-bottom:1px solid var(--line);cursor:pointer;white-space:nowrap}
thead th:hover{color:var(--accent)}
tbody td{padding:14px;border-bottom:1px solid var(--line);font-size:13px;vertical-align:top}
tbody tr:hover{background:#f8fbff}
tbody tr:last-child td{border-bottom:0}
.mono{font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace}
.muted{color:var(--muted)}
.badge{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:12px;font-weight:600}
.time-good{color:var(--good);font-weight:600}.time-warn{color:var(--warn);font-weight:600}.time-bad{color:var(--bad);font-weight:600}
.empty-state{text-align:center!important;color:var(--muted)!important;padding:52px 20px!important}
.panel-footer{display:flex;justify-content:space-between;gap:16px;padding:14px 18px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
@media (max-width:1000px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-card:nth-child(odd){border-left:0}.stat-card:nth-child(n+3){border-top:1px solid var(--line)}.topbar{flex-direction:column}.header-controls{align-items:flex-start}}
@media (max-width:640px){.app-shell{padding:22px 14px 32px}h1{font-size:25px}.stats-grid{grid-template-columns:1fr}.stat-card + .stat-card{border-left:0;border-top:1px solid var(--line)}.top-actions{justify-content:flex-start}.status-wrap{white-space:normal;flex-wrap:wrap}.panel-footer{flex-direction:column}.toolbar{flex-direction:column;align-items:stretch}.search-wrap{max-width:none}.toolbar .page-size-wrap{align-items:flex-start}}
html[data-theme="dark"]{--bg:#0b1220;--surface:#111827;--surface-2:#172033;--text:#f3f4f6;--muted:#9ca3af;--line:#263244;--shadow:none}
html[data-theme="dark"] tbody tr:hover{background:#142038}
@media (prefers-color-scheme:dark){html:not([data-theme]){--bg:#0b1220;--surface:#111827;--surface-2:#172033;--text:#f3f4f6;--muted:#9ca3af;--line:#263244;--shadow:none}html:not([data-theme]) tbody tr:hover{background:#142038}}

/* V1.3 sorting and pagination */
.sort-btn{display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;color:inherit;padding:0;font:inherit;font-weight:inherit;cursor:pointer;white-space:nowrap}
.sort-indicator{display:inline-flex;align-items:center;gap:1px;color:#9ca3af;font-size:9px;line-height:1;background:transparent}
.sort-indicator .arrow{opacity:.45}
th.sorted .sort-indicator .arrow.active{color:var(--accent);opacity:1}
th.sorted .sort-indicator .arrow:not(.active){opacity:.3}
.page-size-wrap,.status-segment{display:flex;align-items:center;gap:8px;padding:10px 15px;color:var(--muted)}
.page-size-wrap select{border:0;background:transparent;color:var(--text);padding:0 22px 0 2px;outline:none;cursor:pointer;font-weight:700}
.page-size-wrap select:focus{color:var(--accent)}
.status-segment{border-left:1px solid var(--line);font-weight:600}
.pagination{display:flex;align-items:center;justify-content:center;gap:10px;color:var(--muted)}
.page-btn{border:1px solid var(--line);background:var(--surface);color:var(--text);padding:6px 11px;border-radius:8px;cursor:pointer;font-size:12px}
.page-btn:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}
.page-btn:disabled{opacity:.45;cursor:not-allowed}
@media (max-width:760px){.page-size-wrap{margin-right:0}.panel-footer{align-items:flex-start}.pagination{justify-content:flex-start}}
