:root {
  --bg: #f6f9ff;
  --panel: #ffffff;
  --text: #10204a;
  --muted: #6b7c9d;
  --line: #e4ebf6;
  --line-strong: #d5deee;
  --primary: #0b6bff;
  --primary-dark: #075be0;
  --primary-soft: #edf5ff;
  --green: #17b26a;
  --red: #e5484d;
  --orange: #f59e0b;
  --purple: #7c3aed;
  --shadow: 0 18px 40px rgba(22, 44, 90, .07);
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 15% 10%, #e9f3ff, transparent 32%), radial-gradient(circle at 80% 15%, #edf2ff, transparent 28%), var(--bg);
}
.login-card {
  width: min(430px, 100%);
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 30px;
}
.login-brand, .brand { display: flex; align-items: center; gap: 12px; }
.login-brand strong { font-size: 24px; }
.login-card p { margin: 10px 0 22px; color: var(--muted); }
.login-card label { display: block; color: var(--muted); margin: 14px 0 7px; }
.login-card small { display: block; color: var(--muted); margin-top: 16px; line-height: 1.6; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 14px;
  display: grid; place-items: center;
  color: #fff; font-weight: 800;
  background: linear-gradient(135deg, #0b6bff, #13b0ff);
  box-shadow: 0 10px 20px rgba(11,107,255,.24);
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  padding: 11px 13px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
textarea { min-height: 98px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #9cc2ff; box-shadow: 0 0 0 4px rgba(11, 107, 255, .10); }
.primary, .secondary, .danger, .icon-btn, .mobile-menu, .text-link, .addr-link, .tag-filter, .team-tab, .modal-tag, .notify-dot, .notify-pill {
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
}
.primary { background: linear-gradient(180deg, var(--primary), var(--primary-dark)); color: #fff; padding: 11px 18px; box-shadow: 0 10px 20px rgba(11,107,255,.16); }
.secondary { background: #eef3fb; color: var(--text); padding: 10px 15px; }
.danger { background: #fff0f0; color: #c9292d; padding: 10px 15px; }
.full { width: 100%; margin-top: 20px; }
.small { padding: 7px 11px; border-radius: 9px; font-size: 13px; }
.wide { min-width: 220px; }
.icon-btn { width: 36px; height: 36px; background: #f1f5fb; color: var(--text); padding: 0; }
.text-link { padding: 0; background: transparent; color: var(--primary); font-weight: 700; }
.addr-link { padding: 0; background: transparent; color: var(--primary); font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.addr-link:hover, .text-link:hover { text-decoration: underline; }
.form-error, .error-panel { border: 1px solid #ffd4d4; background: #fff1f1; color: #b42318; border-radius: 14px; padding: 12px 14px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: rgba(255,255,255,.96);
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  z-index: 30;
}
.brand { padding: 6px 8px 28px; }
.brand strong { display: block; font-size: 21px; letter-spacing: .2px; }
.brand small { color: var(--muted); }
.side-nav { display: flex; flex-direction: column; gap: 12px; }
.side-nav-btn {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  justify-content: flex-start;
  font-weight: 700;
  font-size: 16px;
  position: relative;
}
.side-nav-btn .nav-icon {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  color: #5b6b8f;
  flex: 0 0 26px;
}
.side-nav-btn .nav-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}
.side-nav-btn.active {
  background: #eef5ff;
  color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
  border-radius: 18px;
}
.side-nav-btn.active .nav-icon { color: var(--primary); }
.side-user {
  margin-top: auto;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}
.side-user-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}
.side-user-actions .small { width: 100%; padding: 8px 10px; }
.side-user-actions .logout-action { color: #c9292d; background: #fff0f0; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #eaf2ff; color: var(--primary); font-size: 20px; font-weight: 900; }
.side-user-main small { display: block; color: var(--muted); margin-top: 2px; }
.main { min-width: 0; padding: 26px 34px 40px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.title-wrap { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.topbar h1 { margin: 0; font-size: 30px; line-height: 1.2; letter-spacing: .3px; }
.topbar p { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.mobile-menu { display: none; width: 42px; height: 42px; background: #fff; color: var(--text); border: 1px solid var(--line); }
.top-actions { display: flex; gap: 12px; align-items: center; }
.telegram-pill {
  min-width: 250px;
  height: 50px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 12px 26px rgba(22,44,90,.04);
  white-space: nowrap;
}
.telegram-pill b { color: var(--orange); }
.telegram-pill.ok b { color: var(--green); }
.telegram-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.telegram-pill.ok i { background: var(--green); }
.tg-icon { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: #edf5ff; color: var(--primary); font-size: 15px; }
.tg-icon.big { width: 54px; height: 54px; font-size: 25px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(22,44,90,.045);
  padding: 22px;
  margin-bottom: 22px;
}
.card h2 { margin: 0; font-size: 19px; }
.card h3 { margin: 0 0 13px; font-size: 16px; }
.card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card-title small, small, .muted { color: var(--muted); }
.loading-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #e7edf7; border-top-color: var(--primary); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.metric-card {
  background: linear-gradient(180deg, #fff, #f8fbff);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(22,44,90,.04);
}
.metric-card span { display: block; color: var(--muted); margin-bottom: 10px; }
.metric-card strong { display: block; font-size: 24px; }
.metric-card small { display: block; margin-top: 5px; }
.monitor-grid { display: grid; grid-template-columns: minmax(540px, 2fr) minmax(340px, 1fr); gap: 22px; margin-bottom: 22px; }
.address-select-card { margin-bottom: 0; }
.address-select-layout { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 22px; align-items: stretch; margin-top: 18px; }
.vertical-line { background: var(--line); }
.addr-list { display: flex; flex-direction: column; gap: 10px; }
.small-list { max-height: 188px; overflow-y: auto; overflow-x: hidden; padding-right: 4px; }
.addr-check {
  display: grid;
  /* 地址选择区：把地址和余额整体向左收一点，减少右侧空白和横向滚动 */
  grid-template-columns: 22px minmax(54px, 0.58fr) minmax(116px, 0.88fr) minmax(96px, 0.76fr);
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: var(--text);
}
.addr-check input { display: none; }
.check-ui { width: 20px; height: 20px; border: 1px solid #bfd1eb; border-radius: 6px; background: #fff; position: relative; }
.addr-check.checked .check-ui { background: var(--primary); border-color: var(--primary); }
.addr-check.checked .check-ui::after { content: '✓'; color: #fff; position: absolute; font-size: 14px; left: 4px; top: 0px; font-weight: 900; }
.addr-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.addr-code { color: #526485; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.addr-balance { color: #5d7196; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-mini { color: var(--muted); padding: 16px 0; }
.team-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.team-head h3 { margin: 0; }
.team-head h3 small { margin-left: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.team-tabs { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.team-tab { min-width: 82px; height: 42px; border: 1px solid var(--line-strong); background: #fff; color: var(--text); }
.team-tab.active { border-color: var(--primary); background: linear-gradient(180deg, var(--primary), var(--primary-dark)); color: #fff; }
.team-select { max-width: 138px; padding: 8px 10px; }
.monitor-actions { display: flex; align-items: center; gap: 22px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.telegram-hint { color: var(--primary); font-weight: 700; }
.tag-filter-card { margin-bottom: 0; }
.tag-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.tag-card-head h2 { margin: 0; }
.tag-card-head .secondary { white-space: nowrap; }
.tag-button-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.tag-filter {
  height: 54px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
}
.tag-filter.active { border-color: var(--primary); background: linear-gradient(180deg, var(--primary), var(--primary-dark)); color: #fff; }
.tag-filter-card p { color: var(--muted); margin: 22px 0 0; line-height: 1.65; }
.records-card { padding-bottom: 14px; }
.records-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.records-toolbar h2 { margin: 0 0 4px; }
.filter-bar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.filter-bar input { width: 150px; }
.filter-bar select { width: 124px; }
.sort-order-group { display: inline-flex; align-items: center; gap: 6px; padding: 3px; border-radius: 12px; background: #eef3fb; }
.sort-order-btn { border: 0; border-radius: 9px; padding: 8px 11px; background: transparent; color: #344869; font-weight: 800; }
.sort-order-btn.active { background: #fff; color: var(--primary); box-shadow: 0 5px 12px rgba(22,44,90,.08); }
.sort-head { border: 0; background: transparent; color: inherit; padding: 0; display: inline-flex; align-items: center; gap: 5px; font-weight: 900; }
.sort-head span { color: #8da0be; font-size: 13px; }
.sort-head.active { color: var(--primary); }
.sort-head.active span { color: var(--primary); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: #fbfdff; color: #25395f; font-weight: 800; white-space: nowrap; }
td { color: #17284e; }
tr:last-child td { border-bottom: 0; }
.monitor-table { min-width: 1420px; table-layout: fixed; }
.monitor-table th:nth-child(1), .monitor-table td:nth-child(1) { width: 158px; }
.monitor-table th:nth-child(2), .monitor-table td:nth-child(2), .monitor-table th:nth-child(4), .monitor-table td:nth-child(4) { width: 190px; }
.monitor-table th:nth-child(3), .monitor-table td:nth-child(3) { width: 92px; text-align: center; }
.monitor-table th:nth-child(5), .monitor-table td:nth-child(5) { width: 116px; }
.monitor-table th:nth-child(6), .monitor-table td:nth-child(6), .monitor-table th:nth-child(7), .monitor-table td:nth-child(7) { width: 126px; }
.monitor-table th:nth-child(8), .monitor-table td:nth-child(8) { width: 112px; }
.monitor-table th:nth-child(9), .monitor-table td:nth-child(9) { width: 140px; }
.monitor-table th:nth-child(10), .monitor-table td:nth-child(10) { width: 90px; text-align: center; padding-left: 20px; padding-right: 20px; }
.monitor-table th:nth-child(11), .monitor-table td:nth-child(11) { width: 96px; text-align: center; padding-left: 20px; padding-right: 20px; }
.monitor-table .direction-col { text-align: center; }
.monitor-table .direction-col .tag { margin-left: auto; margin-right: auto; }
.monitor-table .action-edit-col, .monitor-table .action-monitor-col { white-space: nowrap; }
.address-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tag { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; padding: 4px 9px; font-size: 13px; line-height: 1; white-space: nowrap; margin: 2px 3px 2px 0; }
.tag-blue { background: #eaf2ff; color: #0b5bd3; }
.tag-green { background: #dcfce7; color: #0e7a43; }
.tag-red { background: #ffe8e8; color: #b42318; }
.tag-gray { background: #eef2f7; color: #546179; }
.tag-purple { background: #f0e9ff; color: #5f35be; }
.tag-yellow { background: #fff4d6; color: #9a5b00; }
.note-col { color: #394b6f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notify-dot { width: 30px; height: 30px; padding: 0; border-radius: 50%; background: #e8f2ff; color: var(--primary); }
.notify-pill { min-width: 58px; padding: 7px 9px; border-radius: 999px; background: #e8f2ff; color: var(--primary); border: 1px solid #bfd9ff; font-weight: 900; font-size: 12px; }
.notify-pill.watched { background: #dcfce7; color: #0e7a43; border-color: #b7e8c6; }
.notify-pill.paused { background: #eef2f7; color: #546179; border-color: #d8e0ec; }
.empty-table { text-align: center; color: var(--muted); padding: 34px !important; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; color: var(--muted); }
.pager b { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #bdd6ff; color: var(--primary); border-radius: 10px; }
.pager select { width: 120px; padding: 8px 10px; }
.inline-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.inline-form input { min-width: 220px; flex: 1; }
.inline-form select { min-width: 180px; flex: 0 0 auto; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.alert-card .status-line { display: flex; align-items: center; gap: 18px; padding: 10px 0; }
.status-line b { font-size: 20px; }
.status-line p { margin: 6px 0 0; color: var(--muted); }
.rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rule-card { border: 1px solid var(--line); background: #fbfdff; border-radius: 16px; padding: 18px; }
.rule-card p { color: var(--muted); line-height: 1.55; margin-bottom: 0; }
.admin-grid { display: grid; grid-template-columns: minmax(310px, .9fr) minmax(520px, 1.3fr); gap: 22px; }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.field-label { margin: 4px 0 -6px; color: #3b4e74; font-size: 13px; font-weight: 800; }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0; }
.perm-grid label { display: flex; align-items: center; gap: 8px; color: #26395f; }
.perm-grid input { width: auto; }
#toast-area { position: fixed; right: 28px; top: 82px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 240px; max-width: 360px; padding: 13px 15px; border-radius: 14px; border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; box-shadow: var(--shadow); }
.toast.error { background: #fff1f1; color: #b42318; border-color: #fecaca; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(13, 28, 59, .22); z-index: 70; }
.modal-card {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 80;
  width: min(430px, calc(100vw - 34px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(18, 36, 80, .18);
  padding: 22px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body label { display: block; margin: 15px 0 8px; color: #3b4e74; font-weight: 700; }
.readonly-address { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; }
.modal-tags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.modal-tag { border: 1px solid var(--line-strong); background: #fff; color: var(--text); padding: 10px 6px; font-weight: 700; }
.modal-tag.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.modal-tip { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.count-tip { text-align: right; color: var(--muted); font-size: 12px; margin-top: 5px; }
.locked-tip { margin-top: 12px; background: #fff7ed; color: #9a5711; border: 1px solid #fed7aa; border-radius: 12px; padding: 10px 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.empty-state { text-align: center; padding: 50px; }
@media (max-width: 1180px) {
  .monitor-grid, .admin-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; position: fixed; left: 0; top: 0; width: min(82vw, 300px); box-shadow: 20px 0 50px rgba(16,32,74,.16); }
  .sidebar.open { display: flex; }
  .main { padding: 18px; }
  .mobile-menu { display: inline-flex; }
  .topbar { flex-direction: column; align-items: stretch; }
  .telegram-pill { width: 100%; min-width: 0; }
  .topbar h1 { font-size: 24px; }
  .address-select-layout { grid-template-columns: 1fr; }
  .vertical-line { height: 1px; }
  .monitor-actions, .records-toolbar, .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar input, .filter-bar select, .sort-order-group { width: 100%; }
  .sort-order-btn { flex: 1; }
  .tag-card-head { align-items: flex-start; }
  .tag-button-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .addr-check { grid-template-columns: 22px minmax(0, 1fr); }
  .addr-code, .addr-balance { grid-column: 2; text-align: left; }
  .metric-grid, .rule-grid { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .inline-form input, .inline-form select { width: 100%; min-width: 0; }
  #toast-area { left: 16px; right: 16px; top: 74px; }
  .toast { width: 100%; max-width: none; }
}

/* v2.1.0 告警规则设置 */
.alert-settings-form { display: flex; flex-direction: column; gap: 18px; }
.alert-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.alert-rule-panel {
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 16px;
  padding: 18px;
  min-height: 190px;
}
.alert-rule-panel.forced { background: linear-gradient(180deg, #fbfdff, #f7fbff); }
.rule-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.rule-head b { display: block; font-size: 17px; margin-bottom: 6px; }
.rule-head p { margin: 0; color: var(--muted); line-height: 1.55; }
.alert-rule-panel > label, .two-col-inputs label { display: block; color: #3b4e74; font-weight: 800; margin-bottom: 8px; }
.input-suffix { display: grid; grid-template-columns: 1fr 70px; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; overflow: hidden; }
.input-suffix input { border: 0; border-radius: 0; box-shadow: none !important; }
.input-suffix span { color: var(--muted); font-weight: 800; text-align: center; border-left: 1px solid var(--line); }
.two-col-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.two-col-inputs input { margin-top: 8px; }
.two-col-inputs small { display: block; margin-top: 6px; }
.switch { flex: 0 0 auto; width: 54px; height: 30px; position: relative; display: inline-flex; align-items: center; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 54px; height: 30px; border-radius: 999px; background: #d9e3f2; position: relative; transition: background .18s; }
.switch span::after { content: ''; position: absolute; left: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 4px 10px rgba(22,44,90,.18); transition: transform .18s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(24px); }
.switch.disabled { opacity: .85; cursor: not-allowed; }
.forced-tip { margin-top: 20px; border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; border-radius: 12px; padding: 12px; line-height: 1.6; }
.alert-save-row { display: flex; align-items: center; gap: 14px; justify-content: flex-end; padding-top: 2px; }
input:disabled { background: #f3f6fb; color: #8391aa; }
@media (max-width: 1180px) { .alert-settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 850px) { .two-col-inputs { grid-template-columns: 1fr; } .alert-save-row { flex-direction: column; align-items: stretch; } }

/* v2.0.10 告警规则配置 */
.alert-settings-form { display: flex; flex-direction: column; gap: 18px; }
.alert-rule-grid { align-items: stretch; }
.alert-rule-card { display: flex; flex-direction: column; gap: 12px; min-height: 220px; }
.rule-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rule-head b { font-size: 17px; }
.switch { position: relative; display: inline-flex; align-items: center; width: 52px; height: 30px; flex: 0 0 auto; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #d9e3f2; transition: .18s; }
.switch span::after { content: ''; position: absolute; left: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(18,36,80,.16); transition: .18s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(22px); }
.input-suffix { position: relative; display: flex; align-items: center; }
.input-suffix input { padding-right: 74px; }
.input-suffix span { position: absolute; right: 13px; color: var(--muted); font-weight: 700; pointer-events: none; }
.two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.forced-pill { display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; border-radius: 999px; background: #fff7ed; color: #c2410c; font-weight: 900; font-size: 13px; border: 1px solid #fed7aa; }
.readonly-rule { border: 1px dashed #bfd1eb; background: #fbfdff; border-radius: 12px; padding: 12px; color: #344869; font-weight: 700; }
.alert-save-row { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
@media (max-width: 850px) {
  .two-cols { grid-template-columns: 1fr; }
  .alert-save-row { align-items: stretch; flex-direction: column; }
}

/* v2.1.1 交易筛选与必填项 */
.sort-tip {
  margin: -6px 0 12px;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
}
.required-star { color: #ef4444; }


/* v2.1.1 规则与必填提示 */
.switch-wrap { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 800; }
.switch-wrap small { white-space: nowrap; }
.month-sort-tip { display: block; margin-top: 8px; color: #1d4ed8; font-weight: 800; }
.required-star { color: #ef4444; }
.modal-card input:required { border-color: var(--line-strong); }
.alert-rule-card input:disabled { background: #f3f6fb; color: #8391aa; cursor: not-allowed; }

/* v2.1.3 标签颜色：未知地址红色，其他黄色，剩余标签蓝色 */

/* v2.1.0 标签颜色：未知地址红色，其他黄色，其余蓝色 */
.tag-filter.tag-filter-blue, .modal-tag.modal-tag-blue { border-color: #b9d6ff; color: #0b5bd3; background: #f8fbff; }
.tag-filter.tag-filter-red, .modal-tag.modal-tag-red { border-color: #ffb8b8; color: #b42318; background: #fff6f6; }
.tag-filter.tag-filter-yellow, .modal-tag.modal-tag-yellow { border-color: #ffd98a; color: #9a5b00; background: #fffaf0; }
.tag-filter.tag-filter-blue.active, .modal-tag.modal-tag-blue.active { background: #0f6bf2; color: #fff; border-color: #0f6bf2; }
.tag-filter.tag-filter-red.active, .modal-tag.modal-tag-red.active { background: #e11d48; color: #fff; border-color: #e11d48; }
.tag-filter.tag-filter-yellow.active, .modal-tag.modal-tag-yellow.active { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.alert-watch-form { margin-bottom: 14px; }
.alert-watch-form input[name="address"] { min-width: 320px; }
.switch-wrap { display: inline-flex; align-items: center; gap: 8px; }
.switch-wrap small { color: var(--muted); font-weight: 800; }
.required-star { color: #e11d48; font-weight: 900; }


/* v2.1.4 首页参考图样式 */
.home-dashboard { display: flex; flex-direction: column; gap: 22px; }
.home-top-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.home-kpi-card {
  min-height: 132px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(22,44,90,.045);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.home-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 28px;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}
.home-icon.small { width: 54px; height: 54px; border-radius: 18px; font-size: 24px; }
.home-icon-blue { background: linear-gradient(180deg, #e8f2ff, #d9ebff); color: var(--primary); }
.home-icon-purple { background: linear-gradient(180deg, #f1e9ff, #eadcff); color: #7c3aed; }
.home-icon-green { background: linear-gradient(180deg, #dffbee, #ccf7e1); color: #17a65b; }
.home-icon-orange { background: linear-gradient(180deg, #fff0d6, #ffe6ba); color: #f59e0b; }
.home-kpi-main span, .home-balance-card span { display: block; color: #31446a; font-weight: 800; margin-bottom: 6px; }
.home-kpi-main strong { display: block; font-size: 27px; line-height: 1.15; letter-spacing: .2px; }
.home-kpi-main strong em, .home-balance-card strong em { font-style: normal; font-size: 14px; color: #4768b5; font-weight: 700; margin-left: 4px; }
.home-kpi-main small { display: block; color: #4768b5; margin-top: 9px; font-weight: 600; }
.home-section-card { margin-bottom: 0; padding: 24px 28px; }
.home-balance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.home-balance-card {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.home-balance-card strong { display: block; font-size: 23px; line-height: 1.2; }
.home-activity-table table th, .home-activity-table table td { padding: 14px 18px; }
.home-activity-table table th { background: #fbfdff; color: #53688e; }
.home-activity-table table { min-width: 980px; table-layout: fixed; }
.home-activity-table th:nth-child(1), .home-activity-table td:nth-child(1) { width: 170px; }
.home-activity-table th:nth-child(2), .home-activity-table td:nth-child(2), .home-activity-table th:nth-child(4), .home-activity-table td:nth-child(4) { width: 245px; }
.home-activity-table th:nth-child(3), .home-activity-table td:nth-child(3) { width: 90px; text-align: center; }
.home-activity-table th:nth-child(5), .home-activity-table td:nth-child(5) { width: 120px; }
.home-activity-table td:nth-child(5) { font-weight: 800; }
.home-address-cell .tag { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1280px) {
  .home-top-grid, .home-balance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .home-top-grid, .home-balance-grid { grid-template-columns: 1fr; }
  .home-kpi-card { padding: 18px; }
  .home-section-card { padding: 18px; }
}

/* v2.1.7 用户端标签删除、管理端查看员工标签 */
.own-tag-manage { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdff; }
.mini-title { color: #25395f; font-weight: 900; margin-bottom: 10px; }
.own-tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.own-tag-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.tiny { padding: 5px 8px; border-radius: 9px; font-size: 12px; min-height: auto; }
.category-admin-form select { min-width: 220px; }
.category-admin-form input { min-width: 260px; }

/* v2.1.8 管理端标签按账号筛选 */
.category-title-row {
  align-items: flex-start;
  gap: 16px;
}
.filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.filter-label select {
  min-width: 180px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}
@media (max-width: 900px) {
  .category-title-row { flex-direction: column; }
  .filter-label { width: 100%; justify-content: space-between; }
  .filter-label select { flex: 1; min-width: 0; }
}

/* v2.1.9 多选标签、收入告警、余额概览月收支 */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.home-balance-main small {
  display: block;
  margin-top: 7px;
  color: #597197;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.home-balance-card { min-height: 112px; align-items: flex-start; }
.home-balance-main { min-width: 0; }
.own-tag-manage .mini-title small { color: var(--muted); font-weight: 700; margin-left: 6px; }
.modal-tag.active::after { content: ' ✓'; font-weight: 900; }
.alert-rule-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1180px) { .alert-rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 850px) { .alert-rule-grid { grid-template-columns: 1fr; } }

/* v2.2.1 交易监控表格布局：编辑在备注后，监控放最后，方向居中 */
.monitor-table { min-width: 1430px; }
.monitor-table th:nth-child(3), .monitor-table td:nth-child(3), .direction-col { text-align: center !important; }
.direction-col .tag { margin-left: auto; margin-right: auto; }
.monitor-table th:nth-child(10), .monitor-table td:nth-child(10) { width: 92px; text-align: center; padding-left: 20px; padding-right: 20px; }
.monitor-table th:nth-child(11), .monitor-table td:nth-child(11) { width: 116px; text-align: center; padding-left: 22px; padding-right: 22px; }
.edit-action-col .secondary.small, .monitor-action-col .notify-pill { min-width: 66px; }
.monitor-action-col .notify-pill { padding-left: 14px; padding-right: 14px; }
.tag-button-grid .tag-filter.active { box-shadow: 0 8px 18px rgba(15, 107, 242, .16); }

/* v2.2.3：告警规则文案改为标签地址告警，避免和员工自有监控地址通告混淆 */
.monitor-table { min-width: 1320px; table-layout: fixed; }
.monitor-table col.col-time { width: 146px; }
.monitor-table col.col-from { width: 172px; }
.monitor-table col.col-direction { width: 78px; }
.monitor-table col.col-to { width: 172px; }
.monitor-table col.col-amount { width: 104px; }
.monitor-table col.col-month { width: 112px; }
.monitor-table col.col-total { width: 118px; }
.monitor-table col.col-tag { width: 96px; }
.monitor-table col.col-note { width: 84px; }
.monitor-table col.col-edit { width: 82px; }
.monitor-table col.col-monitor { width: 92px; }
.monitor-table th:nth-child(3), .monitor-table td:nth-child(3),
.monitor-table .direction-col { text-align: center !important; }
.monitor-table .direction-col .tag { margin-left: auto; margin-right: auto; }
.monitor-table th:nth-child(9), .monitor-table td:nth-child(9) { width: 84px; padding-left: 10px; padding-right: 10px; }
.monitor-table th:nth-child(10), .monitor-table td:nth-child(10),
.monitor-table th.edit-action-col, .monitor-table td.edit-action-col { width: 82px; text-align: center !important; padding-left: 8px !important; padding-right: 8px !important; }
.monitor-table th:nth-child(11), .monitor-table td:nth-child(11),
.monitor-table th.monitor-action-col, .monitor-table td.monitor-action-col { width: 92px; text-align: center !important; padding-left: 8px !important; padding-right: 8px !important; }
.edit-action-col .secondary.small, .monitor-action-col .notify-pill { min-width: 58px; }
.monitor-action-col .notify-pill { padding-left: 10px; padding-right: 10px; }

/* v2.2.4：地址选择区域把地址/余额列向前收一点，并去掉横向滚动；新增内部地址交易开关 */
.address-select-layout { gap: 18px; }
.small-list { overflow-y: auto; overflow-x: hidden; }
.addr-check {
  grid-template-columns: 22px minmax(62px, 92px) minmax(118px, 146px) minmax(90px, 118px);
  justify-content: start;
  column-gap: 9px;
}
.addr-code { max-width: 146px; }
.addr-balance { text-align: left; max-width: 118px; }
@media (max-width: 1200px) {
  .addr-check { grid-template-columns: 22px minmax(62px, 88px) minmax(104px, 1fr) minmax(82px, 112px); }
}

/* v2.2.5 */
.alert-watch-form select { min-width: 140px; }
/* v2.2.5：用户反馈地址和余额再往前一点 */
.address-select-card .addr-check {
  grid-template-columns: 22px minmax(52px, 78px) minmax(112px, 134px) minmax(86px, 110px);
  column-gap: 6px;
}
.address-select-card .addr-code { max-width: 134px; }
.address-select-card .addr-balance { max-width: 110px; }

/* v2.2.5：地址选择区地址/余额再向左收一点，告警标签地址新增表单 */
.addr-check {
  grid-template-columns: 22px minmax(56px, 82px) minmax(108px, 136px) minmax(82px, 108px) !important;
  column-gap: 6px !important;
}
.addr-code { max-width: 136px; }
.addr-balance { max-width: 108px; }
.alert-watch-form select { min-width: 180px; }
@media (max-width: 1200px) {
  .addr-check { grid-template-columns: 22px minmax(54px, 76px) minmax(100px, 1fr) minmax(78px, 104px) !important; }
}


/* v2.2.7：余额保留两位并尽量完整显示；内部交易允许编辑备注 */
.address-select-card .addr-check,
.addr-check {
  grid-template-columns: 22px minmax(52px, 80px) minmax(116px, 142px) minmax(128px, 158px) !important;
  column-gap: 6px !important;
}
.address-select-card .addr-code,
.addr-code { max-width: 142px; }
.address-select-card .addr-balance,
.addr-balance {
  max-width: 158px !important;
  min-width: 128px;
  overflow: visible;
  text-overflow: clip;
  font-variant-numeric: tabular-nums;
}
.readonly-tags .tag { display: inline-flex; }
@media (max-width: 1200px) {
  .addr-check { grid-template-columns: 22px minmax(54px, 76px) minmax(100px, 1fr) minmax(110px, 136px) !important; }
  .addr-balance { min-width: 110px; max-width: 136px !important; }
}

/* v2.2.11 点击交易地址查看该地址与当前选中用户地址之间的交易 */
.addr-link { cursor: pointer; }
.active-address-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 12px;
  padding: 10px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  flex-wrap: wrap;
}
.active-address-filter span { line-height: 1.5; }
.active-address-filter button { background: #fff; }

/* v2.2.11 地址钻取筛选 */
.active-address-filter {
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #1e3a8a;
  font-weight: 700;
}
.active-address-filter b {
  color: var(--primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (max-width: 700px) {
  .active-address-filter { align-items: stretch; flex-direction: column; }
}

/* v2.2.11 地址点击查看交易 */
.address-focus-tip {
  margin: -4px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}
.address-focus-tip b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.password-modal { max-width: 440px; }


/* v2.3.2 正式版：手机网页排版优化 */
@media (max-width: 760px) {
  html, body { width: 100%; overflow-x: hidden; }
  body { font-size: 13px; background: #f5f8ff; }
  .app-shell { display: block; min-height: 100vh; }
  .main { padding: 14px 12px 26px; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    margin: -14px -12px 14px;
    padding: 12px;
    background: rgba(246, 249, 255, .96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(228, 235, 246, .9);
  }
  .title-wrap { align-items: center; gap: 10px; }
  .topbar h1 { font-size: 22px; line-height: 1.25; }
  .topbar p { font-size: 12px; margin-top: 5px; }
  .mobile-menu { width: 40px; height: 40px; flex: 0 0 auto; }
  .telegram-pill {
    width: 100%;
    min-width: 0;
    height: 42px;
    justify-content: flex-start;
    padding: 0 12px;
    font-size: 13px;
  }
  .tg-icon { width: 24px; height: 24px; }

  .sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: min(86vw, 320px);
    height: 100vh;
    padding: 18px 14px;
    overflow-y: auto;
    box-shadow: 24px 0 60px rgba(16, 32, 74, .24);
    border-right: 1px solid var(--line);
  }
  .sidebar.open { display: flex; }
  .brand { padding: 4px 6px 18px; }
  .brand strong { font-size: 19px; }
  .side-nav { gap: 8px; }
  .side-nav-btn { height: 50px; border-radius: 16px; font-size: 15px; padding: 0 14px; }
  .side-nav-btn .nav-icon svg { width: 23px; height: 23px; }
  .side-user { margin-top: 20px; }

  .card { padding: 16px; border-radius: 16px; margin-bottom: 14px; }
  .card-title { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 12px; }
  .card h2 { font-size: 18px; }
  .card h3 { font-size: 15px; }

  .home-dashboard { gap: 14px; }
  .home-top-grid, .home-balance-grid, .metric-grid, .rule-grid, .admin-grid, .alert-settings-grid, .alert-rule-grid { grid-template-columns: 1fr !important; gap: 12px; }
  .home-kpi-card, .home-balance-card, .metric-card { padding: 16px; border-radius: 16px; }
  .home-icon { width: 52px; height: 52px; border-radius: 16px; font-size: 24px; }
  .home-icon.small { width: 46px; height: 46px; border-radius: 14px; font-size: 21px; }
  .home-kpi-main strong { font-size: 24px; word-break: break-word; }
  .home-balance-card strong { font-size: 21px; word-break: break-word; }
  .home-section-card { padding: 16px; }

  .monitor-grid { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
  .address-select-layout { grid-template-columns: 1fr !important; gap: 14px; margin-top: 14px; }
  .vertical-line { height: 1px; width: 100%; }
  .small-list { max-height: none; overflow: visible; padding-right: 0; }
  .addr-check,
  .address-select-card .addr-check {
    grid-template-columns: 24px minmax(0, 1fr) !important;
    column-gap: 9px !important;
    row-gap: 4px;
    align-items: start;
    min-height: 44px;
    padding: 5px 0;
  }
  .check-ui { margin-top: 2px; }
  .addr-name { grid-column: 2; font-size: 15px; white-space: normal; }
  .addr-code, .addr-balance,
  .address-select-card .addr-code, .address-select-card .addr-balance {
    grid-column: 2;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
  }
  .addr-balance { color: #4768b5; font-weight: 700; }
  .team-tabs { gap: 8px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .team-tab { min-width: 92px; height: 38px; }

  .tag-card-head { flex-direction: row; align-items: center; }
  .tag-card-head .secondary { padding: 8px 11px; font-size: 12px; }
  .tag-button-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .tag-filter { height: 48px; font-size: 15px; border-radius: 14px; }
  .own-tag-manage { padding: 12px; }
  .own-tag-list { gap: 8px; }

  .records-card { padding: 16px 12px; }
  .records-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .filter-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .filter-bar input, .filter-bar select, .filter-bar button, .sort-order-group { width: 100%; }
  .sort-order-group { grid-column: 1 / -1; }
  .sort-order-btn { flex: 1; }
  .wide { min-width: 0; width: 100%; }

  .table-wrap { border: 0; overflow: visible; border-radius: 0; }
  .monitor-table,
  .home-activity-table table {
    min-width: 0 !important;
    width: 100%;
    table-layout: auto;
    display: block;
    background: transparent;
  }
  .monitor-table colgroup { display: none; }
  .monitor-table thead,
  .home-activity-table thead { display: none; }
  .monitor-table tbody,
  .home-activity-table tbody { display: block; }
  .monitor-table tr,
  .home-activity-table tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(22, 44, 90, .045);
    overflow: hidden;
  }
  .monitor-table td,
  .home-activity-table td {
    width: auto !important;
    min-width: 0 !important;
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 10px 12px !important;
    border-bottom: 1px dashed var(--line);
    text-align: left !important;
  }
  .monitor-table td:last-child,
  .home-activity-table td:last-child { border-bottom: 0; }
  .monitor-table td::before,
  .home-activity-table td::before {
    color: #607398;
    font-weight: 800;
    font-size: 12px;
  }
  .monitor-table td:nth-child(1)::before { content: '时间'; }
  .monitor-table td:nth-child(2)::before { content: '来源地址'; }
  .monitor-table td:nth-child(3)::before { content: '方向'; }
  .monitor-table td:nth-child(4)::before { content: '收款方地址'; }
  .monitor-table td:nth-child(5)::before { content: '金额'; }
  .monitor-table td:nth-child(6)::before { content: '本月总额'; }
  .monitor-table td:nth-child(7)::before { content: '总金额'; }
  .monitor-table td:nth-child(8)::before { content: '标签'; }
  .monitor-table td:nth-child(9)::before { content: '备注'; }
  .monitor-table td:nth-child(10)::before { content: '编辑'; }
  .monitor-table td:nth-child(11)::before { content: '监控'; }
  .home-activity-table td:nth-child(1)::before { content: '时间'; }
  .home-activity-table td:nth-child(2)::before { content: '来源地址'; }
  .home-activity-table td:nth-child(3)::before { content: '方向'; }
  .home-activity-table td:nth-child(4)::before { content: '收款方地址'; }
  .home-activity-table td:nth-child(5)::before { content: '金额'; }
  .home-activity-table td:nth-child(6)::before { content: '状态'; }
  .address-cell { min-width: 0; }
  .address-cell .addr-link { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
  .monitor-table .direction-col .tag { margin-left: 0; margin-right: 0; }
  .note-col { white-space: normal; }
  .edit-action-col .secondary.small, .monitor-action-col .notify-pill { min-width: 68px; }
  .active-address-filter, .address-focus-tip { flex-direction: column; align-items: stretch; }

  .pager { justify-content: center; flex-wrap: wrap; gap: 8px; }
  .pager select { flex: 1 1 120px; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .inline-form input, .inline-form select, .inline-form button { width: 100%; min-width: 0; }
  .row-actions { gap: 6px; }


  .mobile-card-table {
    min-width: 0 !important;
    width: 100%;
    table-layout: auto;
    display: block;
    background: transparent;
  }
  .mobile-card-table thead { display: none; }
  .mobile-card-table tbody { display: block; }
  .mobile-card-table tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(22, 44, 90, .045);
    overflow: hidden;
  }
  .mobile-card-table td {
    width: auto !important;
    min-width: 0 !important;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 10px 12px !important;
    border-bottom: 1px dashed var(--line);
    text-align: left !important;
    word-break: break-word;
  }
  .mobile-card-table td:last-child { border-bottom: 0; }
  .mobile-card-table td::before {
    color: #607398;
    font-weight: 800;
    font-size: 12px;
  }
  .mobile-card-table .empty-table { display: block; text-align: center !important; padding: 24px 12px !important; }
  .mobile-card-table .empty-table::before { content: ''; display: none; }
  .address-list-table td:nth-child(1)::before { content: '地址'; }
  .address-list-table td:nth-child(2)::before { content: '员工'; }
  .address-list-table td:nth-child(3)::before { content: '当前余额'; }
  .address-list-table td:nth-child(4)::before { content: '交易同步'; }
  .address-list-table td:nth-child(5)::before { content: '操作'; }
  .tag-watch-table td:nth-child(1)::before { content: '地址'; }
  .tag-watch-table td:nth-child(2)::before { content: '名称'; }
  .tag-watch-table td:nth-child(3)::before { content: '标签'; }
  .tag-watch-table td:nth-child(4)::before { content: '状态'; }
  .tag-watch-table td:nth-child(5)::before { content: '添加时间'; }
  .tag-watch-table td:nth-child(6)::before { content: '操作'; }
  .manual-watch-table td:nth-child(1)::before { content: '地址'; }
  .manual-watch-table td:nth-child(2)::before { content: '名称'; }
  .manual-watch-table td:nth-child(3)::before { content: '状态'; }
  .manual-watch-table td:nth-child(4)::before { content: '添加时间'; }
  .manual-watch-table td:nth-child(5)::before { content: '操作'; }
  .user-list-table td:nth-child(1)::before { content: '姓名/用户名'; }
  .user-list-table td:nth-child(2)::before { content: '角色'; }
  .user-list-table td:nth-child(3)::before { content: '状态'; }
  .user-list-table td:nth-child(4)::before { content: '操作'; }
  .category-admin-table td:nth-child(1)::before { content: '所属用户'; }
  .category-admin-table td:nth-child(2)::before { content: '标签'; }
  .category-admin-table td:nth-child(3)::before { content: '使用情况'; }
  .category-admin-table td:nth-child(4)::before { content: '操作'; }

  .alert-card .status-line { align-items: flex-start; gap: 12px; }
  .status-line b { font-size: 18px; }
  .alert-rule-panel, .alert-rule-card, .rule-card { min-height: 0; padding: 15px; }
  .rule-head { align-items: flex-start; }
  .switch-wrap { align-items: center; }
  .two-col-inputs, .two-cols, .perm-grid { grid-template-columns: 1fr !important; }
  .alert-save-row { flex-direction: column; align-items: stretch; }
  .alert-watch-form { display: grid; grid-template-columns: 1fr; gap: 8px; }

  .category-title-row { flex-direction: column; align-items: stretch; }
  .filter-label { width: 100%; justify-content: space-between; }
  .filter-label select { min-width: 0; flex: 1; }
  .category-admin-form input, .category-admin-form select { min-width: 0; }

  .modal-backdrop { background: rgba(13, 28, 59, .30); }
  .modal-card {
    left: 10px;
    right: 10px;
    bottom: 10px;
    top: auto;
    width: auto;
    max-height: calc(100vh - 28px);
    transform: none;
    overflow: auto;
    border-radius: 20px;
    padding: 18px;
  }
  .modal-tags { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-foot { position: sticky; bottom: -18px; background: #fff; padding-top: 12px; }

  #toast-area { left: 12px; right: 12px; top: 70px; }
  .toast { min-width: 0; max-width: none; width: 100%; }
  .empty-state { padding: 28px 12px; }
}

@media (max-width: 420px) {
  .main { padding-left: 10px; padding-right: 10px; }
  .topbar { margin-left: -10px; margin-right: -10px; }
  .topbar h1 { font-size: 20px; }
  .filter-bar { grid-template-columns: 1fr; }
  .tag-button-grid { grid-template-columns: 1fr !important; }
  .monitor-table td,
  .home-activity-table td,
  .mobile-card-table td { grid-template-columns: 78px minmax(0, 1fr); }
  .modal-tags { grid-template-columns: 1fr; }
}
