﻿:root {
  color-scheme: light;
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f7fafc;
  --line: #dde5ee;
  --line-strong: #c8d2df;
  --text: #172033;
  --muted: #687386;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #e1f4f1;
  --danger: #b42318;
  --warning: #b7791f;
  --ok: #15803d;
  --shadow: 0 18px 50px rgba(20, 35, 60, 0.10);
  --focus: rgba(15, 118, 110, 0.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 1180px;
  background: linear-gradient(180deg, #f7fbff 0%, var(--bg) 360px);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

.shell {
  width: min(1720px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

h1, h2, h3, p { margin: 0; }

.eyebrow {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

h1 {
  margin-top: 6px;
  font-size: 34px;
  font-weight: 820;
  letter-spacing: 0;
}

.subtitle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.state {
  min-width: 92px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(20, 35, 60, 0.06);
}

.state.loading { border-color: #f2d08b; background: #fff8e8; color: var(--warning); }
.state.ok { border-color: #a8dec0; background: #edf9f1; color: var(--ok); }
.state.error { border-color: #f1b8b2; background: #fff1f0; color: var(--danger); }

.filters {
  display: grid;
  grid-template-columns: 180px 150px 190px 96px 1fr;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(200, 210, 223, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input, select, button {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

input, select {
  width: 100%;
  padding: 0 11px;
  background: #fff;
  color: var(--text);
}

input:focus, select:focus, button:focus {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

button:hover { background: var(--accent-strong); }
button:disabled { cursor: not-allowed; opacity: 0.65; }

.board {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(200, 210, 223, 0.9);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.board-head h2 { font-size: 17px; font-weight: 820; }
.board-head p { margin-top: 5px; color: var(--muted); font-size: 13px; }

.count-pill {
  min-width: 62px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: #3b465a;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.list-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.page-size-label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.page-size-label select {
  width: 76px;
  height: 32px;
  padding: 0 8px;
}

.pager-button {
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent-strong);
  border-color: var(--line);
  font-size: 12px;
}

.pager-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.page-info {
  min-width: 76px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 850;
}

.task-table-wrap {
  position: relative;
  min-height: 360px;
  max-height: calc(100vh - 220px);
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 10px 11px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #425066;
  font-size: 12px;
  font-weight: 820;
}

.task-row { cursor: pointer; transition: background-color 0.15s ease; }
.task-row:hover { background: #f3fbf9; }
.task-row.active { background: var(--accent-soft); }

.expand-col {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.expand-button {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--accent-strong);
  line-height: 1;
  font-size: 18px;
}

.expand-button:hover { background: var(--accent); color: #fff; }

.title-cell {
  max-width: 390px;
  white-space: normal;
  line-height: 1.45;
}

.metric, .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.metric.success, .badge.SUCCESS { background: #dcfce7; color: #166534; }
.metric.failed, .badge.FAILED { background: #fee2e2; color: #991b1b; }
.metric.partial, .badge.PARTIAL_SUCCESS { background: #fef3c7; color: #92400e; }
.metric.processing, .badge.PROCESSING { background: #dbeafe; color: #1d4ed8; }
.metric.cancelled, .badge.CANCELLED { background: #e5e7eb; color: #4b5563; }

.inline-detail-row > td {
  padding: 0;
  background: #f7fafc;
}

.inline-panel {
  margin: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: #f8fbfd;
}

.inline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 10px 58px;
}

.inline-head h3 { font-size: 15px; font-weight: 820; }
.inline-head p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.inline-count { color: var(--muted); font-size: 12px; font-weight: 800; }

.inline-content { padding: 0 18px 18px 58px; }
.inline-content.loading, .log-panel.loading, .inline-empty { color: var(--muted); font-size: 13px; }

.nested-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.nested-table th { position: static; background: #f4f7fa; }
.nested-table td, .nested-table th { padding: 9px 10px; }

.item-row { cursor: pointer; }
.item-row:hover, .item-row.active { background: #eef8f6; }

.log-row > td {
  padding: 0;
  background: #fff;
}

.log-panel {
  padding: 12px;
  background: #fff;
}

.log-title {
  margin-bottom: 9px;
  color: #425066;
  font-size: 13px;
  font-weight: 820;
}

.logs { min-width: 980px; }
.compact-empty { padding: 12px; }
.error-text { color: var(--danger); }

.empty {
  position: absolute;
  inset: 70px 0 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  pointer-events: none;
}

.empty.hidden { display: none; }

a { color: var(--accent-strong); font-weight: 700; }

@media (max-width: 900px) {
  body { min-width: 0; }
  .shell { width: calc(100vw - 24px); padding-top: 18px; }
  .hero { display: grid; align-items: start; }
  .filters { grid-template-columns: 1fr; }
  .task-table-wrap { max-height: none; }
  .inline-head, .inline-content { padding-left: 16px; padding-right: 16px; }
}

.view-button {
  width: 48px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--accent-strong);
  border-color: var(--line-strong);
  font-size: 12px;
}

.view-button:hover {
  background: var(--accent);
  color: #fff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: min(1180px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 56px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.24);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.modal-head h2 {
  font-size: 18px;
  font-weight: 820;
}

.modal-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 6px;
  border-color: var(--line);
  background: #fff;
  color: #334155;
  font-size: 22px;
  line-height: 1;
}

.icon-button:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.modal-body {
  min-height: 260px;
  overflow: auto;
  padding: 16px 18px 18px;
}

.modal-body.loading {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.modal-table-wrap {
  max-height: calc(100vh - 230px);
}

.item-row {
  cursor: pointer;
}

.item-row:hover {
  background: #eef8f6;
}

.back-link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 28px rgba(20, 35, 60, 0.06);
}

.back-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.log-shell .task-table-wrap {
  max-height: calc(100vh - 190px);
}

.logs-page-table {
  min-width: 1120px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.theme-toggle {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 28px rgba(20, 35, 60, 0.06);
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-filter {
  width: auto;
  border: 0;
  cursor: pointer;
}

.status-filter:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.duration-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.duration-none {
  background: #eef2f7;
  color: #64748b;
}

.duration-hot-1 {
  background: #e6f7ec;
  color: #166534;
}

.duration-hot-2 {
  background: #fff0bd;
  color: #854d0e;
}

.duration-hot-3 {
  background: #fed7aa;
  color: #9a3412;
}

.duration-hot-4 {
  background: #fecaca;
  color: #991b1b;
}

html[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #162033;
  --surface-soft: #111827;
  --line: #2a3a52;
  --line-strong: #33445f;
  --text: #e5edf7;
  --muted: #9aa8bb;
  --accent: #14b8a6;
  --accent-strong: #5eead4;
  --accent-soft: #123832;
  --danger: #fca5a5;
  --warning: #facc15;
  --ok: #86efac;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --focus: rgba(20, 184, 166, 0.24);
}

html[data-theme="dark"] body {
  background: linear-gradient(180deg, #172033 0%, var(--bg) 360px);
}

html[data-theme="dark"] .filters,
html[data-theme="dark"] .board,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .state,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .back-link,
html[data-theme="dark"] .icon-button {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .board-head,
html[data-theme="dark"] .modal-head {
  background: linear-gradient(180deg, #1b2638 0%, #162033 100%);
  border-color: var(--line);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] .nested-table-wrap {
  background: #0f172a;
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] th {
  background: #111827;
  color: #cbd5e1;
}

html[data-theme="dark"] td,
html[data-theme="dark"] th {
  border-bottom-color: #253247;
}

html[data-theme="dark"] .task-row:hover,
html[data-theme="dark"] .item-row:hover {
  background: #123832;
}

html[data-theme="dark"] .task-row.active {
  background: #16443d;
}

html[data-theme="dark"] .modal-backdrop {
  background: rgba(2, 6, 23, 0.66);
}

html[data-theme="dark"] .count-pill,
html[data-theme="dark"] .view-button,
html[data-theme="dark"] .expand-button {
  background: #0f172a;
  color: var(--accent-strong);
  border-color: var(--line);
}

html[data-theme="dark"] .view-button:hover,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .back-link:hover {
  background: var(--accent-soft);
}

html[data-theme="dark"] .duration-none {
  background: #253247;
  color: #94a3b8;
}

html[data-theme="dark"] .duration-hot-1 {
  background: #134e3a;
  color: #bbf7d0;
}

html[data-theme="dark"] .duration-hot-2 {
  background: #713f12;
  color: #fde68a;
}

html[data-theme="dark"] .duration-hot-3 {
  background: #7c2d12;
  color: #fed7aa;
}

html[data-theme="dark"] .duration-hot-4 {
  background: #7f1d1d;
  color: #fecaca;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.chart-card {
  min-height: 190px;
  overflow: hidden;
  border: 1px solid rgba(200, 210, 223, 0.9);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.chart-head h2 {
  font-size: 15px;
  font-weight: 850;
}

.chart-head span {
  min-width: 40px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-align: center;
  font-size: 12px;
  font-weight: 850;
}

.chart-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.chart-row {
  height: auto;
  display: grid;
  grid-template-columns: minmax(76px, 0.8fr) minmax(90px, 1fr) 44px;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-weight: 750;
}

.chart-row:hover,
.chart-row.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.chart-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.16);
}

.chart-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, #38bdf8 100%);
}

.chart-value {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.chart-status.SUCCESS .chart-fill { background: #22c55e; }
.chart-status.FAILED .chart-fill { background: #ef4444; }
.chart-status.PARTIAL_SUCCESS .chart-fill { background: #f59e0b; }
.chart-status.PROCESSING .chart-fill { background: #3b82f6; }
.chart-status.CANCELLED .chart-fill { background: #94a3b8; }

.chart-empty {
  min-height: 88px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.chart-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.chart-filter-bar.hidden {
  display: none;
}

.chart-filter-bar button {
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 12px;
}

html[data-theme="dark"] .chart-card {
  background: var(--surface);
  border-color: var(--line);
}

html[data-theme="dark"] .chart-head {
  background: linear-gradient(180deg, #1b2638 0%, #162033 100%);
  border-color: var(--line);
}

html[data-theme="dark"] .chart-row {
  background: #111827;
  color: var(--text);
}

html[data-theme="dark"] .chart-row:hover,
html[data-theme="dark"] .chart-row.active {
  background: #123832;
  color: var(--accent-strong);
}

html[data-theme="dark"] .chart-track {
  background: rgba(148, 163, 184, 0.18);
}

@media (max-width: 1100px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

.error-message-cell {
  min-width: 360px;
  max-width: 440px;
  white-space: normal;
}

.error-preview {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  color: var(--text);
}

.error-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.mini-action-button,
.copy-button {
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.mini-action-button:hover,
.copy-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.error-modal {
  width: min(900px, calc(100vw - 48px));
}

.error-modal-body {
  display: grid;
  gap: 12px;
}

.error-message-full {
  min-height: 240px;
  max-height: calc(100vh - 260px);
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.error-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.copy-state {
  min-width: 56px;
  color: var(--ok);
  font-size: 13px;
  font-weight: 800;
}

html[data-theme="dark"] .error-message-full {
  background: #0f172a;
  border-color: var(--line);
}

html[data-theme="dark"] .mini-action-button,
html[data-theme="dark"] .copy-button {
  background: #0f172a;
  color: var(--accent-strong);
  border-color: var(--line);
}

/* Dark-mode form controls and query state refinements */
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] select {
  background: #0b1220;
  border-color: #3b4d68;
  color: #e5edf7;
}

html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  padding: 4px;
  border-radius: 5px;
  background-color: #5eead4;
  filter: invert(1) brightness(1.35) contrast(1.1);
  cursor: pointer;
}

html[data-theme="dark"] input[type="number"]::-webkit-inner-spin-button,
html[data-theme="dark"] input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  filter: invert(1) brightness(1.35) contrast(1.1);
}

html[data-theme="dark"] input[type="date"]:hover,
html[data-theme="dark"] input[type="number"]:hover,
html[data-theme="dark"] select:hover {
  border-color: var(--accent);
}

html[data-theme="dark"] .state.loading {
  border-color: #facc15;
  background: rgba(113, 63, 18, 0.72);
  color: #fef08a;
}

html[data-theme="dark"] .state.ok {
  border-color: #22c55e;
  background: rgba(20, 83, 45, 0.72);
  color: #bbf7d0;
}

html[data-theme="dark"] .state.error {
  border-color: #ef4444;
  background: rgba(127, 29, 29, 0.74);
  color: #fecaca;
}

html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  background-color: transparent;
  filter: invert(1) brightness(1.8) contrast(1.05);
}

.channel-cell {
  min-width: 96px;
}

.channel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  max-width: 140px;
  height: 24px;
  padding: 0 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="dark"] .channel-badge {
  background: #0c4a6e;
  color: #bae6fd;
}

.user-summary-filters {
  grid-template-columns: 180px 260px 180px 96px 1fr;
}

.task-board-filters {
  grid-template-columns: 170px 150px 190px 96px 1fr;
}

@media (max-width: 900px) {
  .task-board-filters {
    grid-template-columns: 1fr;
  }
}

.log-filters {
  grid-template-columns: 160px 220px 180px 220px 160px 150px 96px;
}

.node-status-filters {
  grid-template-columns: 180px 96px 1fr;
}

.task-summary-filters {
  grid-template-columns: 180px 220px 220px 96px 1fr;
}

.summary-hero-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.6fr);
  gap: 14px;
  margin-top: 16px;
}

.summary-spotlight,
.summary-mini-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.summary-spotlight:hover,
.summary-mini-card:hover,
.summary-chart-board:hover,
.trend-board:hover,
.group-board:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 22px 58px rgba(20, 35, 60, 0.15);
}

.summary-spotlight {
  min-height: 154px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(37, 99, 235, 0.10)),
    var(--surface);
}

.summary-spotlight span,
.summary-mini-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.summary-spotlight strong {
  color: var(--accent-strong);
  font-size: 48px;
  line-height: 1;
  font-weight: 920;
  font-variant-numeric: tabular-nums;
}

.summary-spotlight em {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 10px;
}

.summary-mini-card {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
}

.summary-mini-card strong {
  font-size: 28px;
  line-height: 1;
  font-weight: 920;
  font-variant-numeric: tabular-nums;
  transition: transform 0.18s ease;
}

.summary-mini-card:hover strong,
.summary-spotlight:hover strong {
  transform: scale(1.04);
}

.summary-mini-card.success strong { color: var(--ok); }
.summary-mini-card.failed strong { color: var(--danger); }
.summary-mini-card.partial strong { color: #b7791f; }
.summary-mini-card.processing strong { color: #2563eb; }
.summary-mini-card.cancelled strong { color: #64748b; }

.task-summary-layout {
  display: grid;
  grid-template-columns: minmax(460px, 0.95fr) minmax(420px, 1.05fr);
  gap: 14px;
}

.summary-chart-board {
  min-height: 360px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.status-donut-panel {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 22px;
}

.donut-wrap {
  display: grid;
  place-items: center;
}

.donut-chart {
  width: 214px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.16);
  transition: transform 0.24s ease, filter 0.24s ease;
}

.status-donut-panel:hover .donut-chart {
  transform: rotate(4deg) scale(1.035);
  filter: saturate(1.12);
}

.donut-center {
  width: 132px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(20, 35, 60, 0.12);
}

.donut-center strong {
  font-size: 28px;
  font-weight: 920;
  font-variant-numeric: tabular-nums;
}

.donut-center span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.status-break-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.status-break-row {
  display: grid;
  grid-template-columns: 12px 68px minmax(80px, 1fr) 58px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.16s ease, color 0.16s ease;
}

.status-break-row:hover {
  transform: translateX(4px);
  color: var(--accent-strong);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.status-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-track,
.duration-range-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.16);
}

.status-track span,
.duration-range-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
  transform-origin: left center;
  animation: barReveal 0.58s ease both;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.status-break-row:hover .status-track span,
.duration-range-row:hover .duration-range-track span,
.group-row-card:hover .group-total-track span {
  filter: brightness(1.08) saturate(1.12);
  transform: scaleX(1.015);
}

.status-break-row.success .status-track span { background: #22c55e; }
.status-break-row.failed .status-track span { background: #ef4444; }
.status-break-row.partial .status-track span { background: #f59e0b; }
.status-break-row.processing .status-track span { background: #3b82f6; }
.status-break-row.cancelled .status-track span { background: #94a3b8; }

.duration-range-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.duration-range-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.18s ease, transform 0.18s ease;
}

.duration-range-row:hover {
  background: var(--surface-soft);
  transform: translateX(4px);
}

.duration-range-row div {
  display: grid;
  gap: 5px;
}

.duration-range-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.duration-range-row strong {
  font-size: 20px;
  font-weight: 920;
  font-variant-numeric: tabular-nums;
}

.duration-range-row.fast strong { color: var(--ok); }
.duration-range-row.avg strong { color: var(--accent-strong); }
.duration-range-row.slow strong { color: var(--danger); }
.duration-range-row.fast .duration-range-track span { background: linear-gradient(90deg, #22c55e, #86efac); }
.duration-range-row.avg .duration-range-track span { background: linear-gradient(90deg, #0f766e, #38bdf8); }
.duration-range-row.slow .duration-range-track span { background: linear-gradient(90deg, #f97316, #ef4444); }

.trend-board {
  overflow: visible;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.group-board {
  overflow: visible;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.group-chart {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.group-row-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(180px, 0.65fr) minmax(360px, 1.15fr) minmax(300px, 0.95fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  box-shadow: 0 8px 24px rgba(20, 35, 60, 0.05);
  animation: groupCardIn 0.42s ease both;
  animation-delay: var(--delay, 0ms);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.group-row-card.clickable {
  cursor: pointer;
}

.group-row-card:hover {
  transform: translateY(-3px) scale(1.004);
  border-color: rgba(15, 118, 110, 0.62);
  background: var(--accent-soft);
  box-shadow: 0 18px 46px rgba(20, 35, 60, 0.14);
}

.group-row-card:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.group-row-main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.group-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  transition: transform 0.18s ease;
}

.group-row-card:hover .group-rank {
  transform: rotate(-6deg) scale(1.08);
}

.group-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.group-title strong,
.group-title em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-title strong {
  font-size: 14px;
  font-weight: 900;
}

.group-title em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.group-total-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(46px, max-content);
  align-items: center;
  gap: 10px;
}

.group-total-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.16);
}

.group-total-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
  transform-origin: left center;
  animation: barReveal 0.62s ease both;
}

.group-total-bar strong {
  color: var(--accent-strong);
  font-size: 18px;
  font-weight: 930;
  font-variant-numeric: tabular-nums;
}

.group-status-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(54px, 1fr));
  gap: 7px;
}

.group-status-pill {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.group-status-pill:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--surface);
}

.group-status-pill:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.group-status-pill em {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-status-pill strong {
  font-size: 15px;
  font-weight: 930;
  font-variant-numeric: tabular-nums;
}

.group-status-pill.success strong { color: var(--ok); }
.group-status-pill.failed strong { color: var(--danger); }
.group-status-pill.partial strong { color: #b7791f; }
.group-status-pill.processing strong { color: #2563eb; }
.group-status-pill.cancelled strong { color: #64748b; }

.group-duration-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(78px, 1fr));
  gap: 8px;
}

.group-duration-list span {
  display: grid;
  gap: 4px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(100, 116, 139, 0.08);
  transition: transform 0.16s ease, background 0.16s ease;
}

.group-duration-list span:hover {
  transform: translateY(-2px);
  background: rgba(15, 118, 110, 0.12);
}

.group-duration-list em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.group-duration-list strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-chart {
  padding: 22px 24px 20px;
}

.trend-echart {
  width: 100%;
  height: 430px;
}

.trend-showcase {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 0%, rgba(15, 118, 110, 0.11), transparent 34%),
    radial-gradient(circle at 82% 5%, rgba(37, 99, 235, 0.13), transparent 34%),
    linear-gradient(180deg, var(--surface-soft), var(--surface));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 28px rgba(20, 35, 60, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.trend-showcase:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 20px 48px rgba(20, 35, 60, 0.13);
}

.trend-kpi-strip {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px 0;
}

.trend-kpi {
  min-width: 132px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "label delta"
    "value delta";
  align-items: center;
  gap: 3px 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 8px 22px rgba(20, 35, 60, 0.06);
}

.trend-kpi em {
  grid-area: label;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.trend-kpi strong {
  grid-area: value;
  font-size: 23px;
  line-height: 1;
  font-weight: 930;
  font-variant-numeric: tabular-nums;
}

.trend-kpi small {
  grid-area: delta;
  min-width: 38px;
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.trend-kpi.user strong { color: #0f766e; }
.trend-kpi.task strong { color: #2563eb; }

.trend-tooltip {
  min-width: 178px;
}

.trend-tooltip-title {
  padding: 9px 11px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.trend-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 11px;
}

.trend-tooltip-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trend-tooltip-row i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.trend-tooltip-row strong {
  font-size: 14px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.trend-canvas {
  position: relative;
  height: 360px;
  padding: 12px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 8%, rgba(15, 118, 110, 0.09), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(37, 99, 235, 0.10), transparent 32%),
    linear-gradient(180deg, var(--surface-soft), var(--surface));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.trend-canvas svg {
  width: 100%;
  height: 315px;
  overflow: visible;
}

.trend-series {
  transition: opacity 0.18s ease, filter 0.18s ease;
}

.trend-canvas:hover .trend-series {
  opacity: 0.52;
}

.trend-canvas .trend-series:hover,
.trend-canvas .trend-series:focus-within {
  opacity: 1;
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.18));
}

.trend-line,
.trend-line-glow,
.trend-line-hit {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-area {
  opacity: 0.9;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.trend-line {
  stroke-width: 2.4;
  transition: stroke-width 0.18s ease, filter 0.18s ease;
}

.trend-line-glow {
  stroke-width: 10;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.trend-line-hit {
  stroke-width: 18;
  opacity: 0;
  cursor: pointer;
}

.trend-series:hover .trend-line,
.trend-series:focus-within .trend-line {
  stroke-width: 3.6;
}

.trend-series:hover .trend-area,
.trend-series:focus-within .trend-area {
  opacity: 1;
}

.trend-series:hover .trend-line-glow,
.trend-series:focus-within .trend-line-glow {
  opacity: 0.13;
}

.trend-point {
  cursor: pointer;
  outline: none;
}

.trend-point-halo {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.trend-point-dot {
  stroke: var(--surface);
  stroke-width: 2.6;
  transform-box: fill-box;
  transform-origin: center;
  transition: r 0.18s ease, stroke-width 0.18s ease, transform 0.18s ease;
}

.trend-point:hover .trend-point-halo,
.trend-point:focus .trend-point-halo,
.trend-series:hover .trend-point-halo {
  opacity: 0.15;
  transform: scale(1.55);
}

.trend-point:hover .trend-point-dot,
.trend-point:focus .trend-point-dot {
  r: 6;
  stroke-width: 3;
  transform: scale(1.1);
}

.trend-value-label {
  opacity: 0;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 5px;
  fill: var(--text);
  font-size: 12.5px;
  font-weight: 900;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.trend-point:hover .trend-value-label,
.trend-point:focus .trend-value-label,
.trend-series:hover .trend-value-label,
.trend-series:focus-within .trend-value-label {
  opacity: 1;
  transform: translateY(-4px);
}

.trend-grid-line {
  stroke: rgba(100, 116, 139, 0.16);
  stroke-width: 1;
}

.trend-axis-line {
  stroke: rgba(71, 85, 105, 0.70);
  stroke-width: 1.6;
}

.trend-axis-tick {
  stroke: rgba(71, 85, 105, 0.55);
  stroke-width: 1.4;
}

.trend-x-label,
.trend-y-label {
  color: var(--muted);
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.trend-legend span:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.trend-legend i {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

html[data-theme="dark"] .summary-spotlight,
html[data-theme="dark"] .summary-mini-card,
html[data-theme="dark"] .donut-center,
html[data-theme="dark"] .group-row-card,
html[data-theme="dark"] .trend-canvas {
  background-color: var(--surface);
  border-color: var(--line);
}

html[data-theme="dark"] .summary-mini-card {
  background: linear-gradient(180deg, #1b2638 0%, #111827 100%);
}

html[data-theme="dark"] .donut-center {
  background: #162033;
}

html[data-theme="dark"] .trend-canvas {
  background:
    radial-gradient(circle at 18% 8%, rgba(20, 184, 166, 0.12), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(96, 165, 250, 0.13), transparent 32%),
    linear-gradient(180deg, #111827, #162033);
}

html[data-theme="dark"] .trend-showcase {
  background:
    radial-gradient(circle at 18% 8%, rgba(20, 184, 166, 0.12), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(96, 165, 250, 0.13), transparent 32%),
    linear-gradient(180deg, #111827, #162033);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08), 0 14px 34px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .trend-kpi {
  background: rgba(15, 23, 42, 0.68);
  border-color: var(--line);
}

html[data-theme="dark"] .group-row-card {
  background: linear-gradient(180deg, #1b2638 0%, #111827 100%);
}

html[data-theme="dark"] .group-row-card:hover {
  background: #123832;
}

html[data-theme="dark"] .group-status-pill {
  background: rgba(15, 23, 42, 0.72);
  border-color: var(--line);
}

html[data-theme="dark"] .group-duration-list span {
  background: rgba(15, 23, 42, 0.72);
}

.chart-refreshed {
  animation: cardRefresh 0.38s ease both;
}

@keyframes barReveal {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes groupCardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardRefresh {
  0% { transform: translateY(2px); }
  100% { transform: translateY(0); }
}

@media (max-width: 1300px) {
  .summary-hero-grid,
  .task-summary-layout,
  .status-donut-panel {
    grid-template-columns: 1fr;
  }

  .status-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group-row-card {
    grid-template-columns: 1fr;
  }

  .group-status-list,
  .group-duration-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.node-status-board {
  overflow: visible;
}

.node-status-chart {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.node-status-row {
  height: auto;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(520px, 1.2fr);
  align-items: stretch;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.node-status-row:hover,
.node-status-row:focus {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  outline: none;
}

.node-status-main {
  display: grid;
  grid-template-rows: auto auto 10px;
  gap: 6px;
  min-width: 0;
}

.node-status-main strong,
.node-status-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-status-main strong {
  font-size: 15px;
  font-weight: 900;
}

.node-status-main em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.node-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 8px;
}

.node-metric {
  height: auto;
  min-height: 58px;
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  text-align: left;
}

.node-metric:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.node-metric em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.node-metric strong {
  overflow: hidden;
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-metric.ok strong { color: var(--ok); }
.node-metric.danger strong { color: var(--danger); }
.node-metric.time strong { color: var(--accent-strong); }

html[data-theme="dark"] .node-status-row {
  background: linear-gradient(180deg, #1b2638 0%, #111827 100%);
  border-color: var(--line);
}

html[data-theme="dark"] .node-status-row:hover {
  background: #123832;
}

html[data-theme="dark"] .node-metric {
  background: rgba(15, 23, 42, 0.72);
  border-color: var(--line);
}

@media (max-width: 1300px) {
  .log-filters {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .node-status-row {
    grid-template-columns: 1fr;
  }
}

.user-summary-board {
  margin-top: 16px;
}

.user-rank-chart {
  display: grid;
  gap: 10px;
  padding: 16px 18px 4px;
}

.user-rank-row {
  height: auto;
  display: grid;
  grid-template-columns: 42px minmax(180px, 0.9fr) minmax(160px, 1.2fr) 70px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
}

.user-rank-row:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.rank-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.rank-user {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rank-user strong,
.rank-user em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-user strong {
  font-size: 14px;
  font-style: normal;
}

.rank-user em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.16);
}

.rank-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
}

.rank-count {
  justify-self: end;
  font-size: 18px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.user-summary-table-wrap {
  max-height: calc(100vh - 430px);
}

.user-summary-table {
  min-width: 1180px;
}

html[data-theme="dark"] .user-rank-row {
  background: #111827;
  border-color: var(--line);
}

html[data-theme="dark"] .user-rank-row:hover {
  background: #123832;
}

.users-empty {
  position: static;
  min-height: 160px;
}

.user-rank-chart {
  padding: 18px;
}

.user-summary-card {
  height: auto;
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  color: var(--text);
  text-align: left;
  box-shadow: 0 10px 28px rgba(20, 35, 60, 0.06);
}

.user-summary-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  transform: translateY(-1px);
}

.user-summary-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.summary-bars {
  display: grid;
  gap: 8px;
}

.summary-bar-row {
  display: grid;
  grid-template-columns: 58px minmax(140px, 1fr) 64px;
  align-items: center;
  gap: 10px;
}

.summary-bar-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.summary-bar-row strong {
  justify-self: end;
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.summary-bar-row.item-bar .rank-track span {
  background: linear-gradient(90deg, #6366f1, #38bdf8);
}

.user-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 8px;
}

.user-metric {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.user-metric em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.user-metric strong {
  font-size: 17px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.user-metric.ok strong { color: var(--ok); }
.user-metric.danger strong { color: var(--danger); }
.user-metric.info strong { color: #2563eb; }
.user-metric.credit strong { color: var(--accent-strong); }

html[data-theme="dark"] .user-summary-card {
  background: linear-gradient(180deg, #1b2638 0%, #111827 100%);
  border-color: var(--line);
}

html[data-theme="dark"] .user-summary-card:hover {
  background: #123832;
}

html[data-theme="dark"] .user-metric {
  background: rgba(15, 23, 42, 0.72);
  border-color: var(--line);
}

html[data-theme="dark"] .user-metric.info strong { color: #93c5fd; }

@media (max-width: 1100px) {
  .user-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-bar-row {
    grid-template-columns: 58px minmax(90px, 1fr) 56px;
  }
}

/* User summary chart layout fixes */
.users-shell .board {
  overflow: visible;
}

.users-shell .user-rank-chart {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  overflow: visible;
}

.users-shell .user-summary-card {
  height: auto !important;
  min-height: 0;
  width: 100%;
  min-width: 0;
  align-items: stretch;
  grid-template-columns: 44px minmax(0, 1fr);
  white-space: normal;
  line-height: 1.35;
}

.users-shell .user-summary-card * {
  box-sizing: border-box;
  min-width: 0;
}

.users-shell .user-summary-main,
.users-shell .summary-bars,
.users-shell .user-metrics-grid {
  width: 100%;
}

.users-shell .rank-user strong,
.users-shell .rank-user em {
  display: block;
  max-width: 100%;
}

.users-shell .summary-bar-row {
  width: 100%;
  grid-template-columns: 64px minmax(0, 1fr) minmax(48px, max-content);
}

.users-shell .rank-track {
  width: 100%;
  min-width: 0;
}

.users-shell .user-metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.users-shell .user-metric {
  min-width: 0;
  overflow: hidden;
}

.users-shell .user-metric strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .users-shell .user-summary-card {
    grid-template-columns: 1fr;
  }

  .users-shell .rank-index {
    justify-self: start;
  }

  .users-shell .summary-bar-row {
    grid-template-columns: 56px minmax(0, 1fr) minmax(42px, max-content);
  }

  .users-shell .user-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.users-shell .user-metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.user-metric.item strong {
  color: #6366f1;
}

html[data-theme="dark"] .user-metric.item strong {
  color: #c4b5fd;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #f7fbff 0%, var(--bg) 360px);
}

.auth-card {
  width: min(420px, calc(100vw - 32px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.auth-error {
  margin-top: 14px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

html[data-theme="dark"] .auth-shell {
  background: linear-gradient(180deg, #172033 0%, var(--bg) 360px);
}
