﻿:root {
  color-scheme: light;
  --bg: #f5f9fb;
  --side: #ffffff;
  --panel: rgba(255, 255, 255, 0.94);
  --text: #172033;
  --muted: #6b7280;
  --line: #e8edf2;
  --brand: #18a999;
  --brand-soft: #eafff9;
  --blue: #4f7df3;
  --green: #22a968;
  --red: #ef476f;
  --purple: #7c5cff;
  --orange: #f59e0b;
  --shadow: 0 10px 26px rgba(24, 42, 64, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 28% 0%, rgba(24, 169, 153, 0.14), transparent 34rem),
    linear-gradient(180deg, #f8fbfd 0%, var(--bg) 100%);
}

body.dark-mode {
  color-scheme: dark;
  --bg: #0b1220;
  --side: rgba(15, 23, 42, .94);
  --panel: rgba(17, 24, 39, .94);
  --text: #e5edf7;
  --muted: #9aa8ba;
  --line: #263449;
  --brand-soft: rgba(24, 169, 153, .18);
  --shadow: 0 14px 32px rgba(0, 0, 0, .34);
  background:
    radial-gradient(circle at 28% 0%, rgba(24, 169, 153, 0.18), transparent 34rem),
    linear-gradient(180deg, #111827 0%, var(--bg) 100%);
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 255px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--side);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  height: 62px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(232, 237, 242, 0.65);
}

.brand-logo {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  background: linear-gradient(135deg, #173b8f, #23d3a8);
  box-shadow: 0 8px 18px rgba(24, 169, 153, 0.22);
}
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: .02em; }
.brand-version {
  display: inline-flex;
  margin-top: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f0f2f5;
  color: #6b7280;
  font-size: 12px;
}

.side-nav {
  padding: 14px 12px 4px;
  display: grid;
  gap: 6px;
}
.side-nav.compact { padding-top: 8px; }
.side-section {
  padding: 20px 24px 2px;
  color: #9aa4b2;
  font-size: 13px;
  font-weight: 700;
}
.nav-item {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  color: #445064;
  text-decoration: none;
  border-radius: 12px;
  transition: .18s ease;
  font-size: 14px;
}
.nav-item:hover { background: #f4fbfa; color: #0b887b; }
.nav-item.active { background: var(--brand-soft); color: #09887b; font-weight: 700; }
.nav-icon {
  width: 21px;
  text-align: center;
  color: currentColor;
  opacity: .95;
}
.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
}
.ghost-btn {
  height: 38px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  text-align: left;
  padding: 0 16px;
  font-size: 14px;
}
.ghost-btn:hover { background: #f3f7f7; }
.ghost-btn.active { background: var(--brand-soft); color: #09887b; font-weight: 800; }
.footer-icon {
  width: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  justify-content: center;
}

.main {
  min-width: 0;
  padding: 0 32px 34px;
}
.topbar {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar h1 { margin: 0; font-size: 21px; font-weight: 800; }
.topbar p { margin: 4px 0 0; color: #6b7280; font-size: 12px; }
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0 24px;
}
.metric-card,
.toolbar-card,
.progress-panel,
.panel {
  background: var(--panel);
  border: 1px solid rgba(232, 237, 242, .95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.metric-card {
  min-height: 94px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.metric-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  font-weight: 800;
}
.metric-icon.blue { background: #dfeaff; color: var(--blue); }
.metric-icon.green { background: #d8f9e8; color: var(--green); }
.metric-icon.red { background: #ffe5e9; color: var(--red); }
.metric-icon.purple { background: #ece7ff; color: var(--purple); }
.metric-card span { display: block; color: #667085; font-size: 13px; }
.metric-card strong { display: block; margin-top: 2px; font-size: 24px; line-height: 1; letter-spacing: .01em; }
.metric-card small { display: block; margin-top: 6px; color: #8a95a5; font-size: 12px; }
.metric-card:nth-child(3) small { color: #11955b; }
.metric-card:nth-child(4) small { color: #d92d20; }

.toolbar-card { padding: 16px; margin-bottom: 24px; }
.check-form {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) auto;
  gap: 18px;
  align-items: end;
}
.check-form label { font-weight: 700; font-size: 14px; color: #344054; }
.input-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.input-row select { flex: 0 0 220px; }
.input-row input,
.input-row textarea { flex: 1 1 300px; min-width: 240px; }
.input-row button { flex: 0 0 auto; }
input[type="text"], input[type="search"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dce3ea;
  border-radius: 10px;
  background: #fff;
  padding: 10px 13px;
  color: var(--text);
  outline: none;
  font-size: 14px;
  transition: .16s ease;
}
input[type="text"], input[type="search"], input[type="password"], input[type="number"], select {
  height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}
textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.45;
  font-family: inherit;
}
input:focus, select:focus { border-color: #7bd6cb; box-shadow: 0 0 0 4px rgba(24,169,153,.12); }
textarea:focus { border-color: #7bd6cb; box-shadow: 0 0 0 4px rgba(24,169,153,.12); }
button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 0 18px;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition: .16s ease;
}
button:hover { filter: brightness(.96); transform: translateY(-1px); }
button:disabled { opacity: .62; cursor: not-allowed; transform: none; }

.side-nav .nav-item,
.side-nav .nav-item:hover,
.side-nav .nav-item:focus {
  min-height: 40px;
  padding: 0 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
  transform: none;
}
.side-nav .nav-item {
  justify-content: flex-start;
  text-align: left;
  width: 100%;
}
.side-nav .nav-item:hover { background: #f4fbfa; }
.side-nav .nav-item.active { background: var(--brand-soft); }

body.sidebar-collapsed .app-layout { grid-template-columns: 76px 1fr; }
body.sidebar-collapsed .brand {
  justify-content: center;
  padding: 12px;
}
body.sidebar-collapsed .brand > div:not(.brand-logo),
body.sidebar-collapsed .side-section,
body.sidebar-collapsed .btn-label {
  display: none;
}
body.sidebar-collapsed .side-nav { padding: 12px 10px 4px; }
body.sidebar-collapsed .side-nav .nav-item {
  justify-content: center;
  gap: 0;
  padding: 0;
  overflow: hidden;
  font-size: 0;
}
body.sidebar-collapsed .side-nav .nav-icon {
  width: 40px;
  font-size: 16px;
}
body.sidebar-collapsed .sidebar-footer { padding: 12px 10px; }
body.sidebar-collapsed .ghost-btn {
  justify-content: center;
  padding: 0;
}
body.sidebar-collapsed .footer-icon { font-size: 18px; }

body.dark-mode .sidebar,
body.dark-mode .metric-card,
body.dark-mode .toolbar-card,
body.dark-mode .progress-panel,
body.dark-mode .panel {
  border-color: var(--line);
}
body.dark-mode .brand,
body.dark-mode .sidebar-footer,
body.dark-mode .schedule-form,
body.dark-mode .line-stat,
body.dark-mode .overview-list div,
body.dark-mode th,
body.dark-mode td {
  border-color: var(--line);
}
body.dark-mode .brand-version,
body.dark-mode .secondary-btn {
  background: #253147;
  color: #cbd5e1;
}
body.dark-mode .side-section,
body.dark-mode .topbar p,
body.dark-mode .metric-card span,
body.dark-mode .metric-card small,
body.dark-mode .line-picker,
body.dark-mode .line-picker span,
body.dark-mode .hint,
body.dark-mode .latest,
body.dark-mode .muted,
body.dark-mode .empty,
body.dark-mode .deploy,
body.dark-mode .overview-list span,
body.dark-mode .panel-head span,
body.dark-mode .import-status {
  color: var(--muted);
}
body.dark-mode .nav-item,
body.dark-mode .ghost-btn,
body.dark-mode .check-form label,
body.dark-mode .check-inline,
body.dark-mode .thread-picker,
body.dark-mode .thread-picker label,
body.dark-mode .sort-th-btn {
  color: #cbd5e1;
}
body.dark-mode .nav-item:hover,
body.dark-mode .side-nav .nav-item:hover,
body.dark-mode .editing-row,
body.dark-mode tbody tr:hover {
  background: rgba(24, 169, 153, .12);
  color: #7ddfd5;
}
body.dark-mode .nav-item.active,
body.dark-mode .side-nav .nav-item.active,
body.dark-mode .ghost-btn:hover,
body.dark-mode .ghost-btn.active {
  background: var(--brand-soft);
  color: #7ddfd5;
}
body.dark-mode input[type="text"],
body.dark-mode input[type="search"],
body.dark-mode input[type="password"],
body.dark-mode input[type="number"],
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode .import-form input[type="file"],
body.dark-mode .node-form input[type="number"],
body.dark-mode .inline-input {
  background: #0f172a;
  border-color: #334155;
  color: var(--text);
}
body.dark-mode input::placeholder { color: #718096; }
body.dark-mode .import-form,
body.dark-mode .redirect-target-panel {
  background: rgba(15, 23, 42, .72);
  border-color: #334155;
}
body.dark-mode .redirect-target-item {
  background: #0f172a;
  border-color: #334155;
}
body.dark-mode .redirect-target-item em { color: var(--muted); }
body.dark-mode .domain-list-actions button.secondary-btn {
  background: #253147;
  color: #cbd5e1;
}
body.dark-mode .target-actions button.secondary-btn {
  background: #253147;
  color: #cbd5e1;
}
body.dark-mode .progress-bar { background: #1f2a3d; }
body.dark-mode .table-wrap { border-color: var(--line); }
body.dark-mode table { background: #0f172a; }
body.dark-mode th { background: #111827; color: #cbd5e1; }
body.dark-mode .detail-row td { background: rgba(15, 23, 42, .86); }
body.dark-mode .redirect-detail,
body.dark-mode .chain-line span { color: var(--muted); }
body.dark-mode .line-stat strong { color: #e2e8f0; }
body.dark-mode .donut::after {
  background: #111827;
  box-shadow: inset 0 0 0 1px #263449;
}
body.dark-mode .empty-steps span {
  background: rgba(24, 169, 153, .14);
  color: #7ddfd5;
}
body.dark-mode code {
  background: #1f2937;
  color: #dbeafe;
}

.secondary-btn { background: #e9eef5; color: #344054; }
.dark-btn { background: #172033; color: #fff; }
.https-btn { background: #175cd3; color: #fff; }
.mini-btn {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  background: #e8f5ff;
  color: #175cd3;
}
.mini-btn.danger { background: #fee4e2; color: #b42318; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.status-actions { display: inline-flex; margin-left: 8px; vertical-align: middle; }
.ellipsis-cell {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.text-ok { color: #0f9f6e; font-weight: 700; }
.text-bad { color: #e5484d; font-weight: 700; }
.page-section[hidden] { display: none !important; }
.hint { margin: 9px 0 0; color: #8a95a5; font-size: 12px; }
.domain-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}
.import-form {
  margin-top: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 420px) auto minmax(160px, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px dashed #d7e2ea;
  border-radius: 14px;
  background: #fbfefd;
}
.import-form strong { font-size: 14px; }
.import-form .hint { margin-top: 3px; }
.import-form input[type="file"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dce3ea;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  color: var(--text);
}
.import-status { color: #667085; font-size: 12px; }
.domain-list-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.domain-list-actions button.secondary-btn { background: #e9eef5; color: #344054; }
.domain-list-actions button.mini-btn.danger { min-height: 38px; background: #fee4e2; color: #b42318; }
.domain-list-tools {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 12px;
  align-items: center;
  margin: 10px 0 14px;
}
.select-col {
  width: 44px;
  text-align: center;
}
.select-col input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.domain-table {
  table-layout: fixed;
  min-width: 1040px;
}
.domain-table th:nth-child(2),
.domain-table td:nth-child(2) { width: 22%; max-width: 0; }
.domain-table th:nth-child(3),
.domain-table td:nth-child(3) { width: 27%; max-width: 0; }
.domain-table th:nth-child(4),
.domain-table td:nth-child(4) { width: 18%; max-width: 0; }
.redirect-import-form {
  margin-top: 14px;
}
.redirect-target-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e5eaf0;
  border-radius: 14px;
  background: #fbfefd;
}
.redirect-target-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.redirect-target-tools {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.target-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.target-actions button.secondary-btn { background: #e9eef5; color: #344054; }
.target-actions button.mini-btn.danger { min-height: 38px; background: #fee4e2; color: #b42318; }
.redirect-target-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  max-height: 190px;
  overflow: auto;
}
.redirect-target-item {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e8edf2;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.redirect-target-item input {
  width: 16px;
  height: 16px;
}
.redirect-target-name {
  min-width: 0;
  display: flex;
}
.redirect-target-item em {
  color: #8a95a5;
  font-size: 12px;
  font-style: normal;
}
.redirect-target-empty { padding: 8px 2px; }
.node-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}
.schedule-form {
  grid-template-columns: auto minmax(220px, 1fr) 130px auto minmax(180px, 1fr);
  padding-top: 12px;
  border-top: 1px solid #edf1f5;
}
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #344054;
  font-weight: 700;
  white-space: nowrap;
}
.node-form input[type="number"] {
  width: 100%;
  height: 42px;
  border: 1px solid #dce3ea;
  border-radius: 10px;
  background: #fff;
  padding: 0 13px;
  color: var(--text);
  outline: none;
  font-size: 14px;
}
.settings-form {
  display: grid;
  grid-template-columns: minmax(130px, auto) minmax(140px, 180px) minmax(160px, 1fr) minmax(120px, 160px) minmax(120px, 160px);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}
.settings-form .form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.settings-lines {
  grid-column: 1 / -1;
  justify-content: flex-start;
  padding: 8px 0;
}
.inline-input {
  width: 100%;
  min-width: 180px;
  height: 36px;
  border: 1px solid #7bd6cb;
  border-radius: 9px;
  padding: 0 10px;
  outline: none;
}
.editing-row { background: #f4fbfa; }
.line-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: #4b5563;
  font-size: 14px;
}
.line-picker span { color: #667085; }
.line-picker label { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; cursor: pointer; }
.check-options {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
}
.thread-picker {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  color: #4b5563;
  font-size: 14px;
}
.thread-picker label { font-weight: 700; color: #344054; }
.thread-picker select {
  width: 96px;
  height: 38px;
}
.check-options .import-status {
  grid-column: 1 / -1;
  text-align: right;
}
.sort-th-btn {
  min-height: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  border-radius: 0;
  font-size: inherit;
  font-weight: 800;
}
.sort-th-btn:hover {
  filter: none;
  transform: none;
  color: #09887b;
}

.progress-panel { margin-bottom: 24px; padding: 16px; }
.progress-top { display: flex; justify-content: space-between; margin-bottom: 9px; color: #667085; font-size: 13px; }
.progress-bar { height: 10px; border-radius: 999px; background: #edf2f7; overflow: hidden; }
.progress-bar div { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #4f7df3, #18a999); transition: width .22s ease; }
.latest { min-height: 18px; margin-top: 9px; color: #667085; font-size: 13px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 22px;
  margin-bottom: 24px;
}
.panel { padding: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head h2, .result-head h2, .empty h2, .deploy h2 { margin: 0; font-size: 15px; }
.panel-head span { color: #8a95a5; font-size: 12px; }
.panel-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.chart-row { display: grid; grid-template-columns: 210px 1fr; gap: 18px; align-items: center; min-height: 220px; }
.donut {
  width: 192px;
  height: 192px;
  border-radius: 50%;
  background: conic-gradient(#4f7df3 0 25%, #22a968 25% 50%, #ef476f 50% 75%, #f59e0b 75% 100%);
  position: relative;
  margin: auto;
}
.donut::after {
  content: '';
  position: absolute;
  inset: 48px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px #eef2f7;
}
.line-stats { display: grid; gap: 8px; }
.line-stat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #edf1f5;
  padding: 8px 0;
  color: #667085;
  font-size: 13px;
}
.line-stat strong { color: #2f3a4c; font-size: 14px; }
.line-stat em { color: #18a999; font-style: normal; font-weight: 800; }
.overview-list { display: grid; gap: 12px; padding-top: 3px; }
.overview-list div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #edf1f5; }
.overview-list span { color: #667085; }
.overview-list strong { text-align: right; font-size: 14px; }

.result-panel { margin-bottom: 24px; }
.result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.muted { color: #7b8794; margin: 8px 0 0; font-size: 13px; }
.actions button { background: #172033; min-height: 38px; }
.filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px 160px;
  gap: 12px;
  margin: 16px 0;
}
.table-wrap { overflow: auto; border: 1px solid #e5eaf0; border-radius: 14px; }
.small-table table { min-width: 100%; }
table { width: 100%; border-collapse: collapse; min-width: 980px; background: #fff; }
th, td { padding: 12px 12px; border-bottom: 1px solid #edf1f5; text-align: left; white-space: nowrap; font-size: 13px; }
th { position: sticky; top: 0; z-index: 1; background: #f9fbfd; color: #667085; font-weight: 800; }
tbody tr:hover { background: #f8fcfb; }
.redirect-table {
  table-layout: fixed;
  min-width: 1120px;
}
.resizable-table th {
  position: sticky;
  user-select: none;
}
.col-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  z-index: 3;
}
.col-resizer::after {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 3px;
  width: 1px;
  background: rgba(102, 112, 133, .28);
}
.col-resizer:hover::after {
  background: var(--brand);
  width: 2px;
}
.redirect-table th,
.redirect-table td {
  max-width: 0;
  overflow: hidden;
}
.redirect-table th:nth-child(6),
.redirect-table td:nth-child(6) {
  max-width: none;
  overflow: visible;
}
.redirect-table td:nth-child(6) .badge {
  max-width: calc(100% - 56px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.redirect-table .detail-row td {
  max-width: none;
  overflow: visible;
}
.detail-row td { background: #fbfefd; white-space: normal; }
.redirect-detail {
  display: grid;
  gap: 8px;
  color: #475467;
}
.redirect-hop-cell {
  white-space: normal;
  vertical-align: top;
}
.redirect-hop-list {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.redirect-hop-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.redirect-hop-item span {
  color: #667085;
  font-weight: 800;
  font-size: 12px;
}
.redirect-hop-item .ellipsis-cell {
  display: block;
  min-width: 0;
}
.redirect-full-chain {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}
.redirect-full-hop {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.redirect-full-hop span {
  color: #667085;
  font-weight: 800;
}
.redirect-full-hop code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.redirect-full-hop em {
  color: #8a95a5;
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
}
.chain-line {
  display: grid;
  grid-template-columns: 78px minmax(220px, 1fr) 56px;
  gap: 10px;
  align-items: center;
}
.chain-line span { color: #667085; font-weight: 700; }
.chain-line code {
  overflow-wrap: anywhere;
  white-space: normal;
}
.chain-line em {
  color: #18a999;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; font-weight: 800; font-size: 12px; }
.badge.ok { color: #087443; background: #dcfae6; }
.badge.bad { color: #b42318; background: #fee4e2; }
.empty { margin-bottom: 24px; color: #667085; }
.empty p, .deploy p { margin: 10px 0 0; line-height: 1.65; }
.empty-steps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.empty-steps span { padding: 9px 12px; border-radius: 999px; background: #f4fbfa; color: #09887b; font-weight: 700; font-size: 13px; }
.deploy { color: #667085; }
code { padding: 2px 6px; border-radius: 6px; background: #f1f5f9; color: #0f172a; }

@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .domain-form { grid-template-columns: 1fr; }
  .import-form { grid-template-columns: 1fr; }
  .node-form, .schedule-form { grid-template-columns: 1fr; }
  .settings-form { grid-template-columns: 1fr; }
  .check-form { grid-template-columns: 1fr; }
  .check-options { grid-template-columns: 1fr; }
  .thread-picker { justify-content: flex-start; }
  .check-options .import-status { text-align: left; }
  .line-picker { justify-content: flex-start; }
  .domain-list-tools { grid-template-columns: 1fr; }
  .redirect-target-tools { grid-template-columns: 1fr; }
  .redirect-target-head { align-items: flex-start; flex-direction: column; }
  .target-actions { justify-content: flex-start; }
}
@media (max-width: 820px) {
  .app-layout { grid-template-columns: 1fr; }
  body.sidebar-collapsed .app-layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; overflow: visible; }
  body.sidebar-collapsed .brand {
    justify-content: flex-start;
    padding: 12px 22px;
  }
  body.sidebar-collapsed .brand > div:not(.brand-logo),
  body.sidebar-collapsed .side-section {
    display: block;
  }
  .side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.sidebar-collapsed .side-nav .nav-item {
    justify-content: flex-start;
    gap: 12px;
    padding: 0 16px;
    font-size: 14px;
  }
  body.sidebar-collapsed .side-nav .nav-icon {
    width: 21px;
    font-size: inherit;
  }
  .main { padding: 0 16px 24px; }
  .topbar { height: auto; padding: 18px 0; align-items: flex-start; }
  .metrics, .filters { grid-template-columns: 1fr; }
  .input-row, .result-head { flex-direction: column; }
  .input-row button, .actions button { width: 100%; }
  .domain-form { grid-template-columns: 1fr; }
  .chart-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .side-nav { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
}
