:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --line: #d8e0e7;
  --text: #18212b;
  --muted: #637083;
  --primary: #00a896;
  --primary-dark: #008f83;
  --danger: #bb2f3a;
  --success: #237a57;
  --warning-bg: #fff7df;
  --warning-text: #775600;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

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

a:hover {
  text-decoration: underline;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 28px 17px;
  background: #2f3336;
  color: #fff;
  border-bottom: 8px solid #00a896;
}

.brand {
  font-size: 21px;
  font-weight: 700;
}

.subtle {
  margin-top: 5px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 8px 28px rgba(19, 32, 46, 0.06);
}

.collapsible-panel {
  padding-top: 0;
}

.panel-heading {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -20px;
  padding: 18px 20px;
  border-bottom: 1px solid transparent;
}

.collapsible-panel[data-collapsed="false"] .panel-heading {
  border-bottom-color: var(--line);
  margin-bottom: 18px;
}

.panel-heading h1,
.panel-heading h2 {
  margin: 0;
}

.collapse-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.collapse-button:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.panel-body[hidden] {
  display: none;
}

h1,
h2 {
  margin: 0 0 18px;
  letter-spacing: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 19px;
}

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

.form-grid.single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 420px;
}

.wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--text);
  background: #fff;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.16);
}

textarea {
  resize: vertical;
}

.inline-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch-row input {
  width: 18px;
  height: 18px;
}

.module-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
}

