:root {
  color-scheme: light;
  --bg: #edf1ef;
  --surface: #ffffff;
  --surface-2: #f4f7f6;
  --surface-3: #e4eae7;
  --text: #172023;
  --muted: #5c686c;
  --muted-2: #7a8588;
  --border: rgba(23, 32, 35, 0.15);
  --border-strong: rgba(8, 127, 118, 0.48);
  --accent: #087f76;
  --accent-strong: #0a998d;
  --accent-text: #ffffff;
  --amber: #f59e0b;
  --success: #087f5b;
  --danger: #d44555;
  --red: #c93f48;
  --paper: #ffffff;
  --header: #0e1517;
  --header-text: #f5f8f7;
  --shadow: 0 18px 48px rgba(21, 38, 36, 0.10);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1012;
  --surface: #111719;
  --surface-2: #171f21;
  --surface-3: #202a2c;
  --text: #f2f6f5;
  --muted: #a7b1af;
  --muted-2: #788481;
  --border: rgba(235, 247, 244, 0.13);
  --border-strong: rgba(45, 190, 176, 0.52);
  --accent: #2bbcad;
  --accent-strong: #54d6c8;
  --accent-text: #071311;
  --success: #42c997;
  --danger: #fb7185;
  --red: #ff646d;
  --paper: #f5f7f6;
  --header: #080c0d;
  --header-text: #f5f8f7;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.30);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

p,
small {
  color: var(--muted);
  line-height: 1.55;
}

.is-hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 13, 0.94);
  padding: 12px 20px;
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  flex: 0 1 420px;
  min-width: 360px;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-frame {
  display: grid;
  flex: 0 0 auto;
  width: clamp(220px, 16vw, 278px);
  height: 68px;
  place-items: center;
  overflow: visible;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 8px;
  background: #050607;
}

.logo-frame img {
  width: calc(100% - 14px);
  height: calc(100% - 10px);
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-copy small {
  color: #c7d2d5;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
}

.topbar-tabs {
  display: flex;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  padding: 4px;
}

.topbar-tabs a {
  border-radius: 999px;
  padding: 9px 14px;
  color: #d4d4d8;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-tabs a.is-active {
  background: var(--accent);
  color: var(--accent-text);
}

.account-strip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.server-pill,
.status-chip,
.badge {
  white-space: nowrap;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.1);
  color: #bbf7d0;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.status-chip.is-pending {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.13);
  color: #fcd34d;
}

.status-chip.is-paid,
.badge.is-success {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.14);
  color: #bbf7d0;
}

.status-chip.is-error,
.status-chip.is-expired {
  border-color: rgba(251, 113, 133, 0.36);
  background: rgba(251, 113, 133, 0.12);
  color: #fecdd3;
}

.page {
  display: grid;
  gap: 18px;
  max-width: 1680px;
  margin: 0 auto;
  padding: 20px;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(380px, 0.8fr);
  gap: 22px;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(245, 158, 11, 0.05)),
    #101214;
  box-shadow: var(--shadow);
  padding: 22px;
}

.intro-copy {
  display: grid;
  align-content: center;
  gap: 12px;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

h1 {
  max-width: 980px;
  font-size: 32px;
  line-height: 1.22;
}

.intro-copy p {
  max-width: 880px;
}

.trial-notice,
.pricing-notice {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
  padding: 10px 12px;
}

.trial-notice {
  max-width: 900px;
}

.trial-notice strong,
.pricing-notice strong {
  color: #fcd34d;
  font-size: 13px;
}

.trial-notice span,
.pricing-notice span {
  color: #d6d3d1;
  font-size: 13px;
  line-height: 1.55;
}

.intro-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.intro-metrics div {
  display: grid;
  align-content: center;
  min-height: 96px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  padding: 14px;
}

.intro-metrics strong {
  font-size: 22px;
}

.intro-metrics span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.auth-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.auth-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
}

.trial-highlight {
  width: fit-content;
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

.auth-card,
.admin-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  padding: 4px;
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.segmented button.is-active {
  background: var(--accent);
  color: var(--accent-text);
}

.workspace-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 330px;
  align-items: start;
  gap: 16px;
}

.workspace-grid[data-active-view="billing"],
.workspace-grid[data-active-view="orders"],
.workspace-grid[data-active-view="jobs"] {
  grid-template-columns: 220px minmax(0, 1fr);
}

.workspace-grid.is-locked {
  opacity: 0.72;
}

.sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.new-task-button,
.primary-button,
.ghost-button,
.secondary-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.new-task-button,
.primary-button {
  background: var(--accent);
  color: var(--accent-text);
}

.new-task-button:hover,
.primary-button:hover {
  background: var(--accent-strong);
}

.ghost-button,
.secondary-button {
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.045);
  color: #e4e4e7;
  border-color: var(--border);
}

.ghost-button:hover,
.secondary-button:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
}

