﻿:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1d2433;
  --muted: #667085;
  --border: #e4e7ec;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --ok: #16a34a;
  --surface: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(145deg, #eff6ff, #f8fafc 55%, #eef2ff);
}

.login-card {
  width: min(420px, calc(100vw - 32px));
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(30, 64, 175, 0.14);
}

.login-brand {
  margin-bottom: 18px;
  color: #fff;
}

.login-card h1 {
  margin: 0 0 20px;
  font-size: 23px;
}

.login-submit {
  width: 100%;
  height: 44px;
  margin-top: 20px;
}

.login-error {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.app-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  height: 100vh;
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 14px;
  overflow: hidden;
  background: #111827;
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 6px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
  font-size: 14px;
  font-weight: 800;
}

.brand strong {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 14px;
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-top: 34px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: auto;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
}

.nav-item:hover {
  background: #1f2937;
}

.nav-item.active {
  border-color: rgba(96, 165, 250, 0.3);
  background: #1e3a5f;
  color: #fff;
}

.earn-more-nav-item:not(.active) {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.earn-more-nav-item:not(.active):hover {
  border-color: #fb923c;
  background: #ffedd5;
  color: #7c2d12;
}

.nav-icon {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.14);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
}

.nav-item strong {
  display: block;
}

.nav-item strong {
  font-size: 13px;
}

.sidebar-user {
  display: grid;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
  padding: 10px;
  border: 1px solid #273449;
  border-radius: 10px;
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
  max-width: 105px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-balance {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #273449;
}

.sidebar-user-balance span {
  color: #94a3b8;
  font-size: 10px;
}

.sidebar-user-balance strong {
  max-width: none;
  color: #fbbf24;
  font-size: 13px;
  text-align: right;
}

.sidebar-user strong {
  font-size: 12px;
}

.sidebar-user small {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 10px;
}

.sidebar-user button {
  height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  background: #334155;
  font-size: 11px;
}

.sidebar-user-actions {
  display: flex;
  gap: 4px;
}

.sidebar-user-actions button {
  flex: 1 1 0;
}

.sidebar-user-actions button {
  padding: 0 7px;
}

.workspace {
  min-width: 0;
  height: 100vh;
  padding: 22px;
  overflow-x: hidden;
  overflow-y: auto;
}

.workspace-view {
  display: none;
  width: 100%;
  min-width: 0;
  gap: 16px;
}

.workspace-view.active {
  display: grid;
}

.earn-more-page {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.earn-more-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-width: 0;
  padding: 2px 2px 0;
}

.earn-more-heading > div > span {
  color: #b45309;
  font-size: 12px;
  font-weight: 800;
}

.earn-more-heading h2 {
  margin: 5px 0 0;
  color: #172b4d;
  font-size: 24px;
  line-height: 1.35;
}

.earn-more-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.earn-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: stretch;
  gap: 14px;
}

.earn-more-card {
  --earn-accent: #2563eb;
  --earn-soft: #eff6ff;
  display: flex;
  min-width: 0;
  height: 100%;
  padding: 18px;
  border: 1px solid #d8e1ec;
  border-top: 4px solid var(--earn-accent);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.06);
  flex-direction: column;
}

.earn-more-card-account {
  --earn-accent: #d97706;
  --earn-soft: #fffbeb;
}

.earn-more-card-team {
  --earn-accent: #be3455;
  --earn-soft: #fff1f2;
}

.earn-more-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.earn-more-number {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: var(--earn-soft);
  color: var(--earn-accent);
  font-size: 13px;
  font-weight: 800;
  place-items: center;
}

.earn-more-card-heading > div {
  min-width: 0;
}

