:root {
  --bg-0: #0b1120;
  --bg-1: #0e1728;
  --bg-2: #111827;
  --panel: #111827;
  --panel-soft: #1a2535;
  --panel-border: #1e3a5f;
  --text: #e8f0fe;
  --muted: #8ba3c7;
  --accent: #2b7cff;
  --accent-soft: #163f9f;
  --neon: #39ff88;
  --ok: #31c86b;
  --warn: #ffb800;
  --bad: #ff5ca8;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.45;
  background:
    radial-gradient(circle at 15% 0%, rgba(43, 124, 255, 0.12) 0%, transparent 28%),
    radial-gradient(circle at 100% 100%, rgba(80, 120, 255, 0.08) 0%, transparent 24%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(139, 163, 199, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 163, 199, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), transparent 88%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1760px, 98vw);
  margin: 12px auto 24px;
  min-width: 0;
}

.topbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px 14px 12px 68px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: rgba(12, 18, 31, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

h1 {
  margin: 0;
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: #cfe2ff;
  text-transform: uppercase;
}

#metaLine {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-family: var(--mono);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

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

.brand-orb {
  position: absolute;
  top: 10px;
  left: 14px;
  z-index: 20;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 214, 133, 0.95), rgba(255, 126, 35, 0.82) 34%, transparent 35%),
    linear-gradient(145deg, #ff8a1f 0%, #ff5a1f 48%, #e94a12 100%);
  color: #ffffff;
  box-shadow:
    0 10px 24px rgba(255, 90, 31, 0.38),
    inset 0 1px 5px rgba(255, 255, 255, 0.42);
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.08em;
  text-shadow: 0 2px 8px rgba(126, 39, 0, 0.30);
  user-select: none;
}

.pill {
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(17, 24, 39, 0.9);
  color: #dce9ff;
  font-size: 11px;
  font-family: var(--mono);
}

.ghost-button,
.pro-button {
  border: 1px solid rgba(24, 232, 255, 0.42);
  border-radius: 6px;
  padding: 7px 11px;
  color: #dff8ff;
  background: rgba(5, 14, 25, 0.82);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.pro-button {
  color: #052515;
  background: #39ff88;
  border-color: rgba(57, 255, 136, 0.82);
  box-shadow: 0 0 18px rgba(57, 255, 136, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.tabbar {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 4px;
  background: rgba(12, 18, 31, 0.86);
}

.tab-btn {
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
  text-transform: uppercase;
}

.tab-btn.active {
  color: #f7fbff;
  background: #2b7cff;
}

.tab-btn:visited {
  color: inherit;
}

.tab {
  display: none;
}

.tab.active {
  display: block;
}

.kpi-grid,
.split-grid,
.agent-grid {
  display: grid;
  gap: 8px;
}

.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-bottom: 0;
}

.overview-merge {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 8px;
}

.overview-block {
  padding: 10px;
  border: 1px solid rgba(42, 51, 68, 0.95);
  border-radius: 6px;
  background: rgba(12, 18, 31, 0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.overview-block-head {
  color: var(--accent);
  font-size: 9px;
  font-family: var(--mono);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

@media (max-width: 1120px) {
  .overview-merge {
    grid-template-columns: 1fr;
  }
}

.split-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  margin: 10px 0;
}

.intel-grid,
.commerce-grid {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}

.intel-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
}

.commerce-grid {
  grid-template-columns: minmax(360px, 0.72fr) minmax(0, 1fr);
}

.analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.5fr);
  gap: 10px;
  align-items: stretch;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(360px, 0.58fr);
  gap: 10px;
  align-items: stretch;
}

.side-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  min-width: 0;
}

.right-stack {
  display: grid;
  grid-template-rows: minmax(245px, auto) minmax(180px, 1fr);
  gap: 10px;
  min-width: 0;
}

.agent-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.panel,
.kpi-item,
.agent-card,
.decision-card,
.bridge-card,
.chain-step {
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(12, 18, 31, 0.96));
  border-radius: 6px;
}

.panel {
  position: relative;
  padding: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: #2b7cff;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.75);
}

.panel-head h2,
.panel-head .subtle {
  min-width: 0;
}

.hero-panel {
  padding-bottom: 5px;
}

