:root {
  --bg: #080d18;
  --bg-soft: #0c1424;
  --panel: rgba(17, 26, 45, 0.82);
  --panel-solid: #111a2d;
  --border: #22304c;
  --border-soft: rgba(74, 100, 150, 0.22);
  --text: #e6edf8;
  --text-dim: #8b9bb8;
  --text-faint: #5f708e;
  --accent: #3ddc97;
  --accent-soft: rgba(61, 220, 151, 0.14);
  --blue: #63a8ff;
  --blue-soft: rgba(99, 168, 255, 0.14);
  --red: #ff6b81;
  --red-soft: rgba(255, 107, 129, 0.13);
  --amber: #f4b860;
  --purple: #b18cff;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1000px 600px at 12% -8%, rgba(50, 108, 200, 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(26, 120, 96, 0.12), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(88, 57, 170, 0.10), transparent 60%),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(61, 220, 151, 0.28); }

.app {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 6px;
}

.brand { display: flex; align-items: center; gap: 13px; }

.logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--accent);
  background: linear-gradient(140deg, rgba(61, 220, 151, 0.18), rgba(99, 168, 255, 0.10));
  border: 1px solid rgba(61, 220, 151, 0.28);
  box-shadow: 0 0 24px rgba(61, 220, 151, 0.10) inset;
}

.logo svg { width: 23px; height: 23px; }

.brand-text h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0.4px;
  font-weight: 650;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.6px;
}

.top-actions { display: flex; align-items: center; gap: 12px; }

.main-nav {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(8, 14, 26, 0.6);
}

.nav-item {
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: 0.15s ease;
}

.nav-item:hover { color: var(--text); }

.nav-item.active {
  color: #04160e;
  background: var(--accent);
  font-weight: 600;
}

.view { display: flex; flex-direction: column; gap: 16px; }

.conn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-dim);
  padding: 7px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(13, 21, 37, 0.6);
}

.conn i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px currentColor;
}

.conn.online i { background: var(--accent); color: var(--accent); }
.conn.offline i { background: var(--red); color: var(--red); }

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--border-soft);
  background: rgba(13, 21, 37, 0.6);
  color: var(--text-dim);
  cursor: pointer;
  transition: 0.18s ease;
}

.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--text); border-color: #33466b; background: #16213a; }
.icon-btn.active { color: var(--accent); border-color: rgba(61, 220, 151, 0.4); }

/* ---------- 统计卡片 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 14px 16px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(160deg, rgba(23, 34, 58, 0.85), rgba(14, 22, 39, 0.85));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--border);
  opacity: 0.9;
}

.stat-card.accent-valid::after { background: var(--accent); }
.stat-card.accent-invalid::after { background: var(--red); }
.stat-card.accent-latency::after { background: var(--blue); }

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.4px;
}

.stat-value {
  display: block;
  margin-top: 5px;
  font-size: 25px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

.stat-card.accent-valid .stat-value { color: var(--accent); }
.stat-card.accent-invalid .stat-value { color: var(--red); }
.stat-card.accent-latency .stat-value { color: var(--blue); }

/* ---------- 本地代理入口 ---------- */
.endpoint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border-color: rgba(61, 220, 151, 0.22);
  background:
    radial-gradient(620px 130px at 8% 0%, rgba(61, 220, 151, 0.09), transparent 70%),
    var(--panel);
}