.earn-more-card-heading small {
  display: block;
  color: var(--earn-accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.earn-more-card h3 {
  margin: 3px 0 0;
  color: #1f2937;
  font-size: 17px;
  line-height: 1.45;
}

.earn-more-description {
  min-height: 68px;
  margin: 14px 0 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.7;
}

.earn-more-description b {
  color: var(--earn-accent);
  font-size: 14px;
}

.earn-more-income {
  display: grid;
  gap: 3px;
  margin-top: 13px;
  padding: 10px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.earn-more-income span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.earn-more-income strong {
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.earn-more-steps {
  display: grid;
  gap: 12px;
  margin: 15px 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: earn-more-step;
}

.earn-more-steps li {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 2px;
  padding-left: 31px;
  counter-increment: earn-more-step;
}

.earn-more-steps li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--earn-soft);
  color: var(--earn-accent);
  content: counter(earn-more-step);
  font-size: 11px;
  font-weight: 800;
  place-items: center;
}

.earn-more-steps b {
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
}

.earn-more-steps span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.earn-more-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: auto;
}

.earn-more-actions-multiple {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.earn-more-actions-multiple > button:first-child {
  grid-column: 1 / -1;
}

.earn-more-actions button {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-layout {
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(0, 1.35fr);
  align-items: stretch;
  gap: 16px;
  height: calc(100vh - 44px);
  min-height: 0;
}

.task-left-column {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.task-logs {
  display: flex;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
}

.task-logs .logs {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
}

.daily-task-card h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.daily-task-card button {
  width: 100%;
}

.daily-account-config-field #dailyConfigTaskBtn {
  margin-top: 10px;
  white-space: normal;
}

.daily-interval-field {
  margin-top: 14px;
}

.daily-group-field {
  margin: 14px 0;
}

.task-proxy-retry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.task-proxy-retry-grid .field {
  margin-top: 0;
}

.task-proxy-profile-field {
  margin-top: 14px;
}

.task-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
}

.task-form .field {
  margin-top: 0;
}

.task-account-field {
  flex: 1 1 300px;
}

.task-location-field {
  flex: 0 0 180px;
}

.task-location-combobox,
.task-location-combobox input {
  width: 100%;
}

.task-interval-field {
  flex: 0 0 140px;
}

.run-params {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  margin-top: 14px;
}

.task-primary-params {
  display: grid;
  flex: 1 1 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.task-primary-params .field {
  margin-top: 0;
  min-width: 0;
}

.task-region-status {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
  margin-top: -6px;
}

.task-region-status .hint {
  margin: 0;
}

.task-region-status[data-level="error"] .hint {
  color: #dc2626;
}

.task-region-status button {
  flex: 0 0 auto;
  padding: 3px 8px;
  font-size: 12px;
}

.task-toggle-options {
  display: grid;
  flex: 1 1 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.run-params-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.run-params-heading h2 {
  margin: 0;
  font-size: 16px;
}

.scan-proxy-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

#scanProxyEnabledBtn[aria-pressed="true"] {
  color: #fff;
  border-color: #15803d;
  background: #15803d;
}

.scan-settings-status {
  color: var(--muted);
  font-size: 12px;
}

.scan-settings-status.saving {
  color: #b45309;
}

.scan-settings-status.saved {
  color: #15803d;
}

.scan-settings-status.error {
  color: #dc2626;
}

.run-params .task-location-field,
.run-params .task-interval-field,
.run-params .task-max-unclaimed-scan-field,
.run-params .task-max-red-packet-scan-field {
  margin-top: 0;
}

.run-params .task-location-field {
  flex: 1 1 200px;
}

.run-params .task-interval-field {
  flex: 1 1 160px;
}

.run-params .task-max-unclaimed-scan-field,
.run-params .task-max-red-packet-scan-field {
  flex: 1 1 180px;
}

.task-thirty-cent-option,
.task-auto-detect-option {
  display: inline-flex;
  flex: 1 1 240px;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 18px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.task-camera-preview-option {
  border-color: #b9d5cc;
  background: #f6fbf9;
}

body.camera-preview-open {
  overflow: hidden;
}

.camera-preview-modal-card {
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.camera-preview-header {
  align-items: flex-start;
}

.camera-preview-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.camera-preview-body {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 190px;
  gap: 18px;
  margin-top: 16px;
}

.camera-preview-scene {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 894 / 1206;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #dde3e7;
}

.camera-preview-scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.camera-preview-placeholder {
  position: absolute;
  left: 34.34%;
  top: 45.61%;
  width: 18.23%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: translateY(3px) rotate(-2.6deg);
  border: 2px solid #c2410c;
  background: rgba(255, 255, 255, 0.82);
}

.camera-preview-placeholder::before,
.camera-preview-placeholder::after {
  content: "";
  position: absolute;
  background: #c2410c;
}

.camera-preview-placeholder::before {
  width: 1px;
  height: 100%;
}

.camera-preview-placeholder::after {
  width: 100%;
  height: 1px;
}

.camera-preview-placeholder span {
  position: relative;
  z-index: 1;
  padding: 5px 7px;
  color: #7c2d12;
  background: rgba(255, 247, 237, 0.94);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.camera-preview-metrics {
  margin: 0;
}

.camera-preview-metrics div {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.camera-preview-metrics dt {
  color: var(--muted);
  font-size: 12px;
}

.camera-preview-metrics dd {
  margin: 5px 0 0;
  color: #1e3a5f;
  font: 600 13px ui-monospace, Consolas, monospace;
}

.camera-preview-boundary {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: #9a3412;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 700px) {
  .camera-preview-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .camera-preview-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .camera-preview-metrics div {
    min-width: 0;
  }

  .camera-preview-metrics dd {
    overflow-wrap: anywhere;
  }
}

.task-auto-detect-option {
  flex: 1 1 320px;
  border-color: #bfd0ef;
  background: #f7faff;
}

.task-toggle-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.task-toggle-copy strong {
  color: #1e3a5f;
  font-size: 13px;
}

.task-toggle-copy small {
  color: var(--muted);
  font-size: 12px;
}

.task-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  cursor: pointer;
}

.task-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.task-toggle-track {
  display: block;
  width: 44px;
  height: 26px;
  border: 1px solid #b7c4d5;
  border-radius: 13px;
  background: #d9e1ea;
  transition: background 160ms ease, border-color 160ms ease;
}

.task-toggle-track::after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24);
  transition: transform 160ms ease;
}

.task-toggle input:checked + .task-toggle-track {
  border-color: #15803d;
  background: #16a34a;
}

.task-toggle input:checked + .task-toggle-track::after {
  transform: translateX(18px);
}

.task-toggle input:focus-visible + .task-toggle-track {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.auto-detect-task-type-confirm-modal-card {
  width: min(430px, calc(100vw - 28px));
}

.auto-detect-task-type-confirm-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.start-button {
  height: 42px;
}

.yyb-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.yyb-page-heading h2,
.logs-title h2 {
  margin: 0;
}

.yyb-page-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.yyb-header-proxy-select {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(300px, 34vw);
}

.yyb-header-proxy-select > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.yyb-header-proxy-combobox {
  flex: 1 1 auto;
  min-width: 0;
  z-index: 3;
}

.yyb-header-proxy-combobox input {
  width: 100%;
}

.yyb-login-policy-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.yyb-login-policy-field label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.yyb-login-policy-field input {
  width: 64px;
}

.yyb-login-proxy-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(380px, 42vw);
}

.yyb-login-proxy-field label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.yyb-login-proxy-combobox {
  flex: 1 1 auto;
  min-width: 0;
}

.yyb-login-proxy-combobox input {
  width: 100%;
}

.qr-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.qr-page-heading h2 {
  margin: 0;
}

.qr-page-heading > div:first-child p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

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

.qr-add-confirm-modal-card {
  width: min(500px, calc(100vw - 36px));
}

.qr-add-confirm-message {
  margin-top: 18px;
  color: var(--text);
  line-height: 1.7;
}

.qr-add-preview {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7faff;
  color: #52657d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.qr-empty {
  padding: 18px;
  text-align: center;
}

.yyb-login-modal-card {
  width: min(480px, calc(100vw - 36px));
}

.yyb-import-config-modal-card {
  width: min(640px, calc(100vw - 36px));
}

.yyb-import-config-fields {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.yyb-import-config-fields .field {
  margin-top: 0;
}

.yyb-import-code-input {
  min-height: 150px;
  resize: none;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.yyb-import-code-meta {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
}

.yyb-import-config-actions {
  justify-content: flex-end;
  margin-top: 6px;
}

.profile-modal-card {
  width: min(460px, calc(100vw - 36px));
}

.fee-rates-modal-card {
  width: min(400px, calc(100vw - 36px));
}

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

.fee-rates-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.fee-rates-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid #dbe7f5;
  border-radius: 6px;
  background: #f8fbff;
}

.fee-rates-list dt {
  color: #475467;
  font-size: 14px;
}

.fee-rates-list dd {
  margin: 0;
  color: #175cd3;
  font-size: 20px;
  font-weight: 700;
}

.fee-rates-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.user-editor-modal-card {
  width: min(760px, calc(100vw - 36px));
}

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

.user-editor-actions {
  justify-content: flex-end;
}

.transfer-owner-modal-card {
  width: min(500px, calc(100vw - 36px));
}

.yyb-group-modal-card {
  width: min(760px, calc(100vw - 36px));
}

.yyb-account-edit-modal-card {
  width: min(500px, calc(100vw - 36px));
}

.yyb-group-modal-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.yyb-group-management-scope {
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.yyb-group-page-card {
  min-width: 0;
}

.yyb-group-page-description {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.yyb-group-page-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.yyb-group-owner-filter,
.yyb-list-search {
  display: flex;
  align-items: center;
  gap: 9px;
}

.yyb-group-page-filter label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.yyb-group-page-filter .owner-user-combobox {
  width: min(280px, 100%);
}

.yyb-list-search input {
  width: clamp(220px, 24vw, 320px);
}

.balance-card-filter {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
}

.balance-card-filter label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.balance-card-filter .owner-user-combobox {
  width: min(280px, 100%);
}

.balance-card-statistics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
}

.balance-card-statistics > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  min-width: 0;
  padding: 13px 15px;
  border-right: 1px solid var(--border);
}

.balance-card-statistics > div:last-child {
  border-right: 0;
}

.balance-card-statistics span {
  grid-column: 1 / -1;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.balance-card-statistics strong,
.balance-card-statistics b {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #1d63a8;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.balance-card-statistics b {
  color: #344054;
  font-size: 14px;
}

.balance-card-statistics small {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.balance-card-pagination,
.yyb-group-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.balance-card-pagination label,
.yyb-group-pagination label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.balance-card-pagination select,
.yyb-group-pagination select {
  width: auto;
  min-width: 68px;
}

.yyb-group-page-card .yyb-group-list {
  max-height: calc(100dvh - 300px);
}

.yyb-group-list {
  max-height: min(48vh, 360px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.yyb-group-list-empty {
  margin: 0;
  padding: 30px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.yyb-group-table {
  width: 100%;
  min-width: 1910px;
  border-collapse: collapse;
  table-layout: fixed;
}

.yyb-group-table th,
.yyb-group-table td {
  padding: 11px 12px;
  border-top: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

.yyb-group-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-top: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.yyb-group-table td:nth-child(1) {
  font-weight: 700;
}

.yyb-group-table th:nth-child(1) { width: 230px; }
.yyb-group-table th:nth-child(2) { width: 90px; }
.yyb-group-table th:nth-child(3) { width: 130px; }
.yyb-group-table th:nth-child(4) { width: 120px; }
.yyb-group-table th:nth-child(5),
.yyb-group-table th:nth-child(6),
.yyb-group-table th:nth-child(7),
.yyb-group-table th:nth-child(8),
.yyb-group-table th:nth-child(9),
.yyb-group-table th:nth-child(10),
.yyb-group-table th:nth-child(11),
.yyb-group-table th:nth-child(12) { width: 110px; }
.yyb-group-table th:nth-child(13) { width: 160px; }
.yyb-group-table th:nth-child(14) { width: 300px; }

.yyb-group-table th:last-child,
.yyb-group-table td:last-child {
  position: sticky;
  right: 0;
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  z-index: 2;
  background: #fff;
  box-shadow: -8px 0 12px -12px rgba(15, 23, 42, 0.55);
}

.yyb-group-table th:last-child {
  z-index: 3;
  background: var(--surface);
}

.yyb-group-table .yyb-status {
  display: inline-flex;
}

.yyb-finance-mode {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #566273;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.yyb-finance-mode.custom {
  background: #e8f2ff;
  color: #1763aa;
}

.yyb-group-table .table-action-group {
  display: grid;
  grid-template-columns: repeat(5, minmax(54px, 1fr));
  gap: 6px;
  min-width: 276px;
}

.yyb-group-table .table-action-group button {
  min-width: 0;
  padding: 0 8px;
  white-space: nowrap;
}

.yyb-group-form-title {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 14px;
}

.yyb-group-advanced-settings {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
}

.yyb-group-advanced-settings > summary {
  min-height: 44px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 22px;
  cursor: pointer;
  user-select: none;
}

.yyb-group-advanced-settings[open] > summary {
  border-bottom: 1px solid var(--border);
}

.yyb-group-advanced-settings-body {
  padding: 14px;
}

.yyb-group-finance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.yyb-group-finance-grid .field {
  margin-bottom: 0;
}

.modal-card.finance-template-editor-modal-card {
  width: min(960px, calc(100vw - 36px));
  padding: 0;
  overflow: hidden;
}

.finance-template-editor-modal-card > .modal-header {
  min-height: 66px;
  padding: 0 22px;
  border-bottom: 1px solid var(--border);
}

.finance-template-editor-form {
  max-height: calc(100vh - 116px);
  overflow: auto;
  padding: 20px 22px 0;
}

.finance-template-presets {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px solid #f0d6a2;
  border-radius: 6px;
  background: #fffaf0;
  color: #7a5a22;
  font-size: 13px;
  font-weight: 700;
}

.finance-template-preset {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  gap: 6px;
  padding: 0 13px;
  border: 2px solid #e0a62f;
  border-radius: 6px;
  background: #fff;
  color: #9a6500;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(180, 120, 20, 0.12);
}

.finance-template-preset:hover {
  border-color: #c88916;
  background: #fff7df;
  box-shadow: 0 3px 8px rgba(180, 120, 20, 0.2);
}

.finance-template-preset small {
  padding: 2px 6px;
  border-radius: 4px;
  background: #d97706;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.finance-template-preset.finance-template-preset-growth {
  border-color: #79a7e8;
  color: #1d5eaa;
  box-shadow: 0 2px 5px rgba(49, 111, 197, 0.12);
}

.finance-template-preset.finance-template-preset-growth:hover {
  border-color: #397cc8;
  background: #eef6ff;
  box-shadow: 0 3px 8px rgba(49, 111, 197, 0.2);
}

.finance-template-preset.finance-template-preset-growth small {
  background: #2870c5;
}

.finance-template-preset.finance-template-preset-growth small:first-of-type {
  background: #16803c;
}

.finance-template-name-field {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
}

.finance-template-name-field label {
  color: #3f4857;
  font-size: 13px;
  font-weight: 700;
}

.finance-template-name-field input,
.finance-template-name-field select {
  height: 42px;
  font-weight: 600;
}

.finance-template-recharge-field {
  margin-top: -6px;
}

.finance-template-recharge-field > div {
  min-width: 0;
}

.finance-template-recharge-field small {
  display: block;
  margin-top: 6px;
  color: #7c8798;
  font-size: 11px;
  line-height: 1.55;
}

.finance-rule-editor {
  border-top: 1px solid #dce2ea;
  border-bottom: 1px solid #dce2ea;
}

.finance-rule-columns,
.finance-rule-row {
  display: grid;
  grid-template-columns: 112px minmax(140px, 0.8fr) minmax(140px, 0.8fr) minmax(360px, 1.6fr);
  align-items: center;
  gap: 14px;
}

.finance-rule-columns {
  min-height: 38px;
  padding: 0 14px;
  background: #f5f7fa;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.finance-rule-row {
  min-height: 112px;
  padding: 18px 14px;
  border-top: 1px solid #e8ecf1;
}

.finance-rule-task {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.finance-rule-task strong {
  overflow-wrap: anywhere;
  color: #293241;
  font-size: 14px;
}

.finance-rule-mark {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
}

.finance-rule-mark.dadongpeng {
  background: #e7f0ff;
  color: #245fc6;
}

.finance-rule-mark.bushui {
  background: #e8f7ef;
  color: #147a4b;
}

.finance-rule-mark.xiaodongpeng {
  background: #fff1df;
  color: #a55013;
}

.finance-rule-field {
  min-width: 0;
  margin: 0;
}

.finance-rule-field label {
  display: none;
}

.finance-percent-input {
  position: relative;
}

.finance-percent-input input {
  height: 42px;
  padding-right: 38px;
  font-variant-numeric: tabular-nums;
}

.finance-percent-input > span {
  position: absolute;
  top: 50%;
  right: 13px;
  color: #7c8798;
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-50%);
  pointer-events: none;
}

.finance-rule-costs {
  display: grid;
  align-content: center;
  gap: 8px;
}

.finance-master-switch {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #dfe4ea;
  border-radius: 5px;
  background: #f4f6f8;
  color: #253047;
  font-size: 13px;
}

.finance-cost-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.finance-cost-options .finance-switch {
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid #edf0f3;
  border-radius: 5px;
  background: #fafbfc;
}

.finance-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 42px;
  gap: 8px;
  color: #465164;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.finance-switch > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.finance-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.finance-switch-track {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 18px;
  border: 1px solid #c9d0da;
  border-radius: 9px;
  background: #dfe4ea;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.finance-switch-track::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24);
  content: "";
  transition: transform 0.15s ease;
}

.finance-switch input:checked + .finance-switch-track {
  border-color: #28735a;
  background: #28735a;
}

.finance-switch input:checked + .finance-switch-track::after {
  transform: translateX(14px);
}

.finance-switch input:focus-visible + .finance-switch-track {
  outline: 2px solid #8eb8e5;
  outline-offset: 2px;
}

.finance-switch input:disabled ~ span {
  opacity: 0.55;
  cursor: not-allowed;
}

.finance-template-editor-form > .profile-error {
  min-height: 20px;
  margin: 12px 0 0;
}

.finance-template-editor-actions {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  margin: 0 -22px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.finance-template-editor-actions button {
  min-width: 92px;
}

@media (max-width: 900px) {
  .finance-rule-columns {
    display: none;
  }

  .finance-rule-row {
    grid-template-columns: 112px repeat(2, minmax(0, 1fr));
    min-height: 0;
  }

  .finance-rule-field label {
    display: block;
    margin-bottom: 7px;
    color: #667085;
    font-size: 11px;
    font-weight: 700;
  }

  .finance-rule-costs {
    grid-column: 2 / -1;
  }
}

@media (max-width: 620px) {
  .modal-card.finance-template-editor-modal-card {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
  }

  .finance-template-editor-modal-card > .modal-header {
    min-height: 58px;
    padding: 0 14px;
  }

  .finance-template-editor-form {
    max-height: calc(100vh - 80px);
    padding: 16px 14px 0;
  }

  .finance-template-name-field {
    grid-template-columns: 1fr;
    gap: 7px;
    padding-bottom: 16px;
  }

  .finance-rule-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
    padding: 16px 4px;
  }

  .finance-rule-task,
  .finance-rule-costs {
    grid-column: 1 / -1;
  }

  .finance-rule-costs {
    gap: 6px;
  }

  .finance-cost-options {
    grid-template-columns: 1fr;
  }

  .finance-switch {
    align-items: flex-start;
    min-height: 36px;
    line-height: 20px;
  }

  .finance-template-editor-actions {
    margin: 0 -14px;
    padding: 12px 14px;
  }

  .finance-template-editor-actions button {
    flex: 1 1 0;
  }
}

.yyb-group-portal-form-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.yyb-group-portal-form-section h4 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 14px;
}

.yyb-group-portal-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.yyb-group-money {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.yyb-group-owner-balance-hint {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.yyb-group-owner-balance-hint.is-loading {
  color: var(--muted);
}

.yyb-group-owner-balance-hint.is-error {
  color: var(--danger);
}

.yyb-group-finance-summary small { display: block; white-space: nowrap; line-height: 1.6; }

.yyb-group-money.negative {
  color: var(--danger);
  font-weight: 700;
}

.yyb-group-add-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.yyb-account-archive-modal-card {
  width: min(560px, calc(100vw - 36px));
}

.yyb-account-archive-scope {
  margin: 16px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.yyb-account-archive-security {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #f6f8fb;
  color: #58677a;
  font-size: 13px;
  line-height: 1.65;
}

.yyb-account-archive-preview {
  min-height: 20px;
  margin: 12px 0 0;
  color: #52657d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.yyb-account-archive-modal-card input[type="file"] {
  width: 100%;
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
}

.yyb-account-edit-actions {
  justify-content: flex-end;
}

.transfer-owner-field {
  margin-top: 18px;
}

.transfer-owner-actions {
  justify-content: flex-end;
}

.proxy-profile-modal-card {
  width: min(760px, calc(100vw - 36px));
}

.proxy-profile-modal-actions {
  justify-content: flex-end;
}

.profile-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: #dc2626;
  font-size: 13px;
}

.profile-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.yyb-login-modal-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.yyb-login-qr-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.proxy-basic-grid,
.proxy-regex-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.proxy-basic-grid {
  grid-template-columns: minmax(180px, 240px);
}

.proxy-regex-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.proxy-basic-grid .field,
.proxy-regex-grid .field {
  margin-top: 0;
}

.proxy-regex-input {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.yyb-login-qr-panel {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.yyb-current-proxy-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  width: 100%;
  min-height: 46px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
  line-height: 1.45;
}

.yyb-qr-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 260px;
  height: 260px;
  padding: 8px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fff;
}

.yyb-qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.yyb-qr-frame img:not([src]) {
  display: none;
}

.yyb-qr-placeholder .yyb-qr-placeholder-content {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.yyb-qr-placeholder span {
  color: var(--muted);
  font-size: 13px;
}

.yyb-qr-fetch-button {
  min-width: 128px;
  min-height: 38px;
  border: 1px solid var(--primary);
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.yyb-qr-fetch-button:hover:not(:disabled) {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.yyb-qr-fetch-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.yyb-login-status {
  width: 100%;
  margin-top: 12px;
  text-align: center;
}

.yyb-login-status strong {
  font-size: 18px;
}

.proxy-provider-input {
  min-height: 84px;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.5;
}

.proxy-test-result {
  min-height: 20px;
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.5;
}

.proxy-test-result[data-level="success"] {
  color: #15803d;
}

.proxy-test-result[data-level="error"] {
  color: #dc2626;
}

.proxy-test-result[data-level="info"] {
  color: #1d4ed8;
}

.proxy-profiles-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.mobile-relays-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 18px;
}

.mobile-relay-pairing-panel {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}

.mobile-relay-mode-toolbar {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}

.mobile-relay-mode-toolbar .is-selected {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.mobile-relay-pairing-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.mobile-relay-pairing-title {
  display: block;
  color: #1d4ed8;
}

.mobile-relay-pairing-heading .hint {
  margin: 4px 0 0;
}

.mobile-relay-pairing-state {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-relay-pairing-state[data-level="success"] {
  background: #dcfce7;
  color: #15803d;
}

.mobile-relay-pairing-state[data-level="warning"] {
  background: #fef3c7;
  color: #a16207;
}

.mobile-relay-credential-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-relay-credential {
  min-width: 0;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.78);
}

.mobile-relay-link-credential {
  grid-column: 1 / -1;
}

.mobile-relay-credential > label {
  display: block;
  margin-bottom: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.mobile-relay-credential-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.mobile-relay-credential-line input {
  min-width: 0;
  flex: 1 1 auto;
  height: 34px;
  padding: 6px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.mobile-relay-credential-line button {
  flex: 0 0 auto;
}

.mobile-relay-advanced-config {
  margin-top: 10px;
}

.mobile-relay-advanced-config summary {
  cursor: pointer;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.mobile-relay-advanced-config textarea {
  min-height: 150px;
  margin: 8px 0 0;
  font-size: 12px;
}

.mobile-relay-pairing-actions {
  margin-top: 10px;
}

.scan-mobile-settings-hint {
  grid-column: 1 / -1;
  margin: -4px 0 0;
}

.mobile-relay-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.mobile-relay-status.online {
  background: #dcfce7;
  color: #15803d;
}

.mobile-relay-status.revoked {
  background: #fee2e2;
  color: #b91c1c;
}

.mobile-relay-manual-rotate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mobile-relay-manual-rotate input {
  width: 68px;
  min-width: 68px;
  height: 32px;
  padding: 4px 7px;
}

#proxyProfileMobileFields {
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #f8fbff;
}

.proxy-profiles-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.proxy-profiles-heading h2 {
  margin: 0;
  font-size: 18px;
}

.system-pool-helper {
  margin: 5px 0 0;
  color: #6b7788;
  font-size: 12px;
  line-height: 1.45;
}

.system-pool-membership {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #d9e2ee;
  border-radius: 999px;
  background: #f5f7fa;
  color: #66758a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.system-pool-membership.joined {
  border-color: #c7dbf4;
  background: #edf5ff;
  color: #2463a6;
}

.system-pool-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}

.workspace .system-pool-action,
.workspace .system-pool-action:hover {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #b8d2ef;
  border-radius: 7px;
  background: #edf5ff;
  color: #1d63a8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.workspace .system-pool-action:hover {
  border-color: #8eb8e5;
  background: #e3effc;
}

.workspace .system-pool-action.is-member,
.workspace .system-pool-action.is-member:hover {
  border-color: #d7dee8;
  background: #f6f8fb;
  color: #64748b;
}

.proxy-profiles-table-wrap {
  width: 100%;
  max-width: 100%;
  margin-top: 14px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.proxy-profiles-table {
  width: 100%;
  min-width: 1500px;
  border-collapse: collapse;
  table-layout: fixed;
}

.proxy-profiles-table th,
.proxy-profiles-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

.proxy-profiles-table th {
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.proxy-profiles-table tr:last-child td {
  border-bottom: 0;
}

.proxy-profiles-table th:last-child,
.proxy-profiles-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -8px 0 12px -12px rgba(15, 23, 42, 0.55);
}

.proxy-profiles-table th:last-child {
  z-index: 3;
  background: var(--surface);
}

.proxy-profiles-table th:nth-child(1) { width: 180px; }
.proxy-profiles-table th:nth-child(2) { width: 90px; }
.proxy-profiles-table th:nth-child(3) { width: auto; }
.proxy-profiles-table th:nth-child(4) { width: 100px; }
.proxy-profiles-table th:nth-child(5) { width: 100px; }
.proxy-profiles-table th:nth-child(6) { width: 180px; }
.proxy-profiles-table th:nth-child(7) { width: 280px; }
.proxy-profiles-table th:nth-child(8) { width: 180px; }
.proxy-profiles-table th:nth-child(9) { width: 300px; }

.proxy-profile-scheme {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.proxy-profile-url {
  display: block;
  overflow: hidden;
  color: #475467;
  font-family: Consolas, "Courier New", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proxy-profile-count {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.proxy-profile-count.success {
  color: #15803d;
}

.proxy-profile-count.failure {
  color: #dc2626;
}

.proxy-profile-result-button {
  display: block;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  text-align: left;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proxy-profile-result-button:hover {
  background: transparent;
  color: #1e40af;
}

.yyb-account-table-wrap {
  width: 100%;
  max-width: 100%;
  margin-top: 14px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.yyb-account-overview {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid var(--border);
  border-bottom: 0;
  background: var(--surface);
}

.yyb-account-overview > div {
  min-width: 0;
  padding: 13px 16px;
  border-right: 1px solid var(--border);
}

.yyb-account-overview > div:last-child {
  border-right: 0;
}

.yyb-account-overview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.yyb-account-overview strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.yyb-account-overview > div:nth-child(2) strong { color: #15803d; }
.yyb-account-overview > div:nth-child(7) strong { color: #b42318; }

.yyb-task-account-management {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.yyb-task-account-management-heading,
.yyb-task-account-panel-heading,
.yyb-task-account-actions,
.yyb-task-suspension-actions {
  display: flex;
  align-items: center;
}

.yyb-task-account-management-heading {
  justify-content: space-between;
  gap: 16px;
}

.yyb-task-account-management-heading h3,
.yyb-task-account-management-heading p {
  margin: 0;
}

.yyb-task-account-management-heading h3 {
  color: #1f2937;
  font-size: 16px;
}

.yyb-task-account-management-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.yyb-task-account-management-heading > label {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.yyb-task-account-management-heading select {
  min-width: 180px;
}

.yyb-task-account-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.yyb-task-account-panel {
  min-width: 0;
  padding: 13px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
}

.yyb-task-account-panel-heading {
  justify-content: space-between;
  gap: 10px;
}

.yyb-task-account-panel-heading > div:first-child {
  min-width: 0;
}

.yyb-task-account-panel-heading strong,
.yyb-task-account-panel-heading small {
  display: block;
}

.yyb-task-account-panel-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.yyb-task-account-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.yyb-task-account-checklist {
  display: grid;
  gap: 6px;
  max-height: 320px;
  margin-top: 10px;
  padding-right: 3px;
  overflow-y: auto;
}

.yyb-task-account-team-group {
  overflow: hidden;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  background: #fff;
}

.yyb-task-account-team-heading {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 3px 10px;
  background: #f7f9fc;
}

.yyb-task-team-checkbox {
  width: 17px;
  height: 17px;
  margin: 0;
  cursor: pointer;
}

.yyb-task-team-checkbox:disabled {
  cursor: not-allowed;
}

button.yyb-task-account-team-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 9px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 36px;
  padding: 5px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #27364a;
  text-align: left;
  cursor: pointer;
}

button.yyb-task-account-team-toggle:hover {
  background: transparent;
  box-shadow: none;
  color: #155eef;
}

.yyb-task-account-team-name {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yyb-task-account-team-summary {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.yyb-task-account-team-chevron {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 120ms ease;
}

.yyb-task-account-team-toggle[aria-expanded="true"] .yyb-task-account-team-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.yyb-task-account-team-members {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid #e7ebf2;
}

.yyb-task-account-team-members[hidden] {
  display: none;
}

.yyb-task-account-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  padding: 7px 9px;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  background: #fbfcfe;
}

.yyb-task-account-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
}

.yyb-task-account-identity {
  min-width: 0;
}

.yyb-task-account-identity strong,
.yyb-task-account-identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yyb-task-account-identity strong {
  color: #27364a;
  font-size: 13px;
}

.yyb-task-account-identity small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.yyb-task-account-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.yyb-task-account-state.suspended {
  background: #fee2e2;
  color: #b42318;
}

.yyb-task-suspension-actions {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.yyb-task-account-empty {
  margin: 0;
  padding: 22px 12px;
  border: 1px dashed #cfd8e6;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1100px) {
  .yyb-task-account-management-grid {
    grid-template-columns: 1fr;
  }
}

.yyb-group-overview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.yyb-group-overview > div:nth-child(3) strong { color: var(--primary); }
.yyb-group-overview > div:nth-child(4) strong { color: #b42318; }

.yyb-abnormal-overview > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.yyb-abnormal-overview button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #667085;
}

.yyb-abnormal-overview button:hover:not(:disabled) {
  border-color: #d7deea;
  background: #f3f6fa;
  color: #344054;
}

.yyb-abnormal-overview button i {
  position: relative;
  display: block;
  width: 15px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 50% / 60%;
}

.yyb-abnormal-overview button i::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
}

.yyb-abnormal-overview button.active {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.yyb-account-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.yyb-account-table {
  width: 100%;
  min-width: 2200px;
  border-collapse: collapse;
  table-layout: fixed;
}

.yyb-account-table th,
.yyb-account-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

.yyb-account-table th {
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.yyb-account-table tr:last-child td {
  border-bottom: 0;
}

.yyb-account-table th:nth-child(1) { width: 44px; }
.yyb-account-table th:nth-child(2) { width: 190px; }
.yyb-account-table th:nth-child(3) { width: 90px; }
.yyb-account-table th:nth-child(4) { width: 130px; }
.yyb-account-table th:nth-child(5) { width: 140px; }
.yyb-account-table th:nth-child(6) { width: 160px; }
.yyb-account-table th:nth-child(7) { width: 120px; }
.yyb-account-table th:nth-child(8) { width: 260px; }
.yyb-account-table th:nth-child(9) { width: 110px; }
.yyb-account-table th:nth-child(10) { width: 150px; }
.yyb-account-table th:nth-child(11) { width: 160px; }
.yyb-account-table th:nth-child(12) { width: 160px; }
.yyb-account-table th:nth-child(13) { width: 150px; }
.yyb-account-table th:nth-child(14) { width: 190px; }
.yyb-account-table th:nth-child(15) { width: 150px; }

.yyb-account-table th:last-child,
.yyb-account-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -8px 0 12px -12px rgba(15, 23, 42, 0.55);
}

.yyb-account-money {
  color: #15803d;
  font-weight: 750;
  white-space: nowrap;
}

.yyb-account-table th:last-child {
  z-index: 3;
  background: var(--surface);
}

.yyb-select-column {
  text-align: center !important;
}

.yyb-select-column input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.yyb-account-name {
  display: flex;
  align-items: center;
  gap: 9px;
}

.yyb-account-title {
  min-width: 0;
}

.yyb-account-title strong,
.yyb-account-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yyb-account-title small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.yyb-group-badge {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yyb-account-remark {
  overflow: hidden;
  color: #475467;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yyb-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}

.yyb-avatar img,
.yyb-avatar span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.yyb-avatar img {
  display: block;
  object-fit: cover;
  background: #f2f4f7;
}

.yyb-avatar span {
  display: grid;
  place-items: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
}

.yyb-openid {
  overflow: hidden;
  color: #475467;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Consolas, "Courier New", monospace;
}

.yyb-uin,
.yyb-last-checked {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yyb-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.yyb-status.alive {
  background: #dcfce7;
  color: #15803d;
}

.yyb-status.expired {
  background: #fee2e2;
  color: #b91c1c;
}

.yyb-status.unknown {
  background: #f2f4f7;
  color: #667085;
}

.yyb-status.disabled {
  background: #fef3c7;
  color: #92400e;
}

.yyb-disabled-reason {
  display: block;
  max-width: 180px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yyb-account-actions {
  white-space: nowrap;
}

.yyb-account-actions button + button {
  margin-left: 5px;
}

.table-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.table-action-group button + button {
  margin-left: 0;
}

.yyb-batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #f8fbff;
}

.yyb-batch-toolbar strong {
  color: #1d4ed8;
  font-size: 13px;
}

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

.batch-admin-action {
  align-items: center;
  justify-content: center;
}

.yyb-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.yyb-pagination label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.yyb-pagination select {
  width: auto;
  min-width: 64px;
  padding: 6px 8px;
}

.yyb-call-form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.7fr) minmax(130px, 0.55fr) minmax(240px, 1fr);
  gap: 14px;
}

.yyb-call-form-grid .field {
  margin-top: 0;
}

.yyb-call-payload {
  min-height: 180px;
}

.yyb-call-actions {
  gap: 10px;
}

.yyb-call-result {
  min-height: 300px;
}

.statistics-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

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

.statistics-summary-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.statistics-summary-group h2 {
  margin: 0 0 12px;
  color: #344054;
  font-size: 15px;
}

.statistics-summary-grid {
  flex: 1;
  display: grid;
  grid-auto-rows: minmax(84px, 1fr);
  gap: 12px;
}

.statistics-today-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.statistics-total-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.statistics-finance-toggle {
  width: 100%;
  min-height: 36px;
  margin-top: 12px;
  border-style: dashed;
  color: var(--primary);
}

.statistics-finance-toggle[aria-expanded="true"] {
  border-style: solid;
  background: #eef4ff;
}

.statistics-finance-grid {
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.statistics-team-finance-card {
  display: grid;
  gap: 12px;
}

.statistics-team-finance-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.statistics-team-finance-heading h2 {
  margin: 0;
  color: #344054;
  font-size: 16px;
}

.statistics-team-finance-heading .hint {
  margin: 6px 0 0;
}

.statistics-team-finance-filters {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.statistics-team-finance-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.statistics-team-finance-filters select {
  min-width: 140px;
}

.statistics-team-finance-scope {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.statistics-team-finance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.statistics-qr-cost-tile {
  grid-column: 1 / -1;
}

.statistics-tile {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
}

.statistics-tile span,
.statistics-tile strong {
  display: block;
}

.statistics-tile span {
  color: var(--muted);
  font-size: 12px;
}

.statistics-tile strong {
  margin-top: 8px;
  color: #111827;
  font-size: clamp(18px, 1.5vw, 23px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.statistics-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
  gap: 12px;
}

.statistics-filters > button {
  min-width: 92px;
}

.statistics-filters .field {
  margin-top: 0;
}

.statistics-filters .admin-only-block {
  flex-direction: column;
}

.statistics-filter-combobox {
  width: 100%;
}

.statistics-records-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.statistics-batch-toolbar {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #f8fbff;
}

.statistics-batch-toolbar strong {
  color: #1d4ed8;
  font-size: 13px;
}

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

.statistics-table-wrap {
  width: 100%;
  max-width: 100%;
  margin-top: 16px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.statistics-table {
  width: 100%;
  min-width: 1780px;
  border-collapse: collapse;
}

.statistics-select-column {
  width: 44px;
  text-align: center !important;
}

.statistics-select-column input {
  width: 16px;
  height: 16px;
}

.statistics-table th,
.statistics-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}

.statistics-account-identity {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 220px;
}

.statistics-account-identity > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-account-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.statistics-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.statistics-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}

.statistics-table tr:last-child td {
  border-bottom: 0;
}

.statistics-result {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-weight: 700;
  white-space: nowrap;
}

.statistics-result.coupon {
  background: #dcfce7;
  color: #166534;
}

.statistics-result.red-packet {
  background: #ffe4e6;
  color: #be123c;
}

.statistics-result.thanks {
  background: #f3f4f6;
  color: #4b5563;
}

.statistics-result.invalid,
.statistics-result.failed {
  background: #fee2e2;
  color: #b91c1c;
}

.statistics-message,
.statistics-qr-link {
  display: block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-error {
  display: block;
  margin-top: 3px;
  color: var(--danger);
}

.statistics-pagination,
.users-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.statistics-pagination label,
.users-pagination label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.statistics-pagination select,
.users-pagination select {
  width: auto;
  min-width: 68px;
}

.users-table-wrap {
  width: 100%;
  max-width: 100%;
  margin-top: 18px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.users-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.users-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.users-heading h2 {
  margin: 0;
  font-size: 18px;
}

.users-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.users-search-input {
  width: 280px;
  max-width: 40vw;
}

.users-batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #f8fbff;
}

.users-batch-toolbar strong {
  color: #1d4ed8;
  font-size: 13px;
}

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

.users-table {
  width: 100%;
  min-width: 2440px;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

.users-table th {
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.users-table tr:last-child td {
  border-bottom: 0;
}

.users-table th:nth-child(1) { width: 50px; }
.users-table th:nth-child(2) { width: 180px; }
.users-table th:nth-child(3) { width: 100px; }
.users-table th:nth-child(4) { width: 90px; }
.users-table th:nth-child(5) { width: 90px; }
.users-table th:nth-child(6) { width: 90px; }
.users-table th:nth-child(7) { width: 90px; }
.users-table th:nth-child(8) { width: 100px; }
.users-table th:nth-child(9) { width: 100px; }
.users-table th:nth-child(10) { width: 90px; }
.users-table th:nth-child(11) { width: 100px; }
.users-table th:nth-child(12) { width: 90px; }
.users-table th:nth-child(13) { width: 220px; }
.users-table th:nth-child(14) { width: 130px; }
.users-table th:nth-child(15) { width: 140px; }
.users-table th:nth-child(16) { width: 180px; }
.users-table th:nth-child(17) { width: 230px; }

.users-select-column {
  text-align: center !important;
}

.users-select-column input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.users-table th:last-child,
.users-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -8px 0 12px -12px rgba(15, 23, 42, 0.55);
}

.users-table th:last-child {
  z-index: 3;
  background: var(--surface);
}

.user-remark {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-money,
.user-rate {
  white-space: nowrap;
}

.user-account-metric {
  color: #344054;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.user-account-metric.available { color: #15803d; }
.user-account-metric.today { color: #1d63a8; }
.user-account-metric.added { color: #6d4c00; }
.user-account-metric.abnormal { color: #b42318; }

.self-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 10px;
}

.user-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.user-status.active {
  background: #dcfce7;
  color: #15803d;
}

.user-status.disabled {
  background: #fee2e2;
  color: #b91c1c;
}

.user-membership {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef1f5;
  color: #5b6472;
  font-size: 12px;
  font-weight: 700;
}

.user-membership.plus {
  background: #e8f0ff;
  color: #245fc6;
}

.user-actions {
  white-space: nowrap;
}

.user-actions button + button {
  margin-left: 5px;
}

.card,
.modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

.header,
.modal-header,
.logs-title,
.toolbar,
.row {
  display: flex;
  align-items: center;
}

.header,
.modal-header,
.logs-title {
  justify-content: space-between;
}

.header {
  padding: 22px 24px;
}

.header p {
  max-width: 720px;
}

.header,
.modal-header,
.toolbar,
.row {
  gap: 12px;
}

.log-toolbar,
.log-mode-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.log-mode-toggle {
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f8fafc;
}

.log-mode-toggle button {
  border-color: transparent;
  box-shadow: none;
}

.log-mode-toggle button.active {
  background: var(--primary);
  color: #fff;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 17px;
  margin-bottom: 12px;
}

.modal-header h2 {
  margin-bottom: 0;
}

p {
  margin-top: 8px;
  color: var(--muted);
}

.hint {
  margin-top: 9px;
  font-size: 13px;
}

.scan-detected-location-details {
  display: block;
  margin-top: 4px;
}

code {
  background: #f2f4f7;
  padding: 2px 6px;
  border-radius: 6px;
}

.form label,
.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

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

.qr-inventory-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfcfe;
}

.qr-inventory-card.active {
  border-color: #93b4ef;
  box-shadow: 0 0 0 3px rgba(29, 99, 168, 0.08);
}

.qr-inventory-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--border);
}

.qr-inventory-card > header h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
}

.qr-inventory-card > header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.qr-inventory-card > header button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.qr-inventory-category {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
  background: #fff;
}

.qr-inventory-category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.qr-inventory-category-title > strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.qr-inventory-category dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid #e9edf3;
  border-radius: 8px;
  background: #fafbfc;
}

.qr-inventory-category dl > div {
  min-width: 0;
  padding: 8px 5px;
  border-right: 1px solid #e9edf3;
  text-align: center;
}

.qr-inventory-category dl > div:last-child {
  border-right: 0;
}

.qr-inventory-category dt {
  color: var(--muted);
  font-size: 10px;
}

.qr-inventory-category dd {
  margin: 4px 0 0;
  color: #253247;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.qr-inventory-category dl > div:first-child dd {
  color: #1d63a8;
}

.qr-cost-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #c9362b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.qr-cost-warning > span {
  display: inline-grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  border: 1px solid #c9362b;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
}

.qr-inventory-category-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.qr-inventory-category-actions button {
  min-height: 31px;
  padding: 0 8px;
  font-size: 11px;
}

.scan-row {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.scan-row label {
  margin: 0;
  white-space: nowrap;
}

.scan-row select {
  flex: 0 1 260px;
}

#requestBtn {
  min-width: 128px;
}

.field {
  margin-top: 18px;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: var(--text);
}

input {
  height: 42px;
}

select {
  height: 42px;
}

.native-select-source {
  display: none !important;
}

.select-combobox {
  width: 100%;
  min-width: 0;
}

.select-combobox.is-disabled {
  opacity: 0.62;
}

.select-combobox input {
  cursor: pointer;
}

.select-combobox input:focus {
  cursor: text;
}

.balance-card-pagination .select-combobox,
.yyb-group-pagination .select-combobox,
.yyb-pagination .select-combobox,
.qr-pagination .select-combobox,
.statistics-pagination .select-combobox,
.users-pagination .select-combobox {
  flex: 0 0 auto;
  width: auto;
  min-width: 68px;
}

.balance-card-pagination .select-combobox input,
.yyb-group-pagination .select-combobox input,
.yyb-pagination .select-combobox input,
.qr-pagination .select-combobox input,
.statistics-pagination .select-combobox input,
.users-pagination .select-combobox input {
  min-width: 68px;
  padding: 0 30px 0 8px;
}

.row input {
  flex: 1;
}

textarea {
  padding: 12px 14px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

input[readonly],
textarea[readonly] {
  background: #f8fafc;
}

.account-combobox {
  position: relative;
}

.account-combobox::after {
  position: absolute;
  top: 17px;
  right: 14px;
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 6px solid #64748b;
  content: "";
  pointer-events: none;
}

.account-combobox input {
  padding-right: 38px;
}

.account-combobox-options {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

.account-combobox-option {
  display: block;
  width: 100%;
  height: auto;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  white-space: normal;
}

.account-combobox-option:hover,
.account-combobox-option:focus,
.account-combobox-option.selected {
  background: #eff6ff;
  color: var(--primary-dark);
}

.account-combobox-option strong,
.account-combobox-option small {
  display: block;
}

.account-combobox-option small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-combobox-empty {
  margin: 0;
  padding: 12px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

button {
  height: 42px;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

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

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

button.copy-success:disabled {
  background: #16a34a;
  color: #fff;
  opacity: 1;
}

.ghost {
  background: #eef2ff;
  color: var(--primary);
}

.ghost:hover {
  background: #dbeafe;
}

.danger-soft {
  background: #fef2f2;
  color: var(--danger);
}

.danger-soft:hover {
  background: #fee2e2;
}

.small {
  height: 32px;
  padding: 0 12px;
}

.logs {
  min-height: 260px;
  max-height: 380px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  background: #0b1020;
  color: #d1e7ff;
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 7px 2px 0;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px #dcfce7;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.58);
}

.modal-card {
  width: min(920px, calc(100vw - 36px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: #f2f4f7;
  color: #344054;
  font-size: 24px;
  line-height: 1;
}

.icon-button:hover {
  background: #e4e7ec;
}

.toolbar {
  flex-wrap: wrap;
  margin-top: 18px;
}

.code-area {
  min-height: 220px;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.master-admin-portal .master-portal-hidden {
  display: none !important;
}

/* 无码代跑下级只查看扫码统计和团队账号；余额、充值、分成比例和修改密码
   属于侧栏账户操作，不在这里隐藏。 */
.app-layout.uncoded-team-member .side-nav .nav-item:not(#navStatisticsBtn):not(#navYybBtn) {
  display: none !important;
}

/* 无码代跑下级由团长统一配置账号和停用状态，不显示这两个自主管理面板。 */
.app-layout.uncoded-team-member .yyb-task-account-management {
  display: none !important;
}

.uncoded-compact-log-card {
  margin: 0 0 16px;
}

.uncoded-compact-log-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.uncoded-compact-log-heading h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.uncoded-compact-log-heading .hint {
  margin: 0;
}

.uncoded-compact-log-box {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
}

.uncoded-compact-log-line {
  display: grid;
  grid-template-columns: 170px minmax(110px, 1fr) 90px minmax(150px, 2fr);
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
}

@media (max-width: 720px) {
  .uncoded-compact-log-line {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.activation-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #f8fafc;
}

.activation-gate-card {
  width: min(430px, calc(100vw - 32px));
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.activation-gate-brand {
  margin-bottom: 16px;
  color: #fff;
}

.activation-gate-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
}

.activation-gate-card p {
  color: var(--muted);
  line-height: 1.6;
}

.activation-mode-badge,
.activation-code-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.activation-mode-badge.billing { background: #f2f4f7; color: #475467; }
.activation-mode-badge.active { background: #dcfce7; color: #15803d; }
.activation-mode-badge.expired { background: #fee2e2; color: #b42318; }
.activation-code-status.unused { background: #dcfce7; color: #15803d; }
.activation-code-status.used { background: #f2f4f7; color: #667085; }

.activation-mode-field {
  min-width: 0;
}

.activation-mode-field > label:first-child { display: block; }

.activation-mode-field .activation-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin: 0;
  cursor: pointer;
}

.activation-mode-switch input { position: absolute; opacity: 0; pointer-events: none; }
.activation-mode-switch-track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .15s ease;
}
.activation-mode-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .2);
  transition: transform .15s ease;
}
.activation-mode-switch input:checked + .activation-mode-switch-track { background: var(--primary); }
.activation-mode-switch input:checked + .activation-mode-switch-track::after { transform: translateX(16px); }
.activation-mode-field small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.5; }

.activation-codes-page { display: grid; gap: 18px; }
.activation-code-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.activation-code-heading h2 { margin: 0 0 6px; }
.activation-code-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.activation-code-create-form { display: grid; grid-template-columns: 180px 150px minmax(180px, 1fr) auto; align-items: end; gap: 12px; margin-top: 18px; }
.activation-code-remark-field { min-width: 0; }
.created-activation-codes { display: grid; gap: 10px; margin-top: 14px; }
.created-activation-codes .code-area { min-height: 120px; }
.activation-code-list-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.activation-code-table-wrap { overflow: auto; margin-top: 18px; }
.activation-code-table { width: 100%; min-width: 1050px; border-collapse: collapse; }
.activation-code-table th, .activation-code-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.activation-code-table th { color: var(--muted); font-size: 12px; font-weight: 700; }
.activation-code-value { color: #1d4ed8; font-family: Consolas, monospace; }

.master-admin-portal .sidebar-user-balance,
.master-admin-portal #openFeeRatesBtn,
.master-admin-portal #openSystemRechargeBtn { display: none !important; }
.master-admin-portal #userEditorBalanceField { display: none !important; }
.master-admin-portal .users-table .user-membership-column,
.master-admin-portal .users-table .user-role-column,
.master-admin-portal .user-editor-role-field,
.master-admin-portal .user-editor-membership-field { display: none !important; }
.app-layout.activation-mode .sidebar-user-balance,
.app-layout.activation-mode #openFeeRatesBtn,
.app-layout.activation-mode #openSystemRechargeBtn { display: none !important; }

@media (max-width: 760px) {
  .activation-gate { padding: 10px; }
  .activation-gate-card { width: 100%; padding: 22px 18px; border-radius: 10px; }
  .activation-code-heading { display: grid; }
  .activation-code-create-form { grid-template-columns: 1fr 1fr; }
  .activation-code-remark-field,
  .activation-code-create-form > button { grid-column: 1 / -1; }
  .activation-code-list-actions { display: grid; grid-template-columns: 1fr auto; }
  .activation-code-table { min-width: 0; }
  .activation-code-table thead { display: none; }
  .activation-code-table tbody { display: grid; gap: 10px; }
  .activation-code-table tr { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
  .activation-code-table td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .activation-code-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; }
}

.admin-only-column {
  display: none;
}

.admin-only-block {
  display: none;
}

/* Keep role-only controls hidden even when their component layout declares a
   later display value (for example .owner-filter or an inline action button). */
.app-layout:not(.role-admin) .admin-only-block,
.app-layout:not(.role-admin) .admin-only-column {
  display: none !important;
}

.app-layout.role-admin .admin-only-column {
  display: table-cell;
}

.app-layout.role-admin .admin-only-block {
  display: flex;
}

.owner-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.owner-filter .owner-user-combobox {
  width: clamp(150px, 17vw, 220px);
  min-width: 150px;
}

.owner-filter .owner-user-combobox input {
  width: 100%;
}

.qr-filter-bar,
.yyb-filter-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.yyb-filter-bar {
  flex-wrap: wrap;
  gap: 12px;
}

.qr-filter-bar .qr-owner-filter,
.yyb-filter-bar .owner-filter {
  margin: 0;
}

.yyb-refresh-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  border-radius: 10px;
  font-size: 22px;
}

.yyb-refresh-icon.loading span {
  animation: yyb-refresh-spin 0.8s linear infinite;
}

@keyframes yyb-refresh-spin {
  to { transform: rotate(360deg); }
}

.yyb-group-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.yyb-group-filter-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.yyb-group-combobox {
  width: clamp(150px, 17vw, 220px);
  min-width: 150px;
}

.yyb-group-combobox input {
  width: 100%;
}

.yyb-group-management-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.yyb-group-management-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-layout.role-admin .yyb-group-management-actions .admin-only-block {
  display: inline-flex;
}

.qr-add-modal-card {
  width: min(680px, calc(100vw - 36px));
}

.qr-detail-modal {
  place-items: stretch end;
  padding: 0;
}

.modal.above-qr-detail {
  z-index: 30;
}

.modal-card.qr-detail-modal-card {
  display: flex;
  width: min(1480px, 94vw);
  max-height: none;
  height: 100vh;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px 0 0 12px;
}

.qr-detail-header {
  flex: 0 0 auto;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}

.qr-detail-header > div {
  min-width: 0;
}

.qr-detail-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.qr-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 0 0 auto;
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfc;
}

.qr-detail-summary article {
  min-width: 0;
  padding: 10px 13px;
  border-right: 1px solid var(--border);
}

.qr-detail-summary article:last-child {
  border-right: 0;
}

.qr-detail-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.qr-detail-summary strong {
  display: block;
  margin-top: 4px;
  color: #27364b;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.qr-detail-summary article:nth-child(2) strong {
  color: #1d63a8;
}

.qr-detail-status-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 0;
  margin-top: 12px;
}

.qr-detail-status-tabs button {
  min-width: 82px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid #dce2ea;
  border-right: 0;
  border-radius: 0;
  background: #fff;
  color: #66707d;
  font-size: 12px;
}

.qr-detail-status-tabs button:first-child {
  border-radius: 6px 0 0 6px;
}

.qr-detail-status-tabs button:last-child {
  border-right: 1px solid #dce2ea;
  border-radius: 0 6px 6px 0;
}

.qr-detail-status-tabs button[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.qr-detail-table-wrap {
  flex: 1 1 auto;
  max-height: none;
  min-height: 220px;
}

.qr-detail-modal-card > .qr-pagination {
  flex: 0 0 auto;
}

.qr-add-actions {
  justify-content: flex-end;
}

.response-detail-modal-card {
  width: min(900px, calc(100vw - 36px));
}

.response-detail-body {
  min-height: 380px;
  max-height: calc(100vh - 280px);
  resize: vertical;
  user-select: text;
  white-space: pre;
}

.response-detail-actions {
  justify-content: flex-end;
}

.qr-input {
  min-height: 84px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.45;
}

.qr-table-wrap {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  max-height: 440px;
  overflow: auto;
}

.qr-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.qr-table th,
.qr-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  word-break: break-all;
  font-size: 13px;
}

.qr-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.qr-table-wrap {
  overflow-x: hidden;
}

.qr-table {
  min-width: 0;
}

.qr-table th:nth-child(1),
.qr-table td:nth-child(1) {
  width: 3%;
}

.qr-table th:nth-child(2),
.qr-table td:nth-child(2) {
  width: 7%;
}

.qr-table th:nth-child(3),
.qr-table td:nth-child(3) {
	width: 6%;
}

.qr-table th:nth-child(4),
.qr-table td:nth-child(4) {
	width: 16%;
}

.qr-table th:nth-child(5),
.qr-table td:nth-child(5) {
	width: 7%;
}

.qr-table th:nth-child(6),
.qr-table td:nth-child(6) {
	width: 6%;
}

.qr-table th:nth-child(7),
.qr-table td:nth-child(7) {
	width: 9%;
}

.qr-table th:nth-child(8),
.qr-table td:nth-child(8) {
	width: 9%;
}

.qr-table th:nth-child(9),
.qr-table td:nth-child(9) {
	width: 6%;
}

.qr-table th:nth-child(10),
.qr-table td:nth-child(10) {
	width: 6%;
}

.qr-table th:nth-child(11),
.qr-table td:nth-child(11) {
	width: 9%;
}

.qr-table th:nth-child(12),
.qr-table td:nth-child(12) {
	width: 8%;
}

.qr-table th:nth-child(13),
.qr-table td:nth-child(13) {
	width: 8%;
}

.qr-select-column {
  text-align: center !important;
}

.qr-select-column input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.qr-batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #f8fbff;
}

.qr-batch-toolbar strong {
  color: #1d4ed8;
  font-size: 13px;
}

.qr-batch-selection {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}

.qr-batch-selection > strong {
  white-space: nowrap;
}

.qr-today-wasted-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qr-today-wasted-filters button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid #dce2ea;
  border-radius: 6px;
  background: #fff;
  color: #475467;
  font-size: 12px;
  white-space: nowrap;
}

.qr-today-wasted-filters button[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.qr-today-wasted-filters [data-qr-today-wasted-count] {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

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

.qr-link-search {
  display: flex;
  align-items: center;
  flex: 1 1 270px;
  gap: 7px;
  min-width: 0;
  font-size: 12px;
}

.qr-link-search span {
  white-space: nowrap;
}

.qr-link-search input {
  min-width: 180px;
  width: 280px;
  max-width: 100%;
  height: 34px;
}

.qr-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.qr-pagination label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qr-pagination select {
  width: auto;
  min-width: 64px;
  padding: 6px 8px;
}

.qr-actions {
  display: grid;
  gap: 4px;
  white-space: normal;
  text-align: center !important;
}

.qr-actions .table-action-group {
  display: grid;
  gap: 4px;
}

.qr-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 25px;
  padding: 0 4px;
  margin: 0;
  border-radius: 7px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 11px;
}

.qr-action:hover {
  background: #dbeafe;
}

.delete-qr {
  background: #fef2f2;
  color: var(--danger);
}

.delete-qr:hover {
  background: #fee2e2;
}

.qr-table tr:last-child td {
  border-bottom: 0;
}

.qr-scanned td {
  background: #f0fdf4;
}

.qr-status {
  display: inline-block;
  min-width: 42px;
  padding: 3px 7px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.qr-status.scanned {
  background: #dcfce7;
  color: #15803d;
}

.qr-status.unscanned {
  background: #f2f4f7;
  color: #667085;
}

.qr-kind {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.qr-kind.cash-coupon {
  background: #dbeafe;
  color: #1d4ed8;
}

.qr-kind.wechat-red {
  background: #ffedd5;
  color: #c2410c;
}

.reward-type {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.reward-type.cash-coupon {
  background: #dbeafe;
  color: #2563eb;
}

.reward-type.wechat-red {
  background: #ffedd5;
  color: #ea580c;
}

.reward-type.thanks {
  background: #f2f4f7;
  color: #475467;
}

.reward-type.invalid {
  background: #fef2f2;
  color: #b42318;
}

.response-result-button {
  display: -webkit-box;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  white-space: normal;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  user-select: text;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.response-result-button:hover {
  background: transparent;
  color: inherit;
  text-decoration: underline;
}

.scan-time {
  white-space: pre-line;
  color: #475467;
  line-height: 1.45;
}

.qr-code-cell {
  vertical-align: top;
}

.qr-code-cell span {
  display: block;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .yyb-call-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-layout {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px 10px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand > div:not(.brand-mark),
  .nav-item > span:last-child,
  .sidebar-user-info,
  .sidebar-user-balance {
    display: none;
  }

  .sidebar-user {
    align-items: stretch;
    flex-direction: column;
  }

  .sidebar-user-actions {
    flex-direction: column;
  }

  .sidebar-user-actions button {
    width: 100%;
    padding: 0 4px;
  }

  .side-nav {
    margin-top: 28px;
  }

  .nav-item {
    justify-content: center;
    min-height: 48px;
    padding: 8px;
  }

  .workspace {
    padding: 16px;
  }

  .task-layout {
    height: calc(100vh - 32px);
  }

  .task-form {
    gap: 10px;
  }

  .qr-table th,
  .qr-table td {
    padding: 7px 5px;
    font-size: 12px;
  }
}

@media (max-width: 960px) {
  .statistics-summary-groups {
    grid-template-columns: 1fr;
  }

  .statistics-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .task-logs {
    height: auto;
    overflow: visible;
  }

  .task-logs .logs {
    flex: 0 0 auto;
    min-height: 300px;
    max-height: 420px;
  }
}

@media (max-width: 760px) {

  .yyb-account-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yyb-group-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yyb-account-overview > div {
    padding: 11px 13px;
    border-bottom: 1px solid var(--border);
  }

  .yyb-account-overview > div:nth-child(2n) {
    border-right: 0;
  }

  .yyb-account-overview > div:last-child {
    border-bottom: 0;
  }

  .yyb-task-account-management {
    padding: 12px;
  }

  .yyb-task-account-management-heading,
  .yyb-task-account-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .yyb-task-account-management-heading > label {
    justify-content: space-between;
  }

  .yyb-task-account-management-heading select {
    min-width: 0;
    width: min(62vw, 230px);
  }

  .yyb-task-account-actions,
  .yyb-task-suspension-actions {
    justify-content: flex-start;
  }

  body {
    height: 100dvh;
  }

  .app-layout {
    display: flex;
    height: 100dvh;
    flex-direction: column;
  }

  .sidebar {
    z-index: 20;
    display: grid;
    grid-template-areas:
      "brand user"
      "nav nav";
    grid-template-columns: minmax(0, 1fr) auto;
    flex: 0 0 auto;
    gap: 8px 10px;
    padding: 8px 10px 9px;
    overflow: visible;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
  }

  .brand {
    grid-area: brand;
    justify-content: flex-start;
    min-height: 40px;
    padding: 0;
  }

  .brand > div:not(.brand-mark) {
    display: block;
  }

  .brand-mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .side-nav {
    grid-area: nav;
    display: flex;
    gap: 6px;
    margin-top: 0;
    padding-bottom: 1px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    min-height: 38px;
    padding: 7px 11px;
    border-radius: 9px;
    white-space: nowrap;
  }

  .nav-item > span:last-child {
    display: block;
  }

  .nav-icon {
    display: none;
  }

  .sidebar-user {
    grid-area: user;
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 4px;
    margin-top: 0;
    padding: 0;
    border: 0;
  }

  .sidebar-user-balance {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    padding: 0 3px;
    border-top: 0;
  }

  .sidebar-user-balance span {
    display: none;
  }

  .sidebar-user-balance strong {
    font-size: 12px;
    white-space: nowrap;
  }

  .sidebar-user-actions {
    flex-direction: row;
    gap: 4px;
  }

  .sidebar-user-actions button {
    width: auto;
    min-width: 42px;
    height: 34px;
    padding: 0 6px;
    font-size: 12px;
  }

  .workspace,
  .workspace-view,
  .card {
    min-width: 0;
    max-width: 100%;
  }

  .workspace {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 12px;
    overflow: auto;
    overscroll-behavior: contain;
  }

  .card,
  .modal-card {
    padding: 13px;
    border-radius: 13px;
  }

  .login-card {
    padding: 22px;
    border-radius: 16px;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }

  button {
    min-height: 40px;
  }

  .logs-title,
  .log-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .log-mode-toggle button {
    flex: 1 1 0;
  }

  .task-form {
    align-items: stretch;
    flex-direction: column;
  }

  .task-account-field,
  .task-location-field,
  .task-interval-field,
  .task-max-unclaimed-scan-field,
  .task-max-red-packet-scan-field {
    flex: 1 1 auto;
  }

  .run-params {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .run-params .task-location-field,
  .run-params .task-interval-field,
  .run-params .task-max-unclaimed-scan-field,
  .run-params .task-max-red-packet-scan-field {
    flex: 1 1 auto;
  }

  .run-params .task-auto-detect-option,
  .run-params .task-thirty-cent-option,
  .run-params .task-camera-preview-option {
    width: 100%;
    min-height: 50px;
  }

  .yyb-page-heading,
  .proxy-profiles-heading,
  .users-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-relay-pairing-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-relay-credential-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-relay-link-credential {
    grid-column: auto;
  }

  .mobile-relay-credential-line {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-relay-credential-line button {
    width: 100%;
  }

  .users-heading-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .users-search-input {
    width: 100%;
    max-width: none;
  }

  .yyb-batch-toolbar,
  .yyb-pagination,
  .qr-batch-toolbar,
  .qr-pagination,
  .statistics-pagination,
  .users-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .yyb-pagination,
  .qr-pagination,
  .statistics-pagination,
  .users-pagination {
    justify-content: flex-start;
  }

  .statistics-summary-grid,
  .statistics-filters,
  .statistics-team-finance-grid {
    grid-template-columns: 1fr;
  }

  .statistics-team-finance-heading {
    flex-direction: column;
  }

  .statistics-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .statistics-tile {
    padding: 13px;
  }

  .statistics-tile strong {
    font-size: 19px;
  }

  .yyb-qr-frame {
    align-self: center;
    width: 220px;
    height: 220px;
  }

  .yyb-login-modal-grid {
    grid-template-columns: 1fr;
  }

  .proxy-basic-grid,
  .proxy-regex-grid {
    grid-template-columns: 1fr;
  }

  .task-proxy-retry-grid {
    grid-template-columns: 1fr;
  }

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

  .qr-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .qr-add-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .qr-page-heading .qr-add-actions {
    grid-template-columns: 1fr;
  }

  .yyb-page-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .yyb-header-proxy-select {
    width: 100%;
  }

  .yyb-login-proxy-field {
    width: 100%;
  }

  .yyb-login-policy-field {
    justify-content: space-between;
    width: 100%;
  }

  .yyb-login-policy-field input {
    width: min(120px, 42vw);
  }

  .header,
  .row {
    align-items: stretch;
    flex-direction: column;
  }

  .header button,
  .row button {
    width: 100%;
  }

  .qr-filter-bar,
  .yyb-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .yyb-refresh-icon {
    align-self: flex-end;
    width: 40px;
    margin-left: 0;
  }

  .owner-filter,
  .owner-filter .owner-user-combobox,
  .owner-filter .owner-user-combobox input {
    width: 100%;
  }

  .owner-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .yyb-group-filter,
  .yyb-group-filter-control,
  .yyb-group-combobox,
  .yyb-group-combobox input {
    width: 100%;
  }

  .yyb-group-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .yyb-group-filter-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .yyb-group-management-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .yyb-group-management-actions button {
    width: 100%;
  }

  .yyb-page-actions button,
  .proxy-profiles-heading button,
  .users-heading button,
  .statistics-filters > button,
  .yyb-pagination button,
  .qr-pagination button,
  .statistics-pagination button,
  .users-pagination button {
    width: 100%;
  }

  .qr-batch-actions {
    align-items: stretch;
    width: 100%;
    flex-direction: column;
  }

  .qr-batch-actions > button {
    width: 100%;
  }

  .qr-link-search {
    flex: 0 0 auto;
    width: 100%;
  }

  .qr-link-search input {
    width: 100%;
  }

  .yyb-batch-actions {
    align-items: stretch;
    width: 100%;
    flex-direction: column;
  }

  .yyb-batch-actions > button {
    width: 100%;
  }

  .statistics-batch-toolbar,
  .statistics-batch-actions,
  .users-batch-toolbar,
  .users-batch-actions {
    align-items: stretch;
    width: 100%;
    flex-direction: column;
  }

  .statistics-batch-actions button,
  .users-batch-actions button {
    width: 100%;
  }

  .yyb-pagination label,
  .qr-pagination label,
  .statistics-pagination label,
  .users-pagination label {
    justify-content: space-between;
    width: 100%;
  }

  .yyb-pagination select,
  .qr-pagination select,
  .statistics-pagination select,
  .users-pagination select {
    width: 96px;
  }

  .yyb-call-actions,
  .profile-actions,
  .user-editor-actions,
  .transfer-owner-actions,
  .yyb-login-modal-actions,
  .qr-add-actions,
  .response-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .yyb-call-actions button,
  .profile-actions button,
  .user-editor-actions button,
  .transfer-owner-actions button,
  .yyb-login-modal-actions button,
  .qr-add-actions button,
  .response-detail-actions button {
    width: 100%;
  }

  .response-detail-body {
    min-height: 240px;
    max-height: calc(100dvh - 280px);
  }

  .yyb-account-table-wrap,
  .qr-table-wrap,
  .statistics-table-wrap,
  .users-table-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .yyb-account-table,
  .qr-table,
  .statistics-table,
  .users-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  .yyb-account-table thead,
  .qr-table thead,
  .statistics-table thead,
  .users-table thead {
    display: none;
  }

  .yyb-account-table tbody,
  .qr-table tbody,
  .statistics-table tbody,
  .users-table tbody {
    display: grid;
    gap: 10px;
  }

  .yyb-account-table tr,
  .qr-table tr,
  .statistics-table tr,
  .users-table tr {
    display: block;
    padding: 8px 11px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(16, 24, 40, 0.05);
  }

  .yyb-account-table td,
  .qr-table td,
  .statistics-table td,
  .users-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    width: auto !important;
    padding: 8px 0 !important;
    border-bottom: 1px dashed var(--border);
    background: transparent;
    text-align: left !important;
    word-break: break-word;
  }

  .yyb-account-table td:last-child,
  .qr-table td:last-child,
  .statistics-table td:last-child,
  .users-table td:last-child {
    border-bottom: 0;
  }

  .yyb-account-table th:last-child,
  .yyb-account-table td:last-child,
  .users-table th:last-child,
  .users-table td:last-child {
    position: static;
    box-shadow: none;
  }

  .yyb-account-table td::before,
  .qr-table td::before,
  .statistics-table td::before,
  .users-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .yyb-account-table td.admin-only-column,
  .qr-table td.admin-only-column,
  .statistics-table td.admin-only-column {
    display: none;
  }

  .app-layout.role-admin .yyb-account-table td.admin-only-column,
  .app-layout.role-admin .qr-table td.admin-only-column,
  .app-layout.role-admin .statistics-table td.admin-only-column {
    display: grid;
  }

  .yyb-openid,
  .yyb-account-remark,
  .user-remark,
  .statistics-message,
  .statistics-qr-link {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .table-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
  }

  .table-action-group button {
    flex: 1 1 90px;
    min-width: 0;
  }

  .table-action-group button + button {
    margin-left: 0;
  }

  .qr-actions .table-action-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .qr-action {
    height: 36px;
    min-height: 36px;
  }

  .qr-scanned {
    background: #f0fdf4 !important;
  }

  .qr-scanned td {
    background: transparent;
  }

  .response-result-button {
    -webkit-line-clamp: 3;
    overflow-wrap: anywhere;
  }

  .qr-table th,
  .qr-table td {
    padding: 8px;
  }

  .modal {
    padding: 10px;
  }

  .modal-card {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .user-editor-grid {
    grid-template-columns: 1fr;
  }
}

/* 桌面侧栏菜单固定单项高度，并在品牌区与账户区之间垂直居中。 */
@media (min-width: 761px) {
  .side-nav {
    grid-auto-rows: 44px;
    align-content: safe center;
  }

  .nav-item {
    height: 44px;
    min-height: 44px;
  }
}

/* -------------------------------------------------------------------------- */
/* 轻量管理台视觉主题：参考“扫码上号”页面的白卡、细边框与低饱和配色。             */
/* -------------------------------------------------------------------------- */

:root {
  --bg: #f2f6fc;
  --card: #ffffff;
  --surface: #f7faff;
  --text: #28384d;
  --muted: #8291a7;
  --border: #dce6f2;
  --primary: #2f64df;
  --primary-dark: #2454c7;
  --danger: #e02026;
  --ok: #1f9d7a;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

.app-layout {
  grid-template-columns: 214px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  padding: 18px 12px;
  border-right: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.brand {
  min-height: 58px;
  padding: 0 8px 14px;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  border-radius: 5px;
  background: var(--primary);
  box-shadow: none;
}

.brand strong {
  color: #30343b;
  font-size: 15px;
}

.side-nav {
  gap: 4px;
  margin-top: 18px;
}

.nav-item {
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #617187;
}

.nav-item:hover {
  background: #f4f7fb;
}

.nav-item.active {
  border-color: #d8e5ff;
  background: #edf4ff;
  color: var(--primary);
}

.nav-icon {
  width: 27px;
  height: 27px;
  border-radius: 4px;
  background: #f1f3f6;
  color: #7d8590;
}

.nav-item.active .nav-icon {
  background: var(--primary);
  color: #fff;
}

.sidebar-user {
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fafbfc;
}

.sidebar-user strong {
  color: #2d3d52;
}

.sidebar-user small,
.sidebar-user-balance span {
  color: var(--muted);
}

.sidebar-user-balance {
  border-top-color: var(--border);
}

.sidebar-user-balance strong {
  color: #2563eb;
}

.sidebar-user button {
  border: 1px solid #dbe1e9;
  background: #fff;
  color: #68717d;
}

.workspace {
  padding: 28px 34px 50px;
  background: var(--bg);
}

.workspace-view {
  width: min(1120px, 100%);
  margin: 0 auto;
  gap: 18px;
}

.task-layout {
  height: auto;
  grid-template-columns: minmax(350px, 0.86fr) minmax(440px, 1.25fr);
  gap: 18px;
}

.task-left-column {
  gap: 18px;
}

.card,
.modal-card {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--card);
  box-shadow: none;
}

.card h2,
.modal-card h2 {
  color: #30343b;
  font-size: 18px;
  font-weight: 700;
}

.run-params-heading,
.logs-title,
.qr-page-heading,
.statistics-records-card > .statistics-filters,
.yyb-page-heading,
.proxy-profiles-heading {
  border-bottom-color: var(--border);
}

.field label,
.owner-filter label,
.yyb-group-filter label {
  color: #666d78;
  font-weight: 600;
}

input,
select,
textarea,
.account-combobox input {
  border-color: #dce2ea !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #30343b;
  box-shadow: none !important;
}

input:focus,
select:focus,
textarea:focus,
.account-combobox input:focus {
  border-color: #8eacef !important;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(47, 100, 223, 0.12) !important;
}

.workspace button:not(.ghost):not(.danger-soft):not(.icon-button):not(.qr-action):not(.account-combobox-option) {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}

.workspace button:not(.ghost):not(.danger-soft):not(.icon-button):not(.qr-action):not(.account-combobox-option):hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.workspace .ghost,
.workspace .icon-button {
  border-color: #dce2ea;
  background: #fff;
  color: #66707d;
}

.workspace .ghost:hover,
.workspace .icon-button:hover {
  border-color: #bfc8d4;
  background: #f8fafc;
  color: #30343b;
}

.workspace .danger-soft {
  border-color: #f3c5c7;
  background: #fff5f5;
  color: #d71920;
}

.workspace .danger-soft:hover {
  border-color: #e02026;
  background: #fff0f0;
}

.start-button,
#dailyTaskBtn {
  min-height: 42px;
  border-radius: 4px;
  font-weight: 700;
}

.scan-settings-status,
.yyb-status,
.qr-status,
.statistics-result {
  border-radius: 3px;
}

.logs {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fafbfc;
  color: #4d5662;
  white-space: normal;
}

.runtime-log-line {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 2px 0;
  line-height: 1.55;
}

.runtime-log-line time {
  color: #8a94a3;
  white-space: nowrap;
}

.runtime-log-level {
  color: #5f6b7a;
  font-weight: 700;
  white-space: nowrap;
}

.runtime-log-line.success .runtime-log-level {
  color: #16803c;
}

.runtime-log-line.warning .runtime-log-level {
  color: #b25b00;
}

.runtime-log-line.error .runtime-log-level {
  color: #cf222e;
}

.runtime-log-message {
  min-width: 0;
  overflow-wrap: anywhere;
}

.runtime-log-line.compact {
  display: block;
  padding: 4px 0;
}

.runtime-log-line.compact .runtime-log-message {
  color: #30343b;
}

@media (max-width: 760px) {
  .runtime-log-line {
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .runtime-log-message {
    grid-column: 1 / -1;
    padding-left: 4px;
  }
}

.log-mode-toggle {
  gap: 0;
}

.log-mode-toggle button {
  border-radius: 0;
}

.log-mode-toggle button:first-child {
  border-radius: 4px 0 0 4px;
}

.log-mode-toggle button:last-child {
  border-radius: 0 4px 4px 0;
}

.log-mode-toggle button.active {
  border-color: var(--primary) !important;
  background: var(--primary) !important;
  color: #fff !important;
}

.statistics-summary-group,
.statistics-tile {
  border-color: var(--border);
  background: #fff;
  box-shadow: none;
}

.statistics-summary-group {
  border-radius: 5px;
}

.statistics-tile {
  border-radius: 4px;
}

.statistics-tile span {
  color: #6e7682;
}

.statistics-tile strong {
  color: #30343b;
  font-weight: 500;
}

.yyb-account-table-wrap,
.qr-table-wrap,
.statistics-table-wrap,
.users-table-wrap {
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: none;
}

.yyb-account-table th,
.qr-table th,
.statistics-table th,
.users-table th {
  border-color: var(--border);
  background: #f5f7fa;
  color: #666d78;
  font-weight: 700;
}

.yyb-account-table td,
.qr-table td,
.statistics-table td,
.users-table td {
  border-color: var(--border);
  color: #3e4651;
}

.yyb-account-table tbody tr:hover td,
.qr-table tbody tr:hover td,
.statistics-table tbody tr:hover td,
.users-table tbody tr:hover td {
  background: #fafcff;
}

.account-combobox-options {
  border-color: var(--border);
  border-radius: 4px;
  box-shadow: 0 9px 22px rgba(31, 41, 55, 0.1);
}

.account-combobox-option:hover,
.account-combobox-option.selected {
  background: #f5f7fa;
  color: #30343b;
}

/* 下拉候选项采用与“扫码统计-结果类型”一致的中性选择样式，不继承主按钮颜色。 */
.workspace .account-combobox-option,
.workspace .account-combobox-option:hover {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #fff;
  color: #3e4651;
  box-shadow: none;
}

.workspace .account-combobox-option:hover,
.workspace .account-combobox-option:focus,
.workspace .account-combobox-option.selected {
  border-color: #e2e7ef;
  background: #f5f7fa;
  color: #30343b;
}

.workspace .account-combobox-option strong {
  color: inherit;
}

.workspace .account-combobox-option small {
  color: #9096a0;
}

.modal {
  background: rgba(30, 35, 42, 0.28);
}

.modal-header {
  border-bottom-color: var(--border);
}

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .workspace {
    padding: 18px;
  }

  .task-layout {
    grid-template-columns: 1fr;
  }
}


/* -------------------------------------------------------------------------- */
/* Proxy list refinement: retain every field without a split, scrollable row. */
/* -------------------------------------------------------------------------- */

/* A response preview is a link-like detail trigger, not a primary action. */
.workspace .proxy-profile-result-button,
.workspace .proxy-profile-result-button:hover {
  display: block;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #2878c8;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace .proxy-profile-result-button:hover {
  color: #165fa8;
}

/* The proxy-profile fields do not fit in the workspace. Render each profile as a
   compact information card so the operation area never detaches while scrolling. */
.proxy-profiles-table-wrap {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.proxy-profiles-table {
  display: block;
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.proxy-profiles-table thead {
  display: none;
}

.proxy-profiles-table tbody {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  gap: 14px;
}

.proxy-profiles-table tr {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  column-gap: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
}

.proxy-profiles-table td {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 43px;
  padding: 8px 14px;
  border-bottom: 1px solid #edf0f4;
  color: #3e4651;
  font-size: 13px;
  text-align: left;
}

.proxy-profiles-table td::before {
  content: attr(data-label);
  color: #8a94a3;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.proxy-profiles-table td:nth-child(1) {
  grid-column: 1 / -1;
  min-height: 48px;
  background: #fafbfc;
  font-size: 15px;
}

.proxy-profiles-table td.proxy-profile-name > strong,
.proxy-profiles-table td.proxy-profile-name > .system-pool-control,
.proxy-profiles-table td.proxy-profile-name > .mobile-proxy-details {
  grid-column: 1 / -1;
}

.proxy-profiles-table td:nth-child(3),
.proxy-profiles-table td:nth-child(7),
.proxy-profiles-table td:nth-child(9) {
  grid-column: 1 / -1;
}

.proxy-profiles-table td:nth-child(9),
.proxy-profiles-table tr:last-child td:nth-child(9) {
  padding-top: 11px;
  padding-bottom: 12px;
  border-bottom: 0;
}

/* The administrator-only system-pool field adds one more cell. Keep the
   operation group full width regardless of whether that cell is present. */
.proxy-profiles-table td:last-child,
.proxy-profiles-table tr:last-child td:last-child {
  grid-column: 1 / -1;
  padding-top: 11px;
  padding-bottom: 12px;
  border-bottom: 0;
}

.proxy-profiles-table td:last-child,
.proxy-profiles-table th:last-child {
  position: static;
  z-index: auto;
  background: transparent;
  box-shadow: none;
}

.proxy-profiles-table tr:last-child td {
  border-bottom: 1px solid #edf0f4;
}

.proxy-profiles-table .proxy-profile-url {
  min-width: 0;
}

.proxy-profiles-table .table-action-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

.proxy-profiles-table .table-action-group button {
  min-width: 0;
  padding-right: 6px;
  padding-left: 6px;
  white-space: nowrap;
}


/* The task controls are one workflow. Visually connect the left-side stages
   instead of leaving several unrelated white boxes floating beside the logs. */
.task-left-column {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
}

.task-left-column > .card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.task-left-column > .card + .card {
  border-top: 1px solid var(--border);
}

@media (max-width: 940px) {
  .proxy-profiles-table tbody {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .proxy-profiles-table tr {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .proxy-profiles-table td,
  .proxy-profiles-table td:nth-child(1),
  .proxy-profiles-table td:nth-child(3),
  .proxy-profiles-table td:nth-child(7),
  .proxy-profiles-table td:nth-child(9) {
    grid-column: 1;
  }

  .proxy-profiles-table .table-action-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Extraction result is an inline detail link: never inherit primary-button chrome. */
.workspace button.proxy-profile-result-button:not(.ghost):not(.danger-soft):not(.icon-button):not(.qr-action),
.workspace button.proxy-profile-result-button:not(.ghost):not(.danger-soft):not(.icon-button):not(.qr-action):hover {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #2878c8 !important;
  font-weight: 500 !important;
}

.workspace button.proxy-profile-result-button:not(.ghost):not(.danger-soft):not(.icon-button):not(.qr-action):hover {
  color: #165fa8 !important;
}

/* PZ administrator setup and the disposable QR-login network picker. */
.ipzan-config-card {
  width: min(860px, 100%);
}

.login-proxy-config-sections {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.login-proxy-config-section {
  padding: 16px;
  border: 1px solid #dce2ea;
  border-radius: 5px;
  background: #fff;
}

.login-proxy-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.login-proxy-section-heading h3 {
  margin: 0;
  color: #273244;
  font-size: 15px;
}

.login-proxy-section-heading p {
  max-width: 620px;
  margin: 6px 0 0;
  color: #727d8c;
  font-size: 12px;
  line-height: 1.6;
}

.login-proxy-key-grid {
  grid-template-columns: 1fr;
}

.ipzan-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin-top: 18px;
}

.ipzan-enable-field {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #4b5563;
}

.ipzan-enable-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.ipzan-config-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.yyb-login-modal-card {
  width: min(720px, calc(100vw - 36px));
}

.custom-yyb-login-modal-card {
  width: min(720px, calc(100vw - 36px));
}

.yyb-login-modal-card > .modal-header,
.custom-yyb-login-modal-card > .modal-header {
  position: sticky;
  top: -18px;
  z-index: 4;
  min-height: 74px;
  margin: -18px -18px 0;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.yyb-login-mode-panel {
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fafbfc;
}

.yyb-login-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dce2ea;
  border-radius: 4px;
  background: #fff;
}

.yyb-login-mode-tabs .yyb-login-mode {
  min-height: 36px;
  border: 0;
  border-right: 1px solid #dce2ea;
  border-radius: 0;
  background: #fff;
  color: #606a78;
  font-weight: 600;
}

.yyb-login-mode-tabs .yyb-login-mode:last-child {
  border-right: 0;
}

.yyb-login-mode-tabs .yyb-login-mode:hover {
  background: #edf4ff;
  color: var(--primary);
}

.yyb-login-mode-tabs .yyb-login-mode.active,
.yyb-login-mode-tabs .yyb-login-mode.active:hover {
  background: var(--primary);
  color: #fff;
}

.yyb-login-mode-fields {
  margin-top: 14px;
}

.yyb-login-mode-fields p {
  margin: 0;
  color: #7b8491;
  font-size: 13px;
  line-height: 1.6;
}

.yyb-smart-location-info {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #dce2ea;
  border-radius: 4px;
  background: #f7f9fb;
  color: #4e5c6d;
  font-size: 13px;
  line-height: 1.5;
}

.yyb-login-location-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.72fr);
  gap: 14px;
}

.yyb-login-custom-policy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.yyb-login-custom-input-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 0.42fr);
  gap: 14px;
}

.yyb-login-custom-policy-grid .field,
.yyb-login-custom-input-grid .field {
  margin-top: 0;
}

.yyb-login-location-grid .field {
  margin-top: 0;
}

.yyb-current-proxy-info {
  display: grid;
  gap: 5px;
  border: 1px solid #dce4ed;
  border-radius: 4px;
  background: #f7f9fb;
  color: #53606f;
}

.custom-yyb-login-config-panel {
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fafbfc;
}

.custom-yyb-login-config-panel > p {
  margin: 0 0 14px;
  color: #7b8491;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 620px) {
  .ipzan-config-grid,
  .yyb-login-location-grid,
  .yyb-login-custom-policy-grid,
  .yyb-login-custom-input-grid {
    grid-template-columns: 1fr;
  }

  .login-proxy-section-heading {
    display: grid;
  }

  .yyb-login-modal-card > .modal-header,
  .custom-yyb-login-modal-card > .modal-header {
    top: -13px;
    min-height: 64px;
    margin: -13px -13px 0;
    padding: 13px;
  }

}

/* 扫码任务的基础/高级模式：基础模式只保留日常运行所需的最小参数。 */
.task-mode-panel {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--card);
}

.task-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #d7e2f0;
  border-radius: 4px;
  background: #fff;
}

.workspace button.task-mode-tab:not(.ghost):not(.danger-soft):not(.icon-button):not(.qr-action),
.workspace button.task-mode-tab:not(.ghost):not(.danger-soft):not(.icon-button):not(.qr-action):hover {
  min-height: 52px;
  border: 0 !important;
  border-radius: 0;
  background: #fff !important;
  color: #50627a !important;
  font-size: 16px;
  font-weight: 700;
  box-shadow: none;
}

.workspace button.task-mode-tab:not(.ghost):not(.danger-soft):not(.icon-button):not(.qr-action):not(:last-child) {
  border-right: 1px solid #d7e2f0 !important;
}

.workspace button.task-mode-tab:not(.ghost):not(.danger-soft):not(.icon-button):not(.qr-action):hover {
  background: #f4f7fc !important;
  color: var(--primary) !important;
}

.workspace button.task-mode-tab.active:not(.ghost):not(.danger-soft):not(.icon-button):not(.qr-action),
.workspace button.task-mode-tab.active:not(.ghost):not(.danger-soft):not(.icon-button):not(.qr-action):hover {
  background: var(--primary) !important;
  color: #fff !important;
}

.task-mode-basic .task-advanced-option {
  display: none !important;
}

.task-mode-schedule .task-schedule-option {
  display: grid !important;
}

.scan-schedule-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.scan-schedule-actions {
  grid-column: 1 / -1;
  align-items: center;
}

.scan-schedule-auto-purchase {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
}

.scan-schedule-actions .scan-settings-status {
  margin-left: auto;
}

@media (max-width: 620px) {
  .scan-schedule-fields { grid-template-columns: 1fr 1fr; }
  .scan-schedule-actions .scan-settings-status { margin-left: 0; }
}

/* 桌面端任务区固定在可视区域内：左侧参数和右侧日志各自滚动，避免一侧内容拉高整页。 */
@media (min-width: 901px) {
  .task-layout {
    height: calc(100dvh - 106px);
    min-height: 0;
  }

  .task-left-column {
    position: relative;
    z-index: 5;
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .task-logs {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 0;
  }

  /* 代理配置位于左侧末段，向上展开可始终保留在固定面板内。 */
  .task-scan-proxy-card .account-combobox-options {
    top: auto;
    bottom: calc(100% + 6px);
    max-height: min(280px, 48vh);
  }
}

/* 单列窄屏改由页面滚动，不能裁切绝对定位的下拉候选项。 */
@media (max-width: 900px) {
  .task-left-column {
    position: relative;
    z-index: 5;
    overflow: visible;
  }

  .task-logs {
    position: relative;
    z-index: 1;
  }
}

/* Phone record cards: retain the full record, but keep the first screen focused
   on the data needed to decide whether to act. Secondary identifiers move into
   a native expandable detail area instead of making every card several screens tall. */
.mobile-account-details,
.mobile-statistics-details,
.mobile-qr-details,
.mobile-proxy-details,
.mobile-user-details,
.mobile-statistics-error {
  display: none;
}

.yyb-status-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.yyb-scan-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .yyb-account-card,
  .statistics-records-card {
    padding: 11px;
  }

  .yyb-account-table-wrap,
  .statistics-table-wrap {
    margin-top: 12px;
  }

  .yyb-account-table tbody,
  .statistics-table tbody {
    gap: 9px;
  }

  .yyb-account-table tr,
  .statistics-table tr {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.045);
  }

  .yyb-account-table td,
  .statistics-table td {
    display: block;
    min-width: 0;
    padding: 8px 0 !important;
    border-bottom: 1px dashed #e6ebf2;
  }

  .yyb-account-table td::before,
  .statistics-table td::before {
    display: block;
    margin-bottom: 3px;
    color: #8491a3;
    font-size: 11px;
    line-height: 1.25;
  }

  .yyb-account-table td.yyb-select-column,
  .statistics-table td.statistics-select-column {
    position: absolute;
    top: 11px;
    right: 12px;
    z-index: 1;
    display: flex;
    align-items: center;
    width: auto !important;
    padding: 0 !important;
    border: 0;
  }

  .yyb-account-table td.yyb-select-column::before,
  .statistics-table td.statistics-select-column::before {
    display: none;
  }

  /* 扫码账号：账户、状态和操作优先展示；技术字段收进“账户信息”。 */
  .yyb-account-table td.yyb-account-main,
  .yyb-account-table td[data-label="上次业务扫码"],
  .yyb-account-table td.yyb-account-actions {
    grid-column: 1 / -1;
  }

  .yyb-account-table td.yyb-account-main {
    padding-right: 34px !important;
  }

  .yyb-account-table td.yyb-account-main::before {
    display: none;
  }

  .yyb-account-table td.yyb-account-remark,
  .yyb-account-table td[data-label="OpenID"],
  .yyb-account-table td[data-label="UIN"],
  .yyb-account-table td[data-label="最近检查"],
  .yyb-account-table td[data-label="添加时间"],
  .app-layout.role-admin .yyb-account-table td.admin-only-column {
    display: none;
  }

  .yyb-account-table .yyb-account-name {
    min-height: 32px;
  }

  .yyb-account-table .table-action-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 7px;
  }

  .yyb-account-table .table-action-group button {
    min-height: 34px;
    padding: 0 8px;
  }

  .mobile-account-details,
  .mobile-statistics-details,
  .mobile-qr-details,
  .mobile-proxy-details,
  .mobile-user-details {
    display: block;
    margin-top: 9px;
    border-top: 1px solid #e8edf4;
  }

  .mobile-account-details summary,
  .mobile-statistics-details summary,
  .mobile-qr-details summary,
  .mobile-proxy-details summary,
  .mobile-user-details summary {
    padding: 9px 0 1px;
    color: #52657d;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-account-details dl,
  .mobile-statistics-details dl,
  .mobile-qr-details dl,
  .mobile-proxy-details dl,
  .mobile-user-details dl {
    display: grid;
    gap: 7px;
    margin: 9px 0 2px;
  }

  .mobile-account-details dl > div,
  .mobile-statistics-details dl > div,
  .mobile-qr-details dl > div,
  .mobile-proxy-details dl > div,
  .mobile-user-details dl > div {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  .mobile-account-details dt,
  .mobile-account-details dd,
  .mobile-statistics-details dt,
  .mobile-statistics-details dd,
  .mobile-qr-details dt,
  .mobile-qr-details dd,
  .mobile-proxy-details dt,
  .mobile-proxy-details dd,
  .mobile-user-details dt,
  .mobile-user-details dd {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
  }

  .mobile-account-details dt,
  .mobile-statistics-details dt,
  .mobile-qr-details dt,
  .mobile-proxy-details dt,
  .mobile-user-details dt {
    color: #8491a3;
  }

  .mobile-account-details dd,
  .mobile-statistics-details dd,
  .mobile-qr-details dd,
  .mobile-proxy-details dd,
  .mobile-user-details dd {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #43536a;
  }

  /* 扫码统计：失败原因保持可见，但不再用长错误文本撑高整张记录。 */
  .statistics-table td[data-label="时间"],
  .statistics-table td[data-label="应用宝账户"],
  .statistics-table td[data-label="统计结果"] {
    grid-column: 1 / -1;
  }

  .statistics-table td[data-label="时间"] {
    padding-right: 34px !important;
  }

  .statistics-table td[data-label="产品名称"],
  .statistics-table td[data-label="扫码结果"],
  .statistics-table td[data-label="二维码"] {
    display: none;
  }

  .statistics-table td[data-label="统计结果"] {
    border-bottom: 0;
  }

  .mobile-statistics-error {
    display: -webkit-box;
    margin-top: 7px;
    overflow: hidden;
    color: #d92d20;
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .statistics-table .mobile-statistics-details {
    margin-top: 10px;
  }

  /* 二维码库：把长链接、完整结果和请求 Body 收进详情，列表只保留执行状态。 */
  .qr-library-card,
  .proxy-profiles-card,
  .users-card {
    padding: 11px;
  }

  .qr-table tbody,
  .users-table tbody,
  .proxy-profiles-table tbody {
    gap: 9px;
  }

  .qr-table tr,
  .users-table tr,
  .proxy-profiles-table tr {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.045);
  }

  .qr-table td,
  .users-table td,
  .proxy-profiles-table td {
    display: block;
    min-width: 0;
    min-height: 0;
    padding: 8px 0 !important;
    border-bottom: 1px dashed #e6ebf2;
    background: transparent;
  }

  .qr-table td::before,
  .users-table td::before,
  .proxy-profiles-table td::before {
    display: block;
    margin-bottom: 3px;
    color: #8491a3;
    font-size: 11px;
    line-height: 1.25;
  }

  .qr-table td.qr-select-column,
  .users-table td.users-select-column {
    position: absolute;
    top: 11px;
    right: 12px;
    z-index: 1;
    display: flex;
    width: auto !important;
    padding: 0 !important;
    border: 0;
  }

  .qr-table td.qr-select-column::before,
  .users-table td.users-select-column::before {
    display: none;
  }

  .qr-table td.scan-time,
  .qr-table td.qr-actions,
  .users-table td.user-main,
  .users-table td[data-label="账户余额"],
  .users-table td.user-actions,
  .proxy-profiles-table td.proxy-profile-name,
  .proxy-profiles-table td:nth-child(6),
  .proxy-profiles-table td:nth-child(9),
  .proxy-profiles-table td:last-child {
    grid-column: 1 / -1;
  }

  .qr-table td[data-label="二维码"],
  .qr-table td[data-label="产品名称"],
  .qr-table td[data-label="扫码结果"],
  .app-layout.role-admin .qr-table td.admin-only-column,
  .users-table td[data-label="备注"],
  .users-table td[data-label="创建时间"],
  .proxy-profiles-table td:nth-child(3),
  .proxy-profiles-table td:nth-child(7),
  .proxy-profiles-table td:nth-child(8) {
    display: none;
  }

  .qr-table td.scan-time {
    padding-right: 34px !important;
    border-bottom: 0;
  }

  .qr-table .mobile-qr-details {
    white-space: normal;
  }

  .qr-table .qr-actions .table-action-group {
    width: 100%;
  }

  /* 用户列表保留账号概览、状态、余额和扣费比例；备注与创建时间按需展开。 */
  .users-table td.user-main {
    padding-right: 34px !important;
  }

  .users-table td.user-main::before,
  .proxy-profiles-table td.proxy-profile-name::before {
    display: none;
  }

  .users-table .table-action-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 7px;
  }

  .users-table .table-action-group button {
    min-width: 0;
    min-height: 34px;
    padding: 0 5px;
  }

  /* 代理池库：名称、协议、计数和最近提取时间直接可见，其余内容按需查看。 */
  .proxy-profiles-table td:nth-child(1) {
    min-height: 0;
    background: transparent;
    font-size: 15px;
  }

  .proxy-profiles-table td:nth-child(9),
  .proxy-profiles-table tr:last-child td:nth-child(9) {
    border-bottom: 0;
  }

  .proxy-profiles-table .table-action-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 7px;
  }

  .proxy-profiles-table .table-action-group button {
    min-width: 0;
    min-height: 34px;
    padding: 0 7px;
  }
}

/* Keep the system-pool action visually distinct from a generic primary button. */
.workspace button.system-pool-action,
.workspace button.system-pool-action:hover {
  border-color: #b8d2ef !important;
  background: #edf5ff !important;
  color: #1d63a8 !important;
}

.workspace button.system-pool-action:hover {
  border-color: #8eb8e5 !important;
  background: #e3effc !important;
}

.workspace button.system-pool-action.is-member,
.workspace button.system-pool-action.is-member:hover {
  border-color: #d7dee8 !important;
  background: #f6f8fb !important;
  color: #64748b !important;
}

@media (max-width: 700px) {
  .yyb-group-modal-header-actions {
    gap: 5px;
  }

  .yyb-group-finance-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .yyb-group-page-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .yyb-group-owner-filter,
  .yyb-list-search {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .yyb-group-page-filter .owner-user-combobox,
  .yyb-group-page-filter .owner-user-combobox input,
  .yyb-list-search input {
    width: 100%;
  }

  .yyb-group-list {
    max-height: none;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  /* The desktop page-card rule has higher specificity and otherwise keeps a
     short max-height on mobile, causing the table row to flow underneath the
     pagination and action buttons. */
  .yyb-group-page-card,
  .yyb-group-page-card .yyb-group-list {
    max-height: none;
    overflow: visible;
  }

  .yyb-group-table,
  .yyb-group-table tbody {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

  .yyb-group-table thead {
    display: none;
  }

  .yyb-group-table tr {
    display: block;
    padding: 8px 11px;
    overflow: visible;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.045);
  }

  .yyb-group-table td {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 8px;
    width: auto !important;
    padding: 8px 0;
    border-top: 0;
    border-bottom: 1px dashed var(--border);
    text-align: left;
  }

  .yyb-group-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .yyb-group-table th:last-child,
  .yyb-group-table td:last-child {
    position: static;
    z-index: auto;
    min-width: 0;
    max-width: none;
    background: transparent;
    box-shadow: none;
  }

  .yyb-group-table td:last-child {
    border-bottom: 0;
  }

  .yyb-group-table td:last-child {
    align-items: start;
  }

  .yyb-group-table .table-action-group {
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
  }

  .yyb-group-table .table-action-group button {
    min-width: 0;
    min-height: 34px;
    padding: 0 4px;
  }
}

/* 登录页保持轻量、居中，并与团队登录页使用一致的表单节奏。 */
.login-screen {
  background: #f3f6fb;
}

.login-screen .login-card {
  width: min(368px, calc(100vw - 32px));
  padding: 32px;
  border: 1px solid #e1e7ef;
  border-radius: 14px;
  box-shadow: 0 18px 46px rgba(30, 52, 82, 0.09);
}

.login-screen .login-brand {
  width: fit-content;
  min-width: 64px;
  height: 32px;
  margin: 0 auto 26px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}

.login-screen form {
  display: grid;
  gap: 18px;
}

.login-screen .field label {
  margin-bottom: 8px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 650;
}

.login-screen .field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d5dce7 !important;
  border-radius: 8px !important;
  background: #fff !important;
}

.login-screen .field input::placeholder {
  color: #a4adba;
}

.login-screen .field input:focus {
  border-color: #6f9bea !important;
  box-shadow: 0 0 0 3px rgba(47, 100, 223, 0.12) !important;
}

.login-screen .login-submit {
  height: 44px;
  margin-top: 2px;
  border-radius: 8px;
}

.login-screen .login-error {
  min-height: 18px;
  margin-top: 14px;
}

@media (max-width: 480px) {
  .login-screen,
  .login-shell {
    padding: 14px;
  }

  .login-screen .login-card,
  .login-shell .login-card {
    padding: 26px 22px;
  }
}

/* 卡密管理与充值使用独立布局，不改变原有扫码和团队表格。 */
#balanceCardsView { width: 100%; min-width: 0; margin-right: auto; margin-left: auto; }
.balance-card-page { display: grid; width: 100%; min-width: 0; gap: 16px; }
.balance-card-list-card,
.created-balance-cards-panel { width: 100%; min-width: 0; }
.balance-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.balance-card-heading h2 { margin: 0; }
.balance-card-heading p { margin: 6px 0 0; color: #667085; font-size: 13px; }
.balance-card-list-card > .balance-card-heading { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.balance-card-heading-actions { display: flex; align-items: center; gap: 8px; }
.balance-card-create-modal-card { width: min(680px, calc(100vw - 28px)); }
.balance-card-purchase-config-modal-card { width: min(620px, calc(100vw - 28px)); }
.balance-card-purchase-guide-modal-card { width: min(430px, calc(100vw - 28px)); text-align: center; }
.balance-card-purchase-setup-guide-modal-card { width: min(520px, calc(100vw - 28px)); }
.balance-card-purchase-setup-guide-modal-card .modal-header { align-items: flex-start; }
.balance-card-purchase-setup-guide-modal-card .modal-header h2 { font-size: 19px; }
.balance-card-create-hint { margin: 6px 0 0; color: #667085; font-size: 13px; font-weight: 400; }
.balance-card-create-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 14px; margin-top: 18px; }
.balance-card-create-form .field { margin: 0; }
.balance-card-create-form .profile-error,
.balance-card-create-actions { grid-column: 1 / -1; }
.balance-card-create-actions { margin-top: 2px; }
.balance-card-purchase-config-form { display: grid; gap: 14px; margin-top: 18px; }
.balance-card-purchase-config-form .field { margin: 0; }
.balance-card-setup-guide-action-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 1px solid #e4e7ec; border-radius: 6px; background: #f8fafc; color: #667085; font-size: 12px; }
.balance-card-setup-guide-action-row button { flex: 0 0 auto; white-space: nowrap; }
.balance-card-online-switch { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border: 1px solid #bfdbfe; border-radius: 8px; background: #f8fbff; color: #344054; font-size: 13px; font-weight: 700; }
.balance-card-online-switch input { width: 17px; height: 17px; margin: 0; }
.balance-card-purchase-entry,
.workspace button.balance-card-purchase-entry { width: 100%; min-height: 36px; margin-top: 10px; border: 1px dashed #a7b9dc !important; background: #f8fbff !important; color: #2454c7 !important; box-shadow: none !important; }
.balance-card-purchase-entry:hover,
.workspace button.balance-card-purchase-entry:hover { border-color: #6f92d8 !important; background: #eef4ff !important; }
.balance-card-recharge-purchase-field { margin-top: 12px; padding: 10px 12px; border: 1px solid #d9e2f3; background: #f8fbff; }
.balance-card-recharge-purchase-label { display: block; margin-bottom: 6px; color: #52627a; font-size: 12px; font-weight: 700; }
.balance-card-recharge-purchase-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.balance-card-recharge-purchase-row a { min-width: 0; flex: 1; overflow: hidden; color: #2454c7; text-overflow: ellipsis; white-space: nowrap; }
.balance-card-purchase-guide-tip { margin: 10px 0 16px; color: #475467; line-height: 1.7; white-space: pre-wrap; }
.balance-card-purchase-guide-actions { justify-content: center; }
.balance-card-purchase-guide-actions button { min-width: 110px; }
.balance-card-purchase-setup-guide-intro { margin-top: 18px; }
.balance-card-purchase-setup-guide-intro strong { display: block; color: #1d2939; font-size: 18px; line-height: 1.4; }
.balance-card-purchase-setup-guide-intro p { margin: 6px 0 0; color: #667085; font-size: 13px; line-height: 1.6; }
.balance-card-purchase-setup-benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 17px; padding: 15px 0; border-top: 1px solid #e4e7ec; border-bottom: 1px solid #e4e7ec; }
.balance-card-purchase-setup-benefits span { display: flex; align-items: center; gap: 7px; min-width: 0; color: #344054; font-size: 12px; font-weight: 700; line-height: 1.4; }
.balance-card-purchase-setup-benefits span::before { content: "✓"; display: grid; flex: 0 0 22px; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #e8f7ee; color: #18794e; font-size: 13px; font-weight: 800; }
.balance-card-purchase-setup-next { display: flex; align-items: baseline; gap: 7px; margin-top: 14px; color: #667085; font-size: 12px; line-height: 1.5; }
.balance-card-purchase-setup-next strong { flex: 0 0 auto; color: #344054; font-size: 13px; }
.balance-card-purchase-setup-guide-actions { justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.balance-card-purchase-setup-guide-actions #dismissBalanceCardPurchaseSetupGuideBtn { margin-right: auto; border-color: transparent; background: transparent; color: #667085; box-shadow: none; }
.balance-card-purchase-setup-guide-actions #dismissBalanceCardPurchaseSetupGuideBtn:hover { border-color: #d0d5dd; background: #f9fafb; }
@media (max-width: 560px) {
  .balance-card-purchase-setup-guide-modal-card { width: calc(100vw - 20px); }
  .balance-card-purchase-setup-guide-intro { margin-top: 14px; }
  .balance-card-purchase-setup-benefits { grid-template-columns: 1fr; gap: 9px; padding: 13px 0; }
  .balance-card-purchase-setup-next { align-items: flex-start; flex-direction: column; gap: 2px; }
  .balance-card-purchase-setup-guide-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .balance-card-purchase-setup-guide-actions button { width: 100%; margin: 0 !important; }
  .balance-card-purchase-setup-guide-actions #openBalanceCardPurchaseSetupGuideBtn { order: -2; }
  .balance-card-purchase-setup-guide-actions #configureBalanceCardPurchaseNowBtn { order: -1; }
}
.system-config-card { width: min(820px, 100%); margin: 0 auto; }
.system-config-heading { padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.system-config-heading h2 { margin: 0; }
.system-config-heading p { margin: 6px 0 0; color: #667085; font-size: 13px; }
.system-card-purchase-config-form { display: grid; gap: 14px; margin-top: 18px; }
.system-card-purchase-config-form .field { margin: 0; }
.system-config-section-heading h3 { margin: 0; color: #344054; font-size: 16px; }
.system-config-section-heading p { margin: 5px 0 0; color: #667085; font-size: 12px; line-height: 1.5; }
.system-card-setup-guide-field small { display: block; margin-top: 6px; color: #667085; font-size: 12px; line-height: 1.45; }
.system-card-setup-guide-row { display: flex; align-items: center; gap: 8px; }
.system-card-setup-guide-row input { min-width: 0; flex: 1 1 auto; }
.system-card-setup-guide-row button { flex: 0 0 auto; white-space: nowrap; }
.system-config-divider { height: 1px; margin: 4px 0; background: var(--border); }
.system-promotion-reward-rate-field small { display: block; margin-top: 6px; color: #667085; font-size: 12px; line-height: 1.45; }
.system-promotion-reward-rate-control { display: flex; align-items: center; width: min(240px, 100%); }
.system-promotion-reward-rate-control input { min-width: 0; border-radius: 8px 0 0 8px; }
.system-promotion-reward-rate-control span { display: grid; flex: 0 0 44px; height: 42px; place-items: center; border: 1px solid var(--border); border-left: 0; border-radius: 0 8px 8px 0; background: #f8fafc; color: #475467; font-size: 13px; font-weight: 700; }
.system-config-actions { display: flex; justify-content: flex-end; padding-top: 2px; }
.created-balance-cards-panel textarea { width: 100%; min-height: 180px; margin-top: 14px; padding: 12px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.6; }
.balance-card-batch-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 10px 12px; border: 1px solid #bfdbfe; border-radius: 10px; background: #f8fbff; }
.balance-card-select-input,
.balance-card-select-column input { width: 16px; height: 16px; margin: 0; }
.balance-card-batch-toolbar > strong { color: #1d4ed8; font-size: 13px; }
.balance-card-batch-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.balance-card-table-wrap { width: 100%; max-width: 100%; min-width: 0; margin-top: 16px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.balance-card-table { width: 100%; min-width: 1370px; border-collapse: collapse; table-layout: fixed; }
.balance-card-table th,
.balance-card-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; font-size: 13px; }
.balance-card-table th { position: sticky; top: 0; z-index: 1; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.balance-card-table tr:last-child td { border-bottom: 0; }
.balance-card-table tbody tr:hover td { background: #fbfdff; }
.balance-card-table th:nth-child(1) { width: 58px; }
.balance-card-table th:nth-child(2) { width: 220px; }
.balance-card-table th:nth-child(3) { width: 115px; }
.balance-card-table th:nth-child(4) { width: 130px; }
.balance-card-table th:nth-child(5) { width: 100px; }
.balance-card-table th:nth-child(6) { width: 90px; }
.balance-card-table th:nth-child(7) { width: 150px; }
.balance-card-table th:nth-child(8) { width: 155px; }
.balance-card-table th:nth-child(9) { width: 150px; }
.balance-card-table th:nth-child(10) { width: 155px; }
.balance-card-table th:nth-child(11) { width: 150px; }
.balance-card-table th:last-child,
.balance-card-table td:last-child { position: sticky; right: 0; z-index: 2; background: #fff; box-shadow: -8px 0 12px -12px rgba(15, 23, 42, 0.55); }
.balance-card-table th:last-child { z-index: 3; background: var(--surface); }
.balance-card-select-column { width: 54px; text-align: center !important; }
.balance-card-code { display: block; overflow: hidden; color: #344054; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.balance-card-type { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.balance-card-type.system { color: #175cd3; background: #eff8ff; }
.balance-card-type.team { color: #027a48; background: #ecfdf3; }
.balance-card-status { display: inline-flex; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.balance-card-status.unused { color: #027a48; background: #ecfdf3; }
.balance-card-status.used { color: #475467; background: #f2f4f7; }
.balance-card-status.disabled { color: #b42318; background: #fef3f2; }
.balance-card-row-actions { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.balance-card-row-actions button { min-width: 56px; }
.balance-recharge-modal-card { width: min(480px, calc(100vw - 28px)); }
.sidebar-user-actions { flex-wrap: wrap; }

/* 管理员专属菜单统一放在末尾，并与普通业务菜单明确分隔。 */
.nav-item.system-nav-start {
  position: relative;
  height: 40px;
  min-height: 40px;
  margin-top: 4px;
}

.nav-item.system-nav-start::before {
  position: absolute;
  top: -5px;
  right: 0;
  left: 0;
  height: 1px;
  background: #dfe5ec;
  content: "";
  pointer-events: none;
}

@media (max-width: 760px) {
  .nav-item.system-nav-start {
    height: 38px;
    min-height: 38px;
    margin-top: 0;
    margin-left: 8px;
  }

  .nav-item.system-nav-start::before {
    top: 5px;
    right: auto;
    bottom: 5px;
    left: -7px;
    width: 1px;
    height: auto;
  }
}

@media (max-width: 1100px) {
  .balance-card-remark-field { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  #balanceCardsView { margin: 0; }
  .balance-card-page { gap: 12px; }
  .balance-card-list-card,
  .created-balance-cards-panel { padding: 14px; }
  .balance-card-heading { align-items: stretch; }
  .balance-card-heading-actions { flex: 0 0 auto; }
  .balance-card-heading-actions button { flex: 1; }
  .balance-card-table-wrap { overflow: visible; border: 0; border-radius: 0; }
  .balance-card-table,
  .balance-card-table tbody { display: grid; width: 100%; min-width: 0; gap: 10px; }
  .balance-card-table thead { display: none; }
  .balance-card-table tr { display: block; padding: 8px 12px; overflow: hidden; border: 1px solid #e4e7ec; border-radius: 10px; background: #fff; }
  .balance-card-table td { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 8px; width: auto !important; padding: 8px 0; border-bottom: 1px dashed #e4e7ec; text-align: left !important; }
  .balance-card-table td::before { content: attr(data-label); color: #667085; font-size: 12px; font-weight: 700; }
  .balance-card-table th:last-child,
  .balance-card-table td:last-child { position: static; z-index: auto; border-bottom: 0; background: transparent; box-shadow: none; }
  .balance-card-table .balance-card-select-column { display: flex; align-items: center; justify-content: space-between; }
  .balance-card-table .balance-card-select-column::before { content: attr(data-label); }
  .balance-card-code { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .balance-card-row-actions { flex-wrap: wrap; }
  .balance-card-row-actions button { flex: 1; }
  .created-balance-cards-panel textarea { min-height: 140px; }
}

@media (max-width: 650px) {
  .balance-card-heading { flex-direction: column; }
  .balance-card-batch-toolbar { align-items: stretch; flex-direction: column; }
  .balance-card-batch-actions { width: 100%; margin-left: 0; }
  .balance-card-batch-actions button { flex: 1; }
  .balance-card-create-form { grid-template-columns: 1fr; }
  .balance-card-remark-field,
  .balance-card-create-form .profile-error,
  .balance-card-create-actions { grid-column: auto; }
  .balance-card-create-actions button { flex: 1; }
  .balance-card-setup-guide-action-row { align-items: stretch; flex-direction: column; }
  .balance-card-setup-guide-action-row button { width: 100%; }
  .system-card-setup-guide-row { align-items: stretch; flex-direction: column; }
  .system-card-setup-guide-row button,
  .system-config-actions button { width: 100%; }
  .balance-card-filter { align-items: stretch; flex-direction: column; }
  .balance-card-filter .owner-user-combobox { width: 100%; }
  .balance-card-statistics { grid-template-columns: 1fr 1fr; }
  .balance-card-statistics > div:nth-child(2) { border-right: 0; }
  .balance-card-statistics > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .balance-card-pagination,
  .yyb-group-pagination { align-items: stretch; justify-content: flex-start; flex-direction: column; }
  .yyb-group-pagination { position: static; clear: both; width: 100%; margin-top: 14px; }
  .balance-card-pagination label,
  .yyb-group-pagination label { justify-content: space-between; width: 100%; }
  .balance-card-pagination select,
  .yyb-group-pagination select { width: 96px; }
  .balance-card-pagination .select-combobox,
  .yyb-group-pagination .select-combobox { width: 96px; }
  .balance-card-pagination button,
  .yyb-group-pagination button { width: 100%; }
}

@media (max-width: 420px) {
  .balance-card-statistics { grid-template-columns: 1fr; }
  .balance-card-statistics > div,
  .balance-card-statistics > div:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--border); }
  .balance-card-statistics > div:last-child { border-bottom: 0; }
}

/* 登录和独立/邀请注册沿用同一张登录卡片。 */
.login-screen .auth-mode-link {
  width: 100%;
  min-height: 36px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 650;
}

.login-screen .auth-mode-link:hover {
  background: transparent;
  color: #174ea6;
  text-decoration: underline;
}

.login-screen #registerForm {
  gap: 14px;
}

.login-screen .login-register-hint {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.login-screen #registerForm .auth-mode-link,
.login-screen #registerForm .login-error {
  margin-top: 0;
}

.login-screen .login-error.success {
  color: #15803d;
}

/* 菜单项增多后允许桌面侧栏内部滚动，移动端仍保持横向菜单。 */
.side-nav {
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 2px;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* 推广中心。 */
.promotion-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.promotion-center-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 0;
}

.promotion-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #55708f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.promotion-center-heading h1 {
  margin: 0;
  color: #172b4d;
  font-size: 26px;
  line-height: 1.2;
}

.promotion-center-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.promotion-guide-trigger {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #c6dced;
  border-radius: 4px;
  background: #f4f9fd;
  color: #1769aa;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.promotion-guide-trigger:hover {
  border-color: #8bb7d8;
  background: #eaf4fb;
}

.promotion-guide-trigger.team {
  border-color: #ecd4ad;
  background: #fff9ef;
  color: #a85d00;
}

.promotion-guide-trigger.team:hover {
  border-color: #d8ad70;
  background: #fff3df;
}

.promotion-content {
  min-width: 0;
}

.team-promotion-modal-card {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.promotion-content .promotion-link-card {
  width: 100%;
  margin: 0;
  text-align: left;
}

.promotion-content .promotion-link-heading h2 { color: #172b4d; font-size: 20px; }

#systemPromotionPanel,
#teamPromotionPanel {
  display: grid;
  gap: 16px;
  min-width: 0;
}

#systemPromotionPanel.hidden,
#teamPromotionPanel.hidden {
  display: none;
}

.team-promotion-purpose {
  display: grid;
  gap: 10px;
  margin-top: -2px;
  padding: 16px 18px 15px;
  border: 1px solid #b8d0ff;
  border-left: 5px solid #2f64df;
  border-radius: 8px;
  background: #eff6ff;
}

.team-promotion-purpose-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.team-promotion-purpose-heading > div > span {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #2f64df;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.team-promotion-purpose-heading > div > strong {
  display: block;
  margin-top: 7px;
  color: #1d2939;
  font-size: 17px;
  line-height: 1.45;
}

.team-promotion-purpose-heading > div > p {
  max-width: 760px;
  margin: 7px 0 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.65;
}

.team-promotion-purpose-heading > button {
  flex: 0 0 auto;
  min-width: 124px;
  margin-top: 2px;
}

.team-promotion-purpose-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 3px;
  color: #344054;
}

.team-promotion-purpose-flow > div {
  display: grid;
  flex: 1 1 0;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  min-width: 0;
}

.team-promotion-purpose-flow > div > b {
  display: grid;
  grid-row: 1 / span 2;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #2454c7;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px #9db9f4;
}

.team-promotion-purpose-flow > div > strong {
  color: #344054;
  font-size: 13px;
  line-height: 1.35;
}

.team-promotion-purpose-flow > div > span {
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
}

.team-promotion-purpose-flow > i {
  flex: 0 0 auto;
  color: #8aa7e8;
  font-size: 18px;
  font-style: normal;
  font-weight: 800;
}

.team-promotion-purpose-note {
  display: block;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.team-promotion-purpose small {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.team-promotion-filter-card {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.promotion-content .team-promotion-filter-card {
  padding: 14px 18px;
}

.team-promotion-filter-control {
  display: grid;
  flex: 0 1 320px;
  gap: 6px;
  width: min(320px, 100%);
}

.team-promotion-filter-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.team-promotion-breakdown {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
}

.team-promotion-breakdown b {
  color: #475467;
  font-weight: 700;
}

.team-promotion-breakdown strong {
  color: #1769aa;
  font-weight: 800;
}

.team-promotion-filter-control label {
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.team-promotion-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.team-promotion-pagination > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.promotion-link-card {
  width: min(820px, 100%);
  margin: 0 auto;
  text-align: center;
}

.promotion-inline-owner-filter {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.promotion-inline-owner-filter label {
  flex: 0 0 auto;
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.promotion-inline-owner-filter .owner-user-combobox {
  width: min(360px, 100%);
}

.promotion-link-heading h2,
.promotion-records-heading h2 {
  margin: 0;
  color: #30343b;
  font-size: 18px;
}

.promotion-link-heading > h2 {
  margin-top: 8px;
  font-size: 21px;
}

.promotion-link-heading p,
.promotion-records-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.promotion-reward-rule {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #f4c46a;
  border-left: 4px solid #e98a13;
  border-radius: 6px;
  background: #fff8e8;
  color: #69410a;
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
}

.promotion-reward-rule > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.promotion-reward-rule strong {
  color: #c45500;
  font-size: 15px;
  line-height: 1.45;
}

.promotion-reward-rule b {
  color: #b54708;
  font-size: 15px;
}

.promotion-reward-kicker {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 4px;
  background: #d97706;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.promotion-reward-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  text-align: left;
}

.promotion-reward-flow > div {
  display: flex;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  gap: 7px;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.promotion-reward-flow > div > b {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #c45500;
  box-shadow: inset 0 0 0 1px #f4c46a;
  font-size: 12px;
}

.promotion-reward-flow > i {
  flex: 0 0 auto;
  color: #e4a23a;
  font-size: 17px;
  font-style: normal;
  font-weight: 800;
}

.promotion-guide-modal-card {
  width: min(600px, calc(100vw - 28px));
}

.promotion-guide-modal-card .modal-header {
  align-items: flex-start;
}

.promotion-guide-modal-card .modal-header p {
  max-width: 480px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.promotion-guide-steps {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.promotion-guide-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #f8fafc;
}

.promotion-guide-steps li > strong {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #e6f1f9;
  color: #1769aa;
  font-size: 12px;
}

.promotion-guide-steps li > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.promotion-guide-steps b {
  color: #344054;
  font-size: 13px;
}

.promotion-guide-steps span {
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
}

.promotion-guide-note {
  margin: 13px 0 0;
  padding: 9px 11px;
  border-left: 3px solid #e0a04b;
  background: #fff9ef;
  color: #8a5b1b;
  font-size: 12px;
  line-height: 1.5;
}

.team-member-guide-prep {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 11px 13px;
  border: 1px solid #dce2ea;
  border-radius: 6px;
  background: #f7f9fc;
}

.team-member-guide-prep span,
.team-member-guide-result span {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.team-member-guide-prep strong {
  color: #344054;
  font-size: 13px;
}

.team-member-guide-prep small {
  color: #7b8492;
  font-size: 12px;
  line-height: 1.45;
}

.team-member-guide-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.team-member-guide-heading strong {
  color: #344054;
  font-size: 14px;
}

.team-member-guide-heading span {
  color: #7b8492;
  font-size: 11px;
}

.team-member-guide-steps {
  margin-top: 9px;
}

.team-member-guide-result {
  display: grid;
  gap: 4px;
  margin-top: 13px;
  padding: 11px 13px;
  border-left: 3px solid #2f64df;
  background: #f3f7ff;
}

.team-member-guide-result strong {
  color: #234fbd;
  font-size: 14px;
}

.team-member-guide-result small {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.promotion-guide-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.promotion-link-control {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 18px;
}

.promotion-owner-filter {
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
  text-align: left;
}

.promotion-owner-filter label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.promotion-owner-filter .owner-user-combobox {
  width: min(320px, 100%);
}

.promotion-shared-owner-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(360px, 100%);
  padding: 9px 12px;
}

.promotion-shared-owner-filter label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.promotion-shared-owner-filter .owner-user-combobox {
  width: min(360px, 100%);
}

.promotion-link-control input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.promotion-link-control button {
  flex: 0 0 auto;
  min-width: 104px;
}

.promotion-error {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 13px;
}

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

.promotion-summary-card {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.promotion-summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.promotion-summary-card strong {
  color: #1d63a8;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.promotion-summary-card small {
  color: #667085;
  font-size: 12px;
}

.promotion-records-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.promotion-table-wrap {
  width: 100%;
  margin-top: 16px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.promotion-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.promotion-table th,
.promotion-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

.promotion-table th {
  background: #f5f7fa;
  color: #666d78;
  font-size: 12px;
  font-weight: 700;
}

.promotion-table tr:last-child td {
  border-bottom: 0;
}

.promotion-table tbody tr:hover td {
  background: #fafcff;
}

.promotion-user-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.promotion-user-status.active {
  background: #dcfce7;
  color: #15803d;
}

.promotion-user-status.disabled {
  background: #fef3c7;
  color: #92400e;
}

.promotion-user-status.deleted,
.promotion-user-status.unknown {
  background: #f2f4f7;
  color: #667085;
}

.promotion-amount {
  color: #15803d;
  font-weight: 750;
  white-space: nowrap;
}

.promotion-empty {
  margin: 0;
  padding: 24px 16px;
  text-align: center;
}

/* 用户管理新增邀请人列后重新校准宽表列宽。 */
.users-table {
  min-width: 2540px;
}

.users-table th:nth-child(1) { width: 50px; }
.users-table th:nth-child(2) { width: 180px; }
.users-table th:nth-child(3) { width: 130px; }
.users-table th:nth-child(4) { width: 100px; }
.users-table th:nth-child(5) { width: 90px; }
.users-table th:nth-child(6) { width: 90px; }
.users-table th:nth-child(7) { width: 120px; }
.users-table th:nth-child(8) { width: 90px; }
.users-table th:nth-child(9) { width: 100px; }
.users-table th:nth-child(10) { width: 120px; }
.users-table th:nth-child(11) { width: 120px; }
.users-table th:nth-child(12) { width: 130px; }
.users-table th:nth-child(13) { width: 90px; }
.users-table th:nth-child(14) { width: 100px; }
.users-table th:nth-child(15) { width: 220px; }
.users-table th:nth-child(16) { width: 130px; }
.users-table th:nth-child(17) { width: 140px; }
.users-table th:nth-child(18) { width: 180px; }
.users-table th:nth-child(19) { width: 230px; }

.user-inviter {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .earn-more-page {
    gap: 14px;
  }

  .earn-more-heading h2 {
    font-size: 21px;
  }

  .earn-more-grid {
    gap: 12px;
  }

  .earn-more-card {
    padding: 15px;
  }

  .earn-more-description {
    min-height: 0;
  }

  .side-nav {
    flex: 0 0 auto;
    padding-right: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .promotion-summary-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .promotion-center-heading h1 { font-size: 23px; }

  .promotion-center-heading { align-items: stretch; flex-direction: column; }
  .promotion-shared-owner-filter { width: 100%; }

  .team-promotion-filter-card {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .team-promotion-filter-actions {
    align-items: stretch;
    display: flex;
    justify-content: flex-start;
  }

  .team-promotion-filter-actions button {
    min-width: 0;
    height: auto;
    min-height: 36px;
    padding: 6px;
    white-space: normal;
    line-height: 1.3;
  }

  .team-promotion-purpose {
    padding: 14px 14px 13px;
  }

  .team-promotion-purpose-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .team-promotion-purpose-heading > button {
    width: 100%;
    margin-top: 2px;
  }

  .team-promotion-purpose-flow {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .team-promotion-purpose-flow > i {
    align-self: center;
    transform: rotate(90deg);
  }

  .team-promotion-filter-control {
    flex: 0 0 auto;
    gap: 4px;
    width: 100%;
  }

  .team-promotion-filter-control .account-combobox input {
    height: 38px;
  }

  .team-promotion-filter-control .account-combobox::after {
    top: 15px;
  }

  .team-promotion-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .team-promotion-pagination > div {
    justify-content: space-between;
  }

  .promotion-records-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .promotion-records-heading button {
    width: 100%;
  }

  .promotion-table {
    min-width: 0;
  }

  .promotion-table thead {
    display: none;
  }

  .promotion-table tbody {
    display: grid;
    gap: 9px;
    padding: 9px;
  }

  .promotion-table tr {
    display: block;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
  }

  .promotion-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    background: transparent !important;
  }

  .promotion-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .promotion-table td:last-child {
    border-bottom: 0;
  }

  .app-layout.role-admin .promotion-table td.admin-only-column {
    display: grid;
  }
}

@media (max-width: 480px) {
  .promotion-link-heading > h2 {
    font-size: 19px;
  }

  .promotion-reward-rule {
    align-items: flex-start;
    gap: 9px;
    padding: 11px 13px;
  }

  .promotion-reward-kicker {
    margin-top: 1px;
  }

  .promotion-reward-flow {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .promotion-reward-flow > i {
    align-self: center;
    transform: rotate(90deg);
  }

  .promotion-link-control {
    flex-direction: column;
  }

  .promotion-link-control button {
    width: 100%;
  }

  .promotion-inline-owner-filter {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .promotion-inline-owner-filter label {
    padding-bottom: 0;
  }

  .promotion-inline-owner-filter .owner-user-combobox {
    width: 100%;
  }

  .promotion-owner-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .promotion-owner-filter .owner-user-combobox {
    width: 100%;
  }

  .promotion-shared-owner-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .promotion-shared-owner-filter .owner-user-combobox {
    width: 100%;
  }

  .promotion-summary-card strong {
    font-size: 22px;
  }
}

/* 命名分润模板列表不继承团队主表的超宽列布局。 */
#financeTemplateList .yyb-group-table {
  min-width: 900px;
  table-layout: auto;
}

@media (max-width: 700px) {
  #financeTemplateList .yyb-group-table {
    min-width: 0;
  }
}

#financeTemplateList .yyb-group-table th {
  width: auto;
}
#financeTemplateList .yyb-group-table th:first-child {
  width: 140px;
}
#financeTemplateList .yyb-group-table th:last-child {
  width: 130px;
}

/* QR purchase stays within the QR library workflow and keeps verification manual. */
.qr-purchase-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #f8fafc;
}

.master-purchase-visibility-card {
  display: none;
  margin-bottom: 14px;
}

.master-admin-portal .master-purchase-visibility-card {
  display: grid;
  gap: 12px;
}

.qr-purchase-actions .scan-settings-status {
  margin-left: auto;
}

.qr-purchase-config-card {
  width: min(680px, calc(100vw - 28px));
  max-height: min(880px, calc(100dvh - 28px));
  overflow-y: auto;
}

.qr-purchase-confirm-card {
  width: min(500px, calc(100vw - 28px));
}

.qr-purchase-result-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.qr-purchase-result-panel label {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.qr-purchase-result-panel textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  font-family: Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}

.qr-purchase-result-actions {
  justify-content: space-between;
}

.qr-purchase-result-actions span {
  color: #667085;
  font-size: 12px;
}

.qr-purchase-config-form,
.qr-purchase-slider-panel,
.qr-purchase-quote-panel {
  display: grid;
  gap: 14px;
}

.qr-purchase-login-grid,
.qr-purchase-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.qr-purchase-order-contact-field {
  grid-column: 1 / -1;
}

.qr-purchase-order-contact-field small {
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.qr-purchase-product-group {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
}

.qr-purchase-product-group legend {
  padding: 0 7px;
  color: #475467;
  font-size: 14px;
  font-weight: 700;
}

.qr-purchase-config-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.qr-purchase-slider-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #dce2ea;
  border-radius: 5px;
  background: #f8fafc;
}

.qr-purchase-slider-image {
  position: relative;
  width: 240px;
  height: 150px;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 4px;
  background: #e9eef5;
}

.qr-purchase-slider-image canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 240px;
  height: 150px;
}

.qr-purchase-slider-track {
  position: relative;
  width: 240px;
  height: 42px;
  margin: 0 auto;
  border: 1px solid #d2d9e3;
  border-radius: 4px;
  background: #eef2f7;
  color: #7a8492;
  line-height: 40px;
  text-align: center;
  user-select: none;
  touch-action: none;
}

.qr-purchase-slider-track > span {
  pointer-events: none;
}

#qrPurchaseSliderHandle {
  position: absolute;
  z-index: 2;
  top: -1px;
  left: -1px;
  width: 50px;
  height: 42px;
  padding: 0;
  border-radius: 4px;
  font-size: 25px;
  line-height: 40px;
  cursor: grab;
  touch-action: none;
}

#qrPurchaseSliderHandle:active {
  cursor: grabbing;
}

.qr-purchase-login-status {
  min-height: 21px;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.qr-purchase-login-status[data-level="success"] { color: #16803c; }
.qr-purchase-login-status[data-level="error"] { color: #b42318; }

.qr-purchase-quote-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid #b9d8c4;
  border-radius: 5px;
  background: #f2fbf5;
}

.qr-purchase-quote-panel[data-level="error"] {
  border-color: #f0b8b8;
  background: #fff5f5;
}

.qr-purchase-quote-panel > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.qr-purchase-quote-panel > p {
  grid-column: 1 / -1;
  margin: 0;
  color: #596273;
  line-height: 1.6;
}

@media (max-width: 620px) {
  .qr-purchase-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .qr-purchase-actions .scan-settings-status {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .qr-purchase-login-grid,
  .qr-purchase-product-grid,
  .qr-purchase-quote-panel {
    grid-template-columns: 1fr;
  }

  .qr-purchase-quote-panel > p {
    grid-column: auto;
  }

  .qr-purchase-config-actions > button {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media (max-width: 1050px) {
  .qr-inventory-grid {
    grid-template-columns: 1fr;
  }

  .qr-inventory-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qr-inventory-card > header {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .qr-inventory-card {
    grid-template-columns: 1fr;
  }

  .qr-inventory-card > header {
    grid-column: auto;
  }

  .qr-detail-modal {
    padding: 0;
  }

  .modal-card.qr-detail-modal-card {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    padding: 11px;
    border: 0;
    border-radius: 0;
  }

  /* The detail list owns the scrolling area; pagination stays in normal flow
     at the bottom instead of covering the last QR card. */
  .qr-detail-modal-card > .qr-detail-table-wrap {
    min-height: 0;
    height: auto;
    overflow: auto;
    overscroll-behavior: contain;
  }

  .qr-detail-modal-card > .qr-pagination {
    flex: 0 0 auto;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--panel, #fff);
  }

  .qr-detail-modal-card > .qr-pagination label,
  .qr-detail-modal-card > .qr-pagination button,
  .qr-detail-modal-card > .qr-pagination #qrPaginationInfo,
  .qr-detail-modal-card > .qr-pagination #qrPaginationTotal {
    flex: 0 0 auto;
  }

  .qr-detail-modal-card > .qr-pagination select {
    min-height: 38px;
  }

  .qr-detail-summary article {
    padding: 9px 8px;
  }

  .qr-detail-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .qr-detail-summary strong {
    font-size: 17px;
  }

  .qr-detail-status-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .qr-detail-status-tabs button {
    width: 100%;
    min-width: 0;
    padding: 0 5px;
  }

  .qr-batch-selection,
  .qr-today-wasted-filters {
    width: 100%;
  }

  .qr-today-wasted-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .qr-today-wasted-filters button {
    min-width: 0;
    min-height: 38px;
    padding: 5px 4px;
  }

  .qr-detail-table-wrap {
    min-height: 0;
  }
}

/* Waste detection shares the portal's account and proxy setup. */
.waste-check-page-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 18px; }
.waste-check-page-heading h1 { margin:0 0 6px; color:#1d2939; font-size:26px; }
.waste-check-page-heading .hint { margin:0; }
.waste-check-view { max-width:1500px; }
.waste-check-card + .waste-check-card { margin-top:18px; }
.waste-check-section-heading { display:flex; align-items:center; gap:12px; margin-bottom:18px; }
.waste-check-section-heading > div { flex:1; min-width:0; }
.waste-check-section-heading h2 { margin:0 0 5px; font-size:17px; }
.waste-check-section-heading .hint { margin:0; }
.waste-check-step { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; border-radius:10px; background:#eff6ff; color:#2563eb; font-size:14px; font-weight:700; }
.waste-check-form-grid { display:grid; grid-template-columns:minmax(160px,1.2fr) minmax(180px,1fr) minmax(180px,1fr) auto; align-items:end; gap:14px; margin-bottom:16px; }
.waste-check-card .field { display:grid; gap:7px; margin:0; min-width:0; color:#344054; font-size:13px; }
.waste-check-card input[type="text"], .waste-check-card input[type="search"], .waste-check-card select, .waste-check-access-card input[type="search"], .waste-check-access-card select { width:100%; min-width:0; }
.waste-check-card textarea { width:100%; min-height:170px; resize:vertical; font-family:Consolas,monospace; font-size:12px; line-height:1.65; }
.waste-check-outer-option { display:flex; align-items:center; gap:7px; min-height:40px; padding-bottom:3px; font-size:13px; white-space:nowrap; }
.waste-check-outer-option input[type="checkbox"] { width:16px; height:16px; min-width:16px; margin:0; }
.waste-check-file-field { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:12px 14px; margin-bottom:15px; border:1px dashed #cbd5e1; border-radius:8px; background:#f8fafc; font-size:13px; }
.waste-check-file-field input[type="file"] { width:260px; max-width:100%; padding:0; border:0; background:transparent; }
.waste-check-file-field .hint { margin:0; }
.waste-check-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-top:14px; }
.waste-check-toolbar > div { display:flex; gap:8px; flex-wrap:wrap; }
.waste-check-over-limit { color:#b42318; }
.waste-check-network-hint { margin:13px 0 0; }
.waste-check-card .profile-error { margin:8px 0 0; min-height:18px; }
.waste-check-metrics { display:grid; grid-template-columns:repeat(6,minmax(100px,1fr)); gap:12px; }
.waste-check-metrics article { display:grid; gap:9px; padding:16px; border:1px solid #e4e7ec; border-radius:10px; background:#f8fafc; }
.waste-check-metrics article span { color:#667085; font-size:12px; }
.waste-check-metrics article strong { color:#344054; font-size:26px; line-height:1; font-variant-numeric:tabular-nums; }
.waste-check-metrics article.unused { border-color:#bbf7d0; background:#f0fdf4; }
.waste-check-metrics article.unused strong { color:#15803d; }
.waste-check-metrics article.used { border-color:#fecaca; background:#fef2f2; }
.waste-check-metrics article.used strong { color:#b91c1c; }
.waste-check-metrics article.unknown { border-color:#fde68a; background:#fffbeb; }
.waste-check-metrics article.unknown strong { color:#b45309; }
.waste-check-progress-track { height:9px; margin-top:18px; overflow:hidden; border-radius:999px; background:#e4e7ec; }
.waste-check-progress-track > div { height:100%; width:0; background:#2563eb; transition:width .25s; }
.waste-check-progress-copy { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:9px; color:#667085; font-size:12px; font-variant-numeric:tabular-nums; }
.waste-check-result-toolbar { display:flex; align-items:end; gap:12px; flex-wrap:wrap; margin-bottom:15px; }
.waste-check-result-toolbar label { display:grid; gap:7px; width:150px; color:#344054; font-size:13px; }
.waste-check-result-toolbar .waste-check-search { flex:1; min-width:200px; max-width:520px; }
.waste-check-table-wrap { overflow-x:auto; }
.waste-check-table { width:100%; border-collapse:collapse; font-size:12px; }
.waste-check-table th { padding:11px 12px; border-bottom:1px solid #e4e7ec; background:#f8fafc; color:#475467; text-align:left; font-weight:600; white-space:nowrap; }
.waste-check-table td { padding:11px 12px; border-bottom:1px solid #edf0f5; vertical-align:middle; color:#344054; }
.waste-check-table th:first-child { width:65px; }
.waste-check-table td.waste-check-link { max-width:440px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family:Consolas,monospace; }
.waste-check-table .waste-check-result-message { min-width:200px; max-width:400px; overflow-wrap:anywhere; }
.waste-check-status { display:inline-flex; align-items:center; padding:3px 8px; border-radius:999px; color:#475467; background:#f2f4f7; font-size:11px; font-weight:600; white-space:nowrap; }
.waste-check-status.unused { background:#dcfce7; color:#15803d; }
.waste-check-status.used { background:#fee2e2; color:#b91c1c; }
.waste-check-status.unknown { background:#fef3c7; color:#b45309; }
.waste-check-status.pending { background:#dbeafe; color:#1d4ed8; }
.waste-check-history-table { min-width:930px; }
.waste-check-history-table th:first-child { width:auto; }
.waste-check-history-table td:first-child { min-width:150px; }
.waste-check-history-table td:first-child small { display:block; margin-top:4px; color:#98a2b3; font-size:11px; }
.waste-check-selected { background:#f0f6ff; }
.waste-check-pagination { display:flex; align-items:center; justify-content:flex-end; gap:12px; flex-wrap:wrap; margin-top:16px; color:#667085; font-size:12px; }
.waste-check-pagination > span:first-child { margin-right:auto; }
.waste-check-pagination label { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.waste-check-pagination select { width:70px; padding:5px 8px; height:30px; }
.waste-check-access-search { display:grid; gap:7px; width:min(400px,100%); margin:18px 0; color:#344054; font-size:13px; }
.waste-check-access-table { min-width:540px; }
.waste-check-access-table th:first-child { width:30%; }
.waste-check-access-table th:last-child { width:180px; text-align:right; }
.waste-check-access-table td:last-child { text-align:right; }
.waste-check-access-switch { display:inline-flex; align-items:center; gap:12px; font-size:12px; color:#667085; }
@media (max-width:1100px) { .waste-check-form-grid { grid-template-columns:repeat(2,minmax(170px,1fr)); } .waste-check-metrics { grid-template-columns:repeat(3,minmax(110px,1fr)); } }
@media (max-width:640px) { .waste-check-page-heading h1 { font-size:22px; } .waste-check-form-grid { grid-template-columns:1fr; gap:12px; } .waste-check-section-heading { gap:9px; flex-wrap:wrap; } .waste-check-section-heading > button { margin-left:45px; } .waste-check-section-heading h2 { font-size:16px; } .waste-check-metrics { grid-template-columns:repeat(2,minmax(90px,1fr)); gap:8px; } .waste-check-metrics article { padding:13px; } .waste-check-metrics article strong { font-size:24px; } .waste-check-toolbar > div { width:100%; } .waste-check-toolbar > div > button { flex:1; } .waste-check-result-toolbar { gap:8px; } .waste-check-result-toolbar label { width:100%; } .waste-check-result-toolbar .waste-check-search { max-width:none; min-width:0; } .waste-check-result-toolbar > button { flex:1; } .waste-check-pagination { gap:8px; } .waste-check-pagination > span:first-child { flex:1 0 100%; } }

.waste-check-top-grid { display:grid; grid-template-columns:minmax(0,1.12fr) minmax(0,1fr); align-items:start; gap:18px; margin-bottom:18px; }
.waste-check-top-grid > .waste-check-card { min-width:0; margin:0; }
.waste-check-top-grid .waste-check-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.waste-check-top-grid .waste-check-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.waste-check-top-grid .waste-check-metrics article { padding:14px 12px; }
.waste-check-top-grid .waste-check-section-heading { flex-wrap:wrap; }
.waste-check-top-grid .waste-check-section-heading > button { margin-left:48px; }
.waste-check-export-hint { margin:15px 0 0; line-height:1.6; }
.waste-check-history-actions { display:flex; gap:6px; white-space:nowrap; }
@media (max-width:1000px) { .waste-check-top-grid { grid-template-columns:1fr; } .waste-check-top-grid .waste-check-section-heading > button { margin-left:0; } }
@media (max-width:640px) { .waste-check-top-grid .waste-check-form-grid { grid-template-columns:1fr; } .waste-check-top-grid .waste-check-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .waste-check-top-grid .waste-check-section-heading > button { margin-left:45px; } }

.waste-check-card .waste-check-proxy-readonly { background:#f8fafc; color:#475467; cursor:default; }

.waste-check-proxy-panel { min-width:0; margin:0 0 16px; padding:14px; border:1px solid #dbe3f0; border-radius:10px; background:#f8fbff; }
.waste-check-proxy-panel .run-params-heading { align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.waste-check-proxy-panel h3 { margin:0; font-size:14px; color:#344054; }
.waste-check-proxy-panel .hint { margin:10px 0 0; line-height:1.6; }
.waste-check-proxy-panel .scan-proxy-multi-options { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); max-height:230px; overflow-y:auto; }

.waste-check-access-table { min-width:1350px; }
.waste-check-access-table th:first-child { width:auto; }
.waste-check-access-table th:last-child { width:180px; text-align:left; }
.waste-check-access-table td:last-child { text-align:left; }
.waste-check-access-table select { min-width:120px; }
.waste-check-access-table input[type="number"] { width:105px; min-width:80px; }
.waste-check-access-table td { vertical-align:middle; }
.waste-check-access-table td > small { display:block; margin-top:6px; color:var(--muted); }
.waste-check-access-actions { display:flex; gap:6px; white-space:nowrap; }
