:root {
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --ink: #172033;
  --muted: #667085;
  --muted-strong: #475467;
  --line: #dfe4ea;
  --line-strong: #c8d0da;
  --primary: #2359a8;
  --primary-hover: #194987;
  --primary-soft: #edf4ff;
  --success: #16734b;
  --success-soft: #ecf8f1;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --sidebar: #182231;
  --sidebar-muted: #9eabbc;
  --radius: 8px;
  --shadow: 0 10px 24px rgba(20, 34, 54, 0.08);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font-ui: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font-family: var(--font-ui); font-size: 14px; line-height: 1.5; }
button { font: inherit; }
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; }
svg { display: block; width: 18px; height: 18px; stroke-width: 1.8; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 208px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 5; height: 100vh; padding: 24px 16px; background: var(--sidebar); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; font-size: 15px; font-weight: 650; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid #60738d; border-radius: 7px; background: #26374d; color: #f3f7fc; font-size: 16px; font-weight: 650; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { color: #fff; font-size: 15px; font-weight: 680; }
.brand-copy small { margin-top: 3px; color: #aebdd0; font-size: 10px; font-weight: 500; }
.sidebar nav { display: grid; gap: 4px; margin-top: 40px; }
.nav-item { min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 6px; color: var(--sidebar-muted); text-decoration: none; transition: background-color 180ms ease, color 180ms ease; }
.nav-item:hover { color: #fff; background: #223146; }
.nav-item.active { color: #fff; background: #2a3c54; }
.nav-item.active svg { color: #8bb7f0; }
.mobile-menu { display: none; }
.mobile-backdrop { display: none; }

.main { width: 100%; min-width: 0; max-width: 1180px; padding: 24px clamp(28px, 4.5vw, 64px) 56px; }
.topbar { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.crumb { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.topbar h1 { margin: 0; font-size: 25px; line-height: 1.25; letter-spacing: 0; font-weight: 680; }
.topbar p:last-child { max-width: 620px; margin: 5px 0 0; color: var(--muted-strong); }

.operation-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 16px; margin-top: 16px; align-items: stretch; }
.task-panel, .jobs-section { min-width: 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-heading, .section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading h2, .section-head h2 { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 650; }
.panel-heading p, .section-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.panel-heading > svg, .rules-heading > svg { color: var(--muted); }
.file-limit { color: var(--muted); font-size: 13px; white-space: nowrap; }
.mode-control { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; padding: 0; border: 0; }
.mode-control legend { grid-column: 1 / -1; margin-bottom: 1px; color: var(--muted-strong); font-size: 13px; font-weight: 600; }
.mode-option { display: flex; align-items: flex-start; gap: 10px; min-height: 76px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; }
.mode-option.selected { border-color: var(--primary); background: #f5f9ff; }
.mode-option input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--primary); }
.mode-option strong, .mode-option small { display: block; }
.mode-option strong { font-size: 14px; font-weight: 650; }
.mode-option small { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.upload-zone { min-height: 148px; margin-top: 16px; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 18px; padding: 22px 28px; border: 1px dashed #aeb8c5; border-radius: 7px; background: var(--surface-subtle); cursor: pointer; outline: 0; transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--primary); background: #f5f9ff; }
.upload-zone:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(35, 89, 168, 0.18); }
.upload-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #b9c9de; border-radius: 8px; background: var(--surface); color: var(--primary); }
.upload-icon svg { width: 20px; height: 20px; }
.upload-copy { display: flex; align-items: baseline; gap: 8px; }
.upload-copy strong { font-size: 16px; font-weight: 650; }
.upload-copy span { color: var(--muted); font-size: 14px; }
.primary-button { min-height: 44px; margin-left: 4px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 0; border-radius: 6px; background: var(--primary); color: #fff; font-weight: 600; cursor: pointer; transition: background-color 180ms ease, box-shadow 180ms ease; }
.primary-button:hover { background: var(--primary-hover); }
.primary-button:focus-visible { outline: 3px solid rgba(35, 89, 168, 0.24); outline-offset: 2px; }
.primary-button svg { width: 17px; height: 17px; }
.privacy-inline { display: flex; align-items: center; gap: 8px; color: var(--muted-strong); }
.privacy-inline > svg { flex: 0 0 18px; margin-top: 1px; color: var(--success); }
.privacy-inline p { margin: 0; font-size: 12px; }
.privacy-inline strong, .privacy-inline span { display: inline; }
.privacy-inline strong { color: var(--ink); font-weight: 600; }
.privacy-inline span::before { content: " · "; color: var(--line-strong); }
.task-panel .privacy-inline { margin-top: 10px; }
.jobs-section { display: flex; flex-direction: column; }
.section-head { align-items: flex-end; margin-bottom: 12px; }
.session-count { color: var(--muted); font-size: 12px; }
.session-count b { color: var(--ink); font-size: 14px; }
.job-table { min-height: 0; flex: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-subtle); }
.table-row { min-height: 54px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.empty-state { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--muted); }
.empty-state > svg { width: 26px; height: 26px; margin-bottom: 6px; color: #98a2b3; }
.empty-state strong { color: var(--muted-strong); font-weight: 600; }
.empty-state span { font-size: 12px; }
.job-item { font-size: 13px; }
.job-name { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 600; }
.job-name svg { flex: 0 0 17px; color: var(--muted); }
.job-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-badge { width: max-content; min-height: 26px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; background: #fff7e6; color: #8a570b; font-size: 12px; font-weight: 600; }
.status-badge svg { width: 13px; height: 13px; }
.status-badge.done { background: var(--success-soft); color: var(--success); }
.status-badge.failed { background: var(--danger-soft); color: var(--danger); }
.status-badge.verify { background: #fff7e6; color: #8a570b; }
.status-badge.processing svg { animation: spin 1s linear infinite; }
.job-count { color: var(--muted-strong); font-size: 12px; }
.job-count.warning { color: #8a570b; font-weight: 600; }
.job-action { grid-column: 2; grid-row: 2 / 4; align-self: center; display: flex; align-items: center; gap: 10px; }
.job-link, .retry-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; color: var(--primary); font: inherit; font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; }
.job-link:hover, .retry-button:hover { color: var(--primary-hover); }
.job-link:focus-visible, .retry-button:focus-visible { border-radius: 4px; outline: 3px solid rgba(35, 89, 168, 0.18); }
.job-link svg, .retry-button svg { width: 15px; height: 15px; }
.job-error { grid-column: 1 / -1; margin: 0 0 0 26px; color: var(--danger); font-size: 12px; }
.job-review-notice { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff7e6; color: #8a570b; font-size: 12px; line-height: 1.55; }
.review-notice-heading { display: grid; gap: 2px; }
.review-notice-heading strong { color: #8a570b; font-size: 13px; font-weight: 650; }
.review-notice-heading span { color: #8a570b; }
.review-item-list { display: grid; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; }
.review-item-list li { min-width: 0; overflow-wrap: anywhere; }
.review-item-list li::before { content: "·"; margin-right: 6px; color: #8a570b; font-weight: 700; }
.review-item-list strong { color: #8a570b; font-weight: 650; }
.review-toggle { min-height: 32px; display: inline-flex; align-items: center; gap: 5px; margin: 6px 0 -4px -6px; padding: 0 6px; border: 0; border-radius: 4px; background: transparent; color: #8a570b; font: inherit; font-weight: 650; cursor: pointer; }
.review-toggle:hover { background: var(--surface); }
.review-toggle:focus-visible { outline: 3px solid rgba(35, 89, 168, 0.18); outline-offset: 1px; }
.review-toggle svg { width: 14px; height: 14px; transition: transform 180ms ease; }
.review-toggle.expanded svg { transform: rotate(180deg); }
.job-progress { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; margin-top: 2px; }
.progress-track { position: relative; height: 4px; overflow: hidden; border-radius: 999px; background: #e8edf3; }
.progress-bar { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform 220ms var(--ease-out); }
.progress-bar.indeterminate { width: 36%; transform-origin: center; animation: progress-scan 1.15s var(--ease-out) infinite; }
.progress-detail { color: var(--muted); font-size: 12px; white-space: nowrap; }
.job-item.processing-row { animation: row-enter 260ms var(--ease-out) both; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: min(380px, calc(100vw - 32px)); padding: 11px 14px; border-radius: 7px; background: #202b3b; color: #fff; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 180ms ease, transform 180ms ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes progress-scan { from { transform: translateX(-120%) scaleX(1); } to { transform: translateX(310%) scaleX(1); } }
@keyframes row-enter { from { opacity: .4; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1240px) {
  .operation-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1080px) {
  .operation-grid { grid-template-columns: 1fr; }
  .jobs-section { min-height: 310px; }
}

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 184px minmax(0, 1fr); }
  .main { padding-inline: 28px; }
  .jobs-section { min-height: 280px; }
}

@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; z-index: 6; height: auto; min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; box-shadow: 0 1px 0 rgba(255,255,255,.1); }
  .brand { padding: 0; }
  .mobile-menu { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #fff; cursor: pointer; }
  .mobile-menu:hover, .mobile-menu:focus-visible { background: #26374d; outline: 0; }
  .sidebar nav { position: absolute; top: 64px; left: 0; right: 0; display: none; margin: 0; padding: 8px 12px 12px; background: var(--sidebar); box-shadow: 0 10px 20px rgba(16,24,40,.18); }
  .sidebar nav.open { display: grid; }
  .mobile-backdrop.open { position: fixed; inset: 64px 0 0; z-index: 4; display: block; background: rgba(16, 24, 40, 0.38); }
  .main { padding: 20px 16px 48px; }
  .topbar { padding-bottom: 16px; }
  .topbar h1 { font-size: 24px; }
  .operation-grid { margin-top: 16px; }
  .task-panel, .jobs-section { padding: 20px; }
  .upload-zone { min-height: 180px; flex-direction: column; gap: 9px; }
  .mode-control { grid-template-columns: 1fr; }
  .primary-button { margin: 4px 0 0; }
  .privacy-inline strong, .privacy-inline span { display: block; }
  .privacy-inline span::before { content: none; }
  .section-head { align-items: flex-start; }
  #jobList { display: grid; gap: 10px; }
  .job-item { min-height: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 15px; }
  .job-error { margin: 0; }
  .job-progress { grid-column: 1 / -1; margin: 0; padding: 2px 0 0; }
  .empty-state { min-height: 160px; text-align: center; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
}

@media (max-width: 420px) {
  .panel-heading { gap: 12px; }
  .file-limit { max-width: 88px; overflow: hidden; text-overflow: ellipsis; }
  .upload-copy { flex-direction: column; align-items: center; gap: 1px; }
  .privacy-inline span { max-width: 30ch; }
  .session-count { max-width: 80px; text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .progress-bar.indeterminate { width: 100%; transform: none; opacity: .55; }
}

/* Web workbench: independent browser surface, visually aligned with the native-glass prototype. */
:root {
  --canvas: #e9eef4;
  --window: #f6f8fb;
  --surface-soft: #f3f6fa;
  --blue: #1769e0;
  --blue-hover: #0f5ecf;
  --blue-soft: #edf4ff;
  --green: #087a55;
  --green-soft: #eaf7f1;
  --amber: #9a5b05;
  --amber-soft: #fff6e5;
  --red: #b42318;
  --red-soft: #fff0ee;
  --shadow-window: 0 28px 80px rgba(22, 34, 51, .16), 0 2px 8px rgba(22, 34, 51, .08);
  --shadow-float: 0 12px 32px rgba(28, 43, 63, .12), 0 1px 3px rgba(28, 43, 63, .08);
  --font-ui: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
html, body { min-height: 100%; }
body { background: var(--canvas); color: #182230; font: 14px/1.5 var(--font-ui); }
.stage { min-height: 100vh; display: grid; place-items: center; padding: 30px; }
.app-shell { width: min(1380px, calc(100vw - 60px)); min-height: min(900px, calc(100vh - 60px)); overflow: hidden; display: block; border: 1px solid rgba(120, 139, 161, .34); border-radius: 16px; background: var(--window); box-shadow: var(--shadow-window); }
.toolbar { position: relative; z-index: 2; min-height: 72px; display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr); align-items: center; gap: 20px; padding: 0 24px; border-bottom: 1px solid rgba(203, 213, 225, .78); background: rgba(255, 255, 255, .76); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
.brand { display: inline-flex; align-items: center; min-width: 0; padding: 0; }
.brand-lockup { display: block; width: 116px; height: 44px; object-fit: cover; object-position: center; border-radius: 4px; }
.workspace-nav { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid rgba(203, 213, 225, .72); border-radius: 10px; background: rgba(236, 241, 247, .8); box-shadow: inset 0 1px 1px rgba(35, 52, 73, .04); }
.workspace-nav a { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border-radius: 7px; color: #647084; font-size: 13px; font-weight: 600; text-decoration: none; }
.workspace-nav a:hover { color: #182230; }
.workspace-nav a.active { background: rgba(255, 255, 255, .94); color: #182230; box-shadow: 0 1px 5px rgba(0, 0, 0, .12); }
.workspace-nav svg { width: 15px; height: 15px; }
.toolbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.connection, .balance { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border-radius: 8px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.connection { border: 1px solid #bfe2d3; background: var(--green-soft); color: var(--green); }
.balance { min-width: 96px; justify-content: center; border: 1px solid #c8daf6; background: #f2f7ff; color: #275da8; cursor: pointer; }
.balance:hover { border-color: #a9c7f4; background: #eaf3ff; }
.purchase-button { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--blue); border-radius: 8px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.purchase-button:hover { border-color: var(--blue-hover); background: var(--blue-hover); }
.connection svg, .balance svg, .purchase-button svg { width: 16px; height: 16px; }
.main { width: min(1180px, calc(100% - 64px)); max-width: none; margin: 0 auto; padding: 24px 0 30px; }
.page-heading { margin-bottom: 12px; }
.page-heading h1 { margin: 0; font-size: 28px; line-height: 1.25; font-weight: 720; }
.privacy-strip { min-height: 48px; display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 11px 14px; border-radius: 8px; background: var(--green-soft); color: #0b674a; font-size: 13px; }
.privacy-strip svg { width: 19px; height: 19px; flex: 0 0 19px; }
.privacy-strip strong { font-weight: 700; }
.privacy-strip span { opacity: .86; }
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.section { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 19px 20px 0; }
.section-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.section-meta { color: var(--quiet); font-size: 12px; white-space: nowrap; }
.modes { display: grid; gap: 8px; margin: 0; padding: 16px 20px 20px; border: 0; }
.mode-option { position: relative; min-height: 72px; display: grid; grid-template-columns: 88px minmax(0, 1fr) 18px; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: #182230; cursor: pointer; }
.mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.mode-option.selected { border-color: #6fa5f0; background: var(--blue-soft); box-shadow: inset 0 0 0 1px rgba(23,105,224,.08); }
.mode-option:focus-within { outline: 3px solid rgba(23, 105, 224, .13); outline-offset: 2px; }
.mode-title { font-size: 14px; font-weight: 700; }
.mode-copy { color: #526174; font-size: 12px; line-height: 1.6; }
.check-dot { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #9fb2c8; border-radius: 50%; background: #fff; }
.mode-option.selected .check-dot { border-color: var(--blue); background: var(--blue); color: #fff; }
.check-dot svg { width: 11px; height: 11px; }
.strict-settings { display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 16px; margin-top: 12px; padding: 16px 20px; border: 1px solid #a9c7f4; border-radius: 8px; background: #f5f9ff; }
.strict-settings[hidden] { display: none; }
.strict-settings-copy { align-self: center; }
.strict-settings-copy h2 { margin: 0; font-size: 14px; line-height: 1.4; font-weight: 700; }
.strict-settings-copy p { margin: 5px 0 0; color: #526174; font-size: 12px; line-height: 1.5; }
.strict-field { min-width: 0; display: grid; gap: 6px; color: #344054; font-size: 12px; font-weight: 700; }
.strict-field input { width: 100%; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #b9c6d5; border-radius: 7px; outline: 0; background: #fff; color: #182230; font: 400 13px/1.5 var(--font-ui); }
.strict-field input::placeholder { color: #667085; opacity: 1; }
.strict-field input:hover { border-color: #9fbde7; }
.strict-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,.13); }
.dropzone { min-height: 164px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 15px; margin: 16px 20px 20px; padding: 20px; border: 1px dashed #8fb4e8; border-radius: 8px; background: #f7faff; cursor: pointer; outline: 0; transition: border-color 180ms ease, background-color 180ms ease; }
.dropzone:hover, .dropzone.dragging { border-color: var(--blue); background: #f1f7ff; }
.dropzone:focus-visible { box-shadow: 0 0 0 3px rgba(23,105,224,.13); }
.icon-tile { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #d3e1f5; border-radius: 10px; background: #fff; color: var(--blue); box-shadow: 0 4px 14px rgba(28, 66, 117, .08); }
.icon-tile svg { width: 23px; height: 23px; }
.drop-copy strong, .drop-copy span { display: block; }
.drop-copy strong { font-size: 14px; font-weight: 700; }
.drop-copy span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.primary-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid var(--blue); border-radius: 7px; background: var(--blue); color: #fff; box-shadow: 0 3px 9px rgba(23, 105, 224, .2); font-weight: 660; cursor: pointer; }
.primary-button:hover { border-color: var(--blue-hover); background: var(--blue-hover); }
.primary-button:focus-visible { outline: 3px solid rgba(23, 105, 224, .2); outline-offset: 2px; }
.primary-button svg { width: 17px; height: 17px; }
.queue { margin-top: 12px; }
.queue-heading { align-items: flex-end; padding-bottom: 2px; }
.queue-summary { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.queue-summary strong { color: #182230; font-size: 14px; }
.job-list { padding: 10px 20px 14px; }
.job-list > #jobList { display: grid; }
.empty-state { min-height: 132px; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--muted); text-align: center; }
.empty-state > svg { width: 26px; height: 26px; margin-bottom: 4px; color: #98a2b3; }
.empty-state strong { color: #526174; font-weight: 650; }
.empty-state span { font-size: 12px; }
.job-item { min-height: 76px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: 8px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.job-item:last-child { border-bottom: 0; }
.file-icon { grid-column: 1; grid-row: 1; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: #eaf2ff; color: var(--blue); }
.file-icon svg { width: 19px; height: 19px; }
.job-name { grid-column: 2; grid-row: 1; display: block; min-width: 0; }
.job-name-text, .job-count { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-name-text { font-size: 13px; font-weight: 670; }
.job-count { margin-top: 4px; color: var(--muted); font-size: 11px; }
.job-progress { grid-column: 2 / -1; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 0; }
.progress-track { height: 5px; overflow: hidden; border-radius: 999px; background: #e5ebf2; }
.progress-bar { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--blue); }
.progress-bar.indeterminate { width: 36%; transform-origin: center; animation: progress-scan 1.15s cubic-bezier(.23,1,.32,1) infinite; }
.progress-detail { color: var(--muted); font-size: 11px; white-space: nowrap; }
.status-badge { grid-column: 3; grid-row: 1; min-width: 94px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 0; border-radius: 0; background: transparent; color: #3167a9; font-size: 12px; font-weight: 670; white-space: nowrap; }
.status-badge svg { width: 17px; height: 17px; }
.status-badge.done { background: transparent; color: var(--green); }
.status-badge.failed { background: transparent; color: var(--red); }
.status-badge.verify { background: transparent; color: var(--amber); }
.status-badge.processing svg { animation: spin 1.1s linear infinite; }
.job-action { grid-column: 4; grid-row: 1; align-self: center; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.job-link, .retry-button { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 4px; border: 0; border-radius: 7px; background: transparent; color: #47627f; font-size: 12px; font-weight: 650; text-decoration: none; cursor: pointer; }
.job-link:hover, .retry-button:hover { color: var(--blue); background: #edf3fb; }
.job-link:focus-visible, .retry-button:focus-visible { outline: 3px solid rgba(23,105,224,.18); outline-offset: 1px; }
.job-link svg, .retry-button svg { width: 16px; height: 16px; }
.job-error, .job-review-notice { grid-column: 2 / -1; grid-row: 2; margin: 0; padding: 8px 10px; border-radius: 6px; background: #fff7f5; color: #8f251d; font-size: 11px; line-height: 1.55; }
.job-review-notice { border: 1px solid #f1d7bd; background: var(--amber-soft); color: #7c4c09; }
.review-notice-heading { display: grid; gap: 2px; }
.review-notice-heading strong { font-weight: 700; }
.review-item-list { margin: 8px 0 0; padding-left: 16px; }
.review-toggle { min-height: 30px; padding: 0 6px; border: 0; border-radius: 5px; background: transparent; color: inherit; font-weight: 650; cursor: pointer; }
.review-toggle:hover { background: rgba(255,255,255,.55); }
.product-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.product-facts article { min-height: 78px; display: flex; align-items: center; gap: 12px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.8); }
.fact-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 9px; background: #edf3fb; color: #47627f; }
.fact-icon svg { display: block; flex: 0 0 auto; }
.fact-icon svg { width: 19px; height: 19px; }
.product-facts article > div > strong, .product-facts article > div > span { display: block; }
.product-facts article > div > strong { font-size: 13px; line-height: 1.35; font-weight: 700; }
.product-facts article > div > span { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.credit-dialog { width: min(520px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 32px)); overflow: auto; padding: 28px; border: 1px solid rgba(255,255,255,.7); border-radius: 14px; background: rgba(255,255,255,.98); box-shadow: var(--shadow-float); color: #182230; text-align: center; }
.credit-dialog::backdrop { background: rgba(24,34,48,.3); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.dialog-close:hover { background: var(--surface-soft); color: #182230; }
.dialog-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto; border-radius: 14px; background: var(--blue-soft); color: var(--blue); }
.dialog-icon svg { width: 25px; height: 25px; }
.credit-dialog h2 { margin: 16px 0 0; font-size: 20px; line-height: 1.35; }
.credit-dialog p { margin: 8px auto 20px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.credit-dialog .primary-button { min-width: 190px; }
.phone-login-form { display: grid; gap: 8px; margin-top: 20px; text-align: left; }
.credit-dialog .phone-login-form .dialog-lead { width: 100%; margin: -8px 0 8px; text-align: center; }
.phone-login-form label { color: #526071; font-size: 12px; font-weight: 700; }
.phone-login-form input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid #cbd4df; border-radius: 6px; background: #fff; color: #182230; font: inherit; }
.phone-login-form input:focus { outline: 2px solid rgba(38, 118, 213, .28); border-color: #2676d5; }
.phone-login-form input[aria-invalid="true"] { border-color: var(--red); }
.phone-login-form input[aria-invalid="true"]:focus { outline-color: rgba(180, 35, 24, .2); }
.phone-login-form input[readonly] { background: #f6f8fa; color: #526071; }
.phone-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.credit-dialog .phone-code-status { margin: -2px 0 2px; color: var(--green); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; text-align: left; }
.credit-dialog .phone-code-status.error { color: var(--red); }
.secondary-button { min-width: 136px; min-height: 42px; padding: 0 12px; border: 1px solid #b9c5d3; border-radius: 6px; background: #f6f8fa; color: #28425e; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; cursor: pointer; }
.secondary-button:disabled, .phone-login-form .primary-button:disabled { cursor: not-allowed; opacity: .55; }
.phone-login-form .primary-button { width: 100%; margin-top: 8px; }
.purchase-panel { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); text-align: left; }
.purchase-panel-head { display: flex; align-items: flex-start; gap: 10px; }
.purchase-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 9px; background: var(--blue-soft); color: var(--blue); }
.purchase-icon svg { width: 18px; height: 18px; }
.purchase-panel h3 { margin: 0; font-size: 15px; line-height: 1.4; }
.purchase-panel-head p { margin: 3px 0 0; font-size: 12px; }
.purchase-steps { display: grid; gap: 9px; margin-top: 15px; }
.purchase-step { display: grid; grid-template-columns: 23px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-width: 0; }
.step-index { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 750; }
.purchase-step strong, .purchase-step p { display: block; }
.purchase-step strong { font-size: 12px; font-weight: 700; }
.purchase-step p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.purchase-panel code { padding: 2px 5px; border-radius: 4px; background: #f1f4f8; color: #243b5a; font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.copy-button { min-height: 30px; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid #cbd6e4; border-radius: 6px; background: #fff; color: #47627f; font-size: 11px; font-weight: 700; cursor: pointer; }
.copy-button:hover { border-color: #9fbde7; background: var(--blue-soft); color: var(--blue); }
.copy-button:disabled { cursor: not-allowed; opacity: .5; }
.copy-button svg { width: 13px; height: 13px; }
.support-account-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 11px; border: 1px solid #dbe4ee; border-radius: 7px; background: #f8fafc; color: var(--muted); font-size: 11px; }
.support-account-row code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: transparent; padding: 0; color: #273d5d; }
.support-qr { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.support-qr img { width: 68px; height: 68px; padding: 3px; border: 1px solid #dbe4ee; border-radius: 7px; background: #fff; object-fit: contain; }
.purchase-note { margin: 10px 0 0 !important; color: var(--muted); font-size: 11px !important; }
.surface-view { min-width: 0; }
.purchase-view .page-heading { margin-bottom: 12px; }
.purchase-view .page-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.purchase-network-strip { margin-bottom: 18px; background: var(--amber-soft); color: var(--amber); }
.billing-flow { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
.flow-main { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.purchase-steps { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(360px, .8fr); gap: 0; margin-top: 0; background: var(--surface); }
.purchase-steps .flow-step { border-bottom: 0; }
.purchase-steps .flow-step + .flow-step { padding-left: 40px; border-left: 1px solid var(--line); }
.flow-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.flow-step:last-child { border-bottom: 0; }
.step-num { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #eaf2ff; color: var(--blue); font-weight: 720; }
.flow-step h2 { margin: 2px 0 0; font-size: 16px; font-weight: 700; }
.flow-step > div > p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.package { min-height: 80px; display: grid; align-content: center; justify-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: #182230; text-align: center; cursor: pointer; }
.package:hover { border-color: #9fc5ff; background: #f5f9ff; }
.package.selected { border-color: #6fa5f0; background: var(--blue-soft); box-shadow: inset 0 0 0 1px rgba(23,105,224,.08); }
.package strong, .package span { display: block; }
.package strong { font-size: 14px; font-weight: 700; }
.package span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.purchase-contact { display: flex; align-items: center; gap: 15px; margin-top: 14px; }
.qr-box { width: 132px; aspect-ratio: 1; overflow: hidden; flex: 0 0 132px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.qr-box img { display: block; width: 100%; height: 100%; object-fit: contain; }
.purchase-contact-copy { display: grid; gap: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.purchase-contact-copy strong { color: #182230; font-size: 13px; }
.purchase-contact-copy code, .purchase-account-row code { padding: 2px 5px; border-radius: 4px; background: #f1f4f8; color: #243b5a; font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.redemption-step { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.code-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 14px; }
.code-field input { min-width: 0; height: 42px; padding: 0 13px; border: 1px solid #b9c6d5; border-radius: 7px; outline: 0; background: #fff; color: #182230; font: inherit; }
.code-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,.13); }
.code-field .primary-button { min-height: 42px; }
.purchase-account-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 14px; padding: 11px 12px; border: 1px solid #dbe4ee; border-radius: 7px; background: #f8fafc; color: var(--muted); font-size: 12px; }
.purchase-account-row code { min-width: 0; overflow: hidden; background: transparent; color: #273d5d; text-overflow: ellipsis; white-space: nowrap; }
.purchase-footnote { margin-top: 9px !important; font-size: 11px !important; }
.purchase-login-button { min-height: 34px; }
@media (max-width: 860px) { .stage { padding: 0; } .app-shell { width: 100%; min-height: 100vh; border: 0; border-radius: 0; } .toolbar { grid-template-columns: 1fr auto; padding: 0 18px; } .workspace-nav { display: none; } .main { width: min(100% - 40px, 760px); } .work-grid, .product-facts { grid-template-columns: 1fr; } .strict-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); } .strict-settings-copy { grid-column: 1 / -1; } }
@media (max-width: 620px) { .toolbar { min-height: 64px; padding: 0 14px; } .brand-lockup { width: 94px; height: 36px; } .connection { display: none; } .main { width: min(100% - 32px, 560px); padding-top: 20px; } .page-heading h1 { font-size: 24px; } .strict-settings { grid-template-columns: 1fr; padding: 16px; } .strict-settings-copy { grid-column: auto; } .dropzone { grid-template-columns: 1fr; justify-items: center; min-height: 200px; text-align: center; } .drop-copy { text-align: center; } .job-item { grid-template-columns: 42px minmax(0, 1fr) auto auto; gap: 10px; padding: 12px 0; } .job-progress { grid-column: 2 / -1; } .job-action { grid-column: 4; grid-row: 1; } .job-action .retry-button { font-size: 0; } .job-action .retry-button svg { margin: 0; } .status-badge { grid-column: 3; grid-row: 1; min-width: 0; font-size: 0; } .status-badge svg { margin: 0; } .job-error, .job-review-notice { grid-column: 2 / -1; } .product-facts article { padding: 14px; } }
@media (max-width: 420px) { .brand-lockup { width: 82px; height: 34px; } .toolbar-actions { gap: 6px; } .balance, .purchase-button { gap: 5px; padding: 0 8px; font-size: 11px; } .purchase-button span, .balance span { max-width: 70px; overflow: hidden; text-overflow: ellipsis; } .credit-dialog { padding: 24px 18px; } .phone-code-row { grid-template-columns: 1fr; } .phone-code-row .secondary-button { width: 100%; } .purchase-step { grid-template-columns: 23px minmax(0, 1fr); } .purchase-step .copy-button { grid-column: 2; justify-self: start; } }
@media (max-width: 860px) { .purchase-steps { grid-template-columns: 1fr; } .purchase-steps .flow-step + .flow-step { padding-left: 22px; border-top: 1px solid var(--line); border-left: 0; } }
@media (max-width: 560px) { .packages { grid-template-columns: 1fr; } .purchase-contact { align-items: flex-start; } .purchase-account-row { grid-template-columns: 1fr; align-items: stretch; gap: 6px; } .purchase-account-row .secondary-button { width: 100%; } }
@media (max-width: 560px) { .code-field { grid-template-columns: 1fr; } .code-field .primary-button { width: 100%; } }