.primary-button:disabled,
.ghost-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.secondary-button.is-disabled,
.download-link.is-disabled {
  pointer-events: none;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.03);
}

.side-nav {
  display: grid;
  gap: 4px;
}

.side-nav a {
  border-radius: 8px;
  color: #d4d4d8;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
  text-decoration: none;
}

.side-nav a:hover,
.side-nav a.is-active {
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent-strong);
}

.quota-box,
.operator-box,
.notice-card,
.result-card,
.panel,
.admin-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.quota-box,
.operator-box,
.notice-card,
.result-card {
  padding: 14px;
}

.quota-box span,
.operator-box span,
.metric-grid span,
label span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quota-box strong,
.operator-box strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
}

.quota-box small,
.operator-box small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

.workspace-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.translate-panel {
  padding: clamp(18px, 2vw, 26px);
}

.translation-entitlement {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: rgba(45, 212, 191, 0.05);
  padding: 15px 16px;
}

.translation-entitlement.is-paid {
  border-left-color: var(--success);
  background: rgba(52, 211, 153, 0.07);
}

.translation-entitlement.is-empty {
  border-left-color: var(--amber);
  background: rgba(245, 158, 11, 0.07);
}

.translation-entitlement span,
.translation-entitlement strong,
.translation-entitlement small {
  display: block;
}

.translation-entitlement span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.translation-entitlement strong {
  margin-top: 4px;
  font-size: 17px;
}

.translation-entitlement small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.entitlement-link {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.entitlement-link:hover {
  text-decoration: underline;
}

.primary-settings-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.advanced-settings {
  margin-bottom: 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.advanced-settings summary {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  list-style-position: inside;
}

.advanced-settings summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.advanced-settings-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0 0 14px;
}

body.is-app-mode .sidebar {
  box-shadow: none;
}

body.is-app-mode .quota-box,
body.is-app-mode .operator-box {
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 14px 4px 2px;
}

.panel,
.admin-panel {
  padding: 16px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2 {
  font-size: 18px;
  line-height: 1.25;
}

.section-title p {
  margin-top: 5px;
  font-size: 13px;
}

.section-title > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pricing-notice {
  margin-bottom: 14px;
}

.trial-card {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 8px;
  background: rgba(103, 232, 249, 0.07);
  padding: 12px 14px;
}

.trial-card span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.trial-card strong {
  font-size: 16px;
}

.plan-card {
  display: grid;
  min-height: 208px;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  padding: 14px;
  text-align: left;
}

.plan-card:hover {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.07);
}

.plan-card.is-selected {
  border-color: var(--border-strong);
  background: rgba(45, 212, 191, 0.12);
}

.plan-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.plan-kicker,
.plan-credit {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.plan-card strong {
  font-size: 18px;
}

.plan-price {
  font-size: 26px;
  font-weight: 900;
}

.plan-card small {
  min-height: 38px;
  font-size: 12px;
}

.plan-card ul {
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.order-controls,
.settings-row,
.admin-form-grid {
  display: grid;
  gap: 12px;
}

.order-controls {
  grid-template-columns: 160px minmax(180px, 1fr) auto;
  align-items: end;
  margin-top: 14px;
}

.settings-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.admin-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 6px;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

input,
select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  outline: none;
  padding: 0 10px;
}

input[type="file"] {
  padding: 8px 10px;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

.form-message {
  min-height: 20px;
  color: #fcd34d;
  font-size: 12px;
}

.order-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
  padding: 14px;
}

.order-card.is-paid {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.09);
}

.order-card.is-submitted {
  border-color: rgba(103, 232, 249, 0.35);
  background: rgba(103, 232, 249, 0.08);
}

.order-card.is-error,
.order-card.is-used {
  border-color: rgba(251, 113, 133, 0.34);
  background: rgba(251, 113, 133, 0.08);
}

.order-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-card strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
}

.order-card small {
  display: block;
  margin-top: 5px;
}

.order-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.payment-instructions {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.07);
  padding: 14px;
}

.payment-qr-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.qr-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  padding: 10px;
}

.qr-card.is-selected {
  border-color: rgba(45, 212, 191, 0.68);
  background: rgba(45, 212, 191, 0.1);
}

.qr-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.qr-card-header strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-card-header span {
  flex: none;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
}

.qr-card:not(.is-selected) .qr-card-header span {
  color: var(--muted);
}

.qr-box {
  display: grid;
  min-height: 142px;
  place-items: center;
  border: 1px dashed rgba(103, 232, 249, 0.38);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  padding: 10px;
  text-align: center;
}

.qr-box img {
  max-width: 126px;
  max-height: 126px;
  border-radius: 4px;
  background: #fff;
}

.qr-box span {
  color: var(--muted);
  font-size: 12px;
}

.payment-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.payment-copy > span,
.payment-claim span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.payment-copy strong {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
  padding: 8px 10px;
  font-size: 17px;
  letter-spacing: 0;
}