.subtle {
  color: var(--muted);
  font-size: 10px;
  font-family: var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-head > div:first-child {
  min-width: 0;
}

.lang-toggle {
  display: inline-flex;
  flex-shrink: 0;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(43, 124, 255, 0.22);
  border-radius: 999px;
  background: rgba(240, 246, 255, 0.74);
}

.lang-toggle button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 5px 8px;
  color: #5d6f8d;
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.lang-toggle button.active {
  color: #ffffff;
  background: #2b7cff;
  box-shadow: 0 6px 14px rgba(43, 124, 255, 0.28);
}

.chart-large {
  height: 560px;
}

.chart-mid {
  height: 250px;
}

.chart-small {
  height: 185px;
}

.distance-force-layout {
  display: grid;
  grid-template-columns: minmax(120px, 0.85fr) minmax(150px, 1fr);
  gap: 8px;
  align-items: stretch;
}

.force-gauge,
.distance-bars {
  min-width: 0;
}

.prediction-card {
  display: grid;
  gap: 12px;
  min-height: 205px;
  padding: 10px;
  border: 1px solid rgba(30, 58, 95, 0.82);
  border-radius: 6px;
  background:
    radial-gradient(circle at 100% 0%, rgba(43, 124, 255, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(5, 16, 42, 0.94), rgba(9, 18, 48, 0.96));
  box-shadow: inset 0 1px 0 rgba(120, 170, 255, 0.16), 0 14px 34px rgba(18, 76, 255, 0.16);
}

.prediction-bias {
  color: #d9e8ff;
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.prediction-output-label {
  margin-top: -6px;
  color: #8eb7ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.prediction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.prediction-grid div {
  padding: 8px;
  border: 1px solid rgba(83, 139, 255, 0.42);
  border-radius: 6px;
  background: rgba(8, 24, 66, 0.78);
}

.prediction-grid span,
.prediction-meta span {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.prediction-grid b {
  display: block;
  margin-top: 5px;
  color: #f4fbff;
  font-family: var(--mono);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prediction-card p {
  margin: 0;
  color: #c9d8ec;
  font-size: 12px;
  line-height: 1.55;
}

.prediction-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.prediction-meta span {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid rgba(83, 139, 255, 0.42);
  border-radius: 999px;
  background: rgba(8, 24, 66, 0.72);
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(120, 146, 183, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 46px rgba(13, 36, 72, 0.08);
}

.view-header h2,
.view-header p {
  margin: 0;
}

.view-header h2 {
  color: #173055;
  font-size: 26px;
}

.view-header p {
  margin-top: 4px;
  color: #5d6f8d;
  font-family: var(--mono);
  font-size: 12px;
}

.metric-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 6px;
}

.metric-tile {
  min-height: 54px;
  padding: 8px 9px;
  border: 1px solid rgba(30, 58, 95, 0.78);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(5, 14, 25, 0.88), rgba(10, 18, 31, 0.92)),
    radial-gradient(circle at 100% 0%, rgba(24, 232, 255, 0.12), transparent 48%);
}

.metric-tile span,
.pain-side-grid span,
.settings-form span,
.plan-kicker {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-family: var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.metric-tile b {
  display: block;
  margin-top: 6px;
  color: #f4fbff;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.1;
}

.pain-detail-grid {
  display: grid;
  gap: 7px;
}

.pain-summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pain-summary-line span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid rgba(30, 58, 95, 0.72);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  background: rgba(5, 14, 25, 0.72);
  font-family: var(--mono);
  font-size: 10px;
}

.pain-summary-line b {
  color: #eef7ff;
}

.pain-side-card {
  border: 1px solid rgba(30, 58, 95, 0.82);
  border-radius: 6px;
  padding: 9px;
  background: rgba(5, 14, 25, 0.84);
}

.pain-side-card.long {
  box-shadow: inset 2px 0 0 rgba(99, 255, 92, 0.78);
}

.pain-side-card.short {
  box-shadow: inset 2px 0 0 rgba(24, 232, 255, 0.78);
}

.pain-side-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
}

.pain-side-head span {
  color: #d9e8ff;
  font-weight: 800;
  font-size: 12px;
}

.pain-side-head b {
  color: #ffffff;
  font-family: var(--mono);
  font-size: 15px;
}

.pain-side-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.pain-side-grid div {
  border-top: 1px dashed rgba(139, 163, 199, 0.22);
  padding-top: 5px;
  min-width: 0;
}

.pain-side-grid b {
  display: block;
  margin-top: 4px;
  color: #f4fbff;
  font-family: var(--mono);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-panel {
  min-height: 260px;
}

.settings-form {
  display: grid;
  gap: 9px;
}

.settings-form label {
  display: grid;
  gap: 5px;
}

.settings-form input,
.settings-form select {
  width: 100%;
  border: 1px solid rgba(30, 58, 95, 0.95);
  border-radius: 6px;
  outline: none;
  padding: 8px 9px;
  color: #eff8ff;
  background: rgba(4, 11, 20, 0.88);
  font-family: var(--mono);
  font-size: 11px;
}

pre,
code {
  max-width: 100%;
}

pre {
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

.settings-form input:focus,
.settings-form select:focus {
  border-color: rgba(24, 232, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(24, 232, 255, 0.10);
}

.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-actions button,
.api-access-box button,
.pay-button {
  border: 1px solid rgba(43, 124, 255, 0.52);
  border-radius: 6px;
  padding: 8px 10px;
  color: #031016;
  background: #2b7cff;
  cursor: pointer;
  font-weight: 800;
  font-size: 11px;
  text-decoration: none;
  font-family: var(--mono);
}

.form-actions button + button,
.api-access-box button,
.pay-button.secondary {
  color: #f7fbff;
  background: #5c4dff;
}

.form-status {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.plan-card {
  padding: 10px;
  border: 1px solid rgba(30, 58, 95, 0.82);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(5, 14, 25, 0.92), rgba(10, 18, 31, 0.92));
}

.plan-card.featured {
  border-color: rgba(99, 255, 92, 0.45);
  box-shadow: inset 0 1px 0 rgba(99, 255, 92, 0.12);
}

.plan-price {
  margin: 6px 0 8px;
  color: #f4fbff;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 800;
}

.plan-price span {
  color: var(--muted);
  font-size: 11px;
  margin-left: 3px;
}

.plan-card ul {
  margin: 0 0 10px;
  padding-left: 16px;
  color: #c9d8ec;
  font-size: 11px;
  line-height: 1.55;
}

.pay-button {
  display: inline-flex;
  justify-content: center;
  width: 100%;
}

.api-access-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid rgba(30, 58, 95, 0.82);
  border-radius: 6px;
  background: rgba(5, 14, 25, 0.72);
}

.api-access-box b {
  display: block;
  color: #e7f6ff;
  margin-bottom: 4px;
}

.api-access-box code {
  color: #a9f8ff;
  font-family: var(--mono);
  font-size: 11px;
  word-break: break-all;
}

.subscription-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.subscription-grid div {
  border: 1px solid rgba(43, 124, 255, 0.18);
  border-radius: 14px;
  padding: 12px;
  background: rgba(43, 124, 255, 0.06);
}

.subscription-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.subscription-grid b {
  font-family: var(--mono);
  color: #d9e8ff;
  word-break: break-all;
}

.docs-panel {
  line-height: 1.65;
}

.docs-panel pre {
  overflow: auto;
  border: 1px solid rgba(43, 124, 255, 0.18);
  border-radius: 14px;
  padding: 14px;
  background: rgba(9, 20, 40, 0.94);
  color: #dce9ff;
}

.docs-panel code {
  font-family: var(--mono);
  font-size: 12px;
}

.form-status.bad {
  color: #d9416c;
}

#forceGaugeChart {
  position: relative;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 55%, rgba(99, 255, 92, 0.13), transparent 30%),
    radial-gradient(circle at 50% 60%, rgba(24, 232, 255, 0.12), transparent 46%),
    linear-gradient(180deg, rgba(5, 13, 24, 0.34), rgba(3, 9, 16, 0.10));
  filter: saturate(1.08);
}

#forceGaugeChart::before {
  content: "";
  position: absolute;
  inset: 8px 16px 14px;
  pointer-events: none;
  border: 1px solid rgba(24, 232, 255, 0.16);
  border-radius: 999px;
  box-shadow:
    0 0 24px rgba(24, 232, 255, 0.12),
    inset 0 0 18px rgba(99, 255, 92, 0.08);
}

.kpi-item {
  padding: 9px 10px;
  min-height: 54px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.kpi-label {
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-value {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.18;
  color: #f1f6ff;
}

.decision-card {
  padding: 10px;
  min-height: 252px;
  max-height: 252px;
  overflow: auto;
}

.bridge-card {
  padding: 10px;
}

.compact-strip {
  padding: 8px;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(144px, 1fr));
  gap: 6px;
}

.list-item {
  padding: 8px 9px;
  border: 1px solid rgba(42, 51, 68, 0.95);
  border-radius: 6px;
  background: rgba(12, 18, 31, 0.92);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.list-item .list-title {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.list-item .list-value {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.decision-summary {
  margin-bottom: 8px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 184, 0, 0.28);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 184, 0, 0.16), rgba(255, 184, 0, 0.07));
  color: #fff0c2;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.decision-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.decision-grid {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.decision-grid div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dashed rgba(139, 163, 199, 0.24);
  padding-bottom: 4px;
  font-size: 12px;
}

.bridge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 5px 10px;
}

.bridge-grid div {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  border-bottom: 1px dashed rgba(139, 163, 199, 0.22);
  padding-bottom: 4px;
  font-size: 11px;
}

.bridge-grid b {
  max-width: 56%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.chain-snapshot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 6px;
}

.chain-step {
  padding: 8px 9px;
  border: 1px solid rgba(42, 51, 68, 0.95);
  border-radius: 6px;
  background: rgba(12, 18, 31, 0.92);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chain-step .name {
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 0;
}

.chain-step .value {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.agent-card {
  padding: 10px;
  min-height: 128px;
  max-height: 186px;
  overflow: auto;
}

.agent-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.agent-name {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge {
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  font-family: var(--mono);
}

.badge.active {
  background: rgba(38, 222, 129, 0.12);
  color: #8ef0c4;
  border: 1px solid rgba(38, 222, 129, 0.3);
}

.badge.warm {
  background: rgba(255, 184, 0, 0.13);
  color: #ffe396;
  border: 1px solid rgba(255, 184, 0, 0.32);
}

.badge.stale {
  background: rgba(255, 71, 87, 0.13);
  color: #ffb6c0;
  border: 1px solid rgba(255, 71, 87, 0.32);
}

.badge.unknown {
  background: rgba(139, 163, 199, 0.16);
  color: #d7e1f2;
  border: 1px solid rgba(139, 163, 199, 0.32);
}

.agent-meta {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
}

.agent-judgment {
  font-size: 11px;
  line-height: 1.45;
  max-height: 60px;
  overflow: auto;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(30, 58, 95, 0.82);
  border-radius: 6px;
  background: rgba(9, 14, 24, 0.94);
  max-height: 260px;
}

.table-wrap.scroll-sm {
  max-height: 180px;
}

.table-wrap.scroll-md {
  max-height: 260px;
}

.table-wrap.scroll-lg {
  max-height: 340px;
}

.table-wrap.scroll-xl {
  max-height: 460px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 11px;
}

th,
td {
  border-bottom: 1px solid rgba(30, 58, 95, 0.66);
  text-align: left;
  padding: 6px 7px;
  white-space: nowrap;
  vertical-align: top;
}

th {
  color: #dbe7fb;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #0f1828;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:hover {
  background: rgba(43, 124, 255, 0.06);
}

td code {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.35;
  white-space: normal;
  display: inline-block;
  max-width: 280px;
  color: #d7e2f5;
}

.error-list {
  margin: 0;
  padding-left: 18px;
  color: #ffb5c0;
  max-height: 160px;
  overflow: auto;
  font-size: 11px;
}

.tag {
  border: 1px solid rgba(139, 163, 199, 0.35);
  background: rgba(139, 163, 199, 0.16);
  color: #d7deea;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  font-family: var(--mono);
  display: inline-flex;
  align-items: center;
}

.tag.ok {
  border-color: rgba(38, 222, 129, 0.45);
  background: rgba(38, 222, 129, 0.14);
  color: #8ef0c4;
}

.tag.warn {
  border-color: rgba(255, 184, 0, 0.45);
  background: rgba(255, 184, 0, 0.14);
  color: #ffe396;
}

.tag.bad {
  border-color: rgba(255, 71, 87, 0.45);
  background: rgba(255, 71, 87, 0.14);
  color: #ffbcc7;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(18, 24, 35, 0.95);
}

::-webkit-scrollbar-thumb {
  background: rgba(88, 108, 140, 0.85);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(112, 135, 172, 0.95);
}

@media (max-width: 1080px) {
  .analysis-layout {
    grid-template-columns: 1fr;
  }

  .side-stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .chart-large {
    height: 300px;
  }

  .chart-mid {
    height: 220px;
  }

  .chart-small {
    height: 210px;
  }

  .table-wrap.scroll-xl {
    max-height: 360px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100vw, 100%);
    padding: 0 8px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .pill-row {
    justify-content: flex-start;
  }

  .kpi-item {
    min-height: 46px;
  }

  .chart-large {
    height: 260px;
  }

  .chart-mid {
    height: 190px;
  }

  .side-stack {
    grid-template-columns: 1fr;
  }

  .chart-small {
    height: 190px;
  }

  th,
  td {
    padding: 5px 6px;
  }

  td code {
    max-width: 180px;
  }
}

.memory-shell {
  width: min(1680px, 98vw);
}

.memory-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 8px;
  margin-bottom: 8px;
}

.memory-hero-copy {
  padding: 12px;
  border: 1px solid rgba(42, 51, 68, 0.95);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(12, 18, 31, 0.96), rgba(9, 14, 24, 0.96));
}

.memory-kicker {
  font-family: var(--mono);
  color: #89a7d2;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.memory-hero-copy h2 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.25;
}

.memory-hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  max-width: 68ch;
}

.memory-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 6px;
}

.memory-kpi {
  padding: 7px 8px;
  border: 1px solid rgba(42, 51, 68, 0.95);
  border-radius: 6px;
  background: rgba(12, 18, 31, 0.92);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.memory-kpi-label {
  color: var(--muted);
  font-size: 9px;
}

.memory-kpi-value {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
}

.memory-agent-list {
  display: grid;
  gap: 8px;
}

.memory-agent {
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(12, 18, 31, 0.96));
  overflow: hidden;
}

.memory-agent summary {
  list-style: none;
  cursor: pointer;
  padding: 10px;
}

.memory-agent summary::-webkit-details-marker {
  display: none;
}

.memory-agent-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.memory-agent-summary-left {
  min-width: 280px;
  flex: 1 1 320px;
}

.memory-agent-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.memory-role {
  color: var(--muted);
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 400;
}

.memory-agent-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-family: var(--mono);
}

