/* 188159: shared tokens and one rule owner per component. */
:root {
  color-scheme:light;
  --bg:#f4f7f6;
  --surface:#fff;
  --surface-2:#f5f8f7;
  --surface-3:#e7eeeb;
  --ink:#192c26;
  --muted:#62796e;
  --faint:#84968d;
  --line:#dce6e1;
  --brand:#087966;
  --brand-strong:#066351;
  --brand-soft:#e8f5ef;
  --success:#087966;
  --danger:#bc3a4a;
  --danger-soft:#fff0f2;
  --warning:#966018;
  --warning-soft:#fff5e5;
  --shadow:0 2px 8px #193b2c04;
  --mono:Consolas,"SFMono-Regular",monospace;
  --sans:"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif
}
.dark {
  color-scheme:dark;
  --bg:#101916;
  --surface:#17251f;
  --surface-2:#1d2d26;
  --surface-3:#2a3d33;
  --ink:#eef5f1;
  --muted:#a6bab0;
  --faint:#819a8d;
  --line:#34483d;
  --brand:#73d7bd;
  --brand-strong:#99e6d0;
  --brand-soft:#233e33;
  --success:#73d7bd;
  --danger:#ff9eae;
  --danger-soft:#40292f;
  --warning:#efc37d;
  --warning-soft:#3c3326;
  --shadow:none
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  min-width:320px;
  background:var(--bg);
  color:var(--ink);
  font:14px/1.6 var(--sans)
}
button,input,select,textarea {
  font:inherit
}
button {
  cursor:pointer
}
a {
  color:inherit
}
button:disabled {
  opacity:.55;
  cursor:not-allowed
}
[hidden] {
  display:none!important
}
h1,h2,h3,p {
  margin:0
}
h1 {
  font-size:25px;
  line-height:1.3;
  letter-spacing:-.025em
}
h2 {
  font-size:17px;
  line-height:1.4
}
h3 {
  font-size:14px
}
small {
  font-size:12px;
  color:var(--muted)
}
button,a,input,select,textarea,summary {
  -webkit-tap-highlight-color:transparent
}
:focus-visible {
  outline:2px solid var(--brand);
  outline-offset:3px
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}
.topbar {
  height:56px;
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 max(24px,calc((100vw - 1600px)/2 + 24px));
  border-bottom:1px solid var(--line);
  background:var(--surface)
}
.brand {
  display:flex;
  gap:10px;
  align-items:center;
  text-decoration:none;
  flex:none
}
.brand-mark {
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:10px;
  background:var(--brand-soft);
  border:1px solid var(--line);
  color:var(--brand);
  font-weight:750
}
.brand b {
  display:block;
  font-size:16px
}
.brand small {
  display:block;
  font-size:10px
}
.top-actions {
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0
}
.service-dot {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:12px;
  color:var(--muted);
  white-space:nowrap
}
.service-dot i,.public-limit-note i {
  width:6px;
  height:6px;
  display:inline-block;
  border-radius:50%;
  background:var(--success)
}
.service-dot.is-stale i {
  background:var(--warning)
}
.icon-button {
  display:inline-grid;
  place-items:center;
  width:36px;
  height:36px;
  flex:none;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--surface);
  color:var(--ink);
  font-size:17px
}
.extraction-stats {
  display:flex;
  align-items:center;
  gap:12px;
  padding:4px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface-2);
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
  position:relative
}
.extraction-stats b {
  font-weight:650;
  color:var(--ink)
}
.extraction-stats .stats-success,.extraction-stats .stats-success b {
  color:var(--success)
}
.extraction-stats .stats-failure,.extraction-stats .stats-failure b {
  color:var(--danger)
}
.stats-small {
  display:none
}
.extraction-stats.is-stale {
  border-style:dashed
}
.extraction-stats:focus-visible::after {
  content:attr(title);
  position:absolute;
  right:0;
  top:36px;
  width:260px;
  max-width:80vw;
  white-space:normal;
  padding:10px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:8px;
  box-shadow:var(--shadow);
  z-index:60
}
.shell {
  max-width:1600px;
  margin:auto;
  padding:8px 24px 32px
}
.workspace-intro {
  display:flex;
  align-items:center;
  gap:12px;
  min-height:38px;
  margin-bottom:8px
}
.workspace-intro>div {
  display:flex;
  align-items:center;
  gap:10px
}
.intro-caption {
  font-size:11px;
  color:var(--muted);
  margin-right:auto
}
.plan-badge {
  padding:2px 8px;
  border-radius:6px;
  background:var(--brand-soft);
  color:var(--brand);
  font-size:12px;
  font-weight:700
}
.route-tabs {
  flex:none
}
.route-tab-row {
  border:0;
  padding:0;
  margin:0;
  min-width:0
}
.route-tab-row legend,.plan-only {
  display:none
}
.rail-grid {
  display:flex;
  gap:4px;
  padding:3px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface)
}
.rail {
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  min-width:108px;
  min-height:34px;
  padding:3px 10px;
  border-radius:8px;
  cursor:pointer;
  font-size:13px
}
.rail small {
  display:none
}
.rail input,.choice input {
  position:absolute;
  opacity:0;
  width:1px;
  height:1px
}
.rail:has(input:focus-visible) {
  outline:2px solid var(--brand);
  outline-offset:2px
}
.rail.active {
  background:var(--brand-soft);
  color:var(--brand)
}
.rail.active b {
  font-weight:750
}
.rail.disabled {
  opacity:.5;
  cursor:not-allowed
}
.rail-icon {
  display:grid;
  place-items:center;
  width:23px;
  height:23px;
  font-weight:700;
  background:var(--surface-2);
  border-radius:50%
}
.rail.active .rail-icon {
  background:var(--surface)
}
.workspace-grid {
  display:grid;
  grid-template-columns:350px minmax(0,1fr);
  gap:20px;
  align-items:start
}
.panel {
  min-width:0;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:var(--shadow)
}
.form-panel,.batch-panel {
  padding:20px
}
.batch-panel {
  padding:11px
}
.batch-panel>.panel-heading {
  margin-bottom:4px
}
.form-panel:not(.login-panel) {
  position:sticky;
  top:84px;
  max-height:calc(100dvh - 104px);
  overflow:auto;
  scrollbar-width:thin
}
.right-stack {
  container:tasks / inline-size;
  min-width:0
}
.panel-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px
}
.panel-heading>div {
  display:flex;
  align-items:center;
  min-width:0
}
.section-index {
  display:inline-grid;
  place-items:center;
  min-width:23px;
  height:23px;
  margin-right:8px;
  border-radius:6px;
  background:var(--brand-soft);
  color:var(--brand);
  font-size:11px;
  font-weight:700
}
.quiet {
  padding:3px 7px;
  background:var(--surface-2);
  border-radius:6px;
  font-size:10px;
  white-space:nowrap;
  color:var(--muted)
}
.panel-caption {
  font-size:12px;
  color:var(--muted);
  margin-top:-9px;
  margin-bottom:16px
}
.public-limit-note {
  display:flex;
  flex-wrap:wrap;
  gap:3px 8px;
  padding:9px 11px;
  margin-bottom:16px;
  border-radius:8px;
  background:var(--surface-2);
  font-size:11px;
  color:var(--muted)
}
.public-limit-note b {
  font-weight:600;
  color:var(--brand)
}
.public-limit-note i {
  margin-right:6px
}
.field {
  display:block;
  min-width:0;
  margin-bottom:14px
}
.field>span:first-child,.label-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:6px;
  font-size:12px;
  font-weight:600
}
.proxy-input-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:6px;
  font-size:12px;
  font-weight:600
}
.proxy-input-heading label {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
  flex:1
}
.proxy-select-button {
  flex:none;
  border:1px solid var(--line);
  border-radius:6px;
  padding:3px 8px;
  background:var(--surface);
  color:var(--muted);
  font-size:10px;
  cursor:pointer
}
.proxy-select-button:hover {
  border-color:var(--brand);
  color:var(--brand)
}
.label-row small,.field>span small {
  font-size:10px;
  font-weight:400
}
.field input,.field select,.field textarea,.field-input,.task-toolbar input,.task-toolbar select,.proxy-scheme-select {
  width:100%;
  min-width:0;
  min-height:40px;
  border:1px solid var(--line);
  border-radius:8px;
  padding:9px 10px;
  background:var(--surface);
  color:var(--ink);
  font-size:13px;
  outline-offset:2px
}
.field input:focus,.field select:focus,.field textarea:focus {
  border-color:var(--brand)
}
.field textarea {
  min-height:110px;
  resize:vertical;
  font:12px/1.7 var(--mono)
}
.field textarea::placeholder {
  color:var(--faint)
}
.field-note,.inline-note {
  display:block;
  color:var(--muted);
  font-size:11px;
  line-height:1.7;
  overflow-wrap:anywhere;
  margin:7px 0
}
.two-cols {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px
}
.two-cols .field {
  margin-bottom:8px
}
.form-section-title {
  margin:18px 0 12px;
  padding-top:16px;
  border-top:1px solid var(--line)
}
.primary-button,.secondary-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:38px;
  padding:8px 11px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface);
  color:var(--ink);
  text-decoration:none;
  font-size:12px;
  font-weight:600;
  line-height:1.4;
  transition:background .15s,border-color .15s
}
.primary-button {
  background:var(--brand);
  border-color:var(--brand);
  color:#fff
}
.dark .primary-button {
  color:#112c20
}
.primary-button:hover:not(:disabled) {
  background:var(--brand-strong);
  border-color:var(--brand-strong)
}
.secondary-button:hover:not(:disabled) {
  background:var(--surface-2);
  border-color:var(--brand)
}
.danger-button,.batch-stop {
  color:var(--danger)
}
.form-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px
}
.token-actions .primary-button {
  width:100%;
  min-height:44px;
  font-size:13px
}
.token-actions .primary-button i {
  margin-left:auto;
  font-style:normal
}
.token-actions .secondary-button {
  width:100%
}
.form-feedback {
  padding:10px;
  margin:10px 0;
  background:var(--danger-soft);
  color:var(--danger);
  border-radius:8px;
  font-size:12px;
  overflow-wrap:anywhere
}
.proxy-block,.settings-section {
  border-top:1px solid var(--line);
  margin-top:16px;
  padding-top:14px
}
.config-summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:38px;
  cursor:pointer;
  list-style:none
}
.config-summary::-webkit-details-marker {
  display:none
}
.config-summary>span:first-child {
  display:grid;
  gap:2px
}
.config-summary b {
  font-size:13px
}
.config-summary small {
  font-size:11px
}
.config-summary::after {
  content:'+';
  font-size:18px;
  color:var(--muted)
}
details[open]>.config-summary::after {
  content:'−'
}
.config-static-heading {
  cursor:default
}
.config-static-heading::after {
  content:none
}
.config-edit {
  margin-left:auto;
  font-size:11px;
  color:var(--brand)
}
.proxy-body,.settings-body {
  padding-top:12px
}
.block-heading {
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:8px;
  margin-bottom:12px
}
.block-tags {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px
}
.help-note {
  font-size:11px;
  color:var(--muted)
}
.help-note summary {
  cursor:pointer
}
.help-note p {
  margin:8px 0
}
.proxy-scheme-wrap {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:10px
}
.proxy-scheme-select {
  width:auto;
  min-height:32px;
  padding:5px 7px;
  font-size:11px
}
.local-save-tag,.required-tag {
  font-size:10px;
  color:var(--muted)
}
.required-tag {
  color:var(--warning)
}
#proxyGrid {
  grid-template-columns:1fr
}
.proxy-foot {
  font-size:11px;
  color:var(--muted);
  overflow-wrap:anywhere
}
.retry-setting {
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:8px
}
.retry-setting .field {
  width:120px;
  flex:none
}
.retry-setting p {
  color:var(--muted);
  font-size:11px
}
.toggle-line {
  display:flex;
  align-items:center;
  gap:10px;
  margin:12px 0
}
.toggle-line b {
  display:block;
  font-size:12px
}
.toggle-line small {
  display:block;
  font-size:10px
}
.switch {
  position:relative;
  flex:none;
  width:32px;
  height:19px
}
.switch input {
  position:absolute;
  opacity:0;
  width:1px;
  height:1px
}
.switch span {
  display:block;
  width:32px;
  height:19px;
  border-radius:20px;
  background:var(--surface-3);
  cursor:pointer
}
.switch span::after {
  content:'';
  position:absolute;
  width:13px;
  height:13px;
  top:3px;
  left:3px;
  border-radius:50%;
  background:var(--surface);
  box-shadow:0 1px 3px #0002;
  transition:transform .15s
}
.switch input:checked+span {
  background:var(--brand)
}
.switch input:checked+span::after {
  transform:translateX(13px);
  background:#fff
}
.switch input:focus-visible+span {
  outline:2px solid var(--brand);
  outline-offset:3px
}
.conditional-fields {
  padding:12px;
  background:var(--surface-2);
  border-radius:8px;
  margin:12px 0
}
.compact-fields .field:last-child {
  margin-bottom:0
}
.optional-tag {
  color:var(--brand)
}
.publish-options>h3 {
  margin-bottom:7px
}
.publisher-off,.publisher-choice {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  cursor:pointer;
  min-height:34px
}
.publisher-off {
  margin:8px 0
}
.publisher-choice input,.publisher-off input {
  width:15px;
  height:15px;
  accent-color:var(--brand);
  flex:none;
  margin:0
}
.publisher-choice span {
  display:grid;
  gap:0
}
.publisher-choice b {
  font-size:12px
}
.publisher-choice small {
  font-size:10px
}
.publisher-card {
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  margin:6px 0;
  min-width:0
}
.publisher-card.is-active {
  border-color:var(--brand)
}
.publisher-fields {
  margin-top:10px
}
.publisher-cdk-row {
  display:flex;
  gap:7px;
  align-items:flex-end;
  min-width:0
}
.publisher-cdk-row>.field {
  flex:1;
  min-width:0;
  margin:0
}
.publisher-cdk-row>.secondary-button {
  flex:none;
  min-height:40px;
  padding-inline:8px
}
.publisher-fields a {
  color:var(--brand);
  text-decoration:none
}
.publisher-team {
  margin:12px 0 0
}
.team-refresh {
  margin-top:10px
}
.publisher-cdk-status {
  margin-top:8px;
  font-size:11px;
  color:var(--muted);
  overflow-wrap:anywhere
}
.publisher-cdk-status:empty {
  display:none
}
.publisher-cdk-status.is-error,.publisher-unavailable {
  color:var(--danger)
}
.publisher-cdk-status.is-success {
  color:var(--success)
}
.publisher-worker-status {
  margin-top:8px;
  font-size:11px;
  color:var(--muted);
  overflow-wrap:anywhere
}
.publisher-worker-status.is-error {
  color:var(--danger)
}
.publisher-worker-status.is-success {
  color:var(--success)
}
.publisher-submit-credentials {
  margin-top:16px
}
.publisher-team-stats {
  max-height:240px;
  overflow:auto;
  margin-top:10px;
  scrollbar-width:thin
}
.publisher-team-stats:empty {
  display:none
}
.publisher-team-stats table {
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  font-size:10px
}
.publisher-team-stats caption {
  text-align:left;
  margin-bottom:6px;
  color:var(--muted)
}
.publisher-team-stats th,.publisher-team-stats td {
  padding:7px 3px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
  overflow-wrap:anywhere
}
.publisher-team-stats th:first-child {
  width:37%
}
.publisher-team-stats th:nth-child(2) {
  width:27%
}
.publisher-team-stats td small {
  display:block;
  font-size:9px
}
.team-name-button {
  max-width:100%;
  background:none;
  border:0;
  padding:0;
  font:inherit;
  text-align:left;
  color:var(--brand);
  overflow-wrap:anywhere
}
.batch-summary {
  display:flex;
  flex-wrap:wrap;
  gap:8px 18px;
  font-size:12px;
  color:var(--muted)
}
.task-overview {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px 14px;
  min-height:18px
}
.task-overview .batch-summary {
  flex:1 1 auto
}
.task-overview #workerSummary {
  margin:0;
  font-size:10px;
  overflow-wrap:anywhere;
  white-space:normal
}
.task-visible-count {
  color:var(--muted);
  font-size:10px;
  white-space:nowrap
}
.batch-summary b {
  margin-left:5px;
  color:var(--ink);
  font-variant-numeric:tabular-nums
}
.batch-total {
  font-weight:600;
  color:var(--ink)
}
.submission-summary {
  margin-top:5px;
  padding:6px 8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface-2);
  font-size:12px;
  overflow-wrap:anywhere
}
.submission-counts {
  display:flex;
  flex-wrap:wrap;
  gap:6px 14px;
  color:var(--muted)
}
.submission-counts strong {
  color:var(--ink)
}
.submission-counts b,.submission-counts strong span {
  font-variant-numeric:tabular-nums
}
.submission-error,.submission-unknown {
  color:var(--danger)
}
.submission-note {
  margin:6px 0 0;
  color:var(--muted);
  line-height:1.6
}
.summary-item.done {
  color:var(--success)
}
.summary-item.error,.summary-item.unknown {
  color:var(--danger)
}
.batch-actions {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0
}
.batch-actions .primary-button,.batch-actions .secondary-button {
  min-height:34px;
  padding:6px 9px;
  font-size:11px
}
.task-command-bar {
  display:flex;
  align-items:center;
  gap:8px;
  margin:6px 0
}
.task-toolbar {
  display:flex;
  gap:8px;
  align-items:center;
  flex:1 1 320px;
  min-width:260px
}
.task-search {
  flex:1;
  min-width:0
}
.task-toolbar>label:last-child {
  width:125px;
  flex:none
}
.task-toolbar input {
  background:var(--surface-2)
}
.task-note {
  margin:8px 0 0;
  font-size:10px
}
.batch-list {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:start;
  gap:10px;
  max-height:none;
  min-height:140px;
  overflow:visible;
  padding:2px;
  margin:-2px;
  scrollbar-width:thin;
  overscroll-behavior:contain
}
.batch-task {
  min-width:0;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--surface);
  overflow:hidden
}
.batch-task-content {
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:7px
}
.batch-task-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px
}
.batch-task-number {
  font:10px var(--mono);
  color:var(--muted)
}
.batch-state {
  flex:none;
  font-size:10px;
  font-weight:650;
  padding:2px 6px;
  border-radius:5px;
  background:var(--surface-2);
  color:var(--muted)
}
.batch-state.running,.batch-state.submitting {
  color:var(--brand);
  background:var(--brand-soft)
}
.batch-state.done {
  color:var(--success);
  background:var(--brand-soft)
}
.batch-state.error,.batch-state.unknown {
  color:var(--danger);
  background:var(--danger-soft)
}
.batch-state.quota_exhausted,.summary-item.quota_exhausted {
  color:#b45309;
  background:#fff7ed
}
.license-field #licenseStatus.is-valid {color:var(--brand)}
.license-field #licenseStatus.is-error {color:var(--danger)}
.virtual-spacer {grid-column:1/-1;pointer-events:none;min-height:1px}
.batch-state.queued {
  color:var(--warning);
  background:var(--warning-soft)
}
.batch-task-email {
  display:block;
  font-size:12px;
  line-height:1.45;
  overflow-wrap:anywhere;
  font-weight:650
}
.batch-task-meta {
  display:flex;
  align-items:center;
  min-width:0;
  gap:3px;
  font-size:10px;
  color:var(--muted);
  overflow:hidden;
  white-space:nowrap
}
.batch-task-meta>span:last-child {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis
}
.batch-percent {
  color:var(--brand);
  font-variant-numeric:tabular-nums
}
.batch-task-progress {
  height:3px;
  background:var(--surface-3);
  border-radius:3px;
  overflow:hidden
}
.batch-task-progress i {
  display:block;
  height:100%;
  background:var(--brand);
  border-radius:inherit;
  transition:width .2s ease
}
.batch-task-message {
  font-size:11px;
  line-height:1.45;
  color:var(--muted);
  overflow-wrap:anywhere;
  white-space:pre-wrap
}
.batch-task-message.is-error {
  color:var(--danger)
}
.batch-task-platform {
  display:block;
  padding:4px 7px;
  border-radius:6px;
  background:var(--surface-2);
  color:var(--muted);
  font-size:10px;
  overflow-wrap:anywhere
}
.batch-task-platform.is-success {
  color:var(--success);
  background:var(--brand-soft)
}
.batch-task-platform.is-error {
  color:var(--danger);
  background:var(--danger-soft)
}
.batch-task-platform.is-waiting {
  color:var(--warning);
  background:var(--warning-soft)
}
.publisher-feedback {
  font-size:11px;
  line-height:1.45;
  color:var(--muted);
  overflow-wrap:anywhere;
  white-space:pre-wrap
}
.publisher-feedback.is-error {
  color:var(--danger)
}
.publisher-routing {
  padding-left:9px;
  border-left:2px solid var(--line)
}
.card-qr-area {
  display:flex;
  align-items:center;
  flex-direction:column;
  gap:5px;
  margin:1px 0
}
.qr-preview {
  border:1px solid var(--line);
  border-radius:9px;
  padding:6px;
  background:#fff;
  min-height:44px;
  line-height:0;
  cursor:zoom-in
}
.batch-task-qr {
  display:block;
  width:112px;
  height:112px;
  object-fit:contain;
  background:#fff
}
.card-expiry {
  font-size:11px;
  color:var(--muted);
  font-variant-numeric:tabular-nums
}
.card-expiry.is-expired {
  color:var(--danger)
}
.batch-task-footer {
  padding:8px 10px;
  border-top:1px solid var(--line);
  background:var(--surface-2)
}
.batch-task-actions {
  display:flex;
  flex-wrap:nowrap;
  gap:4px
}
.batch-task-actions .batch-copy {
  flex:1 1 0;
  min-width:0;
  min-height:32px;
  font-size:10px;
  padding:5px 4px;
  white-space:nowrap
}
.batch-task-actions .copy-result {
  order:-1
}
.batch-publisher-actions {
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  margin-top:6px
}
.batch-publisher-actions button {
  flex:1 1 100px;
  min-width:0;
  min-height:34px;
  font-size:11px;
  padding:6px 7px
}
.batch-stop {
  min-height:34px;
  margin-top:6px;
  width:100%
}
.action-reason {
  font-size:10px;
  color:var(--muted);
  margin-top:5px;
  overflow-wrap:anywhere
}
.manual-copy-value {
  width:100%;
  margin-top:8px;
  font-size:11px;
  padding:6px;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--surface);
  color:var(--ink)
}
.empty-log {
  grid-column:1/-1;
  display:grid;
  place-content:center;
  gap:8px;
  text-align:center;
  min-height:140px;
  padding:24px;
  color:var(--muted);
  font-size:13px
}
.empty-log b {
  color:var(--ink);
  font-weight:600
}
.empty-log span {
  font-size:12px
}
@container tasks (min-width:440px) {
  .batch-list {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
}
@container tasks (min-width:680px) {
  .batch-list {
    grid-template-columns:repeat(3,minmax(0,1fr))
  }
}
@container tasks (min-width:900px) {
  .batch-list {
    grid-template-columns:repeat(4,minmax(0,1fr))
  }
}
@container tasks (min-width:960px) {
  .batch-panel>.panel-heading h2 {
    font-size:15px
  }
  .batch-summary {
    gap:4px 10px;
    font-size:10px
  }
  .task-overview #workerSummary,.task-visible-count {
    font-size:9px
  }
  .batch-list {
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:6px
  }
  .batch-task-content {
    padding:7px;
    gap:4px
  }
  .batch-task-top {
    gap:3px
  }
  .batch-task-meta {
    gap:3px;
    font-size:9px;
    overflow:hidden
  }
  .batch-task-number {
    font-size:9px
  }
  .batch-state {
    font-size:9px;
    padding:2px 4px
  }
  .batch-task-email {
    font-size:10px;
    line-height:1.25;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden
  }
  .round-badge {
    font-size:7px;
    padding:1px 2px
  }
  .task-select-wrap {
    margin-right:1px
  }
  .batch-task-meta>span:last-child {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis
  }
  .batch-task-message,.batch-task-platform,.publisher-feedback {
    font-size:9px;
    line-height:1.3
  }
  .batch-task-message {
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden
  }
  .task-rounds-history,.batch-task-relation {
    font-size:8px
  }
  .batch-task-relation .link-inline {
    font-size:8px
  }
  .task-rounds-history {
    gap:2px;
    margin:2px 0;
    padding:2px 3px
  }
  .card-qr-area {
    gap:2px
  }
  .qr-preview {
    padding:3px;
    border-radius:6px
  }
  .batch-task-qr {
    width:72px;
    height:72px
  }
  .card-expiry {
    font-size:8px
  }
  .batch-task-footer {
    padding:5px 6px
  }
  .batch-task-actions,.batch-publisher-actions {
    gap:3px
  }
  .batch-task-actions .batch-copy,.batch-publisher-actions button {
    min-height:27px;
    padding:4px 3px;
    font-size:9px
  }
  .batch-publisher-actions {
    margin-top:4px
  }
  .batch-stop {
    min-height:27px;
    margin-top:4px;
    font-size:9px;
    padding:4px
  }
  .batch-multibar {
    margin:5px 0;
    padding:5px 7px;
    gap:4px
  }
  .multibar-top {
    gap:5px;
    font-size:10px
  }
  .multibar-count,.chip-btn,.action-btn {
    font-size:9px
  }
  .chip-btn {
    padding:2px 5px
  }
  .action-btn {
    padding:4px 7px
  }
  .task-note {
    margin:5px 0 0;
    font-size:9px
  }
}
.workspace-views {
  display:none
}
footer {
  max-width:1600px;
  margin:auto;
  padding:10px 24px 24px;
  display:flex;
  gap:12px;
  font-size:11px;
  color:var(--muted)
}
footer span {
  font-weight:700;
  color:var(--ink)
}
.login-panel {
  position:static;
  max-width:420px;
  margin:10vh auto;
  padding:30px
}
.login-brand {
  margin-bottom:30px
}
.login-panel h1 {
  font-size:24px;
  margin-bottom:10px
}
.login-panel form {
  margin-top:24px
}
.login-submit {
  width:100%;
  min-height:44px
}
.eyebrow {
  font:10px var(--mono);
  letter-spacing:.12em;
  color:var(--brand);
  margin-bottom:8px
}
.toast {
  position:fixed;
  z-index:12000;
  bottom:24px;
  left:50%;
  transform:translateX(-50%);
  max-width:calc(100vw - 32px);
  padding:11px 18px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--ink);
  color:var(--surface);
  box-shadow:0 8px 30px #0002;
  font-size:13px;
  overflow-wrap:anywhere
}
.qr-dialog {
  width:min(460px,calc(100vw - 28px));
  max-height:90dvh;
  padding:0;
  background:var(--surface);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:14px;
  overflow:auto
}
.qr-dialog::backdrop {
  background:#101c19b3;
  backdrop-filter:blur(3px)
}
.qr-dialog-body {
  padding:22px;
  text-align:center
}
.qr-dialog-body img {
  display:block;
  margin:0 auto 16px;
  width:100%;
  max-width:340px;
  padding:12px;
  background:#fff;
  border-radius:8px
}
.qr-dialog-body p {
  font-size:12px;
  overflow-wrap:anywhere
}
/* Existing detection dialog, using the same form and status vocabulary. */
.protocol-nav-link,.detect-nav-btn {
  border:1px solid var(--line);
  border-radius:8px;
  padding:6px 10px;
  background:var(--brand-soft);
  color:var(--brand);
  font-size:12px
}
.modal-overlay {
  position:fixed;
  inset:0;
  background:#101c19b3;
  backdrop-filter:blur(3px);
  z-index:1000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s
}
.modal-overlay.active {
  opacity:1;
  pointer-events:auto
}
.detect-modal-content {
  width:100%;
  max-width:1100px;
  max-height:92dvh;
  display:flex;
  flex-direction:column;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
  overflow:hidden
}
.modal-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 20px;
  border-bottom:1px solid var(--line)
}
.modal-header h2 {
  font-size:17px
}
.modal-body {
  padding:20px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:18px
}
.detect-form-section,.detect-progress-section {
  padding:16px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface-2);
  display:flex;
  flex-direction:column;
  gap:12px
}
.detect-form-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px
}
.detect-at-box,.detect-proxy-box {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:6px
}
.field-input.mono,.mono {
  font-family:var(--mono);
  font-size:12px
}
.detect-proxy-textarea {
  min-height:110px;
  resize:vertical
}
.detect-scope-row {
  padding:12px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:8px
}
.detect-scope-title {
  font-size:13px
}
.detect-scope-options {
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:8px
}
.scope-option,.checkbox-label {
  display:flex;
  gap:8px;
  align-items:flex-start;
  font-size:12px;
  cursor:pointer
}
.scope-option {
  padding:9px;
  border:1px solid var(--line);
  border-radius:8px
}
.scope-option input,.checkbox-label input {
  flex:none;
  accent-color:var(--brand);
  margin-top:4px
}
.detect-options-row,.detect-results-bar {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px
}
.detect-action-btns,.detect-result-actions,.detect-result-filters {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px
}
.detect-progress-header {
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-size:12px
}
.status-indicator-dot {
  display:inline-block;
  width:7px;
  height:7px;
  background:var(--brand);
  border-radius:50%;
  margin-right:6px
}
.detect-progress-bar-wrap {
  height:6px;
  background:var(--surface-3);
  border-radius:8px;
  overflow:hidden
}
.detect-progress-fill {
  height:100%;
  width:0;
  background:var(--brand);
  transition:width .2s
}
.detect-log-details {
  font-size:12px;
  color:var(--muted)
}
.detect-log-list {
  max-height:140px;
  overflow:auto;
  padding:10px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:8px;
  margin-top:8px;
  white-space:pre-wrap;
  font:11px/1.7 var(--mono)
}
.detect-results-section {
  display:grid;
  gap:12px
}
.filter-zero-label {
  font-size:12px;
  display:flex;
  align-items:center;
  gap:6px
}
.search-filter-input {
  max-width:210px
}
.detect-cards-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px
}
.detect-empty-tip {
  grid-column:1/-1;
  padding:36px 20px;
  text-align:center;
  border:1px dashed var(--line);
  border-radius:10px;
  color:var(--muted);
  font-size:13px
}
.region-card {
  min-width:0;
  padding:16px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  display:flex;
  flex-direction:column;
  gap:10px
}
.region-card.zero-ready {
  border-color:var(--brand)
}
.region-card-head,.region-flag-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px
}
.region-flag-title {
  justify-content:start;
  flex-wrap:wrap;
  font-weight:600
}
.country-flag {
  font-size:20px
}
.country-code {
  color:var(--muted);
  font-size:11px
}
.region-status-badge {
  padding:3px 8px;
  border-radius:5px;
  font-size:11px
}
.status-badge-success,.status-badge-primary {
  background:var(--brand-soft);
  color:var(--success)
}
.status-badge-warning {
  background:var(--warning-soft);
  color:var(--warning)
}
.status-badge-danger {
  background:var(--danger-soft);
  color:var(--danger)
}
.status-badge-info {
  background:var(--surface-2);
  color:var(--muted)
}
.pay-methods-wrap {
  display:flex;
  flex-wrap:wrap;
  gap:6px
}
.pay-badge {
  padding:3px 7px;
  border:1px solid var(--line);
  border-radius:5px;
  background:var(--surface-2);
  font-size:11px
}
.pay-methods-empty {
  font-size:11px;
  color:var(--muted)
}
.region-card-foot {
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:10px;
  color:var(--muted);
  border-top:1px solid var(--line);
  padding-top:9px
}
.proxy-node-text {
  overflow-wrap:anywhere;
  min-width:0;
  max-width:70%;
  font-family:var(--mono)
}
.link-btn {
  border:0;
  color:var(--brand);
  cursor:pointer
}
@media(max-width:1099px) {
  .workspace-intro {
    flex-wrap:wrap
  }
  .intro-caption {
    display:none
  }
  .route-tabs {
    margin-left:auto
  }
  .rail {
    min-height:44px
  }
  .workspace-grid {
    grid-template-columns:1fr
  }
  .form-panel:not(.login-panel) {
    position:static;
    max-height:none;
    overflow:visible
  }
  .workspace-views {
    display:flex;
    padding:4px;
    margin-bottom:16px;
    background:var(--surface-3);
    border-radius:10px;
    gap:4px
  }
  .view-tab {
    flex:1;
    min-height:44px;
    border:0;
    border-radius:7px;
    background:transparent;
    color:var(--muted);
    font-size:13px;
    font-weight:600
  }
  .view-tab.active {
    background:var(--surface);
    color:var(--brand);
    box-shadow:var(--shadow)
  }
  .view-tab span {
    margin-left:4px;
    font-size:11px
  }
  .workspace-grid[data-view="create"]>.right-stack,.workspace-grid[data-view="tasks"]>.form-panel {
    display:none
  }
  .batch-list {
    overflow:visible;
    overscroll-behavior:auto
  }
  .detect-form-grid {
    grid-template-columns:1fr
  }
  .primary-button,.secondary-button,.icon-button {
    min-height:44px
  }
  .icon-button {
    width:44px
  }
  .batch-task-actions .batch-copy {
    min-height:44px
  }
  .batch-actions .primary-button,.batch-actions .secondary-button {
    min-height:44px
  }
  .batch-publisher-actions button {
    min-height:44px
  }
  .chip-btn,.action-btn {
    min-height:44px
  }
  .manual-copy-value {
    min-height:44px
  }
  .task-toolbar input,.task-toolbar select,.field input,.field select {
    min-height:44px
  }
}
@media(max-width:700px) {
  .shell {
    padding:10px 14px 24px
  }
  .topbar {
    padding-inline:14px
  }
  .top-actions {
    gap:8px
  }
  .service-dot {
    display:none
  }
  .extraction-stats {
    gap:7px;
    padding:4px 7px;
    font-size:11px
  }
  .stats-wide {
    display:none
  }
  .stats-small {
    display:inline
  }
  .workspace-intro {
    gap:8px;
    margin-bottom:10px
  }
  .workspace-intro h1 {
    font-size:21px
  }
  .route-tabs {
    width:100%;
    margin:0
  }
  .rail-grid {
    width:100%
  }
  .rail {
    flex:1;
    min-width:0;
    justify-content:center
  }
  .form-panel {
    padding:16px
  }
  .batch-panel {
    padding:12px
  }
  .batch-actions>* {
    flex:1 1 140px
  }
  .task-command-bar {
    align-items:stretch;
    flex-direction:column
  }
  .task-command-bar .task-toolbar {
    flex:0 0 auto;
    min-width:0
  }
  .detect-cards-grid {
    grid-template-columns:1fr
  }
  .modal-overlay {
    padding:10px
  }
  .modal-header,.modal-body {
    padding:16px
  }
  .detect-results-bar,.detect-result-filters,.detect-result-actions {
    align-items:stretch
  }
  .search-filter-input {
    max-width:100%
  }
  .login-panel {
    margin:6vh auto;
    padding:24px
  }
  footer {
    padding-inline:14px;
    flex-direction:column;
    gap:4px
  }
}
@media(max-width:420px) {
  .topbar {
    padding-inline:10px;
    gap:8px
  }
  .brand-mark,.brand small {
    display:none
  }
  .brand b {
    font-size:14px
  }
  .extraction-stats {
    gap:5px;
    font-size:10px
  }
  .topbar .icon-button {
    width:32px;
    min-width:32px
  }
  .workspace-intro h1 {
    font-size:20px
  }
  .task-toolbar>label:last-child {
    width:106px
  }
  .task-toolbar input,.task-toolbar select {
    font-size:12px;
    padding-inline:8px
  }
  .batch-list {
    grid-template-columns:1fr
  }
  .login-brand .brand-mark,.login-brand .brand small {
    display:grid
  }
  .login-brand .brand small {
    display:block
  }
  .modal-header h2 {
    font-size:14px
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important
  }
}

