/* 统一工作台：运行操作集中在一页；列表、表单和记录放进可返回的功能窗口。 */
:root {
  font-family:
    Inter, "Segoe UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: #273730;
  background: #f2f4f0;
  font-synthesis: none;
  --ink: #172d25;
  --muted: #7b8981;
  --line: #e3e8e2;
  --green: #21674f;
  --mint: #c7f3b5;
  --paper: #fff;
  --amber: #ad7124;
  --red: #b5504c;
  --radius: 18px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid #dce3dc;
  background: white;
  color: var(--ink);
  border-radius: 9px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  transition:
    background 0.16s,
    border-color 0.16s,
    transform 0.16s;
}
button:hover:not(:disabled) {
  background: #edf3ea;
  border-color: #b8c9b9;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
button.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
button.primary:hover:not(:disabled) {
  background: #164d3a;
}
button.danger {
  color: var(--red);
  background: #fff7f5;
  border-color: #efdcd7;
}
.quiet {
  border-color: transparent;
  background: transparent;
}
.icon-button {
  width: 34px;
  height: 34px;
  padding: 8px;
  background: transparent;
  border-color: transparent;
}
svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #dce3dc;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #6ca284;
  box-shadow: 0 0 0 3px #418b6510;
}
input[type="checkbox"] {
  width: 15px;
  accent-color: var(--green);
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #697a70;
  min-width: 0;
}
small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h2 {
  font-size: 15px;
  font-weight: 650;
}
h3 {
  font-size: 13px;
}
a {
  color: var(--green);
}
[hidden] {
  display: none !important;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #61a781;
  outline-offset: 3px;
}
/* 固定顶部保留品牌、连接和登录入口，不设置侧栏或页面菜单。 */
.topbar {
  height: 72px;
  padding: 0 38px;
  background: #ffffffeb;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-symbol {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transform: rotate(-4deg);
}
.brand-symbol i {
  width: 4px;
  border-radius: 2px;
  background: var(--mint);
  height: 16px;
}
.brand-symbol i:nth-child(2) {
  height: 23px;
}
.brand-symbol i:nth-child(3) {
  height: 11px;
}
.brand-name {
  font-size: 17px;
  letter-spacing: -0.4px;
  font-weight: 750;
}
.brand-type {
  font-size: 10px;
  color: var(--muted);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  margin-left: 4px;
}
.session-tools {
  display: flex;
  align-items: center;
  gap: 20px;
}
.connection {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--green);
  white-space: nowrap;
}
.connection:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px #26704d0b;
}
.connection.reconnecting {
  color: var(--amber);
}
.account-button {
  padding: 4px 0 4px 12px;
  border: 0;
  border-left: 1px solid var(--line);
  background: none;
  display: flex;
  gap: 9px;
}
.avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  background: #edf2e9;
  color: var(--green);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}