.payment-claim {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(140px, 180px) minmax(220px, 1fr) minmax(180px, max-content);
  gap: 10px;
  align-items: end;
  margin-top: 6px;
}

.payment-claim .secondary-button {
  min-width: 180px;
}

.drop-zone {
  display: grid;
  min-height: 230px;
  place-items: center;
  border: 1px dashed rgba(161, 161, 170, 0.58);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  padding: 26px;
  text-align: center;
}

.drop-zone.is-dragging {
  border-color: var(--accent);
  background: rgba(45, 212, 191, 0.08);
}

.drop-zone.is-disabled {
  cursor: wait;
  opacity: 0.72;
}

.drop-zone:focus-within {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-icon {
  display: grid;
  width: 70px;
  height: 82px;
  place-items: center;
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 8px;
  background: #070808;
  color: var(--accent-strong);
  font-size: 17px;
  font-weight: 900;
}

.drop-zone strong {
  margin-top: 16px;
  font-size: 18px;
}

.drop-zone small {
  margin-top: 6px;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px 12px;
  font-size: 13px;
}

.file-row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row.is-empty {
  color: var(--muted);
}

.action-row {
  margin-top: 12px;
}

.status-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.status-panel div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.status-panel strong {
  font-size: 14px;
}

.status-panel span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
}

.progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(161, 161, 170, 0.18);
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

.status-panel.is-running .progress-bar span {
  width: 62%;
  animation: pulse-width 1.3s ease-in-out infinite;
}

.status-panel.is-success .progress-bar span {
  width: 100%;
  background: var(--success);
}

.status-panel.is-error .progress-bar span {
  width: 100%;
  background: var(--danger);
}

.status-panel.is-warning .progress-bar span {
  width: 100%;
  background: #fbbf24;
}

@keyframes pulse-width {
  0% { transform: translateX(-40%); }
  50% { transform: translateX(30%); }
  100% { transform: translateX(100%); }
}

.orders-list {
  display: grid;
  gap: 8px;
}

.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 164px;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  padding: 11px 12px;
  text-align: left;
}

.order-row > span {
  min-width: 0;
}

.order-row > span:last-child {
  justify-self: end;
  width: 164px;
}

.order-row:hover,
.order-row.is-selected {
  border-color: var(--border-strong);
  background: rgba(45, 212, 191, 0.08);
}

.order-row small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  background: #181b20;
  color: #d4d4d8;
  font-weight: 900;
}

tr:last-child td {
  border-bottom: 0;
}

.job-file {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-actions {
  display: flex;
  gap: 8px;
}

.job-actions a {
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: none;
}

.muted,
.order-no {
  color: var(--muted);
}

.empty-cell,
.loading-line {
  color: var(--muted);
  padding: 16px;
  text-align: center;
}

.result-panel {
  position: sticky;
  top: 92px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.metric-grid div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 13px;
}

.metric-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.quality-summary {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.07);
  padding: 12px;
}

.quality-summary.is-review {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.09);
}