.module-options-title {
  width: 100%;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.module-option {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.module-option input {
  width: 17px;
  height: 17px;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.primary-button {
  color: #fff;
  background: var(--primary);
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

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

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

thead th {
  background: #f8fafc;
  color: #425062;
  font-size: 13px;
  font-weight: 700;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.edit-table input {
  min-width: 110px;
}

.link-list {
  display: grid;
  gap: 12px;
}

.link-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.link-item.selectable {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.item-check {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.item-check input,
.check-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: 0 0 auto;
}

.bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.list-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #bce8f1;
  border-radius: 8px;
  background: #eef8fb;
  color: #255d72;
  font-size: 13px;
}

.list-note span {
  overflow-wrap: anywhere;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.link-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.link-main span {
  color: var(--muted);
  font-size: 13px;
}

.link-main a {
  overflow-wrap: anywhere;
}

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

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

.warning {
  margin: 0;
  border: 1px solid #ffe5a3;
  background: var(--warning-bg);
  color: var(--warning-text);
  border-radius: 6px;
  padding: 10px 12px;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.security-note {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  border: 1px solid #bce8f1;
  background: #eef8fb;
  color: #255d72;
  border-radius: 6px;
  padding: 12px;
}

.security-note span {
  overflow-wrap: anywhere;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 13px;
}

.preview-box {
  display: grid;
  gap: 6px;
  border: 1px solid #bce8f1;
  background: #d9edf7;
  color: #255d72;
  border-radius: 6px;
  padding: 12px;
}

.preview-box span {
  font-size: 13px;
}

.stack {
  display: grid;
  gap: 20px;
}

.batch-result {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.batch-links,
.batch-errors {
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
}

.copy-output {
  display: grid;
  gap: 7px;
}

.copy-output span {
  color: var(--muted);
  font-size: 13px;
}

.copy-output textarea {
  min-height: 110px;
  font-family: Consolas, "Microsoft YaHei", monospace;
}

.link-copy-panel {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.link-copy-panel textarea {
  min-height: 210px;
  white-space: pre;
}

.link-list-section {
  display: grid;
  gap: 12px;
}

.list-section-heading {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.list-section-heading h3 {
  margin: 0;
  font-size: 16px;
}

.link-list-body[hidden] {
  display: none;
}

.copy-modal[hidden] {
  display: none;
}

.copy-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(11, 18, 28, 0.58);
}

.copy-modal-panel {
  width: min(960px, 100%);
  max-height: calc(100dvh - 36px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.copy-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.copy-modal-header div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.copy-modal-header span {
  color: var(--muted);
  font-size: 13px;
}

.copy-modal textarea {
  min-height: 62vh;
  resize: none;
  white-space: pre;
  overflow: auto;
  font-family: Consolas, "Microsoft YaHei", monospace;
}

.copy-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.modal-open {
  overflow: hidden;
}

.ratio-modal-panel {
  width: min(440px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  grid-template-rows: auto auto;
}

.ratio-modal .copy-modal-header span {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ratio-modal form {
  max-width: none;
  margin-top: 6px;
}

.ratio-modal .actions {
  margin-top: 2px;
}

.batch-errors {
  color: var(--danger);
  font-size: 13px;
}

.employee-list {
  margin-top: 16px;
}

.employee-report {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.employee-report span {
  display: block;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.employee-report strong {
  color: var(--text);
  font-size: 14px;
}

.employee-report .employee-report-warn {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.employee-report .employee-report-warn strong {
  color: #9a3412;
}

.audit-list {
  display: grid;
  gap: 10px;
}

.audit-item {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.audit-item.selectable {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.audit-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.audit-item span,
.audit-item small {
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100% - 40px));
  background: #17212c;
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(19, 32, 46, 0.22);
}

.notice-bar {
  background: #17212c;
  color: #d9e4ee;
  padding: 10px 18px;
  text-align: center;
  font-size: 14px;
}

.view-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.hero-band {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 26px;
  color: #fff;
  background: linear-gradient(135deg, #1a475f 0%, #1d6f73 100%);
  border-radius: 8px;
}

.hero-band h1 {
  margin-bottom: 8px;
}

.hero-band p {
  margin: 0;
  color: #d7eef1;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 700;
}

.status-pill.bad {
  background: rgba(255, 231, 180, 0.22);
  color: #fff4cc;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.summary-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.summary-item strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  letter-spacing: 0;
}

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

.section-head h2 {
  margin: 0;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
}

.source-tag {
  display: inline-block;
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
}

.result-table td:last-child {
  font-size: 18px;
}

@media (max-width: 860px) {
  .layout-grid,
  .form-grid,
  .summary-band {
    grid-template-columns: 1fr;
  }

  .hero-band,
  .section-head,
  .link-item,
  .audit-item.selectable {
    display: grid;
  }

  .link-item.selectable,
  .audit-item.selectable {
    grid-template-columns: 1fr;
  }

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

  .bulk-toolbar {
    align-items: stretch;
    display: grid;
  }

  .list-note {
    align-items: stretch;
    display: grid;
  }
}

@media (max-width: 560px) {
  .topbar {
    display: grid;
    padding: 14px 16px 12px;
    border-bottom-width: 7px;
  }

  .brand {
    font-size: 18px;
  }

  .subtle {
    font-size: 13px;
  }

  .shell,
  .view-shell {
    width: min(100% - 20px, 1080px);
    margin-top: 14px;
  }

  .panel,
  .hero-band,
  .summary-item {
    padding: 14px;
  }

  .inline-control {
    grid-template-columns: 1fr;
  }

  .link-copy-panel textarea {
    min-height: 240px;
  }

  .copy-modal {
    padding: 0;
  }

  .copy-modal-panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    padding: 12px;
  }

  .copy-modal textarea {
    min-height: 0;
    height: 100%;
    font-size: 15px;
  }

  .copy-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .copy-modal-actions button,
  .copy-modal-header button {
    min-height: 46px;
  }

  th,
  td {
    padding: 10px;
  }
}

.mirror-page {
  background: #fff;
  color: #333;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.42857143;
  margin: 0;
  overflow-x: hidden;
}

.mirror-page .doc-toper {
  font-size: 12px;
  background: #323436;
  padding: 10px 0;
  color: #eee;
  text-align: center;
}

.mirror-page .layout {
  width: 100%;
}

.mirror-page .doc-intro {
  color: #fff;
  padding: 3px 0;
  background: #0a8;
}

.mirror-page .bg-main {
  background-color: #0a8;
}

.mirror-page .top-link {
  color: #8ff;
  text-decoration: none;
}

.mirror-page .container {
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .mirror-page .container {
    width: 750px;
  }
}

@media (min-width: 992px) {
  .mirror-page .container {
    width: 970px;
  }
}

@media (min-width: 1200px) {
  .mirror-page .container {
    width: 1170px;
  }
}

.mirror-page .container-fluid {
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

.mirror-page .row {
  margin-right: -15px;
  margin-left: -15px;
}

.mirror-page .container::before,
.mirror-page .container::after,
.mirror-page .container-fluid::before,
.mirror-page .container-fluid::after,
.mirror-page .row::before,
.mirror-page .row::after,
.mirror-page .navbar::before,
.mirror-page .navbar::after,
.mirror-page .navbar-header::before,
.mirror-page .navbar-header::after {
  display: table;
  content: " ";
}

.mirror-page .container::after,
.mirror-page .container-fluid::after,
.mirror-page .row::after,
.mirror-page .navbar::after,
.mirror-page .navbar-header::after {
  clear: both;
}

.mirror-page p {
  margin: 0 0 10px;
  line-height: 24px;
}

.mirror-page .navbar {
  position: relative;
  min-height: 50px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.mirror-page .navbar-default {
  background-color: #f8f8f8;
  border-color: #e7e7e7;
}

.mirror-page .navbar-header {
  min-height: 50px;
}

.mirror-page .navbar-brand {
  float: left;
  height: auto;
  min-height: 50px;
  padding: 15px;
  font-size: 18px;
  line-height: 1.45;
  color: #777;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.mirror-page .title-meta {
  text-align: left;
  color: gray;
  font-size: xx-small;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.mirror-page .alert {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
}

.mirror-page .alert-info {
  color: #31708f;
  background-color: #d9edf7;
  border-color: #bce8f1;
}

.mirror-page .alert-danger {
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
}

.mirror-page .alert-terminal {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.mirror-page .table {
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
  border-spacing: 0;
  border-collapse: collapse;
  background-color: transparent;
}

.mirror-page .table > tbody > tr > td,
.mirror-page .table > tbody > tr > th {
  padding: 8px;
  line-height: 1.42857143;
  vertical-align: top;
  border-top: 1px solid #ddd;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.mirror-page .table-bordered,
.mirror-page .table-bordered > tbody > tr > td,
.mirror-page .table-bordered > tbody > tr > th {
  border: 1px solid #ddd;
}

.mirror-page .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f9f9f9;
}

.mirror-page .table-hover > tbody > tr:hover {
  background-color: #f5f5f5;
}

.mirror-page .group-table {
  font-size: 12px;
  table-layout: fixed;
}

.mirror-page .footer-note {
  text-align: left;
  color: #aa275b;
}

.mirror-page .footer-note a {
  color: #0a8;
  text-decoration: none;
}

.mirror-page .summary-count,
.mirror-page .summary-status-open {
  color: green;
  font-weight: 700;
}

.mirror-page .summary-quit {
  color: #d43f0a;
  font-weight: 700;
}

.mirror-page .summary-repeat {
  color: #c41230;
  font-weight: 700;
}

.mirror-page .summary-rate {
  color: #c41230;
  font-weight: 700;
}

.mirror-page .summary-intercept,
.mirror-page .summary-status-closed {
  color: #b22222;
  font-weight: 700;
}

.mirror-page .metric-alert {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.06);
}

.mirror-page .table-cell-center {
  text-align: center;
}

.mirror-page .table-metric-count {
  color: green;
  font-weight: 700;
  text-align: center;
}

.mirror-page .table-metric-repeat {
  color: #c41230;
  font-weight: 700;
  text-align: center;
}

.mirror-page .table-metric-rate {
  color: #c41230;
  font-weight: 700;
  text-align: center;
}

.mirror-page .duplicate-rate-pill {
  display: inline-block;
  min-width: 44px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #c41230;
  background: #fee2e2;
  border: 1px solid #fecaca;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.mirror-page .table-metric-quit {
  color: #d43f0a;
  font-weight: 700;
  text-align: center;
}

.mirror-page .table-metric-intercept {
  color: #b22222;
  font-weight: 700;
  text-align: center;
}

.mirror-page .table-group-start {
  border-left: 2px solid #8b9b9b !important;
}

.mirror-page .table-status-text {
  text-align: center;
  font-weight: 700;
}

.mirror-page .table-header-muted {
  color: #64748b;
  font-weight: 700;
  text-align: center;
}

.mirror-page .table-header-success {
  color: green;
  font-weight: 700;
  text-align: center;
}

.mirror-page .table-header-danger {
  color: #b91c1c;
  font-weight: 700;
  text-align: center;
}

.mirror-page .table-header-warning {
  color: #92400e;
  font-weight: 700;
  text-align: center;
}

.mirror-page .table-update-header {
  text-align: left;
}

.mirror-page .table-error-cell {
  text-align: center;
  color: #c2410c;
  background: #fff7ed;
  font-weight: 700;
}

.mirror-page .time-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  white-space: normal;
}

.mirror-page .time-pill-fresh {
  color: green;
  background: #dcfce7;
}

.mirror-page .time-pill-warn {
  color: #92400e;
  background: #fef3c7;
}

.mirror-page .time-pill-stale {
  color: #b91c1c;
  background: #fee2e2;
}

.mirror-page .apply-tip-trigger {
  position: relative;
  display: inline-block;
  margin-left: 4px;
  width: 12px;
  height: 12px;
  line-height: 12px;
  text-align: center;
  border-radius: 50%;
  color: #999;
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  border: 1px solid #ccc;
  vertical-align: middle;
}

.mirror-page .apply-tip {
  display: none;
  position: absolute;
  left: 18px;
  top: -8px;
  z-index: 99;
  min-width: 140px;
  padding: 6px 8px;
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mirror-page .apply-tip-trigger:hover .apply-tip {
  display: block;
}

.mirror-page .green {
  color: green;
}

.mirror-page .red {
  color: red;
}

@media (max-width: 767px) {
  .mirror-page {
    font-size: 14px;
    min-width: 0;
  }

  .mirror-page .doc-toper {
    padding: 10px 0;
    font-size: 12px;
    line-height: 1.6;
  }

  .mirror-page .container {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .mirror-page .doc-toper .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .mirror-page .row {
    margin-left: 0;
    margin-right: 0;
  }

  .mirror-page .navbar {
    margin: 14px 0 18px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .mirror-page .container-fluid {
    padding-left: 14px;
    padding-right: 14px;
  }

  .mirror-page .navbar-brand {
    float: none;
    display: block;
    padding: 14px;
    font-size: 20px;
    line-height: 1.45;
  }

  .mirror-page .title-meta {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
  }

  .mirror-page .bs-callout {
    padding: 0;
    margin: 0;
  }

  .mirror-page p {
    padding: 0 0 6px;
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    white-space: normal;
  }

  .mirror-page .group-table {
    width: 100%;
    min-width: 0;
    margin-bottom: 18px;
    table-layout: fixed;
    font-size: 12px;
  }

  .mirror-page .table > tbody > tr > td,
  .mirror-page .table > tbody > tr > th {
    padding: 7px 2px;
    line-height: 1.45;
    text-align: center;
    vertical-align: top;
    word-break: break-all;
    overflow-wrap: anywhere;
  }

  .mirror-page .group-table .col-seq {
    width: 4.7%;
  }

  .mirror-page .group-table .col-account {
    width: 9.2%;
  }

  .mirror-page .group-table .col-nick {
    width: 8.7%;
  }

  .mirror-page .table-metric-count {
    width: 5.7%;
  }

  .mirror-page .table-metric-repeat {
    width: 6.5%;
  }

  .mirror-page .table-metric-rate {
    width: 10.7%;
  }

  .mirror-page .table-metric-quit {
    width: 6.2%;
  }

  .mirror-page .table-metric-intercept {
    width: 7.3%;
  }

  .mirror-page .table-header-success,
  .mirror-page .table-header-warning,
  .mirror-page .table-header-danger,
  .mirror-page .table-header-muted,
  .mirror-page .table-group-start:not(.table-metric-repeat):not(.table-metric-quit):not(.table-metric-intercept) {
    width: 5.6%;
  }

  .mirror-page .table-update-header,
  .mirror-page .group-table tr > td:last-child {
    width: 6.6%;
  }

  .mirror-page .table-cell-center,
  .mirror-page .table-status-text {
    text-align: center;
  }

  .mirror-page .time-pill {
    padding: 3px 5px;
    border-radius: 12px;
    line-height: 1.35;
    font-weight: 700;
  }

  .mirror-page .metric-alert {
    padding: 1px 6px;
  }

  .mirror-page .footer-note {
    padding: 0;
    font-size: 18px;
    line-height: 1.7;
  }
}

.mirror-page .batch-query-panel {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f8f8f8;
}

.mirror-page .batch-query-form {
  display: grid;
  gap: 10px;
}

.mirror-page .batch-query-form textarea {
  width: 100%;
  min-height: 160px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
  font-family: inherit;
}

.mirror-page .batch-query-actions {
  display: flex;
  gap: 8px;
}

.mirror-page .batch-query-actions button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #0a8;
  border-radius: 4px;
  color: #fff;
  background: #0a8;
  cursor: pointer;
}

.mirror-page .batch-query-actions button + button {
  color: #333;
  border-color: #ccc;
  background: #fff;
}

.batch-monitor-page {
  min-height: 100vh;
  margin: 0;
  background: #f3f6fb;
  color: #1f2937;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

.batch-monitor-page * {
  box-sizing: border-box;
}

.batch-monitor-page a {
  color: #2563eb;
  text-decoration: none;
}

.batch-monitor-page a:hover {
  text-decoration: underline;
}

.batch-monitor-page button,
.batch-monitor-page textarea {
  font: inherit;
}

.batch-monitor-page .top-notice {
  min-height: 32px;
  padding: 8px 16px;
  background: #111827;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

.batch-monitor-page .page-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 18px auto 52px;
}

.batch-monitor-page .page-header,
.batch-monitor-page .panel,
.batch-monitor-page .table-panel {
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.batch-monitor-page .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
  padding: 22px 26px;
  margin-bottom: 16px;
}

.batch-monitor-page .page-title {
  margin: 0;
  color: #111827;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}

.batch-monitor-page .page-subtitle {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.batch-monitor-page .status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.batch-monitor-page .alert {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
}

.batch-monitor-page .panel {
  padding: 18px;
}

.batch-monitor-page .panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.batch-monitor-page .panel-title {
  margin: 0;
  color: #111827;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
}

.batch-monitor-page .panel-tip {
  margin-top: 7px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.batch-monitor-page .helper-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.batch-monitor-page .helper-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #d9e2ee;
  border-radius: 6px;
  color: #64748b;
  background: #ffffff;
  font-size: 13px;
  white-space: nowrap;
}

.batch-monitor-page .batch-input {
  display: block;
  width: 100%;
  min-height: 154px;
  padding: 16px;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  resize: vertical;
  outline: none;
  color: #111827;
  background: #ffffff;
  font-size: 14px;
  line-height: 1.7;
}

.batch-monitor-page .batch-input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

.batch-monitor-page .extract-box {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  background: #fbfdff;
}

.batch-monitor-page .extract-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}

.batch-monitor-page .extract-inline-label {
  flex: 0 0 auto;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

.batch-monitor-page .extract-inline-content {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-monitor-page .extract-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.batch-monitor-page .extract-tag {
  display: inline-flex;
  align-items: center;
  max-width: 360px;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1e6091;
  background: #f0f8ff;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-monitor-page .extract-toggle {
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.batch-monitor-page .toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  background: #f8fafc;
}

.batch-monitor-page .toolbar-left,
.batch-monitor-page .toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-monitor-page .toolbar-left {
  min-width: 0;
}

.batch-monitor-page .toolbar-hint {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #6b7280;
  background: #ffffff;
  font-size: 13px;
}

.batch-monitor-page .btn {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid #1d75f0;
  border-radius: 7px;
  color: #ffffff;
  background: #1d75f0;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.batch-monitor-page .btn:hover {
  background: #1663cf;
}

.batch-monitor-page .btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.batch-monitor-page .btn-default {
  border-color: #d1d9e6;
  color: #111827;
  background: #ffffff;
}

.batch-monitor-page .btn-default:hover {
  border-color: #b8c4d6;
  background: #f8fafc;
}

.batch-monitor-page .btn-icon {
  display: inline-block;
  margin-right: 6px;
  font-weight: 900;
}

.batch-monitor-page .summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.batch-monitor-page .summary-card {
  min-height: 106px;
  padding: 16px;
  border: 1px solid #dce5f1;
  border-top: 4px solid #2484f6;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

.batch-monitor-page .summary-label {
  color: #64748b;
  font-size: 14px;
  line-height: 1.35;
}

.batch-monitor-page .summary-value {
  margin-top: 8px;
  color: #111827;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
}

.batch-monitor-page .summary-desc {
  margin-top: 9px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.35;
}

.batch-monitor-page .table-panel {
  margin-top: 18px;
  padding: 0;
  overflow: hidden;
}

.batch-monitor-page .table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid #edf1f6;
}

.batch-monitor-page .table-title {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 800;
}

.batch-monitor-page .table-subtitle {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.batch-monitor-page .table-toolbar-note {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #e5eaf1;
  border-radius: 6px;
  color: #64748b;
  background: #ffffff;
  font-size: 13px;
  white-space: nowrap;
}

.batch-monitor-page .table-wrap {
  overflow-x: auto;
}

.batch-monitor-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.batch-monitor-page td,
.batch-monitor-page th {
  padding: 13px 12px;
  border-bottom: 1px solid #edf1f6;
  color: #1f2937;
  text-align: left;
  vertical-align: middle;
}

.batch-monitor-page tr:first-child td {
  color: #374151;
  background: #fbfdff;
  font-weight: 800;
}

.batch-monitor-page .text-center {
  text-align: center;
}

.batch-monitor-page .text-muted,
.batch-monitor-page .muted {
  color: #64748b;
}

.batch-monitor-page .link-cell {
  min-width: 240px;
}

.batch-monitor-page .link-cell .muted {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.batch-monitor-page .danger-text {
  color: #dc2626;
  font-weight: 800;
}

.batch-monitor-page .metric-apply {
  color: #2563eb;
  font-weight: 800;
}

.batch-monitor-page .metric-pass,
.batch-monitor-page .metric-enabled,
.batch-monitor-page .metric-online {
  color: #16a34a;
  font-weight: 800;
}

.batch-monitor-page .metric-disabled,
.batch-monitor-page .metric-offline {
  color: #dc2626;
  font-weight: 800;
}

.batch-monitor-page .duplicate-rate-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #c2410c;
  background: #fff7ed;
  font-weight: 800;
}

.batch-monitor-page .time-fresh {
  color: #16a34a;
  font-weight: 800;
}

.batch-monitor-page .time-normal {
  color: #ca8a04;
  font-weight: 800;
}

.batch-monitor-page .time-stale {
  color: #dc2626;
  font-weight: 800;
}

.batch-monitor-page .batch-row-error td {
  background: #fff7ed;
}

.batch-monitor-page .mobile-list {
  display: none;
}

.batch-monitor-page .footer-note {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #e11d48;
  background: #fff7f7;
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .batch-monitor-page .page-shell {
    width: 100%;
    margin: 0;
    padding: 0 10px 28px;
  }

  .batch-monitor-page .top-notice {
    padding: 9px 12px;
    font-size: 13px;
    text-align: left;
  }

  .batch-monitor-page .page-header {
    display: block;
    margin: 12px 0;
    padding: 20px;
  }

  .batch-monitor-page .page-title {
    font-size: 28px;
  }

  .batch-monitor-page .status-chip {
    width: 100%;
    margin-top: 18px;
  }

  .batch-monitor-page .panel {
    padding: 14px;
  }

  .batch-monitor-page .panel-header {
    display: block;
  }

  .batch-monitor-page .panel-title {
    font-size: 24px;
  }

  .batch-monitor-page .helper-tags {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 16px;
  }

  .batch-monitor-page .helper-tag {
    width: 100%;
    min-height: 38px;
    font-size: 15px;
  }

  .batch-monitor-page .batch-input {
    min-height: 232px;
    font-size: 20px;
    line-height: 1.55;
  }

  .batch-monitor-page .extract-inline {
    align-items: flex-start;
  }

  .batch-monitor-page .extract-inline-content {
    flex: 1;
    min-width: 0;
  }

  .batch-monitor-page .extract-tag {
    max-width: 100%;
    font-size: 16px;
  }

  .batch-monitor-page .toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .batch-monitor-page .toolbar-left,
  .batch-monitor-page .toolbar-right {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .batch-monitor-page .btn,
  .batch-monitor-page .toolbar-hint {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    text-align: center;
    font-size: 16px;
  }

  .batch-monitor-page .summary-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .batch-monitor-page .summary-card {
    min-height: 138px;
    padding: 22px;
  }

  .batch-monitor-page .summary-label {
    font-size: 16px;
  }

  .batch-monitor-page .summary-value {
    font-size: 38px;
  }

  .batch-monitor-page .summary-desc {
    font-size: 15px;
  }

  .batch-monitor-page .table-header {
    padding: 18px;
  }

  .batch-monitor-page .table-wrap {
    display: none;
  }

  .batch-monitor-page .mobile-list {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .batch-monitor-page .mobile-row-card {
    display: block;
    padding: 16px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    color: #111827;
    background: #ffffff;
  }

  .batch-monitor-page .mobile-row-card:hover {
    text-decoration: none;
  }

  .batch-monitor-page .mobile-row-error {
    background: #fff7ed;
  }

  .batch-monitor-page .mobile-row-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
  }

  .batch-monitor-page .mobile-row-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    font-weight: 800;
  }

  .batch-monitor-page .mobile-row-index {
    flex: 0 0 auto;
    color: #2563eb;
  }

  .batch-monitor-page .mobile-row-user {
    margin-top: 5px;
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    word-break: break-all;
  }

  .batch-monitor-page .mobile-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .batch-monitor-page .mobile-metric {
    min-height: 68px;
    padding: 10px;
    border: 1px solid #e5eaf1;
    border-radius: 7px;
    background: #fbfdff;
  }

  .batch-monitor-page .mobile-metric.metric-wide {
    grid-column: 1 / -1;
  }

  .batch-monitor-page .mobile-metric-label {
    color: #64748b;
    font-size: 13px;
  }

  .batch-monitor-page .mobile-metric-value {
    margin-top: 7px;
    color: #111827;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 900;
    word-break: break-word;
  }

  .batch-monitor-page .mobile-row-footer {
    margin-top: 12px;
    color: #64748b;
    font-size: 13px;
  }

  .batch-monitor-page .footer-note {
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .batch-monitor-page .page-title {
    font-size: 26px;
  }

  .batch-monitor-page .batch-input {
    font-size: 18px;
  }

  .batch-monitor-page .mobile-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}