.account-copy {
  text-align: left;
  display: flex;
  flex-direction: column;
  line-height: 1.4;
  max-width: 145px;
}
.account-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.account-copy small {
  font-size: 9px;
}
.workspace {
  max-width: 1640px;
  margin: auto;
  padding: 26px 38px 18px;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 14px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  color: #859387;
  text-transform: uppercase;
  display: block;
  margin-bottom: 5px;
}
.workspace-heading h1 {
  font-size: 27px;
  letter-spacing: -0.8px;
  font-weight: 650;
}
.heading-meta {
  color: #8b978f;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.heading-meta .live-dot {
  width: 5px;
  height: 5px;
  background: #7eaa75;
  border-radius: 50%;
}
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.card {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-title .tile-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #5b7d66;
  background: #fafcf8;
}
.card-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.card .card-footer {
  margin-top: auto;
  padding-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-footer button {
  padding: 7px 11px;
  font-size: 11px;
}
.card-footer small {
  font-size: 10px;
}
.span-8 {
  grid-column: span 8;
}
.span-4 {
  grid-column: span 4;
}
.span-3 {
  grid-column: span 3;
}
.span-12 {
  grid-column: span 12;
}
.hero {
  background: var(--ink);
  color: white;
  position: relative;
  border-color: var(--ink);
  min-height: 226px;
  padding: 27px 30px;
}
.hero:after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -80px;
  top: -120px;
  border: 1px solid #d4f5b811;
  border-radius: 50%;
  box-shadow:
    0 0 0 34px #d4f5b806,
    0 0 0 68px #d4f5b803;
  pointer-events: none;
}
.hero .eyebrow {
  color: #8aa095;
  font-size: 9px;
}
.hero h2 {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -1px;
  margin: 5px 0 10px;
}
.hero small {
  color: #8fa398;
}
.hero-top {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  z-index: 1;
}
.hero .badge {
  background: #cee5ba15;
  color: #d4efbd;
  border: 1px solid #c7f3b522;
}
.hero .badge.bad {
  color: #edc4a4;
  background: #d9a46d12;
  border-color: #d9a46d22;
}
.hero-values {
  display: flex;
  gap: 30px;
  margin-top: 17px;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 68px;
}
.hero-stat strong {
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
}
.hero-stat small {
  font-size: 10px;
}
.hero-bottom {
  margin-top: auto;
  padding-top: 21px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
}
.hero button {
  background: #ffffff0b;
  color: #dde9df;
  border-color: #ffffff20;
}
.hero button.primary {
  background: var(--mint);
  border-color: var(--mint);
  color: #203c27;
}
.hero button:hover:not(:disabled) {
  background: #ffffff1c;
}
.hero button.primary:hover:not(:disabled) {
  background: #b7eaa1;
}
.hero button.danger {
  background: #ad6a4f18;
  color: #e8b99e;
  border-color: #e8b99e28;
}
.hero-note {
  font-size: 10px;
  color: #91aa98;
  margin-left: auto;
}
.resource-card {
  min-height: 226px;
}
.resource-line {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 15px;
  font-size: 11px;
  color: #738078;
  margin: 9px 0;
}
.resource-line strong {
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: #3b5043;
}
.resource-track {
  height: 5px;
  background: #edf1e9;
  border-radius: 8px;
  overflow: hidden;
}
.resource-track i {
  display: block;
  height: 100%;
  background: #779c68;
  border-radius: 8px;
}
.module-card {
  min-height: 225px;
}
.module-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 12px;
}
.module-count strong {
  font-size: 27px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -1px;
}
.module-count span {
  font-size: 10px;
  color: var(--muted);
}
.mini-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 31px;
  border-bottom: 1px solid #f0f3ec;
  font-size: 11px;
}
.mini-line:last-child {
  border-bottom: 0;
}
.mini-line .mini-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}
.mini-line small {
  white-space: nowrap;
  font-size: 9px;
}
.mini-line .badge {
  font-size: 9px;
  padding: 3px 6px;
}
.micro-indicator {
  width: 5px;
  height: 5px;
  display: inline-block;
  background: #90b87b;
  border-radius: 50%;
  margin-right: 7px;
  flex-shrink: 0;
}
.micro-indicator.off {
  background: #c6cec4;
}
.queue-ribbon {
  grid-column: span 12;
  display: flex;
  gap: 22px;
  align-items: center;
  background: #e9eee5;
  border: 1px solid #dfe6d9;
  border-radius: 13px;
  padding: 16px 21px;
}
.queue-ribbon > h2 {
  font-size: 11px;
  white-space: nowrap;
  color: #5d705f;
}
.queue-items {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
  gap: 20px;
}
.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #8c978b;
  border-left: 1px solid #d6dfcf;
  padding-left: 17px;
}
.queue-item strong {
  font-size: 17px;
  font-weight: 500;
  color: #4c614c;
  font-variant-numeric: tabular-nums;
}
.workspace-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: #96a093;
  margin-top: 19px;
  gap: 12px;
}
.workspace-foot span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.workspace-foot svg {
  width: 12px;
  height: 12px;
}
.workspace-foot strong {
  font-weight: 500;
}
.state-label {
  color: #6a8169;
}
.muted {
  color: var(--muted);
}
/* 客户把运算控制与最近批次放在同一屏，参数和管理操作使用弹窗。 */
.client-tools {
  min-height: 226px;
  background: #eef3e6;
  border-color: #dde5d4;
}
.client-tools h2 {
  font-size: 20px;
  font-weight: 550;
  margin-top: 2px;
}
.client-tools .primary {
  width: 100%;
  padding: 12px;
  margin: 18px 0 7px;
}
.client-tools > button:last-child {
  font-size: 10px;
  background: transparent;
  border-color: #d1dcc8;
}
.batch-card {
  min-height: 292px;
}
.batch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px 75px 30px;
  align-items: center;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid #edf1e9;
}
.batch-row:last-child {
  border-bottom: 0;
}
.batch-name {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.batch-name strong {
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.batch-name small {
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.batch-completion {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.batch-completion span {
  font-size: 10px;
  text-align: right;
  color: #87937f;
  font-variant-numeric: tabular-nums;
}
.progress {
  height: 4px;
  width: 100%;
  background: #edf2e8;
  border-radius: 6px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: #82aa70;
}
.tool-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.tool-row {
  width: 100%;
  padding: 13px 0;
  justify-content: flex-start;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #edf1e9;
  background: none;
  border-radius: 0;
}
.tool-row:last-child {
  border-bottom: 0;
}
.tool-row > svg {
  color: #7f9c74;
  margin-right: 8px;
}
.tool-row .tool-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tool-row strong {
  font-size: 12px;
  font-weight: 550;
}
.tool-row small {
  font-size: 10px;
  font-weight: 400;
}
.tool-row .end-arrow {
  width: 13px;
  color: #9aa58f;
}
.mini-capacity {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 130px;
  align-self: center;
}
.capacity-dot {
  height: 24px;
  width: 24px;
  border: 1px solid #b9d4a733;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #abc891;
}
.capacity-dot svg {
  width: 12px;
  height: 12px;
}
.capacity-dot.active {
  background: #d6efc516;
  color: #d1efb9;
}
.empty {
  padding: 24px 8px;
  text-align: center;
  font-size: 12px;
  color: #8e9a8c;
}
.badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 5px;
  background: #f2f0e7;
  color: #8e8050;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 5px;
  line-height: 1.3;
}
.badge.good {
  background: #edf5e9;
  color: #5a8750;
}
.badge.bad {
  background: #fbefea;
  color: #b1745b;
}
.agent-checks {
  display: flex;
  gap: 18px;
  padding-top: 18px;
  margin-top: auto;
  flex-wrap: wrap;
}
.agent-check {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9db3a0;
  font-size: 10px;
}
.agent-check svg {
  width: 13px;
  height: 13px;
  color: #c1e5a2;
}
.agent-check.pending svg {
  color: #caa474;
}
.status-duration {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #a5bbab;
}
.node-channel {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid #e7ece0;
  font-size: 10px;
}
.node-channel strong {
  font-size: 15px;
  font-weight: 500;
  margin-right: 4px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.fact {
  background: #f7f9f4;
  padding: 13px 15px;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.fact strong {
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.fact small {
  font-size: 10px;
}
.event-line {
  font-size: 10px;
  color: #87927e;
  padding: 8px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-records {
  min-height: 285px;
}
.agent-records table th,
.agent-records table td {
  padding: 11px 7px;
}
.agent-records .card-head {
  margin-bottom: 7px;
}
.connection-summary {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.connection-summary .connection {
  margin-bottom: 8px;
}
.details-list {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  font-size: 12px;
}
.details-list strong {
  font-weight: 500;
  overflow-wrap: anywhere;
}
.details-list small {
  font-size: 11px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-actions {
  grid-column: 1/-1;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}
.form-actions .primary {
  min-width: 126px;
}
.login-hint {
  grid-column: 1/-1;
  font-size: 11px;
  color: #8c9987;
}
/* 真实功能窗口：父窗口保留，详情关闭后回到刚才的位置。 */
.work-modal {
  width: min(1100px, calc(100vw - 56px));
  height: min(760px, calc(100dvh - 56px));
  max-width: none;
  max-height: calc(100dvh - 56px);
  padding: 0;
  border: 1px solid #d9e3d3;
  border-radius: 18px;
  color: var(--ink);
  background: #f5f7f2;
  overflow: hidden;
  box-shadow: 0 30px 100px #142f2b35;
}
.work-modal::backdrop {
  background: #14251ed1;
  backdrop-filter: blur(4px);
}
.work-modal[open] {
  display: flex;
  flex-direction: column;
  animation: window-in 0.18s ease-out;
}
.modal-head {
  padding: 21px 25px;
  border-bottom: 1px solid #e2e8dc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 18px 18px 0 0;
  flex-shrink: 0;
}
.modal-heading small {
  font-size: 9px;
  letter-spacing: 1px;
  color: #96a08e;
}
.modal-heading h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
  margin-top: 5px;
  font-weight: 550;
}
.modal-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}
.modal-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  padding: 23px 25px;
  min-height: 0;
}
.modal-body > * {
  flex-shrink: 0;
}
.modal-body > button {
  align-self: flex-start;
}
/* 列表填满窗口的剩余空间，只有数据区滚动，页码始终留在数据区下方。 */
.table-holder,
.modal-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.modal-body > .table-holder,
.modal-body > .modal-list,
.modal-list > .table-holder,
.modal-body > .panel:has(> .table-holder) {
  flex: 1 1 0;
  min-height: 0;
}
.modal-body > .panel:has(> .table-holder) {
  display: flex;
  flex-direction: column;
}
.modal-body .panel > h2,
.modal-body .panel > .toolbar {
  flex-shrink: 0;
}
.modal-body .panel > .table-holder,
.modal-body .table-holder > .table-scroll {
  flex: 1 1 auto;
  min-height: 0;
}
.modal-body .table-holder:has(> .empty) > .table-scroll {
  flex: 0 0 auto;
}
.modal-body .table-holder > .empty {
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 76px;
}
.modal-body .table-scroll th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.modal-body > .panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.modal-body > .panel:last-child {
  margin-bottom: 0;
}
.modal-body .panel > h2 {
  margin-bottom: 17px;
}
.modal-body > label {
  margin-bottom: 15px;
}
.modal-body > button {
  margin: 10px 8px 0 0;
}
.modal-body > pre {
  margin: 17px 0;
}
.modal-body .toolbar {
  margin: 12px 0 18px;
}
.modal-body .facts {
  margin: 15px 0;
}
.modal-status {
  padding: 0 25px 13px;
  font-size: 11px;
  color: var(--green);
  background: #f5f7f2;
}
.modal-status:empty {
  display: none;
}
.table-scroll {
  overflow: auto;
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
  text-align: left;
}
th {
  color: #92a08f;
  font-size: 10px;
  font-weight: 500;
  padding: 12px 11px;
  background: #f7f9f4;
  border-bottom: 1px solid #e5ebdf;
  white-space: nowrap;
}
td {
  padding: 13px 11px;
  border-bottom: 1px solid #edf1e8;
  vertical-align: middle;
  color: #52624f;
  max-width: 310px;
  overflow-wrap: anywhere;
}
td small {
  display: block;
  margin-top: 3px;
  font-size: 9px;
}
.entity-label {
  display: grid;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
}
td .entity-name {
  display: block;
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #305540;
  font-weight: 600;
  line-height: 1.6;
  text-align: left;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entity-account {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8a9682;
  font-variant-numeric: tabular-nums;
}
.table-time {
  display: grid;
  gap: 3px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.table-column-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 7px;
  padding-top: 11px;
  border-top: 1px solid #e5ebdf;
  margin-top: 11px;
  color: #7d8b76;
  font-size: 10px;
}
.table-column-pager button {
  flex-shrink: 0;
  padding: 7px;
  font-size: 10px;
}
.table-column-pager > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .responsive-table table {
    table-layout: fixed;
    min-width: 0;
    width: 100%;
  }
  .responsive-table th,
  .responsive-table td {
    white-space: normal;
    padding: 12px 7px;
    vertical-align: middle;
  }
  .responsive-table th:first-child {
    width: 46%;
  }
  .responsive-table .cell-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .responsive-table .col-actions .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .responsive-table .col-actions button {
    width: 100%;
    white-space: nowrap;
    padding: 7px 4px;
  }
  .responsive-table .entity-name {
    font-size: 12px;
  }
  .responsive-table .entity-account {
    font-size: 9px;
  }
}
td .actions {
  gap: 5px;
}
td button {
  font-size: 10px;
  padding: 6px 9px;
}
td .progress {
  min-width: 70px;
  margin-top: 7px;
}
td .badge {
  font-size: 9px;
}
.toolbar,
.actions,
.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.toolbar {
  margin-bottom: 17px;
}
.toolbar small {
  max-width: 340px;
  line-height: 1.6;
}
.toolbar input[type="file"] {
  font-size: 11px;
  padding: 8px;
  max-width: 300px;
  background: white;
}
.toolbar input[type="number"] {
  width: 100px;
}
.pager {
  justify-content: flex-end;
  flex-shrink: 0;
  min-height: 36px;
  padding-top: 10px;
  border-top: 1px solid #e5ebdf;
  margin-top: 14px;
  font-size: 10px;
  color: #8c9987;
}
.pager button {
  font-size: 10px;
  padding: 7px 10px;
}
.scan-line {
  display: grid;
  grid-template-columns: minmax(100px, 1.3fr) 105px repeat(3, minmax(75px, 1fr));
  gap: 10px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #e4ebdc;
}
.scan-line > span {
  font-size: 11px;
}
.scan-line input,
.scan-line select {
  width: 100%;
  font-size: 11px;
}
.scan-order {
  padding: 15px 0;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.scan-order > span {
  font-size: 11px;
}
.scan-order button {
  padding: 5px 9px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.settings-grid > .panel {
  min-width: 0;
}
.metric {
  padding: 15px;
  background: #f7f9f4;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric strong {
  font-size: 24px;
  font-weight: 500;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
pre {
  font:
    11px/1.8 Consolas,
    "SFMono-Regular",
    monospace;
  background: #edf2e7;
  color: #3f5d3c;
  border: 1px solid #e0e8d9;
  border-radius: 10px;
  padding: 18px;
  max-width: 100%;
  overflow: auto;
  white-space: pre;
  tab-size: 2;
}
.notice {
  padding: 13px 17px;
  background: #faf4e5;
  color: #8a743c;
  border: 1px solid #e9debf;
  border-radius: 9px;
  font-size: 11px;
  line-height: 1.8;
}
.error {
  color: var(--red);
  font-size: 11px;
}
.loading {
  padding: 40px;
  text-align: center;
  color: #87977f;
  font-size: 12px;
}
.publish-banner {
  max-width: 1564px;
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  gap: 13px;
}
.publish-banner span {
  flex: 1;
}
.publish-banner button {
  font-size: 11px;
}
#operationStatus {
  font-size: 10px;
  color: var(--amber);
  position: fixed;
  bottom: 17px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: #fff8e8;
  box-shadow: 0 5px 25px #1b302018;
  border: 1px solid #eee1c0;
  border-radius: 30px;
  padding: 9px 18px;
  max-width: 90vw;
  pointer-events: none;
}
#operationStatus:empty {
  display: none;
}
#toast {
  position: fixed;
  bottom: 22px;
  right: 25px;
  max-width: min(440px, 90vw);
  background: #233b2b;
  color: #f1f6e9;
  padding: 13px 19px;
  font-size: 12px;
  line-height: 1.7;
  border-radius: 10px;
  box-shadow: 0 10px 35px #172c2528;
  z-index: 9999;
}
.spinner {
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
#loadingBanner {
  position: fixed;
  inset: max(14px, env(safe-area-inset-top)) auto auto 50%;
  transform: translateX(-50%);
  margin: 0;
  width: min(620px, calc(100vw - 24px));
  max-width: none;
  padding: 13px 18px 16px;
  border: 1px solid #adc5aa;
  border-radius: 12px;
  background: #f5faf1;
  color: #23523c;
  box-shadow: 0 8px 30px #173d2824;
  pointer-events: none;
  z-index: 10000;
  overflow: hidden;
}
#loadingBanner::backdrop {
  background: transparent;
  pointer-events: none;
}
.loading-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
}
.loading-banner-content .spinner {
  flex: 0 0 13px;
}
#loadingBanner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35%;
  height: 3px;
  background: #518c63;
  border-radius: 3px;
  animation: loading-travel 1.4s ease-in-out infinite;
}
@keyframes loading-travel {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(390%);
  }
}
@media (prefers-reduced-motion: reduce) {
  #loadingBanner::after {
    animation: none;
    width: 100%;
    opacity: 0.65;
  }
  .loading-banner-content .spinner {
    animation: none;
  }
}
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f2f4f0;
}
.login-story {
  background: var(--ink);
  color: #f2f7ea;
  padding: 55px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login-story .brand-name {
  font-size: 17px;
}
.login-story .brand-symbol {
  background: #ffffff0a;
}
.login-story h1 {
  margin-top: auto;
  font-size: clamp(32px, 4vw, 57px);
  font-weight: 450;
  line-height: 1.3;
  letter-spacing: -2px;
}
.login-story h1 em {
  font-style: normal;
  color: #c4e7aa;
}
.login-story p {
  color: #8fa18f;
  font-size: 12px;
  margin: 22px 0 auto;
  max-width: 360px;
  line-height: 1.9;
}
.login-story .login-line {
  font-size: 9px;
  color: #78917b;
  letter-spacing: 2px;
}
.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 40px;
}
.login form {
  width: min(345px, 100%);
}
.login form h2 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
.login form > p {
  font-size: 11px;
  color: #9ba693;
  margin-bottom: 30px;
}
.login form label {
  margin-bottom: 17px;
}
.login form button {
  width: 100%;
  padding: 13px;
  margin-top: 9px;
}
.login form #loginError {
  font-size: 11px;
  color: var(--red);
  margin-top: 12px;
  line-height: 1.7;
}
.login form .login-security {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: #94a08b;
  margin-top: 20px;
}
.login-security svg {
  width: 12px;
  height: 12px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes window-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1150px) and (max-height: 820px) {
  .topbar {
    height: 60px;
  }
  .workspace {
    padding-top: 18px;
  }
  .workspace-heading {
    margin-bottom: 15px;
  }
  .workspace-heading h1 {
    font-size: 24px;
  }
  .hero,
  .resource-card,
  .client-tools {
    min-height: 190px;
  }
  .hero {
    padding: 22px 26px;
  }
  .hero h2 {
    font-size: 27px;
  }
  .hero-values {
    margin-top: 12px;
  }
  .hero-bottom {
    padding-top: 17px;
  }
  .module-card {
    min-height: 205px;
    padding: 18px;
  }
  .module-card .card-head {
    margin-bottom: 13px;
  }
  .queue-ribbon {
    padding: 13px 18px;
  }
  .workspace-foot {
    margin-top: 13px;
  }
  .batch-card,
  .agent-records {
    min-height: 256px;
  }
}
@media (max-width: 1149px) {
  .topbar {
    padding: 0 25px;
  }
  .workspace {
    padding: 24px 25px;
  }
  .span-3 {
    grid-column: span 6;
  }
  .hero {
    padding: 24px;
  }
  .span-8 {
    grid-column: span 7;
  }
  .span-4 {
    grid-column: span 5;
  }
  .module-card {
    min-height: 205px;
  }
  .queue-ribbon {
    gap: 15px;
  }
  .queue-items {
    gap: 12px;
  }
  .queue-item {
    padding-left: 12px;
  }
  .brand-type {
    display: none;
  }
  .batch-row {
    grid-template-columns: minmax(0, 1fr) 80px 64px 26px;
    gap: 10px;
  }
  .hero-note {
    display: none;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 64px;
    padding: 0 19px;
    gap: 10px;
  }
  .brand-name {
    font-size: 14px;
  }
  .brand-lockup {
    gap: 9px;
  }
  .brand-symbol {
    width: 29px;
    height: 29px;
    border-radius: 8px;
  }
  .session-tools {
    gap: 12px;
  }
  .session-tools > .connection {
    font-size: 0;
    gap: 0;
  }
  .session-tools > .connection:before {
    width: 6px;
    height: 6px;
  }
  .account-button {
    padding-left: 11px;
  }
  .account-copy {
    display: none;
  }
  .avatar {
    width: 29px;
    height: 29px;
  }
  .workspace {
    padding: 22px 17px 18px;
  }
  .workspace-heading {
    align-items: flex-end;
    margin-bottom: 17px;
  }
  .workspace-heading h1 {
    font-size: 24px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .heading-meta {
    font-size: 9px;
    max-width: 96px;
    text-align: right;
    line-height: 1.6;
    gap: 5px;
  }
  .workspace-grid {
    gap: 13px;
  }
  .span-8,
  .span-4,
  .span-3 {
    grid-column: span 12;
  }
  .hero {
    min-height: 237px;
    padding: 24px;
  }
  .hero h2 {
    font-size: 30px;
  }
  .hero-values {
    gap: 26px;
    margin-top: 22px;
  }
  .hero-stat strong {
    font-size: 26px;
  }
  .hero-note {
    display: none;
  }
  .resource-card {
    min-height: 180px;
  }
  .card {
    padding: 21px;
    border-radius: 15px;
  }
  .module-card {
    min-height: 200px;
  }
  .queue-ribbon {
    padding: 18px;
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
  .queue-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
  }
  .queue-item {
    padding-left: 10px;
  }
  .workspace-foot {
    flex-wrap: wrap;
    font-size: 8px;
    margin-top: 17px;
    gap: 8px;
  }
  .client-tools {
    min-height: 0;
  }
  .client-tools .primary {
    margin-top: 16px;
  }
  .batch-card {
    min-height: 260px;
  }
  .batch-row {
    grid-template-columns: minmax(0, 1fr) 70px 57px 22px;
    gap: 8px;
    padding: 15px 0;
  }
  .batch-row .badge {
    font-size: 9px;
    padding: 4px 5px;
  }
  .batch-name strong {
    font-size: 11px;
  }
  .batch-name small {
    font-size: 8px;
  }
  .batch-completion span {
    font-size: 9px;
  }
  .work-modal {
    width: calc(100vw - 20px);
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
  }
  .modal-head {
    padding: 16px 17px;
    gap: 8px;
  }
  .modal-heading h2 {
    font-size: 17px;
  }
  .modal-heading small {
    font-size: 8px;
  }
  .modal-actions {
    gap: 3px;
  }
  .modal-actions .quiet {
    font-size: 10px;
    padding: 6px;
  }
  .modal-body {
    padding: 17px 15px;
  }
  .modal-body > .panel {
    padding: 16px 13px;
    margin-bottom: 13px;
  }
  .modal-status {
    padding: 0 17px 12px;
  }
  .toolbar button {
    font-size: 10px;
    padding: 8px 10px;
  }
  .scan-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .scan-line > span {
    grid-column: 1/-1;
  }
  .settings-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .grid {
    grid-template-columns: 1fr 1fr;
  }
  .details-list {
    grid-template-columns: 95px minmax(0, 1fr);
    gap: 13px 10px;
  }
  .form-actions {
    grid-column: 1;
  }
  .agent-checks {
    gap: 13px;
  }
  .agent-check {
    font-size: 9px;
  }
  .agent-records th,
  .agent-records td {
    padding: 10px 6px;
  }
  .agent-records .hide-mobile {
    display: none;
  }
  .facts {
    gap: 10px;
  }
  .fact {
    padding: 12px;
  }
  .fact strong {
    font-size: 11px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 25px 25px 31px;
    min-height: 230px;
  }
  .login-story h1 {
    margin: 34px 0 0;
    font-size: 31px;
    letter-spacing: -1px;
  }
  .login-story p {
    margin: 12px 0 0;
    font-size: 10px;
  }
  .login-line {
    display: none;
  }
  .login-form-wrap {
    padding: 31px 26px 45px;
  }
  .login form {
    max-width: 380px;
  }
  .login form h2 {
    font-size: 23px;
  }
  .login form > p {
    margin-bottom: 22px;
  }
  .publish-banner {
    margin: 12px 17px 0;
    flex-wrap: wrap;
  }
  .publish-banner span {
    flex-basis: 100%;
  }
  #toast {
    right: 15px;
    bottom: 15px;
  }
  .event-line {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.hero .badge.good {
  background: #cee5ba15;
  color: #d4efbd;
  border: 1px solid #c7f3b522;
}
body[data-role="agent"] .agent-records td {
  padding: 8px 7px;
}

.hero h2 {
  line-height: 1.25;
}
.workspace-heading h1 {
  line-height: 1.3;
}
.sort-line {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 9px 0;
}
.sort-line > span {
  min-width: 65px;
  font-size: 12px;
}
.sort-line select {
  width: 100px;
}
.sort-line button {
  padding: 6px 10px;
}
.scan-line[data-mode="fixed"] {
  grid-template-columns: minmax(120px, 1.6fr) 105px minmax(160px, 2fr);
}
.modal-toast {
  margin: 0 25px 16px;
  border: 1px solid #dce6d3;
  background: #edf4e7;
  color: #3d5a37;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 12px;
  line-height: 1.7;
}
@media (max-width: 760px) {
  .scan-line[data-mode="fixed"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .modal-toast {
    margin: 0 15px 15px;
  }
  .mini-line {
    font-size: 12px;
  }
  .modal-actions button {
    min-height: 36px;
  }
}

pre:empty {
  display: none;
}
.confirm-message {
  font-size: 14px;
  line-height: 1.9;
  margin: 8px 0 25px;
}

@media (min-width: 1150px) and (max-height: 820px) {
  .workspace {
    padding: 14px 30px 12px;
  }
  .workspace-heading {
    margin-bottom: 12px;
  }
  .workspace-heading h1 {
    font-size: 23px;
    line-height: 1.2;
  }
  .workspace-grid {
    gap: 12px;
  }
  .hero {
    padding: 20px 24px;
  }
  .hero h2 {
    font-size: 25px;
    margin: 3px 0 6px;
  }
  .hero-values {
    margin-top: 12px;
  }
  .hero-stat strong {
    font-size: 24px;
  }
  .hero-bottom {
    padding-top: 15px;
  }
  .module-card .mini-line {
    min-height: 26px;
  }
  .module-card .module-count {
    margin-bottom: 9px;
  }
  .module-card .module-count strong {
    font-size: 24px;
  }
  .module-card .card-footer {
    padding-top: 12px;
  }
  .module-card .card-head {
    margin-bottom: 12px;
  }
  .queue-ribbon {
    padding: 11px 18px;
  }
  .workspace-foot {
    margin-top: 11px;
  }
  .agent-records .card-head {
    margin-bottom: 7px;
  }
  body[data-role="agent"] .agent-records td {
    padding: 7px;
  }
  .agent-records {
    min-height: 230px;
  }
}

.journal-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.journal-choice {
  padding: 24px 18px;
  justify-content: flex-start;
  gap: 13px;
  background: #f8faf5;
}
.journal-choice svg {
  color: #7c9c6d;
}
@media (max-width: 760px) {
  .journal-choices {
    grid-template-columns: 1fr;
  }
  .journal-choice {
    padding: 19px 16px;
  }
}

:root {
  scrollbar-gutter: stable;
}
.has-window {
  overflow: hidden;
}

.hero-bottom {
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .mini-capacity {
    display: none;
  }
}

/* 客户工作台：并行额度在卡片中设定，批次在原位翻页，API分布与任务并列。 */
.client-hero .hero-values {
  justify-content: flex-start;
  gap: clamp(22px, 5vw, 76px);
}
.parallel-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 35px;
}
.parallel-stepper input {
  width: 54px;
  height: 35px;
  text-align: center;
  font-size: 25px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #f0f5ed;
  border: 1px solid #cee5ba36;
  border-radius: 6px;
  background: #ffffff08;
  padding: 0 2px;
  appearance: textfield;
  -moz-appearance: textfield;
}
.parallel-stepper input::-webkit-inner-spin-button,
.parallel-stepper input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.parallel-stepper input:disabled {
  opacity: 0.65;
  background: transparent;
}
.parallel-stepper .icon-button {
  min-width: 27px;
  width: 27px;
  height: 29px;
  padding: 4px;
}
.parallel-stat small {
  text-align: center;
}
.client-api-access {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}
.client-api-access button {
  padding: 6px 8px;
  font-size: 11px;
  color: #46683a;
}
.client-tools .primary {
  margin-top: 10px;
}
.batch-card .card-head {
  margin-bottom: 8px;
  gap: 8px;
}
.batch-page-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #788770;
  font-size: 11px;
  white-space: nowrap;
}
.batch-page-controls .icon-button {
  min-width: 28px;
  width: 28px;
  height: 28px;
  padding: 5px;
}
.batch-row {
  grid-template-columns: minmax(0, 1fr) 100px 69px 106px;
  gap: 13px;
  padding: 12px 0;
}
.batch-name-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.batch-name-line strong {
  flex: 0 1 auto;
}
.batch-name-line .icon-button {
  flex: 0 0 24px;
  min-width: 24px;
  width: 24px;
  height: 25px;
  padding: 4px;
  color: #819079;
  background: transparent;
  border-color: transparent;
}
.batch-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.batch-actions .icon-button {
  min-width: 32px;
  width: 32px;
  height: 32px;
  padding: 6px;
}
.batch-actions .danger:not(:hover) {
  color: #a57a6c;
  background: #fcf9f6;
  border-color: #ede4dd;
}
.api-usage-content {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}
.api-ring {
  width: clamp(115px, 10vw, 148px);
  height: clamp(115px, 10vw, 148px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.api-ring-center {
  width: 74%;
  height: 74%;
  background: var(--paper, #fff);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.api-ring-center strong {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.api-ring-center small {
  font-size: 10px;
}
.api-usage-legend {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.api-usage-item {
  min-width: 0;
}
.api-usage-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.api-usage-title i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  flex-shrink: 0;
}
.api-usage-title strong {
  font-size: 11px;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.api-usage-title span {
  font-size: 10px;
  color: #7a8772;
  font-variant-numeric: tabular-nums;
}
.api-usage-item > small {
  display: block;
  margin: 5px 0 0 13px;
  font-size: 10px;
}
.parameter-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 15px;
  margin-top: 18px;
}
.parameter-groups .panel {
  min-width: 0;
  margin: 0;
}
.parameter-groups h2 {
  font-size: 13px;
}
.batch-task-table table {
  table-layout: fixed;
  min-width: 0;
}
.batch-task-table th,
.batch-task-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
  text-align: right;
  vertical-align: middle;
}
.batch-task-table th {
  line-height: 1.6;
  text-align: left;
}
.batch-task-table th:first-child,
.batch-task-table td:first-child {
  width: 74px;
  text-align: center;
  color: #7b886f;
}
.batch-task-table td {
  font-variant-numeric: tabular-nums;
}
.matrix-pagers {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 15px;
  margin-top: 19px;
}
.matrix-pager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #788770;
}
.matrix-pager strong {
  font-weight: 500;
  margin-right: 5px;
}
.matrix-pager button {
  padding: 6px 9px;
  font-size: 11px;
}
/* 顺序直接贴近每一行的设定值；移动行不会丢失已输入的值。 */
.scan-rows {
  margin: 20px 0;
  border-top: 1px solid #e6ecdf;
}
.scan-line,
.scan-line[data-mode="fixed"] {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 86px minmax(150px, 1.4fr) 184px;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid #e6ecdf;
  align-items: center;
}
.scan-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.scan-rank {
  font-size: 10px;
  color: #91a185;
  font-variant-numeric: tabular-nums;
}
.scan-label strong {
  font-size: 12px;
  font-weight: 500;
}
.scan-label small {
  display: block;
  font-size: 9px;
  margin-top: 5px;
}
.scan-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.scan-inputs label {
  margin: 0;
  gap: 5px;
  color: #7e8e75;
  font-size: 9px;
}
.scan-line[data-mode="fixed"] .scan-inputs {
  grid-template-columns: minmax(0, 1fr);
}
.scan-line input,
.scan-line select {
  width: 100%;
  min-width: 0;
  font-size: 11px;
  padding: 9px 7px;
}
.scan-order {
  display: flex;
  align-items: center;
  gap: 4px;
}
.scan-order select {
  width: 70px;
  flex: 0 0 70px;
}
.scan-order .icon-button {
  width: 30px;
  min-width: 30px;
  height: 33px;
  padding: 5px;
}
.scan-preview {
  margin-top: 22px;
}
.scan-preview:empty {
  display: none;
}
@media (min-width: 1150px) and (max-height: 820px) {
  .batch-row {
    padding: 9px 0;
  }
  .client-hero .hero-values {
    margin-top: 10px;
  }
  .parallel-stepper input {
    height: 31px;
    font-size: 23px;
  }
  .api-ring {
    width: 125px;
    height: 125px;
  }
}
@media (min-width: 761px) and (max-width: 1149px) {
  body[data-role="client"] .span-8 {
    grid-column: span 8;
  }
  body[data-role="client"] .span-4 {
    grid-column: span 4;
  }
  .batch-row {
    grid-template-columns: minmax(0, 1fr) 66px 60px 91px;
    gap: 8px;
  }
  .batch-actions .icon-button {
    min-width: 27px;
    width: 27px;
    height: 29px;
    padding: 5px;
  }
  .api-usage-content {
    flex-direction: column;
    justify-content: center;
    gap: 16px;
  }
  .api-usage-legend {
    width: 100%;
    gap: 10px;
    flex: 0;
  }
}
@media (max-width: 760px) {
  .client-hero .hero-values {
    gap: 19px;
    justify-content: space-between;
  }
  .client-hero .hero-stat {
    min-width: 0;
  }
  .parallel-stepper {
    gap: 3px;
  }
  .parallel-stepper input {
    width: 41px;
    font-size: 23px;
  }
  .parallel-stepper .icon-button {
    width: 24px;
    min-width: 24px;
    height: 28px;
  }
  .client-hero .hero-bottom {
    gap: 7px;
  }
  .client-hero .hero-bottom > button {
    font-size: 11px;
    padding: 9px 10px;
  }
  .client-hero .hero-top {
    gap: 10px;
  }
  .client-hero .hero-top .badge {
    margin-top: 5px;
    flex-shrink: 0;
  }
  .batch-row {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 9px 10px;
    padding: 13px 0;
  }
  .batch-name {
    grid-column: 1 / -1;
  }
  .batch-row > .badge {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
  }
  .batch-completion {
    grid-column: 2;
    grid-row: 2 / 4;
    align-self: center;
  }
  .batch-actions {
    grid-row: 2;
    grid-column: 1;
  }
  .batch-actions .icon-button {
    width: 32px;
    min-width: 32px;
    height: 30px;
  }
  .batch-name strong {
    font-size: 12px;
  }
  .api-usage-content {
    gap: 17px;
    padding: 10px 0 5px;
  }
  .api-ring {
    width: 120px;
    height: 120px;
  }
  .api-usage-title strong {
    font-size: 11px;
  }
  .parameter-groups {
    grid-template-columns: minmax(0, 1fr);
  }
  .parameter-groups .panel {
    padding: 15px 10px;
  }
  .batch-task-table th:first-child,
  .batch-task-table td:first-child {
    width: 52px;
  }
  .batch-task-table th,
  .batch-task-table td {
    padding: 9px 6px;
  }
  .matrix-pager {
    width: 100%;
    justify-content: space-between;
    gap: 5px;
  }
  .matrix-pager strong {
    width: 100%;
  }
  .scan-line,
  .scan-line[data-mode="fixed"] {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 10px;
  }
  .scan-label {
    grid-column: 1 / -1;
  }
  .scan-order {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

/* 右上角统一流水入口；表格把记录行和信息列分开分页。 */
.journal-menu {
  gap: 6px;
  padding: 8px 11px;
  color: #48653d;
  background: #f6f9f2;
  border-color: #e0e8da;
  white-space: nowrap;
}
.journal-menu svg {
  width: 16px;
  height: 16px;
}
.journal-filter {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.journal-filter label {
  margin: 0;
  min-width: 220px;
  width: min(420px, 70%);
}
.journal-summary {
  color: #7c8a73;
  font-size: 11px;
  padding-bottom: 11px;
  white-space: nowrap;
}
.journal-controls {
  gap: 8px;
  margin: 0 0 15px;
}
.journal-controls button {
  padding: 7px 10px;
  font-size: 11px;
}
.journal-selection {
  color: #74856a;
  font-size: 11px;
  margin-right: auto;
}
.journal-table {
  min-height: 304px;
}
.journal-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.journal-table th,
.journal-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
  line-height: 1.6;
  padding: 11px 10px;
}
.journal-table th:first-child,
.journal-table td:first-child {
  width: 40px;
  text-align: center;
}
.journal-table th:nth-child(2),
.journal-table td:nth-child(2) {
  width: 50px;
  text-align: center;
  color: #8b977f;
}
.journal-table td {
  font-variant-numeric: tabular-nums;
}
.journal-table .loading {
  padding: 90px 15px;
  text-align: center;
}
.journal-table .empty {
  padding: 70px 15px;
}
.journal-boolean {
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
}
.journal-boolean.yes {
  color: #49773a;
  background: #edf5e7;
}
.journal-boolean.no {
  color: #8c796b;
  background: #f6eee6;
}
.journal-cell-detail {
  min-width: 0;
  max-width: 100%;
}
.journal-cell-detail summary {
  cursor: pointer;
  color: #537747;
  font-size: 11px;
  line-height: 1.7;
}
.journal-cell-detail pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  min-width: 0;
  margin-top: 8px;
  padding: 9px;
  font-size: 10px;
  max-height: 230px;
  overflow-y: auto;
}
@media (min-width: 1150px) and (max-height: 820px) {
  .journal-table {
    min-height: 280px;
  }
}
@media (max-width: 760px) {
  .journal-menu {
    gap: 4px;
    padding: 6px 7px;
    font-size: 11px;
  }
  .session-tools {
    gap: 9px;
  }
  .account-button {
    padding-left: 8px;
  }
  .journal-filter {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 11px;
  }
  .journal-filter label {
    min-width: 0;
    width: 100%;
  }
  .journal-summary {
    padding: 0;
    font-size: 10px;
  }
  .journal-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .journal-controls button {
    padding: 8px 6px;
    font-size: 10px;
  }
  .journal-selection {
    justify-self: end;
    align-self: center;
    margin: 0;
  }
  .journal-table {
    min-height: 230px;
  }
  .journal-table th,
  .journal-table td {
    padding: 9px 6px;
    font-size: 10px;
  }
  .journal-table th:first-child,
  .journal-table td:first-child {
    width: 28px;
  }
  .journal-table th:nth-child(2),
  .journal-table td:nth-child(2) {
    width: 34px;
  }
  .journal-cell-detail summary {
    font-size: 10px;
  }
}
@media (max-width: 359px) {
  body:not([data-role="agent"]) .topbar {
    padding-inline: 10px;
    gap: 6px;
  }
  body:not([data-role="agent"]) .brand-name {
    font-size: 12px;
  }
  body:not([data-role="agent"]) .brand-lockup {
    gap: 6px;
  }
  body:not([data-role="agent"]) .session-tools {
    gap: 7px;
  }
}

/* 平台首行：紧凑控制、24小时工作量、服务器资源。 */
.span-6 {
  grid-column: span 6;
}
.platform-control {
  background: #19372a;
  color: #eff5e9;
}
.platform-control .card-title h2 {
  color: #eff5e9;
}
.platform-control .tile-icon {
  background: #d4efbd0b;
  border-color: #a8c79026;
  color: #b6d49b;
}
.platform-control > .primary {
  width: 100%;
  margin: 0 0 16px;
  background: #c5e7ab;
  border-color: #c5e7ab;
  color: #243e21;
}
.control-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}
.control-metrics .hero-stat {
  min-width: 0;
}
.control-metrics .hero-stat strong {
  font-size: 22px;
  letter-spacing: -0.7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.control-metrics .hero-stat small {
  color: #9bb39a;
  font-size: 10px;
}
.workload-card .card-head {
  margin-bottom: 8px;
}
.workload-card .card-head button {
  padding: 6px 9px;
  font-size: 10px;
}
.volume-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.volume-summary strong {
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.9px;
}
.volume-summary small {
  font-size: 10px;
}
.volume-plot {
  position: relative;
  height: 107px;
  padding-left: 22px;
  background: repeating-linear-gradient(
    to top,
    #e6ecdf 0,
    #e6ecdf 1px,
    transparent 1px,
    transparent 35px
  );
}
.volume-peak {
  position: absolute;
  top: 0;
  left: 0;
  color: #9aa58f;
  font-size: 8px;
}
.volume-bars {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  align-items: end;
  gap: 5px;
}
.volume-column {
  height: 100%;
  display: flex;
  align-items: flex-end;
}
.volume-column i {
  display: block;
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(#89ac74, #bdd0aa);
}
.volume-column.current-hour i {
  background: #365f43;
}
.volume-axis {
  display: flex;
  justify-content: space-between;
  padding: 8px 0 0 22px;
  color: #96a18c;
  font-size: 9px;
}
body[data-role="admin"] .resource-line {
  gap: 8px;
}
body[data-role="admin"] .resource-line > span {
  min-width: 26px;
}
body[data-role="admin"] .resource-line > strong {
  min-width: 40px;
  font-size: 11px;
}
.network-rates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border-top: 1px solid #e7ede0;
  padding-top: 13px;
  margin-top: auto;
}
.network-rates > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.network-rates small {
  font-size: 9px;
}
.network-rates strong {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.password-menu {
  padding: 8px 10px;
  font-size: 11px;
  white-space: nowrap;
}
.password-menu svg {
  width: 15px;
  height: 15px;
}
.file-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 14px;
}
.modal-body > .file-panels,
.modal-body > .parameter-groups,
.modal-body > .parameter-host,
.parameter-content,
.parameter-content > .parameter-groups {
  flex: 1 1 0;
  min-height: 0;
}
.parameter-host,
.parameter-content {
  display: flex;
  flex-direction: column;
}
.parameter-host > label,
.parameter-content > .toolbar {
  flex-shrink: 0;
}
.file-panels > .panel,
.parameter-groups > .panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.file-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.file-panel-heading h2 {
  margin: 0;
}
.file-update-table {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
}
.file-update-table > .table-holder {
  flex: 1 1 0;
  min-height: 0;
}
.file-panels > .panel {
  min-width: 0;
  margin: 0;
  padding: 16px 18px;
  background: white;
  border: 1px solid #e1e8da;
  border-radius: 12px;
}
.file-panels > .panel > h2 {
  margin-bottom: 10px;
}
.file-panels table {
  table-layout: fixed;
}
.file-panels th,
.file-panels td {
  white-space: nowrap;
  padding: 9px 8px;
}
.file-panels td .cell-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-panels th:nth-child(2) {
  width: 75px;
}
.file-panels th:nth-child(3) {
  width: 82px;
}
.file-release-time {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: #7c8c70;
  margin: 9px 0 12px;
}
.file-update-table th:last-child,
.file-update-table td:last-child {
  width: 120px;
  text-align: right;
}
.state-timer {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.work-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 17px;
}
.work-filters label {
  margin: 0;
}
.work-filters button {
  height: 40px;
}
.work-query-table table {
  table-layout: fixed;
  min-width: 0;
}
.work-query-table th,
.work-query-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}
.work-query-table th:nth-child(4) {
  width: 76px;
}
.work-query-table th:nth-child(6) {
  width: 82px;
}
.work-id {
  font-family: ui-monospace, monospace;
  font-size: 10px;
}
.work-query-table .loading {
  text-align: center;
  padding: 100px 10px;
}
@media (min-width: 761px) and (max-width: 1149px) {
  body[data-role="admin"] .platform-control,
  body[data-role="admin"] .resource-card {
    grid-column: span 3;
    padding: 17px;
  }
  body[data-role="admin"] .workload-card {
    grid-column: span 6;
    padding: 17px;
  }
  .control-metrics {
    flex-direction: column;
    gap: 10px;
  }
  .network-rates {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .network-rates > div {
    flex-direction: row;
    justify-content: space-between;
  }
}
@media (min-width: 1150px) and (max-height: 820px) {
  .platform-control,
  .workload-card,
  body[data-role="admin"] .resource-card {
    min-height: 224px;
    padding: 18px 20px;
  }
  .volume-plot {
    height: 83px;
  }
  .control-metrics .hero-stat strong {
    font-size: 23px;
  }
  .platform-control > .primary {
    margin-bottom: 13px;
  }
}
@media (max-width: 760px) {
  body[data-role="admin"] .platform-control,
  body[data-role="admin"] .resource-card,
  .span-6 {
    grid-column: span 12;
  }
  .platform-control {
    min-height: 220px;
  }
  .workload-card {
    min-height: 250px;
  }
  .volume-bars {
    gap: 4px;
  }
  .password-menu {
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 6px;
    font-size: 0;
  }
  .password-menu svg {
    flex-shrink: 0;
  }
  .file-panels {
    gap: 13px;
  }
  .modal-body > .parameter-groups,
  .modal-body > .parameter-host,
  .parameter-content > .parameter-groups {
    flex: 0 0 auto;
  }
  .parameter-groups > .panel {
    min-height: 280px;
  }
  .file-panels > .panel {
    padding: 15px 12px;
  }
  .work-filters {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .work-filters label:first-child {
    grid-column: 1/-1;
  }
  .work-filters button {
    grid-column: 1/-1;
  }
  .work-query-table th,
  .work-query-table td {
    padding: 8px 5px;
    font-size: 10px;
  }
  .work-query-table th:nth-child(4) {
    width: 52px;
  }
  .work-query-table th:nth-child(6) {
    width: 62px;
  }
  .work-query-table td button {
    padding: 5px;
    font-size: 9px;
  }
  .work-query-table.compact th:nth-child(2) {
    width: 58px;
  }
  .work-query-table.compact th:nth-child(3) {
    width: 68px;
  }
  .work-compact-summary {
    display: grid;
    gap: 5px;
  }
  .work-compact-summary small {
    font-size: 9px;
    line-height: 1.5;
  }
}
/* 客户独立空间：资源入口并排，批次各自启停；小屏操作按钮允许整齐分组。 */
.tenant-hero {
  padding: 18px 24px;
}
.tenant-hero .hero-values {
  margin: 0;
}
.tenant-hero .hero-top {
  margin-bottom: 10px;
}
.batch-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.batch-actions .icon-button {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 6px;
}
@media (max-width: 760px) {
  .tenant-hero .hero-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .batch-actions {
    display: flex;
    flex-wrap: wrap;
  }
}
/* 桌面客户工作台压缩为三行：状态、资源入口、批次与统计。 */
.tenant-hero {
  min-height: 0;
}
.tenant-resource {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
}
.tenant-resource .card-head,
.tenant-resource .module-count {
  margin: 0;
}
.tenant-resource .module-count span {
  display: none;
}
.tenant-resource .card-footer {
  grid-column: 1 / -1;
  padding-top: 0;
}
@media (min-width: 1150px) {
  .tenant-hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  .tenant-hero .hero-top {
    margin: 0;
    min-width: 220px;
  }
  .tenant-hero .hero-values {
    gap: 38px;
  }
  body[data-role="client"] .batch-row {
    grid-template-columns: minmax(0, 1fr) 85px 63px 170px;
    gap: 10px;
    padding: 10px 0;
  }
  body[data-role="client"] .batch-actions {
    flex-wrap: nowrap;
  }
  body[data-role="client"] .batch-card {
    min-height: 0;
  }
}
@media (min-width: 1150px) and (max-height: 820px) {
  .tenant-hero {
    padding: 14px 20px;
  }
  .tenant-resource {
    padding: 12px 16px;
    gap: 7px;
  }
  body[data-role="client"] .card-head {
    margin-bottom: 10px;
  }
  body[data-role="client"] .tenant-resource .card-head {
    margin: 0;
  }
  body[data-role="client"] .batch-row {
    padding: 8px 0;
  }
}

/* 平台以四个等宽模块联动当前客户，窄屏顺序排列。 */
.platform-switches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 4px 0 12px;
}
.platform-control .card-head {
  margin-bottom: 8px;
}
.platform-switches button {
  white-space: nowrap;
  min-width: 0;
  padding: 6px 4px;
  font-size: 11px;
}
.tenant-search {
  width: 100%;
  min-width: 0;
  border: 1px solid #dce4d6;
  border-radius: 9px;
  padding: 9px 11px;
  background: #f8faf6;
}
.tenant-choices {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 8px 0;
  min-height: 90px;
}
.tenant-choices button {
  justify-content: flex-start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 9px;
}
.tenant-selector .card-footer {
  padding-top: 12px;
}
.tenant-choices .selected {
  background: #eaf1e4;
  color: #365b46;
  border-color: #c7d9ba;
}
.customer-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 11px;
  color: #849178;
}
.selected-tenant-card .mini-line {
  margin: 10px 0;
}
.selected-tenant-card .module-count {
  margin: 8px 0 14px;
}
@media (max-width: 1000px) {
  .tenant-selector,
  .selected-tenant-card {
    grid-column: span 6;
  }
}
@media (max-width: 600px) {
  .tenant-selector,
  .selected-tenant-card {
    grid-column: 1 / -1;
  }
}
@media (min-width: 1150px) {
  body[data-role="admin"] .queue-items {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
  }
  body[data-role="admin"] .selected-tenant-card .mini-line {
    min-height: 27px;
    margin: 3px 0;
  }
  body[data-role="admin"] .selected-tenant-card .module-count {
    margin: 4px 0 10px;
  }
  body[data-role="admin"] .selected-tenant-card .card-head,
  body[data-role="admin"] .tenant-selector .card-head {
    margin-bottom: 12px;
  }
  body[data-role="admin"] .tenant-choices {
    min-height: 76px;
  }
}
@media (min-width: 1150px) and (max-height: 820px) {
  body[data-role="admin"] .selected-tenant-card,
  body[data-role="admin"] .tenant-selector {
    padding: 15px 18px;
  }
  body[data-role="admin"] .selected-tenant-card .mini-line {
    min-height: 22px;
    margin: 2px 0;
  }
  body[data-role="admin"] .tenant-choices {
    min-height: 62px;
  }
  body[data-role="admin"] .tenant-search {
    padding: 6px 9px;
  }
  body[data-role="admin"] .tenant-choices button {
    padding: 3px 6px;
  }
}
@media (min-width: 1150px) and (max-height: 820px) {
  body[data-role="admin"] .tenant-selector .card-head {
    margin-bottom: 4px;
  }
  body[data-role="admin"] .tenant-selector .tenant-search {
    height: 30px;
    min-height: 0;
  }
  body[data-role="admin"] .tenant-choices {
    min-height: 0;
    height: 66px;
    gap: 0;
    margin: 3px 0;
    overflow: hidden;
  }
  body[data-role="admin"] .tenant-choices button {
    min-height: 22px;
    flex-shrink: 0;
    padding: 2px 6px;
    font-size: 11px;
    line-height: 1.3;
  }
  body[data-role="admin"] .tenant-choices button svg {
    width: 14px;
    height: 14px;
  }
  body[data-role="admin"] .tenant-selector .card-footer {
    padding-top: 4px;
  }
  body[data-role="admin"] .customer-stepper {
    height: 26px;
  }
  body[data-role="admin"] .customer-stepper .icon-button {
    width: 26px;
    min-width: 26px;
    height: 26px;
    padding: 4px;
  }
}