.quality-summary.is-empty {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.quality-summary strong {
  color: var(--text);
  font-size: 13px;
}

.quality-summary ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.quality-chip {
  display: inline-flex;
  margin-top: 4px;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
}

.quality-chip.is-review {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

.download-stack {
  display: grid;
  gap: 10px;
}

.download-link {
  display: grid;
  min-height: 42px;
  place-items: center;
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.14);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.notice-card h2 {
  margin-bottom: 8px;
  font-size: 16px;
}

.notice-card p {
  font-size: 12px;
}

.admin-panel {
  margin-bottom: 28px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  grid-template-areas:
    "users users"
    "settings side"
    "orders orders";
  align-items: start;
  gap: 14px;
}

.admin-settings-layout {
  grid-area: settings;
  display: grid;
  gap: 14px;
}

.admin-side-layout {
  grid-area: side;
  display: grid;
  gap: 14px;
}

.admin-orders-card {
  grid-area: orders;
}

.admin-users-card {
  grid-area: users;
}

.admin-card h3 {
  font-size: 15px;
}

.admin-card-note {
  font-size: 12px;
}

.key-status {
  display: grid;
  gap: 8px;
}

.admin-key-actions {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(120px, 0.6fr) minmax(0, 1.8fr);
  gap: 10px;
  align-items: stretch;
}

.connection-status {
  display: flex;
  align-items: center;
  min-height: 40px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.connection-status.is-running {
  border-color: rgba(96, 165, 250, 0.45);
  color: #bfdbfe;
}

.connection-status.is-success {
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(45, 212, 191, 0.08);
  color: var(--accent-strong);
}

.connection-status.is-error {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
}

.payment-qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.payment-qr-editor {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
}

.payment-qr-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  max-height: 178px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.payment-qr-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.payment-qr-preview span {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.key-row {
  display: grid;
  grid-template-columns: 78px 76px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.key-row span {
  color: var(--accent-strong);
  font-weight: 900;
}

.key-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-pay {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.admin-key-grid,
.manual-pay-grid {
  display: grid;
  gap: 12px;
}

.admin-key-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.manual-pay-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.manual-note-field {
  grid-column: 1 / -1;
}

.manual-pay-grid .secondary-button {
  grid-column: 1 / -1;
}

.admin-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-users-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.admin-users-summary div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.admin-users-summary span,
.admin-user-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-users-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
}

.admin-users-list {
  display: grid;
  max-height: 520px;
  gap: 8px;
  overflow: auto;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 0.8fr) minmax(110px, 0.55fr) minmax(160px, 0.75fr) minmax(190px, 0.9fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.admin-user-row > div {
  min-width: 0;
}

.admin-user-row strong,
.admin-user-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-row strong {
  margin-top: 2px;
  font-size: 13px;
}

.admin-user-row small {
  color: var(--muted);
  font-size: 11px;
}

.admin-orders-list {
  display: grid;
  max-height: 420px;
  gap: 8px;
  overflow: auto;
}

.admin-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 10px;
  text-align: left;
}

.admin-order-row:hover {
  border-color: var(--border-strong);
  background: rgba(45, 212, 191, 0.08);
}

.admin-order-row span {
  min-width: 0;
}

.admin-order-row span:last-child {
  text-align: right;
}

.admin-order-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-order-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1320px) {
  .workspace-grid {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .admin-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "users"
      "settings"
      "side"
      "orders";
  }

  .admin-user-row {
    grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 0.8fr) minmax(110px, 0.55fr);
  }

  .admin-user-row > div:nth-child(n + 4) {
    grid-column: span 1;
  }

  .result-panel {
    grid-column: 2 / -1;
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-instructions,
  .payment-claim {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .topbar,
  .intro-band,
  .auth-section,
  .workspace-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    align-items: stretch;
  }

  .brand {
    flex: none;
    min-width: 0;
  }

  .logo-frame {
    width: min(278px, 58vw);
  }

  .topbar-tabs {
    overflow-x: auto;
  }

  .sidebar,
  .result-panel {
    position: static;
  }

  .result-panel {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .intro-metrics,
  .plans-grid,
  .order-controls,
  .settings-row,
  .admin-form-grid,
  .admin-key-grid,
  .admin-key-actions,
  .admin-users-summary,
  .admin-user-row,
  .manual-pay-grid,
  .payment-qr-options,
  .payment-qr-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .manual-note-field,
  .manual-pay-grid .secondary-button {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 12px;
  }

  h1 {
    font-size: 25px;
  }

  .topbar {
    padding: 10px 12px;
  }

  .brand {
    gap: 10px;
  }

  .logo-frame {
    width: min(230px, 74vw);
    height: 58px;
  }

  .brand-copy {
    display: none;
  }

  .intro-band,
  .auth-section,
  .panel,
  .admin-panel {
    padding: 12px;
  }

  .section-title,
  .order-card,
  .status-panel div:first-child,
  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .drop-zone {
    min-height: 210px;
  }

  .order-row {
    grid-template-columns: 1fr;
  }

  .order-row > span:last-child {
    justify-self: start;
    width: auto;
  }

  .key-row {
    grid-template-columns: 1fr;
  }
}

/* C trust-first public experience and shared light/dark theme. */
.topbar {
  display: grid;
  grid-template-columns: minmax(300px, auto) minmax(320px, 1fr) auto;
  min-height: 76px;
  gap: 24px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(14, 21, 23, 0.97);
  color: var(--header-text);
  padding: 10px clamp(16px, 3vw, 48px);
}

[data-theme="dark"] .topbar {
  background: rgba(8, 12, 13, 0.97);
}

.brand {
  min-width: 0;
  max-width: 360px;
  gap: 12px;
}

.logo-frame {
  width: clamp(184px, 15vw, 220px);
  height: 56px;
  border-color: rgba(62, 203, 188, 0.30);
  background: #050809;
}

.logo-frame img {
  width: calc(100% - 10px);
  height: calc(100% - 8px);
}

.brand-copy strong,
.brand-copy small {
  color: var(--header-text);
}

.brand-copy strong {
  font-size: 17px;
}

.brand-copy small {
  opacity: 0.68;
}

.topbar-tabs {
  justify-self: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.topbar-tabs a {
  position: relative;
  border-radius: 0;
  color: rgba(245, 248, 247, 0.72);
  padding: 12px 13px;
}

.topbar-tabs a::after {
  position: absolute;
  right: 13px;
  bottom: 4px;
  left: 13px;
  height: 2px;
  background: var(--accent-strong);
  content: "";
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity 160ms ease, transform 160ms ease;
}

.topbar-tabs a:hover,
.topbar-tabs a:focus-visible,
.topbar-tabs a.is-active {
  background: transparent;
  color: #ffffff;
}

.topbar-tabs a:hover::after,
.topbar-tabs a:focus-visible::after,
.topbar-tabs a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.account-strip {
  justify-self: end;
}

.theme-toggle,
.header-login {
  display: inline-flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: transparent;
  color: var(--header-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 0 12px;
  text-decoration: none;
}

.theme-toggle:hover,
.header-login:hover {
  border-color: rgba(84, 214, 200, 0.72);
  background: rgba(255, 255, 255, 0.06);
}

.theme-toggle:active,
.header-login:active,
.public-button:active {
  transform: translateY(1px);
}

.theme-toggle-icon {
  position: relative;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.theme-toggle-icon::after {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--header);
  content: "";
  transform: translate(3px, -2px);
}

[data-theme="dark"] .theme-toggle-icon::after {
  width: 3px;
  height: 3px;
  border-radius: 0;
  background: transparent;
  box-shadow: -7px 1px 0 currentColor, 1px -7px 0 currentColor, 8px 1px 0 currentColor, 1px 8px 0 currentColor;
  transform: none;
}

.header-login {
  border-color: var(--accent-strong);
  background: var(--accent);
  color: var(--accent-text);
}

.page {
  max-width: 1800px;
  gap: 0;
  padding: 0 clamp(16px, 3vw, 48px) 28px;
}

.marketing-view {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}

.trust-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(520px, 1.08fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
  min-height: min(720px, calc(100dvh - 76px));
  padding: clamp(56px, 7vw, 104px) 0 40px;
}

.trust-hero-copy {
  align-self: center;
  max-width: 680px;
}

.document-code,
.section-index,
.boundary-label,
.public-sample-inspector > p:first-child {
  color: var(--accent);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.trust-hero h1 {
  max-width: 12em;
  margin-top: 18px;
  font-size: 64px;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
  word-break: keep-all;
}

.hero-lead {
  max-width: 60ch;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.public-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 16px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 80ms ease;
}

.public-button.is-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.public-button.is-primary:hover {
  background: var(--accent-strong);
}

.public-button.is-secondary {
  background: transparent;
  color: var(--text);
}

.public-button.is-secondary:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.trial-disclosure {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.trial-disclosure span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.trust-hero-drawing {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 35, 0.22);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: none;
}

[data-theme="dark"] .trust-hero-drawing {
  border-color: rgba(255, 255, 255, 0.18);
}

.trust-hero-drawing img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.drawing-bar,
.trust-hero-drawing figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #eef2f0;
  color: #233033;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 11px;
  padding: 9px 12px;
}

.drawing-bar {
  border-bottom: 1px solid #c7d0cd;
}

.trust-hero-drawing figcaption {
  border-top: 1px solid #c7d0cd;
}

.trust-hero-drawing figcaption span,
.trust-hero-drawing figcaption strong {
  color: #233033;
}

.trust-ledger {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-ledger > div {
  min-width: 0;
  padding: 22px 26px 24px 0;
}

.trust-ledger > div + div {
  border-left: 1px solid var(--border);
  padding-left: 26px;
}

.trust-ledger dt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 900;
}

.trust-ledger dt span,
.public-flow-line > li > span,
.auth-benefits dt {
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.trust-ledger dd {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.public-section {
  scroll-margin-top: 92px;
  padding: clamp(64px, 8vw, 112px) 0;
  border-top: 1px solid var(--border);
}

.public-section-heading {
  display: grid;
  grid-template-columns: minmax(150px, 0.3fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 84px);
  align-items: start;
  margin-bottom: 38px;
}

.public-section-heading h2 {
  max-width: none;
  font-size: 48px;
  line-height: 1.16;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
  word-break: keep-all;
}

.public-section-heading > div > p {
  max-width: 66ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.public-sample-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.55fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.public-sample-main {
  min-width: 0;
  border-right: 1px solid var(--border);
}

.public-sample-toolbar {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding: 8px 14px 8px 18px;
}

.public-sample-toolbar strong {
  overflow: hidden;
  font-family: Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-mode-switch {
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-2);
  padding: 3px;
}

.public-mode-switch button {
  min-width: 56px;
  height: 32px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.public-mode-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-text);
}

.public-sample-stage {
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

.public-sample-stage img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.public-sample-pin {
  position: absolute;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: rgba(14, 21, 23, 0.92);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.24);
  color: #ffffff;
  cursor: pointer;
  font: 800 11px/1 Consolas, monospace;
  transform: translate(-50%, -50%);
}

.public-sample-pin.is-active {
  background: var(--accent);
  outline: 3px solid rgba(8, 127, 118, 0.24);
}

.pin-one { top: 31%; left: 70%; }
.pin-two { top: 56%; left: 31%; }
.pin-three { top: 73%; left: 76%; }

.public-sample-inspector {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(20px, 2.5vw, 34px);
}

.public-sample-inspector h3 {
  margin-top: 6px;
  font-size: 22px;
}

.public-detail-view {
  width: 100%;
  margin: 24px 0 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  aspect-ratio: 16 / 10;
  background-color: #ffffff;
  background-position: 70% 31%;
  background-repeat: no-repeat;
  background-size: 280%;
}

.public-detail-view[data-point="2"] { background-position: 31% 56%; }
.public-detail-view[data-point="3"] { background-position: 76% 73%; }

.public-sample-inspector > strong {
  font-size: 16px;
}

.public-sample-inspector > strong + p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.65;
}

.public-checkpoint-list {
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.public-checkpoint-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  padding: 11px 0;
}

.public-checkpoint-list li span {
  color: var(--muted-2);
  font-family: Consolas, monospace;
}

.public-checkpoint-list li.is-active,
.public-checkpoint-list li.is-active span {
  color: var(--accent);
  font-weight: 800;
}

.public-mode-status {
  margin-top: auto;
  padding-top: 20px;
  font-size: 12px;
}

.public-flow-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.public-flow-line li {
  min-width: 0;
  border-bottom: 1px solid var(--border);
  padding: 22px 26px 26px 0;
}

.public-flow-line li + li {
  border-left: 1px solid var(--border);
  padding-left: 26px;
}

.public-flow-line h3 {
  margin-top: 18px;
  font-size: 16px;
}

.public-flow-line p {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.65;
}

.data-caution {
  display: grid;
  grid-template-columns: minmax(170px, 0.25fr) minmax(0, 1fr);
  gap: 28px;
  margin-top: 28px;
  border-left: 3px solid var(--amber);
  background: rgba(245, 158, 11, 0.08);
  padding: 20px 24px;
}

.data-caution p {
  font-size: 13px;
}

.public-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.public-work-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.public-work-table th,
.public-work-table td {
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  padding: 18px 20px;
  text-align: left;
  vertical-align: top;
}

.public-work-table thead th {
  background: transparent;
  color: var(--muted-2);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.public-work-table tbody th {
  width: 14%;
  color: var(--text);
  font-size: 16px;
}

.public-topic-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  background: var(--border);
  padding: 1px;
}

.public-topic-links a {
  min-width: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  padding: 15px 16px;
  text-decoration: none;
}

.public-topic-links a:hover {
  color: var(--accent);
}

.public-boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.public-boundary-grid > section {
  padding: 30px 7vw 34px 0;
}

.public-boundary-grid > section + section {
  border-left: 1px solid var(--border);
  padding-right: 0;
  padding-left: 7vw;
}

.public-boundary-grid .manual-review {
  border-top: 3px solid var(--red);
}

.manual-review .boundary-label {
  color: var(--red);
}

.public-boundary-grid h3 {
  margin-top: 8px;
  font-size: 24px;
}

.public-boundary-grid ul {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.public-boundary-grid li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  padding: 14px 0;
}

.public-boundary-grid li span {
  color: var(--muted-2);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.public-pricing-table {
  border-top: 1px solid var(--border);
}

.public-pricing-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(190px, 1.1fr) minmax(130px, 0.7fr) minmax(230px, 1.5fr) minmax(120px, auto);
  gap: 18px;
  align-items: center;
  min-height: 74px;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.public-pricing-row > span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.public-pricing-row > span b {
  color: var(--text);
  font-size: 18px;
}

.public-pricing-row .public-button {
  justify-self: end;
}

.pricing-header {
  min-height: 44px;
  color: var(--muted-2);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 11px;
  font-weight: 800;
}

.pricing-header span {
  font-size: 11px;
}

.beta-note {
  margin-top: 18px;
  border-left: 3px solid var(--amber);
  color: var(--muted);
  font-size: 13px;
  padding: 4px 0 4px 14px;
}

.public-auth-section {
  scroll-margin-top: 92px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: clamp(36px, 7vw, 112px);
  align-items: center;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  padding: clamp(64px, 8vw, 112px) 0;
}

.auth-copy h2 {
  max-width: none;
  margin-top: 12px;
  font-size: 48px;
  line-height: 1.18;
  overflow-wrap: anywhere;
  text-wrap: balance;
  word-break: keep-all;
}

.auth-copy > p {
  max-width: 60ch;
  margin-top: 16px;
  line-height: 1.75;
}

.trial-highlight {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.auth-benefits {
  margin: 26px 0 0;
  border-top: 1px solid var(--border);
}

.auth-benefits > div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.auth-benefits dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.public-auth-section .auth-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.auth-data-note {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.55;
}

.public-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  padding: 24px 0 36px;
}

.public-footer a {
  color: var(--accent);
  text-decoration: none;
}

.public-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* Existing customer workspace follows the selected theme. */
[data-theme="light"] input,
[data-theme="light"] select {
  background: var(--surface);
}

[data-theme="light"] .sidebar,
[data-theme="light"] .panel,
[data-theme="light"] .result-card,
[data-theme="light"] .notice-card,
[data-theme="light"] .admin-panel,
[data-theme="light"] .admin-card,
[data-theme="light"] .auth-card {
  background: var(--surface);
}

[data-theme="light"] .ghost-button,
[data-theme="light"] .secondary-button,
[data-theme="light"] .plan-card,
[data-theme="light"] .file-row,
[data-theme="light"] .status-panel,
[data-theme="light"] .order-row,
[data-theme="light"] .metric-grid div,
[data-theme="light"] .quality-summary.is-empty,
[data-theme="light"] .connection-status,
[data-theme="light"] .payment-qr-editor,
[data-theme="light"] .key-row,
[data-theme="light"] .admin-users-summary div,
[data-theme="light"] .admin-user-row,
[data-theme="light"] .admin-order-row,
[data-theme="light"] .qr-card,
[data-theme="light"] .drop-zone,
[data-theme="light"] .file-icon,
[data-theme="light"] .segmented {
  background: var(--surface-2);
}

[data-theme="light"] .payment-copy strong,
[data-theme="light"] .qr-box {
  background: var(--surface);
}

[data-theme="light"] thead {
  background: var(--surface-3);
}

[data-theme="light"] .topbar .ghost-button {
  border-color: rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--header-text);
}

[data-theme="light"] .side-nav a,
[data-theme="light"] .ghost-button,
[data-theme="light"] .secondary-button {
  color: var(--text);
}

[data-theme="light"] .ghost-button:hover,
[data-theme="light"] .secondary-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

[data-theme="light"] .side-nav a:hover,
[data-theme="light"] .side-nav a.is-active {
  background: rgba(8, 127, 118, 0.10);
  color: var(--accent);
}

[data-theme="light"] th {
  background: var(--surface-3);
  color: var(--text);
}

[data-theme="light"] .status-chip.is-pending {
  color: #805200;
}

[data-theme="light"] .status-chip.is-paid,
[data-theme="light"] .badge.is-success {
  color: #07633f;
}

[data-theme="light"] .status-chip.is-error,
[data-theme="light"] .status-chip.is-expired,
[data-theme="light"] .connection-status.is-error {
  color: #a52f42;
}

body.is-app-mode .page {
  max-width: 1800px;
  gap: 18px;
  padding-top: 20px;
}

.result-task-meta {
  margin: -4px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

body.is-app-mode .drop-zone {
  min-height: 176px;
  padding: 20px;
}

body.is-app-mode .file-icon {
  width: 56px;
  height: 64px;
}

body.is-app-mode .drop-zone strong {
  margin-top: 10px;
}

#translate,
#billing,
#orders,
#jobs,
#admin-panel {
  scroll-margin-top: 96px;
}

@media (max-width: 1320px) {
  .trust-hero h1 {
    font-size: 54px;
  }
}

@media (min-width: 1440px) {
  .trust-hero h1 {
    font-size: 72px;
  }
}

@media (max-width: 1160px) {
  .topbar {
    grid-template-columns: minmax(260px, auto) minmax(0, 1fr) auto;
    gap: 12px;
  }

  .brand-copy {
    display: none;
  }

  .public-tabs a {
    padding-right: 9px;
    padding-left: 9px;
  }

  .trust-hero {
    grid-template-columns: minmax(0, 0.8fr) minmax(460px, 1.2fr);
    gap: 34px;
  }

  .trust-hero h1 {
    font-size: 48px;
  }

  .public-section-heading h2,
  .auth-copy h2 {
    font-size: 42px;
  }
}

@media (max-width: 1100px) {
  .trust-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 64px;
  }

  .trust-hero-copy {
    max-width: 760px;
  }

  .trust-hero-drawing {
    transform: none;
  }

  .public-auth-section {
    grid-template-columns: 1fr;
  }

  .public-auth-section .auth-card {
    max-width: 540px;
  }
}

@media (min-width: 1121px) and (max-width: 1320px) {
  body.is-app-mode .workspace-grid[data-active-view="translate"] {
    grid-template-columns: 190px minmax(0, 1fr) 280px;
  }

  body.is-app-mode .workspace-grid[data-active-view="translate"] .result-panel {
    grid-column: auto;
    position: sticky;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .topbar-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: center;
    order: initial;
  }

  .account-strip {
    grid-column: 2;
    grid-row: 1;
  }

  .trust-ledger {
    grid-template-columns: 1fr;
  }

  .trust-ledger > div + div {
    border-top: 1px solid var(--border);
    border-left: 0;
    padding-left: 0;
  }

  .public-section-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .public-sample-workbench {
    grid-template-columns: 1fr;
  }

  .public-sample-main {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .public-sample-inspector {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
    gap: 10px 24px;
  }

  .public-sample-inspector > p:first-child,
  .public-sample-inspector h3,
  .public-detail-view,
  .public-mode-status {
    grid-column: 1;
  }

  .public-sample-inspector > strong,
  .public-sample-inspector > strong + p,
  .public-checkpoint-list {
    grid-column: 2;
  }

  .public-sample-inspector > strong {
    grid-row: 1;
  }

  .public-sample-inspector > strong + p {
    grid-row: 2 / span 2;
  }

  .public-checkpoint-list {
    grid-row: 4 / span 3;
  }

  .public-flow-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-flow-line li:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .public-pricing-row {
    grid-template-columns: minmax(120px, 0.8fr) minmax(170px, 1fr) minmax(110px, 0.7fr) minmax(190px, 1.3fr);
  }

  .public-pricing-row .public-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .pricing-header span:last-child {
    display: none;
  }

  body.is-app-mode .workspace-grid[data-active-view="billing"],
  body.is-app-mode .workspace-grid[data-active-view="orders"],
  body.is-app-mode .workspace-grid[data-active-view="jobs"] {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .topbar {
    min-height: 68px;
    padding: 8px 12px;
  }

  .brand {
    max-width: none;
  }

  .logo-frame {
    width: 154px;
    height: 48px;
  }

  .account-strip {
    gap: 5px;
  }

  .theme-toggle,
  .header-login {
    min-width: 40px;
    height: 40px;
    padding: 0 9px;
  }

  .topbar .ghost-button {
    min-height: 40px;
  }

  .topbar-tabs a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
  }

  .theme-toggle span:last-child {
    display: none;
  }

  body.is-app-mode #account-pill {
    display: none !important;
  }

  body.is-app-mode .brand {
    min-width: 132px;
  }

  body.is-app-mode .sidebar {
    gap: 8px;
    padding: 10px;
  }

  body.is-app-mode .topbar-tabs {
    display: none;
  }

  body.is-app-mode .side-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  body.is-app-mode .side-nav::-webkit-scrollbar {
    display: none;
  }

  body.is-app-mode .side-nav a {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 44px;
    align-items: center;
  }

  body.is-app-mode .new-task-button,
  body.is-app-mode .primary-button,
  body.is-app-mode .ghost-button,
  body.is-app-mode .secondary-button,
  body.is-app-mode .theme-toggle {
    min-height: 44px;
  }

  body.is-app-mode .quota-box,
  body.is-app-mode .operator-box {
    display: none;
  }

  .translation-entitlement {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .entitlement-link {
    justify-self: start;
  }

  .primary-settings-row,
  .advanced-settings-row {
    grid-template-columns: 1fr;
  }

  .advanced-settings summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 0;
  }

  #translate,
  #billing,
  #orders,
  #jobs,
  #admin-panel {
    scroll-margin-top: 126px;
  }

  .topbar-tabs {
    justify-content: flex-start;
  }

  .topbar-tabs a {
    padding: 9px 11px;
  }

  .page {
    padding-right: 14px;
    padding-left: 14px;
  }

  .trust-hero {
    gap: 30px;
    padding-top: 46px;
  }

  .trust-hero h1 {
    font-size: 42px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .public-section-heading h2,
  .auth-copy h2 {
    font-size: 30px;
  }

  .public-sample-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .public-mode-switch {
    align-self: flex-start;
  }

  .public-sample-pin {
    width: 31px;
    height: 31px;
  }

  .public-sample-inspector {
    display: flex;
  }

  .public-flow-line {
    grid-template-columns: 1fr;
  }

  .public-flow-line li + li {
    border-left: 0;
    padding-left: 0;
  }

  .data-caution {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .public-work-table,
  .public-work-table tbody,
  .public-work-table tr,
  .public-work-table th,
  .public-work-table td {
    display: block;
    width: 100%;
  }

  .public-work-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .public-work-table tr {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
  }

  .public-work-table th,
  .public-work-table td {
    border: 0;
    padding: 7px 0;
  }

  .public-work-table td::before {
    display: block;
    color: var(--muted-2);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
  }

  .public-boundary-grid {
    grid-template-columns: 1fr;
  }

  .public-topic-links {
    grid-template-columns: 1fr;
  }

  .public-boundary-grid > section,
  .public-boundary-grid > section + section {
    border-left: 0;
    padding: 28px 0;
  }

  .public-pricing-row,
  .public-pricing-row .public-button {
    display: grid;
    grid-template-columns: 1fr;
    grid-column: auto;
    justify-self: stretch;
  }

  .public-pricing-row {
    gap: 7px;
    padding: 18px 0;
  }

  .pricing-header {
    display: none;
  }

  .public-pricing-row > span::before {
    display: inline-block;
    min-width: 58px;
    color: var(--muted-2);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
  }

  .public-footer {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .public-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 430px) {
  .logo-frame {
    width: 132px;
  }

  .header-login {
    font-size: 12px;
    padding: 0 7px;
  }

  .topbar-tabs a {
    font-size: 12px;
    padding-right: 9px;
    padding-left: 9px;
  }

  .trust-hero h1 {
    font-size: 36px;
  }

  .trust-hero-drawing figcaption,
  .drawing-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
