:root {
  --bg: #f0f2f5;
  --panel: #ffffff;
  --line: #e4e8ee;
  --text: #1f2937;
  --muted: #6b7280;
  --blue: #1e6feb;
  --green: #189a62;
  --amber: #c47a0a;
  --red: #c2443d;
  --sidebar-bg: #0f2237;
  --sidebar-hover: rgba(255, 255, 255, 0.07);
  --sidebar-text: #9db0c7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: var(--blue);
  text-decoration: none;
}

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #0b1e33 0%, #123c6e 55%, #1e6feb 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 34px 30px;
  box-shadow: 0 16px 48px rgba(8, 24, 48, 0.3);
}

.login-logo {
  font-size: 42px;
  text-align: center;
  margin-bottom: 8px;
}

.login-card h1 {
  font-size: 21px;
  margin: 0 0 6px;
  letter-spacing: 0;
  text-align: center;
}

.login-card .subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 22px;
  text-align: center;
}

/* 登录身份提示徽章：胶囊样式 + 淡入动画，按身份换配色（位于密码框与登录按钮之间，居中） */
.login-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  min-height: 30px;
  margin: 10px 0 16px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.login-hint.visible {
  opacity: 1;
  transform: translateY(0);
}
.login-hint .lh-ico {
  font-size: 15px;
  line-height: 1;
}
.login-hint .lh-text {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
/* 身份徽章统一为品牌蓝淡色（与登录按钮/深蓝渐变呼应），身份由图标区分 */
.login-hint.role-superadmin,
.login-hint.role-wanshun,
.login-hint.role-yushengtang,
.login-hint.role-user {
  color: #000;
  border-color: rgba(30, 111, 235, 0.4);
  background: rgba(30, 111, 235, 0.08);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
}

.btn.primary {
  width: 100%;
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  padding: 11px 14px;
  margin-top: 6px;
}

.btn.danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn:hover {
  opacity: 0.9;
}

.error-text {
  color: var(--red);
  font-size: 13px;
  min-height: 20px;
  margin-top: 10px;
}

/* ---- 后台布局：侧边栏 + 顶部栏 + 内容区 ---- */
.admin-body {
  margin: 0;
  background: var(--bg);
  min-height: 100vh;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0b1e33, var(--sidebar-bg));
  color: #fff;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.logo-ico {
  font-size: 22px;
}

.menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 10px;
}