.memory-agent-summary-right {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.memory-score-bar {
  height: 6px;
  background: rgba(39, 50, 67, 0.9);
}

.memory-score-bar > span {
  display: block;
  height: 100%;
  background: #2b7cff;
}

.memory-agent-body {
  padding: 10px;
  border-top: 1px solid rgba(39, 50, 67, 0.95);
  display: grid;
  gap: 8px;
}

.memory-layer-grid,
.memory-detail-grid {
  display: grid;
  gap: 8px;
}

.memory-layer-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.memory-detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.memory-layer {
  padding: 8px;
  border: 1px solid rgba(42, 51, 68, 0.95);
  border-radius: 6px;
  background: rgba(12, 18, 31, 0.92);
}

.memory-layer-head {
  color: #d6ddec;
  font-size: 10px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.memory-layer-meta,
.memory-note,
.memory-line {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  word-break: break-word;
}

.memory-summary-text {
  color: #dce9ff;
  font-size: 11px;
  line-height: 1.5;
  word-break: break-word;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.memory-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(30, 58, 95, 0.55);
  background: rgba(17, 24, 39, 0.9);
  color: #d8e3f2;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 10px;
  font-family: var(--mono);
}

.memory-empty {
  color: var(--muted);
  font-size: 10px;
  font-family: var(--mono);
}

.memory-fault-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.memory-fault-list li {
  padding: 6px 8px;
  border: 1px solid rgba(42, 51, 68, 0.95);
  border-radius: 6px;
  background: rgba(12, 18, 31, 0.92);
  color: #ffb5c0;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.memory-log-tail {
  margin: 8px 0 0;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(42, 51, 68, 0.95);
  border-radius: 6px;
  background: rgba(9, 14, 24, 0.96);
  color: #cfd8e8;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 1120px) {
  .memory-hero {
    grid-template-columns: 1fr;
  }
}

/* Dashboard style 2: light analytical control room */
body.dashboard-light {
  color: #10233f;
  background:
    radial-gradient(circle at 10% 0%, rgba(63, 167, 255, 0.14) 0%, transparent 28%),
    radial-gradient(circle at 96% 2%, rgba(39, 201, 139, 0.12) 0%, transparent 24%),
    linear-gradient(180deg, #eef4fb 0%, #f7fafc 48%, #eef3f8 100%);
}

body.dashboard-light .bg-grid {
  background-image:
    linear-gradient(rgba(86, 112, 155, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 112, 155, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.8;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), transparent 82%);
}

body.dashboard-light .shell {
  width: min(1820px, 98vw);
  margin: 14px auto 28px;
}

body.dashboard-light .topbar,
body.dashboard-light .panel,
body.dashboard-light .kpi-item,
body.dashboard-light .agent-card,
body.dashboard-light .decision-card,
body.dashboard-light .bridge-card,
body.dashboard-light .chain-step,
body.dashboard-light .metric-tile,
body.dashboard-light .pain-side-card,
body.dashboard-light .plan-card,
body.dashboard-light .list-item,
body.dashboard-light .memory-layer,
body.dashboard-light .memory-kpi,
body.dashboard-light .memory-agent,
body.dashboard-light .memory-layer,
body.dashboard-light .table-wrap,
body.dashboard-light .api-access-box {
  border-color: rgba(120, 146, 183, 0.22);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 38px rgba(21, 42, 72, 0.08);
}

body.dashboard-light .topbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

body.dashboard-light h1 {
  color: #0f2341;
  text-transform: none;
  letter-spacing: 0.02em;
}

body.dashboard-light h2 {
  color: #173055;
}

body.dashboard-light #metaLine {
  color: #5d6f8d;
}

body.dashboard-light .pill {
  background: rgba(16, 35, 63, 0.05);
  border-color: rgba(120, 146, 183, 0.26);
  color: #173055;
}

body.dashboard-light .panel::before {
  height: 3px;
  background: #2b7cff;
}

body.dashboard-light .panel-head {
  border-bottom-color: rgba(120, 146, 183, 0.18);
}

body.dashboard-light .subtle {
  color: #7286a1;
}

body.dashboard-light .kpi-item,
body.dashboard-light .metric-tile,
body.dashboard-light .pain-side-card,
body.dashboard-light .plan-card,
body.dashboard-light .agent-card,
body.dashboard-light .decision-card,
body.dashboard-light .chain-step,
body.dashboard-light .list-item,
body.dashboard-light .memory-layer,
body.dashboard-light .memory-kpi,
body.dashboard-light .memory-agent summary {
  color: #122844;
}

body.dashboard-light .kpi-label,
body.dashboard-light .metric-tile span,
body.dashboard-light .pain-side-grid span,
body.dashboard-light .settings-form span,
body.dashboard-light .plan-kicker,
body.dashboard-light .agent-meta,
body.dashboard-light .memory-layer-head,
body.dashboard-light .memory-layer-meta,
body.dashboard-light .memory-note,
body.dashboard-light .memory-line,
body.dashboard-light .memory-kpi-label,
body.dashboard-light .memory-role,
body.dashboard-light .memory-agent-sub {
  color: #6b7f9c;
}

body.dashboard-light .kpi-value,
body.dashboard-light .metric-tile b,
body.dashboard-light .pain-side-head b,
body.dashboard-light .pain-side-grid b,
body.dashboard-light .plan-price,
body.dashboard-light .agent-name,
body.dashboard-light .decision-title,
body.dashboard-light .chain-step .value,
body.dashboard-light .memory-kpi-value,
body.dashboard-light .memory-summary-text {
  color: #0f2341;
}

body.dashboard-light .kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

body.dashboard-light .analysis-layout {
  grid-template-columns: minmax(0, 1.58fr) minmax(340px, 0.42fr);
}

body.dashboard-light .intel-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
}

body.dashboard-light .commerce-grid {
  grid-template-columns: minmax(360px, 0.78fr) minmax(0, 1fr);
}

body.dashboard-light .split-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
}

