:root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #24332f;
  background: #f5f7f6;
  font-synthesis: none;
  --accent: #167d69;
  --line: #e2e8e4;
  --muted: #7b8781;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; min-width: 320px; overflow: hidden; }
body { font-size: 13px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
#app { display: flex; flex-direction: column; height: 100dvh; min-height: 0; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
button, a { -webkit-tap-highlight-color: transparent; }
a { text-decoration: none; color: var(--accent); }
svg { flex-shrink: 0; vertical-align: middle; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.header { background: #fff; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.header-inner { max-width: 1488px; margin: 0 auto; min-height: 64px; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-icon { display: grid; place-items: center; height: 32px; width: 32px; border-radius: 7px; background: #167d69; color: #fff; }
.brand strong { display: block; font-size: 14px; font-weight: 600; }
.brand small { display: block; color: #8d9991; font-size: 10px; margin-top: 2px; }
.header-right { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.header-stats-group { display: flex; gap: 12px; }
.stat-pill { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.pill-val { color: #42654f; font-weight: 600; font-variant-numeric: tabular-nums; }
.dot { height: 5px; width: 5px; border-radius: 50%; background: #7fa797; }
.dot-amber { background: #cfa75b; }
.user-name { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #6a8172; padding-left: 12px; border-left: 1px solid var(--line); }
.language-picker { position: relative; flex-shrink: 0; }
.custom-select-trigger { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 11px; color: #718176; }
.custom-select-trigger:hover, .custom-select-trigger.is-open { border-color: #a9cdbb; background: #f5faf7; }
.chevron-icon { display: inline-flex; color: #a0aea4; }
.custom-select-trigger.is-open .chevron-icon { transform: rotate(180deg); }
.custom-select-menu { display: none; position: absolute; top: calc(100% + 6px); right: 0; min-width: 130px; padding: 5px; border: 1px solid var(--line); background: #fff; border-radius: 7px; box-shadow: 0 8px 20px #24332f12; z-index: 30; }
.custom-select-menu.is-open { display: grid; gap: 3px; }
.custom-select-option { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; gap: 12px; border: 0; border-radius: 4px; background: transparent; color: #718176; font-size: 12px; text-align: left; }
.custom-select-option:hover, .custom-select-option.is-selected { color: var(--accent); background: #eaf4ef; }
.scan-main { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; max-width: 1488px; width: 100%; margin: 0 auto; padding: 24px; gap: 20px; }
.worker-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; flex-shrink: 0; }
.demo-banner { padding: 6px 10px; border: 1px solid #eadbbd; border-radius: 6px; color: #aa8a47; background: #fffaef; font-size: 11px; flex-shrink: 0; }
.earning-metric { padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0; }
.earning-metric > span { display: block; color: #78857c; font-size: 12px; }
.earning-metric > strong { display: block; font-size: 27px; line-height: 1.35; font-weight: 600; letter-spacing: -.7px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.earning-metric small { font-size: 10px; color: #9ba69e; margin-left: 6px; font-weight: 400; letter-spacing: 0; }
.earning-metric p { font-size: 10px; color: #9ba69e; margin-top: 4px; }
.workspace { display: flex; flex: 1; min-width: 0; min-height: 0; }
.panel { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.progress-panel { display: flex; flex-direction: column; width: 100%; min-width: 0; min-height: 0; overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 20px 18px; flex-shrink: 0; }
.queue-heading { min-width: 0; }
.queue-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; }
.queue-count { font-size: 10px; font-weight: 500; padding: 1px 6px; border-radius: 4px; background: #eef4f0; color: #6e8a79; }
.queue-description { color: #94a096; font-size: 11px; margin-top: 4px; }
.task-toolbar { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.connection-status { display: inline-flex; align-items: center; gap: 5px; color: #b08c47; font-size: 10px; margin-right: 5px; }
.connection-status.is-connected { color: #7a9585; }
.mini-button, .qr-btn, .submit-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #dfe6e1; border-radius: 6px; background: #fff; color: #617568; padding: 7px 11px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.mini-button:hover, .qr-btn:hover { background: #f4f8f5; border-color: #bad5c6; }
.mini-button.primary, .qr-btn.primary, .submit-button { background: var(--accent); border-color: var(--accent); color: #fff; }
.mini-button.primary:hover, .qr-btn.primary:hover, .submit-button:hover { background: #116452; border-color: #116452; }
.task-filter-bar { padding: 0 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.tabs { position: relative; display: flex; align-items: stretch; gap: 16px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: #8a978e; padding: 12px 2px; font-size: 12px; white-space: nowrap; }
.tabs button:hover { color: var(--accent); }
.tabs button.active { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
.tab-badge { padding: 0 5px; border-radius: 3px; font-size: 10px; font-weight: 400; background: #f0f4f1; color: #8d9b91; }
.tabs button.active .tab-badge { background: #e4f0e9; color: #458567; }
.queue-note { margin: 14px 20px 0; padding: 9px 12px; border: 1px solid #e3ede6; border-radius: 6px; background: #f6faf7; color: #87998b; font-size: 11px; line-height: 1.7; flex-shrink: 0; }
.queue-note:empty { display: none; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); align-content: start; grid-auto-rows: max-content; gap: 14px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px; transition: opacity .15s; }
.task-grid.tab-transitioning { opacity: .5; }
.task-card { min-width: 0; padding: 16px; border: 1px solid #e4ebe6; border-radius: 8px; background: #fff; }
.task-card:hover { border-color: #c5d7cb; }
.task-account { display: flex; align-items: center; gap: 8px; min-width: 0; }
.task-number { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; padding: 1px 4px; border-radius: 3px; background: #f2f6f3; color: #8a9d8e; white-space: nowrap; }
.status-dot { width: 4px; height: 4px; border-radius: 50%; background: #93b1a0; }
.dot-success { background: #2ba17b; }
.dot-danger { background: #ce9874; }
.task-account h3 { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 550; }
.account-actions { display: flex; flex-shrink: 0; }
.mini-btn-pill { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid #e2eae4; border-radius: 5px; color: #829b8b; background: #fff; }
.task-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 4px; color: #a0ada4; font-size: 10px; }
.task-meta i { font-style: normal; }
.task-card-body { margin-top: 15px; }
.task-qr-pod { display: flex; align-items: center; gap: 12px; background: #f8faf8; border: 1px solid #e9eeea; border-radius: 6px; padding: 11px; min-width: 0; }
.qr-box { position: relative; display: grid; place-items: center; width: 76px; height: 76px; flex: 0 0 76px; border: 1px solid #dde8e1; border-radius: 6px; background: #fff; overflow: hidden; color: #acc2b5; }
.qr-box.is-completed { border-color: #d9eade; background: #edf7f0; }
.qr-check-badge { display: grid; place-items: center; height: 32px; width: 32px; background: #167d69; border-radius: 50%; color: #fff; }
.qr-open { display: block; position: relative; padding: 0; border: 0; width: 100%; height: 100%; background: #fff; }
.qr-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.qr-zoom-hint { display: none; position: absolute; inset: auto 0 0; padding: 2px 0; background: #167d69ee; color: #fff; font-size: 9px; text-align: center; }
.qr-open:hover .qr-zoom-hint { display: block; }
.qr-meta { flex: 1; min-width: 0; }
.qr-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; color: #709781; font-size: 11px; }
.qr-title strong { font-size: 11px; font-weight: 550; color: #4b6658; }
.qr-expire-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 4px; border: 1px solid #e3e9e4; background: #f1f5f2; border-radius: 3px; font-size: 9px; color: #99a69d; white-space: nowrap; }
.qr-expire-tag.is-urgent { background: #fff6e7; border-color: #eddcbb; color: #b9904a; }
.qr-expire-tag.is-expired { color: #b9826f; background: #fff4ec; border-color: #eeded2; }
.qr-pay-flow { margin-top: 7px; }
.qr-pay-flow-row { display: flex; justify-content: space-between; gap: 5px; align-items: center; }
.qr-pay-flow-text { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 10px; color: #83968a; }
.qr-pay-flow-num { flex-shrink: 0; font-size: 9px; color: #a2aea6; }
.qr-pay-flow-bar { height: 3px; border-radius: 2px; overflow: hidden; background: #e6eee8; margin-top: 5px; }
.qr-pay-flow-fill { height: 100%; background: #86b19c; }
.progress-WAITING { width: 60%; }
.progress-CLAIMED { width: 80%; }
.progress-VERIFYING { width: 95%; }
.progress-SUCCEEDED { width: 100%; background: #167d69; }
.progress-REVIEW, .progress-EXPIRED { width: 75%; background: #c99d7e; }
.qr-actions-grid { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.qr-btn { padding: 4px 7px; font-size: 10px; min-height: 25px; }
.qr-desc { font-size: 10px; color: #92a398; line-height: 1.5; }
.task-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.task-card-actions button { margin-top: 10px; }
.task-card-actions .mini-button { font-size: 10px; padding: 4px 6px; }
.danger-action { color: #b4806b; border-color: transparent; background: transparent; }
.card-toggle { border: 0; padding: 0; background: transparent; color: #8aa292; font-size: 10px; }
.green-text { color: #167d69; }
.field-note, .scan-reason { font-size: 11px; line-height: 1.7; color: #8c9c91; }
.scan-reason { margin-top: 9px; color: #b18c73; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-shrink: 0; border-top: 1px solid var(--line); padding: 12px 20px; font-size: 10px; color: #94a097; }
.pagination > div { display: flex; align-items: center; gap: 9px; }
.pagination .mini-button { padding: 5px 9px; font-size: 11px; }
.empty { grid-column: 1/-1; min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #aebfb3; gap: 10px; padding: 30px; }
.empty h2 { font-size: 14px; color: #718779; font-weight: 500; }
.empty p { font-size: 12px; color: #a0b0a5; }
.login-layout { display: grid; place-items: center; flex: 1; min-height: 0; padding: 30px; overflow-y: auto; }
.login-box { width: 100%; max-width: 410px; padding: 28px; }
.login-brand { display: grid; place-items: center; height: 38px; width: 38px; border-radius: 8px; color: var(--accent); background: #eaf4ef; }
.login-box h1 { font-size: 22px; font-weight: 600; margin: 18px 0 6px; }
label { display: grid; gap: 7px; margin: 20px 0; font-size: 12px; color: #637c6b; }
input { min-width: 0; width: 100%; height: 36px; border: 1px solid #dfe6e1; border-radius: 6px; padding: 0 11px; color: #455d4f; background: #fff; font-size: 12px; }
input::placeholder { color: #a9b4ab; }
input:focus { border-color: #85b19c; }
.login-box .submit-button { width: 100%; height: 36px; }
.form-error { min-height: 16px; margin: 12px 0; font-size: 11px; color: #b5806c; }
.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-row input { flex: 1; min-width: 0; text-transform: uppercase; }
.captcha-img-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0 5px; border: 1px solid var(--line); border-radius: 6px; background: #f6f9f7; color: #9bae9f; flex-shrink: 0; }
#captcha-svg-container { display: flex; align-items: center; }
#captcha-svg-container svg { max-width: 110px; height: 34px; }
.privacy-note { padding-top: 14px; border-top: 1px solid var(--line); font-size: 10px; text-align: center; color: #a3afa6; }
.management-entry { display: flex; justify-content: center; align-items: center; gap: 5px; font-size: 11px; margin-top: 12px; }
dialog.scan-modal { width: min(430px,calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; border: 1px solid var(--line); border-radius: 10px; padding: 24px; color: #24332f; background: #fff; overflow-y: auto; }
dialog::backdrop { background: #233f3455; }
.scan-modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scan-modal h2 { font-size: 14px; font-weight: 600; }
.icon-button { display: grid; place-items: center; height: 28px; width: 28px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #8ea394; font-size: 18px; }
.scan-modal img { display: block; width: 100%; aspect-ratio: 1; margin: 16px 0; object-fit: contain; }
.scan-modal p { margin: 12px 0; color: #84988a; font-size: 11px; line-height: 1.7; text-align: center; }
.scan-modal #qr-account { font-weight: 600; color: #42664f; overflow-wrap: anywhere; }
.scan-modal footer { padding-top: 14px; border-top: 1px solid var(--line); font-size: 10px; text-align: center; color: #9caf9e; }
#toast { position: fixed; top: 78px; left: 50%; transform: translateX(-50%); z-index: 100; padding: 11px 16px; border: 1px solid #dce9e0; border-radius: 6px; background: #fff; color: #608d74; box-shadow: 0 6px 20px #24332f12; max-width: 90vw; font-size: 12px; }
@media(max-width:1000px) {
  .header-payment-section { display: none; }
  .scan-main { padding: 20px; }
  .worker-summary { gap: 12px; }
  .earning-metric { padding: 14px 16px; }
  .panel-heading { flex-wrap: wrap; gap: 12px; }
  .task-toolbar { margin-left: auto; }
}
@media(max-width:768px) {
  html, body { height: auto; min-height: 100%; overflow: auto; }
  #app { min-height: 100dvh; height: auto; }
  .header { position: sticky; top: 0; z-index: 25; }
  .header-inner { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .header-right { gap: 7px; }
  .brand strong { font-size: 12px; }
  .brand small { display: none; }
  .brand-icon { width: 28px; height: 28px; }
  .user-name { display: none; }
  .header #logout { font-size: 10px; padding: 6px 8px; }
  .custom-select-trigger { font-size: 10px; padding: 6px 7px; }
  .scan-main { flex: none; padding: 18px 14px; gap: 16px; overflow: visible; }
  .worker-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .earning-metric { padding: 14px; }
  .earning-metric > strong { font-size: 24px; }
  .workspace { display: block; flex: none; }
  .progress-panel { display: block; }
  .panel-heading { padding: 16px 14px; }
  .queue-title { font-size: 15px; }
  .queue-description { font-size: 10px; }
  .task-toolbar { width: 100%; margin: 0; justify-content: flex-end; }
  .connection-status { margin-right: auto; }
  .task-filter-bar { padding: 0 14px; }
  .tabs { gap: 12px; }
  .tabs button { font-size: 11px; }
  .queue-note { margin: 12px 14px 0; }
  .task-grid { grid-template-columns: minmax(0,1fr); padding: 14px; overflow: visible; }
  .task-card { padding: 14px; }
  .pagination { padding: 12px 14px; flex-wrap: wrap; }
  .pagination > span { width: 100%; }
  .pagination > div { margin-left: auto; }
  .login-layout { padding: 24px 14px; }
  .login-box { padding: 24px; }
  .scan-modal { padding: 18px; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