/* hidden 属性优先级高于 .menu-item 的 display:flex（否则受限账号的隐藏菜单会显示出来） */
.menu-item[hidden] {
  display: none !important;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.menu-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.menu-item.active {
  background: var(--blue);
  color: #fff;
}

.menu-ico {
  font-size: 16px;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 12px 22px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.page-title {
  font-size: 16px;
  font-weight: 600;
}

/* 移动端汉堡按钮：桌面端隐藏 */
.menu-toggle {
  display: none;
  padding: 6px 10px;
  font-size: 16px;
  line-height: 1;
}

/* 移动端抽屉遮罩：桌面端隐藏 */
.sidebar-backdrop {
  display: none;
}

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

.user-badge {
  font-size: 13px;
  color: var(--muted);
  background: #f3f6fa;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.content {
  flex: 1;
  padding: 20px 22px;
}

.meta-line {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}

h1 {
  font-size: 23px;
  margin: 0 0 6px;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 4px solid var(--blue);
  letter-spacing: 0;
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

/* ---- 旧版选项卡样式已由侧边栏菜单取代 ---- */

/* ---- feishu monthly stacked bars ---- */
.stack-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 4px;
}

.stack-row {
  display: grid;
  grid-template-columns: 52px 1fr 34px;
  gap: 8px;
  align-items: center;
}

.stack-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}

.stack-track {
  display: flex;
  height: 18px;
  border-radius: 4px;
  overflow: hidden;
  background: #edf1f7;
}

.stack-seg {
  height: 100%;
  min-width: 2px;
}

.seg-year {
  background: #1e6feb;
}

.seg-half {
  background: #f0b429;
}

.seg-month {
  background: #189a62;
}

.seg-none {
  background: #b6becb;
}

.stack-total {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stack-legend {
  margin-top: 12px;
}

.dot.year {
  background: #1e6feb;
}

.dot.half {
  background: #f0b429;
}

.dot.month {
  background: #189a62;
}

.dot.none {
  background: #b6becb;
}

/* ---- feishu monthly column chart ---- */
.col-chart {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 12px 10px 8px;
  height: 230px;
}

.col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.col-value {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.col-track {
  flex: 1;
  width: 100%;
  max-width: 44px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: repeating-linear-gradient(to top, #e6ecf4 0, #e6ecf4 1px, transparent 1px, transparent 25%);
  border-radius: 6px 6px 0 0;
  overflow: hidden;
}

.col-fill {
  width: 100%;
  background: linear-gradient(180deg, #3fa7f7, #1e6feb);
  border-radius: 6px 6px 0 0;
}

.col-fill.top {
  background: linear-gradient(180deg, #f7c66b, #c47a0a);
}

.col-fill.monthly {
  background: linear-gradient(180deg, #3fc58a, #189a62);
}

.col-fill.special {
  background: linear-gradient(180deg, #b6becb, #8d97a8);
}

.col-label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.chart-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.chart-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  background: #eef3f9;
  border-radius: 6px;
  padding: 6px 10px;
}

.period-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.period-tag.year {
  background: #e6f0fd;
  color: #1a5db0;
}

.period-tag.half {
  background: #fff4e0;
  color: #9a5d08;
}

.period-tag.month {
  background: #e7f7ef;
  color: #117a4d;
}

.period-tag.none {
  background: #f3f4f6;
  color: #58637a;
}

/* ---- tx-query 交易查询页 ---- */
.sub-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.sub-tab {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}

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

.sub-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}

.btn.primary-inline {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  min-width: 90px;
}

.api-status {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.api-status.ok {
  background: #e7f7ef;
  color: #117a4d;
}

.api-status.bad {
  background: #fdeeee;
  color: #8f2d28;
}

.toolbar input[type="date"] {
  min-width: 150px;
}

.toolbar input[type="number"] {
  min-width: 130px;
}

.export-link {
  margin-left: 8px;
}

.tx-table {
  min-width: max-content;
}

.tx-table td {
  white-space: nowrap;
}

thead th.num {
  text-align: right;
}

/* ---- feishu detail table ---- */
th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover {
  color: var(--blue);
}

.status-cell {
  white-space: nowrap;
}

.pw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.toolbar .pw-toggle input {
  min-width: auto;
  width: auto;
  margin: 0;
}

.action-message {
  max-width: 420px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
}

.action-message.success {
  background: #e7f7ef;
  border-color: #b9e6cf;
  color: #117a4d;
}

.action-message.error {
  background: #fdeeee;
  border-color: #f3c4c1;
  color: #8f2d28;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(16, 35, 66, 0.06);
}

.card .label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.card .value {
  font-size: 26px;
  font-weight: 600;
}

.card .sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(16, 35, 66, 0.06);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 90px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

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

.bar-track {
  background: #edf1f7;
  border-radius: 6px;
  height: 14px;
  overflow: hidden;
}

.bar-fill {
  background: linear-gradient(90deg, #1e6feb, #3fa7f7);
  height: 100%;
  border-radius: 6px;
  min-width: 2px;
}

.bar-value {
  text-align: right;
  color: var(--muted);
  white-space: nowrap;
}

.bar-value span {
  color: #98a3b3;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.toolbar input,
.toolbar select {
  min-width: 300px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}

.toolbar select {
  min-width: auto;
  background: #fff;
  cursor: pointer;
}

.table-wrap {
  overflow: auto;
  max-height: 640px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1180px;
  background: #fff;
}

thead th {
  position: sticky;
  top: 0;
  background: #eef3f9;
  color: #33415c;
  font-weight: 600;
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  z-index: 2;
}

tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #edf1f6;
  vertical-align: top;
}

tbody tr:hover td {
  background: #f7faff;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.status.online {
  background: #e7f7ef;
  color: #117a4d;
}

.status.offline {
  background: #fdeeee;
  color: #8f2d28;
}

.netcore-reconnect {
  min-width: 64px;
  border-color: #189a62;
  color: #117a4d;
}

.netcore-reconnect:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.cell-status {
  display: inline-block;
  min-width: 84px;
  padding: 4px 6px;
  border-radius: 6px;
  text-align: center;
  font-size: 12px;
  line-height: 1.25;
}

.cell-status strong {
  display: block;
}

.cell-status span {
  display: block;
  color: inherit;
  opacity: 0.85;
}

.cell-status.online {
  background: #e7f7ef;
  color: #117a4d;
}

.cell-status.offline {
  background: #f3f4f6;
  color: #58637a;
}

.cell-status.never {
  background: #fff4e0;
  color: #9a5d08;
}

.cell-status.na {
  background: transparent;
  color: #b6becb;
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  align-items: center;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dot.online {
  background: #189a62;
}

.dot.offline {
  background: #8d97a8;
}

.dot.never {
  background: #c47a0a;
}

.dot.na {
  background: #dde3ec;
}

.count {
  color: var(--muted);
  font-size: 13px;
}

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

.source-count {
  background: #eef3f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.source-count strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 4px;
}

.error-box {
  background: #fdeeee;
  color: #8f2d28;
  border: 1px solid #f3c4c1;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.info-box {
  background: #e6f0fd;
  color: #1a5db0;
  border: 1px solid #b8d4f5;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.empty {
  color: var(--muted);
  padding: 8px 0;
}

.footer {
  color: var(--muted);
  font-size: 12px;
  padding: 12px 4px;
}

/* ---- add-account form ---- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  max-width: 860px;
}

.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}

.field textarea {
  min-height: 70px;
  resize: vertical;
}

.required {
  color: var(--red);
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.check-row {
  display: flex;
  align-items: center;
}

.check-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
}

.check-row input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.form-actions {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.form-actions .btn.primary {
  width: auto;
  min-width: 180px;
}

/* ---- 可搜索账号选择框 ---- */
.ac-search {
  position: relative;
}

.ac-search input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}

.ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 35, 66, 0.12);
  display: none;
}

.ac-dropdown.open {
  display: block;
}

.ac-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  font-size: 14px;
  cursor: pointer;
}

.ac-item:hover {
  background: #eef3f9;
}

.ac-item .ac-name {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

/* 账号管理页：选择面板允许下拉框浮出卡片 */
.section.no-clip {
  overflow: visible;
}

/* ---- add results ---- */
.result-summary {
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 14px;
}

.result-summary.all-ok {
  background: #e7f7ef;
  border: 1px solid #b9e6cf;
  color: #117a4d;
}

.result-summary.partial {
  background: #fef3e2;
  border: 1px solid #fad7a7;
  color: #9a5d08;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.result-item:last-child {
  border-bottom: none;
}

.result-router strong {
  margin-right: 8px;
}

.result-host {
  color: var(--muted);
  font-size: 12px;
}

.result-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.result-error {
  color: var(--red);
  font-size: 12px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- 微信推送中心：科技感面板 ---- */
.wx-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 22px 26px;
  border: 1px solid rgba(63, 167, 247, 0.35);
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 15%, rgba(63, 167, 247, 0.30), transparent 42%),
    radial-gradient(circle at 8% 95%, rgba(24, 154, 98, 0.20), transparent 46%),
    linear-gradient(135deg, #0b1e33 0%, #123c6e 58%, #174a8c 100%);
  box-shadow: 0 8px 28px rgba(11, 30, 51, 0.35);
}

/* 科技感网格纹理 */
.wx-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 78%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 78%);
}

.wx-banner-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.wx-banner-ico {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  box-shadow: 0 0 22px rgba(63, 167, 247, 0.35);
  flex-shrink: 0;
}

.wx-banner-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.wx-banner-sub {
  margin-top: 3px;
  font-size: 12px;
  color: #9db0c7;
  letter-spacing: 0.5px;
}

.wx-banner-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  z-index: 1;
}

.wx-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: #e8f0fa;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.wx-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8d97a8;
  flex-shrink: 0;
}

.wx-dot.ok {
  background: #35d07f;
  animation: wx-pulse 2.2s ease-out infinite;
}

.wx-dot.bad {
  background: #ff6b6b;
}

@keyframes wx-pulse {
  0% { box-shadow: 0 0 0 0 rgba(53, 208, 127, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(53, 208, 127, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 208, 127, 0); }
}

.wx-card {
  border-radius: 12px;
}

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

.wx-h2-ico {
  font-size: 18px;
}

.wx-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.wx-row strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* iOS 风格开关 */
.wx-switch-box {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  user-select: none;
}

.wx-switch-box input {
  display: none;
}

.wx-switch {
  position: relative;
  width: 42px;
  height: 23px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s;
  flex-shrink: 0;
}

.wx-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: left 0.2s;
}

.wx-switch-box input:checked + .wx-switch {
  background: linear-gradient(90deg, #1e6feb, #3fa7f7);
  box-shadow: 0 0 10px rgba(30, 111, 235, 0.45);
}

.wx-switch-box input:checked + .wx-switch::after {
  left: 21px;
}

/* 时间选择盒 */
.wx-time-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid #cfe0f8;
  border-radius: 8px;
  background: #f0f6ff;
  font-size: 13px;
  color: var(--muted);
}

.wx-time-box input[type="time"] {
  border: none;
  background: transparent;
  padding: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  color: var(--text);
  outline: none;
  cursor: pointer;
}

.wx-webhook-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid #cfe0f8;
  border-radius: 8px;
  background: #f0f6ff;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}

.wx-webhook-box input[type="url"] {
  border: 1px solid #cfe0f8;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  flex: 1;
  min-width: 260px;
}

/* 科技感按钮 */
.btn-tech {
  border: none;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #1e6feb, #3fa7f7);
  box-shadow: 0 2px 10px rgba(30, 111, 235, 0.35);
}

.btn-tech:hover {
  opacity: 0.9;
}

.btn-tech.btn-run {
  background: linear-gradient(135deg, #117a4d, #22a06b);
  box-shadow: 0 2px 10px rgba(24, 154, 98, 0.35);
}

.btn-tech-ghost {
  border: 1px dashed #7faeeb;
  border-radius: 8px;
  color: var(--blue);
  background: #f0f6ff;
}

.btn-tech-ghost:hover {
  border-style: solid;
  opacity: 0.9;
}

/* 推送内容药丸选择 */
.wx-chip {
  display: inline-flex;
  cursor: pointer;
  user-select: none;
}

/* hidden 属性必须覆盖 .wx-chip 的 display（否则 label.hidden 不生效，受限账号的无权限项仍会显示） */
.wx-chip[hidden] {
  display: none;
}

.wx-chip input {
  display: none;
}

.wx-chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  transition: all 0.15s;
}

.wx-chip:hover span {
  border-color: #7faeeb;
  color: var(--blue);
}

.wx-chip input:checked + span {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #1e6feb, #3fa7f7);
  box-shadow: 0 2px 8px rgba(30, 111, 235, 0.35);
}

/* 扫描时间槽 */
.time-slots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.time-slot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border: 1px solid #cfe0f8;
  border-radius: 8px;
  background: #f0f6ff;
}

.time-slot input[type="time"] {
  min-width: auto;
  width: 86px;
  padding: 3px 4px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 13px;
  font-family: Consolas, "Courier New", monospace;
  color: var(--blue);
  background: #fff;
}

.btn-mini {
  padding: 3px 8px;
  font-size: 12px;
  border-radius: 5px;
}

/* 日志区块 */
.wx-log-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.wx-log-head strong {
  font-size: 14px;
  font-weight: 600;
}

.wx-log-table thead th {
  background: linear-gradient(180deg, #12334f, #0f2237);
  color: #cfe3f7;
  border-bottom: 1px solid #1d3a5c;
  font-size: 13px;
}

.wx-log-table tbody td {
  font-variant-numeric: tabular-nums;
}

.wx-time-cell {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  white-space: nowrap;
  color: #33415c;
}

.log-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.log-tag.scheduled {
  background: #e6f0fd;
  color: #1a5db0;
  border: 1px solid #b8d4f5;
}

.log-tag.manual {
  background: #e7f7ef;
  color: #117a4d;
  border: 1px solid #b9e6cf;
}

/* 路由器名称标签 */
.log-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
  max-width: 340px;
}

.log-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  line-height: 1.7;
}