body.dashboard-light .panel,
body.dashboard-light .kpi-item,
body.dashboard-light .agent-card,
body.dashboard-light .decision-card,
body.dashboard-light .metric-tile,
body.dashboard-light .pain-side-card,
body.dashboard-light .plan-card,
body.dashboard-light .list-item,
body.dashboard-light .chain-step,
body.dashboard-light .bridge-card,
body.dashboard-light .memory-layer,
body.dashboard-light .memory-kpi,
body.dashboard-light .memory-agent {
  border-radius: 16px;
}

body.dashboard-light .panel {
  padding: 14px;
  margin-bottom: 12px;
}

body.dashboard-light .kpi-item,
body.dashboard-light .metric-tile,
body.dashboard-light .pain-side-card,
body.dashboard-light .plan-card,
body.dashboard-light .agent-card,
body.dashboard-light .chain-step,
body.dashboard-light .list-item,
body.dashboard-light .memory-layer,
body.dashboard-light .memory-kpi {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96)),
    radial-gradient(circle at 100% 0%, rgba(63, 167, 255, 0.06), transparent 42%);
}

body.dashboard-light .kpi-item,
body.dashboard-light .metric-tile,
body.dashboard-light .pain-side-card,
body.dashboard-light .plan-card,
body.dashboard-light .agent-card,
body.dashboard-light .chain-step,
body.dashboard-light .list-item {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.dashboard-light .metric-tile {
  min-height: 60px;
}

body.dashboard-light .metric-tile b {
  font-size: 14px;
}

body.dashboard-light .pain-detail-grid {
  gap: 8px;
}

body.dashboard-light .pain-summary-line span {
  background: rgba(16, 35, 63, 0.04);
  border-color: rgba(120, 146, 183, 0.18);
  color: #627794;
}

body.dashboard-light .pain-summary-line b {
  color: #10233f;
}

body.dashboard-light .pain-side-card.long {
  box-shadow: inset 3px 0 0 rgba(39, 201, 139, 0.78);
}

body.dashboard-light .pain-side-card.short {
  box-shadow: inset 3px 0 0 rgba(63, 167, 255, 0.78);
}

body.dashboard-light .settings-form input,
body.dashboard-light .settings-form select {
  border-color: rgba(120, 146, 183, 0.25);
  background: rgba(247, 250, 255, 0.98);
  color: #122844;
}

body.dashboard-light .settings-form input::placeholder {
  color: #97a8bf;
}

body.dashboard-light .form-actions button,
body.dashboard-light .api-access-box button,
body.dashboard-light .pay-button {
  border: 0;
  background: linear-gradient(180deg, #3fa7ff, #2b7cff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(43, 124, 255, 0.22);
}

body.dashboard-light .form-actions button:hover,
body.dashboard-light .api-access-box button:hover,
body.dashboard-light .pay-button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

body.dashboard-light .form-actions button + button,
body.dashboard-light .pay-button.secondary {
  background: linear-gradient(180deg, #7c6bff, #5c4dff);
  box-shadow: 0 10px 24px rgba(92, 77, 255, 0.18);
}

body.dashboard-light .form-status {
  color: #7a8ca7;
}

body.dashboard-light .plan-card.featured {
  border-color: rgba(63, 167, 255, 0.28);
}

body.dashboard-light .plan-card ul {
  color: #50627d;
}

body.dashboard-light .api-access-box {
  background: rgba(247, 250, 255, 0.94);
}

body.dashboard-light .api-access-box b,
body.dashboard-light .api-access-box code {
  color: #173055;
}

body.dashboard-light .kpi-value,
body.dashboard-light .decision-summary {
  letter-spacing: 0.01em;
}

body.dashboard-light .decision-summary {
  border-color: rgba(63, 167, 255, 0.18);
  background: linear-gradient(180deg, rgba(63, 167, 255, 0.10), rgba(39, 201, 139, 0.06));
  color: #0f2341;
}

body.dashboard-light .decision-grid div,
body.dashboard-light .bridge-grid div {
  border-bottom-color: rgba(120, 146, 183, 0.18);
  color: #193252;
}

body.dashboard-light .badge.active {
  background: rgba(39, 201, 139, 0.12);
  color: #11916b;
  border-color: rgba(39, 201, 139, 0.28);
}

body.dashboard-light .badge.warm {
  background: rgba(255, 184, 0, 0.12);
  color: #9b7400;
  border-color: rgba(255, 184, 0, 0.26);
}

body.dashboard-light .badge.stale {
  background: rgba(255, 71, 87, 0.10);
  color: #c23b4c;
  border-color: rgba(255, 71, 87, 0.24);
}

body.dashboard-light .badge.unknown,
body.dashboard-light .tag {
  background: rgba(16, 35, 63, 0.05);
  color: #50627d;
  border-color: rgba(120, 146, 183, 0.24);
}

body.dashboard-light .tag.ok {
  background: rgba(39, 201, 139, 0.12);
  color: #11916b;
  border-color: rgba(39, 201, 139, 0.28);
}

body.dashboard-light .tag.warn {
  background: rgba(255, 184, 0, 0.12);
  color: #9b7400;
  border-color: rgba(255, 184, 0, 0.26);
}

body.dashboard-light .tag.bad {
  background: rgba(255, 71, 87, 0.10);
  color: #c23b4c;
  border-color: rgba(255, 71, 87, 0.24);
}

body.dashboard-light .agent-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

body.dashboard-light .agent-card {
  min-height: 136px;
}

body.dashboard-light .agent-judgment,
body.dashboard-light .decision-card,
body.dashboard-light .table-wrap,
body.dashboard-light .error-list,
body.dashboard-light .memory-log-tail,
body.dashboard-light td code {
  color: #203653;
}

body.dashboard-light .table-wrap {
  background: rgba(255, 255, 255, 0.9);
}

body.dashboard-light th {
  color: #173055;
  background: #f2f6fb;
  border-bottom-color: rgba(120, 146, 183, 0.18);
}

body.dashboard-light td {
  border-bottom-color: rgba(120, 146, 183, 0.14);
}

body.dashboard-light tbody tr:hover {
  background: rgba(63, 167, 255, 0.05);
}

body.dashboard-light .error-list {
  color: #c23b4c;
}

body.dashboard-light .chart-large {
  height: 590px;
}

body.dashboard-light .chart-mid {
  height: 270px;
}

body.dashboard-light .chart-small {
  height: 220px;
}

body.dashboard-light #forceGaugeChart {
  background:
    radial-gradient(circle at 50% 55%, rgba(63, 167, 255, 0.08), transparent 30%),
    radial-gradient(circle at 50% 60%, rgba(39, 201, 139, 0.08), transparent 46%),
    linear-gradient(180deg, rgba(247, 250, 255, 0.96), rgba(241, 246, 252, 0.96));
}

body.dashboard-light #forceGaugeChart::before {
  border-color: rgba(120, 146, 183, 0.20);
  box-shadow: 0 0 20px rgba(63, 167, 255, 0.10), inset 0 0 18px rgba(39, 201, 139, 0.06);
}

@media (max-width: 1080px) {
  body.dashboard-light .analysis-layout,
  body.dashboard-light .main-layout,
  body.dashboard-light .intel-grid,
  body.dashboard-light .commerce-grid,
  body.dashboard-light .split-grid {
    grid-template-columns: 1fr;
  }

  body.dashboard-light .side-stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
  }

  body.dashboard-light .right-stack {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  body.dashboard-light .distance-force-layout {
    grid-template-columns: minmax(180px, 0.75fr) minmax(240px, 1fr);
  }

  body.dashboard-light .view-header {
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  body.dashboard-light .shell {
    width: min(100vw, 100%);
    margin-top: 0;
    padding: 0 8px 14px;
  }

  body.dashboard-light .topbar,
  body.dashboard-light .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    border-radius: 12px;
  }

  body.dashboard-light .pill-row,
  body.dashboard-light .top-actions {
    justify-content: flex-start;
    width: 100%;
  }

  body.dashboard-light .top-actions > * {
    flex: 1 1 auto;
    text-align: center;
  }

  body.dashboard-light .right-stack,
  body.dashboard-light .plan-grid,
  body.dashboard-light .pain-side-grid,
  body.dashboard-light .distance-force-layout,
  body.dashboard-light .kpi-grid,
  body.dashboard-light .subscription-grid {
    grid-template-columns: 1fr;
  }

  body.dashboard-light .chart-large {
    height: 360px;
  }

  body.dashboard-light .chart-mid,
  body.dashboard-light .chart-small {
    height: 220px;
  }

  body.dashboard-light .panel {
    padding: 9px;
    border-radius: 12px;
  }

  body.dashboard-light .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body.dashboard-light .panel-head .subtle {
    white-space: normal;
  }

  body.dashboard-light .prediction-bias {
    font-size: 24px;
  }

  body.dashboard-light .prediction-grid {
    grid-template-columns: 1fr;
  }

  body.dashboard-light .settings-form input,
  body.dashboard-light .settings-form select,
  body.dashboard-light .form-actions button,
  body.dashboard-light .pay-button,
  body.dashboard-light .ghost-button,
  body.dashboard-light .pro-button {
    min-height: 42px;
    font-size: 12px;
  }

  body.dashboard-light .form-actions,
  body.dashboard-light .api-access-box {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.dashboard-light .plan-price {
    font-size: 34px;
  }

  body.dashboard-light pre {
    max-width: calc(100vw - 34px);
  }

  body.dashboard-light table {
    min-width: 620px;
  }

  body.dashboard-light td code {
    max-width: 180px;
  }
}

@media (max-width: 420px) {
  body.dashboard-light {
    font-size: 12px;
  }

  body.dashboard-light .shell {
    padding: 0 6px 12px;
  }

  body.dashboard-light h1 {
    font-size: 17px;
  }

  body.dashboard-light .kpi-value {
    font-size: 18px;
  }

  body.dashboard-light .chart-large {
    height: 330px;
  }

  body.dashboard-light .chart-small {
    height: 210px;
  }

  body.dashboard-light .distance-force-layout {
    gap: 6px;
  }

  body.dashboard-light .view-header h2 {
    font-size: 22px;
  }
}