/* 提取轮次徽章与重提样式 */
.round-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.4;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.round-badge.round-1 {
  color: #0284c7;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}
.round-badge.round-2 {
  color: #7c3aed;
  background: #f3e8ff;
  border: 1px solid #ddd6fe;
}
.round-badge.round-n {
  color: #ea580c;
  background: #ffedd5;
  border: 1px solid #fed7aa;
}
.batch-task-relation {
  font-size: 11px;
  color: #64748b;
  margin: 3px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.batch-task-relation .link-inline {
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
}
.batch-task-relation .link-inline:hover {
  color: #0284c7;
}
.btn-republish {
  background: #ea580c !important;
  color: #ffffff !important;
  border: 1px solid #c2410c !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.25);
}
.btn-republish:hover {
  background: #c2410c !important;
}
.pulse-highlight {
  animation: cardPulse 1.5s ease-out;
}
@keyframes cardPulse {
  0% { box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.6); }
  100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

/* 批量多选控制条 */
.batch-multibar {
  margin: 8px 0;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.multibar-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}
.multibar-check-all {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.multibar-count {
  color: var(--muted);
  font-size: 11px;
}
.multibar-count b {
  color: var(--brand);
}
.multibar-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  flex-wrap: wrap;
}
.chip-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
}
.chip-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.chip-btn.quiet {
  color: var(--muted);
}
.multibar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.action-btn {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: all .15s ease;
  border: 1px solid transparent;
}
.action-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.action-btn.primary-retry {
  background: #0284c7;
  color: #fff;
  border-color: #0369a1;
}
.action-btn.primary-retry:hover:not(:disabled) {
  background: #0369a1;
}
.action-btn.warn-retry {
  background: #f97316;
  color: #fff;
  border-color: #ea580c;
}
.action-btn.warn-retry:hover:not(:disabled) {
  background: #ea580c;
}

/* 卡片多选框与高亮边框 */
.batch-task.is-checked {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25);
  background: rgba(2, 132, 199, 0.03);
}
.task-select-wrap {
  display: inline-flex;
  align-items: center;
  margin-right: 2px;
}
.task-checkbox {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--brand);
}

/* 原卡片历史轮次时间线 */
.task-rounds-history {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 4px 0;
  padding: 3px 6px;
  background: var(--surface-3, #f1f5f9);
  border-radius: 4px;
  font-size: 10px;
  color: var(--muted);
}
.round-history-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 4px;
  border-radius: 3px;
}
.round-history-item.failed {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}
.round-history-item.current {
  color: #0284c7;
  font-weight: 600;
  background: rgba(2, 132, 199, 0.1);
}
.round-dot {
  font-size: 8px;
}

.admin-shell { max-width: 1180px; margin: 36px auto; padding: 0 20px; }
.admin-grid { display: grid; grid-template-columns: 340px 1fr; gap: 18px; }
.admin-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.admin-card h2 { margin: 0 0 16px; }
.admin-fields { display: grid; gap: 12px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.admin-table td:last-child { white-space: nowrap; }
.created-keys { width: 100%; min-height: 150px; font: 12px var(--mono); margin-top: 12px; }
.admin-login { max-width: 420px; margin: 15vh auto; }
.admin-ledger-card { margin-top: 18px; }
@media (max-width: 850px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-card { overflow: auto; }
}