.endpoint-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.endpoint-label {
  font-size: 11.5px;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.endpoint-type {
  font-size: 10px;
  color: var(--text-faint);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 2px 6px;
}

.endpoint-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.endpoint-line code {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0.4px;
  color: #d9e8ff;
}

.endpoint-proto {
  width: 56px;
  padding: 2px 0;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-align: center;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

.endpoint-default {
  font-size: 9.5px;
  font-weight: 600;
  color: #04160e;
  background: var(--accent);
  padding: 1px 7px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

.mini.visible { opacity: 1; }

.endpoint-hint {
  margin: 5px 0 0;
  font-size: 11.5px;
  color: var(--text-faint);
}

.endpoint-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.endpoint-stats {
  font-size: 11.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- 面板 ---------- */
.panel {
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 10px;
}

.panel-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.panel-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- 导入区 ---------- */
.composer-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 212px;
  gap: 14px;
  padding: 4px 18px 18px;
}

textarea, input[type="text"], input[type="number"], input[type="search"], select {
  width: 100%;
  color: var(--text);
  background: rgba(8, 14, 26, 0.78);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

textarea {
  height: 132px;
  resize: vertical;
  min-height: 96px;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.65;
}

textarea::placeholder { color: #4c5d7c; }

textarea:focus, input:focus, select:focus {
  border-color: rgba(61, 220, 151, 0.55);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.10);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7d8db0 50%),
    linear-gradient(135deg, #7d8db0 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.composer-side {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 11.5px; color: var(--text-faint); letter-spacing: 0.3px; }

.hint {
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.help-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 14px;
}

.help-box code {
  padding: 5px 9px;
  font-size: 11.5px;
  color: #a9c4ea;
  background: rgba(99, 168, 255, 0.08);
  border: 1px solid rgba(99, 168, 255, 0.18);
  border-radius: 7px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: 0.2px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.16s ease;
}

.btn svg { width: 15px; height: 15px; }

.btn.primary {
  color: #04160e;
  background: linear-gradient(180deg, #52e7a5, #31c987);
  border-color: rgba(61, 220, 151, 0.65);
  box-shadow: 0 6px 18px rgba(49, 201, 135, 0.22);
}

.btn.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn.primary:active { transform: translateY(0); }

.btn.ghost {
  color: var(--text-dim);
  background: rgba(19, 29, 49, 0.7);
  border-color: var(--border);
}

.btn.ghost:hover { color: var(--text); border-color: #34486d; background: #17233b; }

.btn.subtle {
  height: 28px;
  padding: 0 10px;
  font-size: 11.5px;
  color: var(--text-faint);
  background: transparent;
  border-color: var(--border-soft);
}

.btn.subtle:hover { color: var(--text); border-color: #34486d; }

.btn.danger {
  color: #ffdbe1;
  background: rgba(255, 107, 129, 0.16);
  border-color: rgba(255, 107, 129, 0.4);
}

.btn.danger:hover { background: rgba(255, 107, 129, 0.24); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
}

/* ---------- 设置面板 ---------- */
.settings-panel {
  padding: 16px 18px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1.5fr) 95px 95px 110px 110px auto auto;
  align-items: end;
  gap: 12px;
}

.settings-grid .wide { min-width: 0; }

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}

input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---------- 引擎搜索 ---------- */
.engine-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #8fd4ff;
  background: rgba(99, 168, 255, 0.13);
  border: 1px solid rgba(99, 168, 255, 0.3);
  border-radius: 6px;
  padding: 4px 9px;
}

.proxy-search {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 0 18px 16px;
  flex-wrap: wrap;
}

.proxy-search .field { min-width: 140px; }
.proxy-search select,
.proxy-search input[type="number"] { height: 40px; }
.proxy-search .btn { height: 40px; min-width: 110px; flex-shrink: 0; }

.count-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
}

.count-presets button {
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(19, 29, 49, 0.7);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.count-presets button:hover,
.count-presets button.active {
  color: #04160e;
  background: var(--accent);
  border-color: rgba(61, 220, 151, 0.55);
}

.fofa-status {
  font-size: 11.5px;
  color: var(--text-faint);
  padding-bottom: 10px;
}

.fofa-status.ok { color: var(--accent); }
.fofa-status.error { color: var(--red); }

.search-error {
  margin: 0 18px 16px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 107, 129, 0.35);
  background: rgba(255, 107, 129, 0.08);
  color: #ffc2cb;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.result-summary { font-size: 12px; color: var(--text-dim); }

.fofa-table-wrap {
  max-height: calc(100vh - 520px);
  min-height: 280px;
}

.fofa-host {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color: #9cc8ff;
  text-decoration: none;
  font-size: 12px;
}

a.fofa-host:hover { text-decoration: underline; color: #cfe4ff; }

.fofa-title {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.proto-other { color: var(--text-dim); background: rgba(139, 155, 184, 0.1); }

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager .btn { height: 28px; padding: 0 10px; }

/* ---------- 工具栏 ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 18px 12px;
}

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tabs {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(8, 14, 26, 0.6);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: 0.15s ease;
}

.tab em {
  font-style: normal;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--text-faint);
  background: rgba(139, 155, 184, 0.12);
  font-variant-numeric: tabular-nums;
}

.tab:hover { color: var(--text); }

.tab.active {
  color: #04160e;
  background: var(--accent);
  font-weight: 600;
}

.tab.active em { color: #04160e; background: rgba(4, 22, 14, 0.16); }

.search {
  width: 190px;
  height: 34px;
}

.proto-filter {
  width: 118px;
  height: 34px;
  font-size: 12px;
}

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

/* ---------- 进度 ---------- */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px 12px;
}

.progress {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(8, 14, 26, 0.85);
  overflow: hidden;
  border: 1px solid rgba(34, 48, 76, 0.6);
}

.progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #31c987, #63a8ff);
  box-shadow: 0 0 14px rgba(61, 220, 151, 0.5);
  transition: width 0.3s ease;
}

#progressText {
  min-width: 84px;
  text-align: right;
  font-size: 11.5px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- 表格 ---------- */
.table-wrap {
  position: relative;
  max-height: calc(100vh - 470px);
  min-height: 240px;
  overflow: auto;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.6px;
  color: var(--text-faint);
  text-transform: uppercase;
  background: #0d1526;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--text-dim); }

.sort-mark {
  display: inline-block;
  width: 10px;
  color: var(--accent);
  font-size: 10px;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(34, 48, 76, 0.38);
  font-size: 12.5px;
  vertical-align: middle;
  white-space: nowrap;
}

tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: rgba(99, 168, 255, 0.055); }
tbody tr.selected { background: rgba(61, 220, 151, 0.055); }
tbody tr:last-child td { border-bottom: none; }

.col-check { width: 38px; padding-left: 18px !important; }
.col-actions { width: 108px; }

.addr {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: #c8d6ee;
  letter-spacing: 0.15px;
}

.addr .port { color: var(--text-faint); }

.mini {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-faint);
  font-family: inherit;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  opacity: 0;
  transition: 0.14s ease;
}

tr:hover .mini { opacity: 1; }
.mini:hover { color: var(--text); border-color: var(--border); background: rgba(99, 168, 255, 0.08); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
}

.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-valid { color: var(--accent); background: var(--accent-soft); border-color: rgba(61, 220, 151, 0.28); }
.status-invalid { color: var(--red); background: var(--red-soft); border-color: rgba(255, 107, 129, 0.26); }
.status-unchecked { color: var(--text-faint); background: rgba(139, 155, 184, 0.09); border-color: rgba(139, 155, 184, 0.18); }
.status-checking { color: var(--blue); background: var(--blue-soft); border-color: rgba(99, 168, 255, 0.3); }
.status-checking::before { animation: pulse 1s ease-in-out infinite; }
.status-partial { color: var(--amber); background: rgba(244, 184, 96, 0.12); border-color: rgba(244, 184, 96, 0.3); }

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

.proto {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
}

.proto-http { color: #7db8ff; background: rgba(99, 168, 255, 0.12); }
.proto-https { color: #64e0cf; background: rgba(100, 224, 207, 0.12); }
.proto-socks4 { color: #b18cff; background: rgba(177, 140, 255, 0.12); }
.proto-socks4a { color: #b18cff; background: rgba(177, 140, 255, 0.12); }
.proto-socks5 { color: #f4b860; background: rgba(244, 184, 96, 0.12); }
.proto-socks5h { color: #f4b860; background: rgba(244, 184, 96, 0.12); }

.auth-yes { color: var(--text-dim); font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 11.5px; }
.auth-no { color: #43536f; }

.latency {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

.latency-bar {
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: rgba(139, 155, 184, 0.14);
  overflow: hidden;
}

.latency-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}

.latency.fast { color: var(--accent); }
.latency.mid { color: var(--amber); }
.latency.slow { color: var(--red); }
.latency.none { color: #43536f; }

.http-code { font-variant-numeric: tabular-nums; color: var(--text-dim); }
.http-ok { color: var(--accent); }
.http-bad { color: var(--red); }

.time { color: var(--text-faint); font-variant-numeric: tabular-nums; font-size: 11.5px; }

.mono {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--text-dim);
}

.err {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-faint);
  font-size: 11.5px;
}

.row-actions { display: flex; gap: 2px; justify-content: flex-end; padding-right: 14px !important; }

.row-actions .mini { opacity: 0; }
tr:hover .row-actions .mini { opacity: 1; }
.row-actions .mini:hover { color: var(--red); background: rgba(255, 107, 129, 0.08); }
.row-actions .mini.recheck:hover { color: var(--blue); background: rgba(99, 168, 255, 0.08); }

/* ---------- 空状态 ---------- */
.empty {
  position: absolute;
  inset: 40px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-faint);
  pointer-events: none;
}

.empty svg { width: 46px; height: 46px; opacity: 0.5; }
.empty p { margin: 0; font-size: 12.5px; }

/* ---------- 底部 ---------- */
.list-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 18px;
  font-size: 11.5px;
  color: var(--text-faint);
}

.foot-target b {
  font-weight: 500;
  color: var(--text-dim);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
}

/* ---------- Toast ---------- */
.toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 200px;
  max-width: 380px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(19, 29, 49, 0.97);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.22s ease;
}

.toast.success { border-color: rgba(61, 220, 151, 0.4); }
.toast.error { border-color: rgba(255, 107, 129, 0.45); }
.toast.leaving { animation: toast-out 0.2s ease forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(6px); }
}

.hidden { display: none !important; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #24334f;
  border-radius: 999px;
  border: 3px solid var(--panel-solid);
}
::-webkit-scrollbar-thumb:hover { background: #33466b; }

@media (max-width: 1120px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .endpoint { flex-direction: column; align-items: stretch; }
  .endpoint-right { justify-content: flex-end; }
  .settings-grid { grid-template-columns: 1fr 1fr 1fr; }
  .settings-grid .wide { grid-column: 1 / -1; }
  .composer-body { grid-template-columns: 1fr; }
  .composer-side { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
  .composer-side .field { min-width: 160px; }
}

@media (max-width: 760px) {
  .app { padding: 16px; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .main-nav { order: 3; width: 100%; justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .table-wrap { max-height: none; }
  .actions { width: 100%; }
  .search, .proto-filter { width: 100%; }
  .proxy-search { flex-direction: column; align-items: stretch; }
  .fofa-table-wrap { max-height: none; }
}