.log-chip.down {
  background: #fdeeee;
  color: #8f2d28;
  border: 1px solid #f3c4c1;
}

.log-chip.cloud {
  background: #f3f4f6;
  color: #58637a;
  border: 1px solid #dde3ec;
}

.log-chip.ok {
  background: #e7f7ef;
  color: #117a4d;
  border: 1px solid #b9e6cf;
}

.log-chip.fail {
  background: #fff4e0;
  color: #9a5d08;
  border: 1px solid #fad7a7;
}

.log-count {
  color: var(--text);
  font-size: 13px;
}

.log-empty {
  color: var(--muted);
  font-size: 13px;
}

/* 监测数据迷你统计 */
.wx-mini-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.wx-mini-stats b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.log-details summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 13px;
  user-select: none;
}

.log-preview {
  margin: 8px 0 0;
  padding: 10px;
  background: #f3f6fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 240px;
  overflow: auto;
  font-family: inherit;
}

/* ---- 日志分页条 ---- */
.wx-pager {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.wx-page-num {
  min-width: 32px;
  justify-content: center;
  border-radius: 6px;
}

.wx-page-num.active {
  background: linear-gradient(135deg, #1e6feb, #3fa7f7);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(30, 111, 235, 0.35);
}

.wx-pager .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---- 全局科技感升级（其他菜单页面） ---- */
/* 页面点阵背景 */
.admin-body {
  background: #eef2f7;
  background-image: radial-gradient(rgba(30, 111, 235, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* 侧边栏选中项发光 + 指示条 */
.menu-item {
  position: relative;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.menu-item.active {
  background: linear-gradient(90deg, #1a5db0, #2f8bf0);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30, 111, 235, 0.45);
}

.menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 999px;
  background: #7fd0ff;
  box-shadow: 0 0 8px rgba(127, 208, 255, 0.9);
}

.logo-ico {
  filter: drop-shadow(0 0 8px rgba(63, 167, 247, 0.65));
}

/* 顶栏毛玻璃 + 渐变标题 */
.topbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 14px rgba(16, 35, 66, 0.06);
}

.page-title {
  color: #1f2937;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .page-title {
    background: linear-gradient(90deg, #1a5db0, #3fa7f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

/* KPI 卡片：顶部渐变条 + 悬浮效果 */
.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  transition: transform 0.18s, box-shadow 0.18s;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1e6feb, #3fa7f7);
  opacity: 0.85;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(30, 111, 235, 0.14);
}

.card .value {
  font-variant-numeric: tabular-nums;
}

/* 区块卡片渐变背景 + 渐变标题条 */
.section {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

h2 {
  border-left: 4px solid var(--blue);
}

@supports (border-image: linear-gradient(180deg, red, blue) 1) {
  h2 {
    border-left: 4px solid transparent;
    border-image: linear-gradient(180deg, #1e6feb, #3fa7f7) 1;
  }
}

/* 表格：渐变表头 + 悬浮行 */
thead th {
  background: linear-gradient(180deg, #eef3f9, #e2ebf7);
}

tbody tr {
  transition: background 0.12s;
}

tbody tr:hover td {
  background: #eef4fd;
}

/* 按钮渐变 */
.btn.primary {
  background: linear-gradient(135deg, #1e6feb, #3fa7f7);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(30, 111, 235, 0.3);
}

.netcore-reconnect {
  background: linear-gradient(135deg, #189a62, #2fb47e);
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(24, 154, 98, 0.3);
}

/* 交易查询子选项卡 */
.sub-tab {
  transition: all 0.15s;
}

.sub-tab.active {
  background: linear-gradient(135deg, #1e6feb, #3fa7f7);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(30, 111, 235, 0.35);
}

.api-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  vertical-align: middle;
}

/* 表格滚动条 */
.table-wrap::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #b8cbe4;
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: #8fadd6;
}

.table-wrap::-webkit-scrollbar-track {
  background: #eef3f9;
}

/* 登录卡片发光 */
.login-card {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  box-shadow: 0 16px 48px rgba(8, 24, 48, 0.35), 0 0 42px rgba(63, 167, 247, 0.18);
}

@media (max-width: 900px) {
  .page {
    padding: 12px;
  }

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

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

  .bar-row {
    grid-template-columns: 90px 1fr 70px;
  }

  .toolbar input,
  .toolbar select {
    min-width: 100%;
  }

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

  .col-chart {
    gap: 2px;
    padding: 8px 4px;
  }

  .col-label {
    font-size: 10px;
  }

  /* 小屏侧边栏收缩为图标栏 */
  .sidebar {
    width: 64px;
  }

  .logo {
    justify-content: center;
    padding: 14px 0;
  }

  .logo .menu-text {
    display: none;
  }

  .menu-item {
    justify-content: center;
    padding: 10px 8px;
  }

  .menu-item .menu-text {
    display: none;
  }

  .menu-ico {
    font-size: 18px;
  }

  .content {
    padding: 14px 12px;
  }
}

/* ---- 手机端适配：侧边栏改为抽屉 + 全屏内容 ---- */
@media (max-width: 768px) {
  .topbar {
    padding: 10px 12px;
    gap: 8px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .topbar-actions {
    gap: 8px;
  }

  .action-message {
    max-width: 100%;
  }

  .content {
    padding: 12px 10px;
  }

  .section {
    padding: 14px 12px;
    border-radius: 8px;
  }

  /* 侧边栏收起为左侧抽屉 */
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    width: 240px;
    height: 100%;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: none;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(8, 24, 48, 0.4);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  /* 抽屉内恢复显示菜单文字 */
  .sidebar .logo {
    justify-content: flex-start;
    padding: 18px 20px;
  }

  .sidebar .logo .menu-text,
  .sidebar .menu-item .menu-text {
    display: inline;
  }

  .sidebar .menu-item {
    justify-content: flex-start;
    padding: 10px 14px;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(8, 24, 48, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  /* 输入控件放大字号，避免 iOS 聚焦时页面自动放大 */
  .toolbar input,
  .toolbar select,
  .field input,
  .field select,
  .field textarea,
  .ac-search input {
    font-size: 16px;
  }

  /* 表格容器占满卡片宽度，横向滑动查看多余列 */
  .table-wrap {
    margin: 0 -12px;
    width: auto;
    border-left: none;
    border-right: none;
    border-radius: 0;
    -webkit-overflow-scrolling: touch;
  }

  /* 子选项卡单行横向滚动 */
  .sub-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .sub-tab {
    flex-shrink: 0;
  }

  .form-actions {
    flex-wrap: wrap;
  }

  .result-item {
    flex-wrap: wrap;
  }

  .result-error {
    max-width: 100%;
    white-space: normal;
  }
}

/* ---- 窄屏手机细节优化 ---- */
@media (max-width: 480px) {
  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .card {
    padding: 12px;
  }

  .card .value {
    font-size: 22px;
  }

  .page-title {
    font-size: 15px;
  }

  .user-badge {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .btn {
    padding: 8px 12px;
  }

  .form-actions .btn.primary,
  .form-actions .btn.danger {
    min-width: 0;
    width: 100%;
  }
}


/* ---- 磊科配置下发：三步向导弹窗 ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.modal-close {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
}

.modal-close:hover {
  background: #f2f2f2;
  color: #333;
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: #fafafa;
}

.modal-foot .btn.primary {
  width: auto;
  margin-top: 0;
}

.wiz-tip {
  margin: 0 0 12px;
  color: #666;
  font-size: 13px;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.form-row select,
.form-row input[type="text"],
.form-row input[type="password"] {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
}

.form-row select:focus,
.form-row input[type="text"]:focus,
.form-row input[type="password"]:focus {
  outline: 2px solid rgba(37, 99, 235, 0.25);
  border-color: var(--blue);
}

.form-row input:disabled,
.form-row select:disabled {
  background: #f4f4f4;
  color: #999;
  cursor: not-allowed;
}

.field-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.field-desc {
  font-size: 12px;
  color: #999;
  font-style: normal;
}

.ro-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 400;
  color: #999;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 4px;
}

.switch-row {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.switch-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.readonly-row {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  background: #fafafa;
  border-radius: 6px;
  padding: 8px 10px;
}

.readonly-value {
  font-size: 13px;
  color: #666;
  word-break: break-all;
}

.module-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.module-item:hover {
  border-color: var(--blue);
}

.module-item:has(input:checked) {
  border-color: var(--blue);
  background: rgba(37, 99, 235, 0.06);
}

.module-item input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--blue);
}

.module-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.module-desc {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
  display: block;
}

.danger-tag {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--red);
  border-radius: 3px;
  padding: 1px 6px;
}

.module-dangerous {
  margin-top: 10px;
  border: 1px dashed #e5b3b3;
  border-radius: 6px;
  padding: 8px 10px;
}

.module-dangerous summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
  user-select: none;
}

.module-dangerous .module-item {
  margin-top: 8px;
}

.preview-meta {
  font-size: 13px;
  color: #555;
  background: #f7f9ff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
  line-height: 1.8;
}

.payload-details {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
}

.payload-details summary {
  cursor: pointer;
  font-size: 12px;
  color: #666;
  user-select: none;
}

.payload-details pre {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.5;
  background: #f6f8fa;
  border-radius: 4px;
  padding: 8px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 160px;
  overflow-y: auto;
  color: #444;
}

.diff-title {
  margin: 14px 0 8px;
  font-size: 13px;
  color: var(--red);
}

.diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.diff-table th,
.diff-table td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
}

.diff-table th {
  background: #fafafa;
  font-weight: 600;
}

/* ---- 爱快配置下发：差异列表 ---- */
.error-text { color: #d33; }
.config-item { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
.item-head { padding: 10px 12px; background: #fafafa; border-bottom: 1px solid var(--line); }
.item-head .field-title { font-weight: 600; }
.item-head.plain { font-weight: 600; }
.diff-list { padding: 4px 0; }
.diff-row { display: flex; align-items: baseline; gap: 10px; padding: 6px 12px; font-size: 13px; }
.diff-row + .diff-row { border-top: 1px dashed #eee; }
.diff-dev { min-width: 90px; font-weight: 600; color: #333; white-space: nowrap; }
.diff-status { min-width: 52px; font-size: 12px; text-align: center; border-radius: 3px; padding: 1px 6px; white-space: nowrap; }
.diff-status.change { background: #fff3cd; color: #8a6d1a; }
.diff-status.ok { background: #e8f5e9; color: #2e7d32; }
.diff-status.skip { background: #eee; color: #888; }
.diff-status.err { background: #fdecea; color: #c62828; }
.diff-text { color: #555; }
.preview-warn { margin-top: 12px; padding: 10px 12px; background: #fff8e1; border: 1px solid #ffe082; border-radius: 6px; color: #8a6d1a; font-size: 13px; }
.result-title { margin: 0 0 12px; }
.ikaui-toolbar { margin-bottom: 14px; }

/* ==================== 一键下发配置：现代卡片风向导弹窗（2026-09-01） ==================== */
/* 渐变标题栏 */
.modal-head {
  background: linear-gradient(135deg, #1e6feb 0%, #3b82f6 100%);
  border-bottom: none;
  padding: 15px 18px;
}
.modal-head h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-head-icon { font-size: 18px; }
.modal-close { color: rgba(255, 255, 255, 0.85); }
.modal-close:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

/* 步骤指示条 */
.wiz-steps {
  display: flex;
  padding: 14px 18px 0;
  background: #fff;
}
.wiz-step-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 4px 12px;
  color: #9aa3b2;
  font-size: 12px;
  border-bottom: 2px solid #e8ecf3;
  white-space: nowrap;
}
.wiz-step-item.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.wiz-step-item.done { color: var(--green); }
.wiz-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e8ecf3;
  color: #7a8494;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.wiz-step-item.active .wiz-step-num { background: var(--blue); color: #fff; }
.wiz-step-item.done .wiz-step-num { background: var(--green); color: #fff; }
.wiz-step-item.done .wiz-step-num::before { content: '✓'; }

/* 步骤页头部 */
.wiz-step-head { margin-bottom: 14px; }
.wiz-step-title { font-size: 15px; font-weight: 600; color: var(--text); }
.wiz-step-sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.wiz-step-sub b { color: var(--blue); }

/* 设备组卡片 */
.group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.group-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  background: #fafbfc;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.group-card input { position: absolute; opacity: 0; }
.group-card:hover { border-color: #bcd2f5; background: #f5f9ff; }
.group-card.checked { border-color: var(--blue); background: #f0f6ff; box-shadow: 0 0 0 1px rgba(30, 111, 235, 0.15); }
.group-card-main { flex: 1; min-width: 0; }
.group-card-name { font-size: 13.5px; font-weight: 600; color: var(--text); display: block; }
.group-card-desc { font-size: 11.5px; color: var(--muted); display: block; margin-top: 2px; }
.group-card-side { text-align: right; flex: none; }
.group-card-count { font-size: 11.5px; color: var(--muted); display: block; }
.group-card-count b { color: var(--blue); font-size: 14px; }
.group-card-bar { display: block; width: 56px; height: 4px; background: #e8ecf3; border-radius: 2px; margin-top: 4px; overflow: hidden; margin-left: auto; }
.group-card-bar i { display: block; height: 100%; background: var(--blue); border-radius: 2px; }
.group-card-check {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 2px solid #d3dae6;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.group-card.checked .group-card-check { background: var(--blue); border-color: var(--blue); }

/* 配置项卡片 */
.config-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 12px;
  overflow: hidden;
}
.config-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
}
.config-card-icon { font-size: 15px; }
.config-card-tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--blue);
  background: #e8f1fe;
  border-radius: 10px;
  padding: 2px 8px;
}
.config-card-body { padding: 12px 14px 4px; }
.config-card-note {
  padding: 8px 14px 10px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
  border-top: 1px dashed #edf0f5;
  margin-top: 8px;
}
.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}
.kv-row span { color: var(--muted); }
.kv-row b { color: var(--text); font-weight: 600; text-align: right; }

/* 域名绑定勾选行 */
.config-card-checkrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
}
.config-card-checkrow input { position: absolute; opacity: 0; }
.config-card-checktext { flex: 1; font-size: 13px; color: var(--text); }
.config-card-checktext b { color: var(--blue); }
.config-card-checkbox {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 2px solid #d3dae6;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.config-card-checkrow.checked .config-card-checkbox { background: var(--blue); border-color: var(--blue); }

/* DHCP 地址池自定义输入行 */
.dhcp-range-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 14px 10px;
  font-size: 13px;
}
.dhcp-range-label { color: var(--muted); flex: none; }
.dhcp-range-row input[type="text"] {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--text);
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  transition: border-color 0.15s, background 0.15s;
}
.dhcp-range-row input[type="text"]:focus { outline: none; border-color: var(--blue); background: #fff; }
.dhcp-range-row input[type="text"].invalid { border-color: #e14b4b; background: #fef6f6; }
.dhcp-range-row input[type="text"]:disabled { opacity: 0.55; background: #f1f3f6; cursor: not-allowed; }
.dhcp-range-hint {
  flex: none;
  font-size: 11px;
  color: #e14b4b;
  max-width: 40%;
  text-align: right;
  line-height: 1.4;
}
@media (max-width: 480px) {
  .dhcp-range-row { flex-wrap: wrap; }
  .dhcp-range-hint { max-width: 100%; width: 100%; text-align: left; }
}

/* VPN 服务器单选卡片 */
.vpn-server {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  margin: 6px 0;
  cursor: pointer;
  background: #fafbfc;
  transition: border-color 0.15s, background 0.15s;
}
.vpn-server:hover { border-color: #bcd2f5; }
.vpn-server.checked { border-color: var(--blue); background: #f0f6ff; }
.vpn-server input { position: absolute; opacity: 0; }
.vpn-server-radio {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  border: 2px solid #d3dae6;
  background: #fff;
  position: relative;
}
.vpn-server.checked .vpn-server-radio { border-color: var(--blue); }
.vpn-server.checked .vpn-server-radio::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--blue);
  border-radius: 50%;
}
.vpn-server-name { flex: 1; font-size: 13px; color: var(--text); font-weight: 500; }
.vpn-server-check { color: var(--blue); font-weight: 700; font-size: 13px; }

/* 通用小件 */
.warn { color: #c62828; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.picked-num { color: var(--blue); }
/* 设备预览 summary 内「全选 / 全不选」：胶囊小组件，全选蓝系 / 全不选中性（悬停红系警示清空） */
summary .nc-select-all {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 6px 14px;
  margin-left: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
summary .nc-select-all[data-action="all"] {
  color: var(--blue);
  border-color: #b9d2f7;
  background: #f2f7ff;
}
summary .nc-select-all[data-action="all"]:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 2px 6px rgba(30, 111, 235, 0.3);
}
summary .nc-select-all[data-action="none"]:hover {
  color: var(--red);
  border-color: #ecc2bf;
  background: #fdf4f3;
}
summary .nc-select-all:active { transform: translateY(1px); box-shadow: none; }
summary .nc-select-all:focus-visible { outline: 2px solid rgba(30, 111, 235, 0.35); outline-offset: 1px; }
.nc-device-search {
  margin: 8px 0;
  width: 280px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  box-sizing: border-box;
}
.nc-device-search:focus { outline: 2px solid rgba(37, 99, 235, 0.25); border-color: var(--blue); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---- 手机端适配（≤480px）：底部上滑全屏弹窗 ---- */
@media (max-width: 480px) {
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; max-height: 94vh; border-radius: 16px 16px 0 0; }
  .modal-head { padding: 14px 16px; }
  .modal-body { padding: 14px 14px; }
  .modal-foot { padding: 10px 14px 16px; }
  .modal-foot .btn { flex: 1; justify-content: center; }
  .wiz-steps { padding: 12px 12px 0; }
  .wiz-step-item { font-size: 11px; }
  .group-grid { grid-template-columns: 1fr; }
  .config-card-head { padding: 10px 12px; }
  .config-card-body { padding: 10px 12px 2px; }
  .diff-table { min-width: 560px; }
  .kv-row b.ellipsis { max-width: 180px; }
}
