:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #d7dce5;
  --text: #182433;
  --muted: #667085;
  --primary: #206bc4;
  --primary-strong: #1a569d;
  --danger: #b42318;
  --warn: #9a6700;
  --success: #137333;
  --info: #1f5fbf;
  --radius: 8px;
  --shadow-card: 0 1px 2px rgba(24, 36, 51, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
}

.topbar,
.app-navbar {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 24px;
}

.app-navbar .container-xl {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
}

.brand,
.app-brand {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  margin-right: 8px;
}

.nav,
.actions,
.app-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav form,
.actions form,
.app-navbar form {
  display: inline-flex;
  gap: 8px;
  margin: 0;
}

.app-nav .nav-link {
  border-radius: 6px;
  color: #3b4757;
  font-size: 14px;
  font-weight: 700;
  min-height: 36px;
  padding: 7px 10px;
}

.app-nav .nav-link:hover {
  background: #eef3fb;
  color: var(--primary);
  text-decoration: none;
}

.user-chip {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
}

.app-container {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 20px 48px;
}

.page-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 8px;
}

h2 {
  font-size: 20px;
  margin: 0 0 8px;
}

.heading-with-help {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.help-tip {
  align-items: center;
  background: #eef3fb;
  border: 1px solid #cad8ee;
  border-radius: 999px;
  color: var(--primary);
  cursor: help;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  height: 20px;
  justify-content: center;
  line-height: 1;
  position: relative;
  text-transform: none;
  width: 20px;
}

.help-tip::after {
  background: #182433;
  border-radius: 6px;
  bottom: calc(100% + 8px);
  box-shadow: 0 6px 18px rgba(24, 36, 51, 0.18);
  color: #ffffff;
  content: attr(data-tip);
  font-size: 13px;
  font-weight: 400;
  left: 50%;
  line-height: 1.45;
  max-width: min(320px, calc(100vw - 40px));
  opacity: 0;
  padding: 8px 10px;
  pointer-events: none;
  position: absolute;
  text-align: left;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
  visibility: hidden;
  width: max-content;
  z-index: 50;
}

.help-tip:hover::after,
.help-tip:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  visibility: visible;
}

.help-tip:focus {
  outline: 2px solid #8ab4f8;
  outline-offset: 2px;
}

p {
  color: var(--muted);
  margin: 0;
}

.button {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  text-decoration: none;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button.disabled {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

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

.button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.button.subtle {
  background: var(--surface);
  color: var(--text);
}

.button.subtle:hover,
.button.tiny:hover {
  background: var(--surface-soft);
}

.button.tiny {
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  min-height: 34px;
  padding: 0 10px;
}

.button.tiny.ghost {
  background: #f8fafc;
  color: var(--muted);
}

.button.full {
  width: 100%;
}

.table-wrap,
.upload-panel,
.empty-state,
.auth-panel,
.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 860px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

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

.compact th,
.compact td {
  padding: 9px 10px;
}

.status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
  text-transform: lowercase;
}

.status + .status {
  margin-left: 6px;
}

.status.completed,
.status.downloaded {
  background: #e8f5ec;
  color: var(--success);
}

.status.failed,
.status.completed_with_errors {
  background: #fdeceb;
  color: var(--danger);
}

.status.downloading,
.status.parsing,
.status.processing,
.status.review_ready,
.status.precheck_ready,
.status.confirmed,
.status.needs_fix,
.status.queued {
  background: #eaf1ff;
  color: var(--info);
}

.status.pending,
.status.uploaded,
.status.missing {
  background: #f3f5f8;
  color: var(--muted);
}

.status.precheck_failed,
.status.discarded {
  background: #fff4dc;
  color: var(--warn);
}

.status.work-action_required {
  background: #fdeceb;
  color: var(--danger);
}

.status.work-running {
  background: #eaf1ff;
  color: var(--info);
}

.status.work-ready {
  background: #e8f5ec;
  color: var(--success);
}

.status.work-needs_confirm {
  background: #eaf1ff;
  color: var(--info);
}

.status.work-blocked {
  background: #fff4dc;
  color: var(--warn);
}

.status.work-complete {
  background: #eef0f4;
  color: #4a5568;
}

.status.work-waiting {
  background: #f3f5f8;
  color: var(--muted);
}

.status.work-discarded {
  background: #fff4dc;
  color: var(--warn);
}

.status.skipped {
  background: #fff4dc;
  color: var(--warn);
}

.status.manual_done {
  background: #eef0f4;
  color: #4a5568;
}

.task-action-row {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 190px;
}

.task-action-row + .task-action-row {
  margin-top: 8px;
}

.status.active {
  background: #e8f5ec;
  color: var(--success);
}

.status.disabled {
  background: #f3f5f8;
  color: var(--muted);
}

.upload-panel {
  display: grid;
  gap: 12px;
  max-width: 560px;
  padding: 20px;
}

.upload-workflow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
}

.scope-tabs {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.scope-tab {
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  min-height: 36px;
  padding: 7px 12px;
}

.scope-tab:hover {
  background: var(--surface-soft);
  text-decoration: none;
}

.scope-tab.active {
  background: #eaf1ff;
  color: var(--primary);
}

.recent-upload-panel {
  margin-top: 22px;
  max-width: 760px;
}

.recent-upload-list {
  display: grid;
  gap: 10px;
}

.recent-upload-item {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  color: var(--text);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 62px;
  padding: 12px 14px;
}

.recent-upload-item:hover {
  border-color: #bad0ff;
  text-decoration: none;
}

.recent-upload-item span:first-child {
  display: grid;
  min-width: 0;
}

.recent-upload-item small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.form-helper {
  font-size: 14px;
}

label {
  color: var(--text);
  font-weight: 700;
}

input[type="file"],
input[type="month"],
input[type="number"],
input[type="password"],
input[type="text"],
select,
textarea {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.user-form {
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr 180px auto;
  padding: 16px;
}

.resource-form {
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  grid-template-columns: 120px minmax(0, 1fr);
  max-width: 760px;
  padding: 16px;
}

.resource-form textarea {
  min-height: 84px;
}

.resource-form button {
  grid-column: 2;
  justify-self: start;
}

.resource-table {
  min-width: 980px;
}

.quota-form {
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  grid-template-columns: 140px minmax(0, 1fr);
  max-width: 760px;
  padding: 16px;
}

.quota-form button {
  grid-column: 2;
  justify-self: start;
}

.inline-form {
  align-items: center;
  display: flex;
  gap: 8px;
}

.inline-form input {
  min-width: 160px;
}

.batch-settings-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  padding: 14px 16px;
}

.batch-tabs {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 6px;
  margin: -4px 0 18px;
}

.batch-tab {
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  color: var(--muted);
  font-weight: 700;
  min-height: 40px;
  padding: 9px 14px;
}

.batch-tab:hover {
  background: #eef3fb;
  color: var(--primary);
  text-decoration: none;
}

.batch-tab.active {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  margin-bottom: -1px;
}

.batch-tab.disabled {
  color: #98a2b3;
  cursor: not-allowed;
}

.confirm-import-panel {
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 520px);
  margin-bottom: 18px;
  padding: 18px;
}

.confirm-import-panel h2 {
  margin: 2px 0 4px;
}

.precheck-actions-panel {
  align-items: center;
  background: #fff7f6;
  border: 1px solid #f2b8b5;
  border-radius: var(--radius);
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.confirm-import-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.confirm-import-form label {
  grid-column: 1 / -1;
}

.download-name-summary {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.download-name-summary > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.download-name-summary strong {
  overflow-wrap: anywhere;
}

.download-name-summary details {
  position: relative;
}

.download-name-summary summary {
  list-style: none;
}

.download-name-summary summary::-webkit-details-marker {
  display: none;
}

.download-name-summary details[open] summary {
  margin-bottom: 10px;
}

.batch-download-name-form {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 420px) auto;
}

.muted-text {
  color: var(--muted);
  font-size: 14px;
}

.danger-zone {
  border-color: #f2b8b5;
}

.danger-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  max-width: 720px;
}

.empty-state {
  padding: 28px;
}

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 20px;
}

.dashboard-metrics {
  margin-bottom: 18px;
}

.next-action-panel {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 18px;
}

.next-action-panel.work-action_required {
  border-left-color: var(--danger);
}

.next-action-panel.work-running {
  border-left-color: var(--info);
}

.next-action-panel.work-blocked {
  border-left-color: var(--warn);
}

.next-action-panel.work-complete {
  border-left-color: var(--muted);
}

.next-action-panel h2 {
  margin: 2px 0 4px;
}

.eyebrow {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.next-action-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.metrics div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px;
}

.metrics span {
  display: block;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}

.metrics label {
  color: var(--muted);
  font-size: 13px;
}

.workflow {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
  padding: 11px 12px;
  text-align: center;
}

.step.done {
  background: #e8f5ec;
  border-color: #b8dfc2;
  color: var(--success);
}

.step.active {
  background: #eaf1ff;
  border-color: #bad0ff;
  color: var(--info);
}

.progress-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
}

.progress-copy {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.progress-copy span,
.muted {
  color: var(--muted);
}

.progress-bar {
  background: #edf1f6;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.progress-bar div {
  background: var(--primary);
  height: 100%;
  transition: width 200ms ease;
}

.preflight-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  padding: 14px;
}

.summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-grid div {
  background: var(--surface-soft);
  border: 1px solid #e4e9f0;
  border-radius: var(--radius);
  padding: 10px 12px;
}

.summary-grid span {
  display: block;
  font-size: 20px;
  font-weight: 700;
}

.summary-grid label {
  color: var(--muted);
  font-size: 13px;
}

.warning-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.warning-list span {
  background: #fff7e6;
  border: 1px solid #f0cf8a;
  border-radius: 999px;
  color: var(--warn);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 9px;
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
}

.order-list {
  display: grid;
  gap: 12px;
}

.review-section {
  margin-bottom: 20px;
}

.quota-progress-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 12px;
  margin: -4px 0 20px;
  padding: 16px;
}

.quota-progress-panel strong {
  display: block;
  font-size: 18px;
}

.section-heading {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 0 0 10px;
}

.section-heading h2 {
  margin: 0;
}

.section-heading p {
  font-size: 14px;
}

.order-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.order-block summary {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 52px;
  padding: 14px 16px;
}

.order-block summary span {
  font-weight: 700;
}

.order-block summary small {
  color: var(--muted);
}

.error-cell {
  color: var(--danger);
  max-width: 320px;
  overflow-wrap: anywhere;
}

.error-tag {
  background: #fdeceb;
  border-radius: 999px;
  color: var(--danger);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  margin: 0 6px 4px 0;
  padding: 3px 7px;
}

.diagnostic-detail {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 6px;
}

.diagnostic-detail summary {
  color: var(--muted);
  cursor: pointer;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.diagnostic-detail pre {
  font: inherit;
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.task-meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.failed-table {
  min-width: 760px;
}

.filter-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.filter-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 36px;
  padding: 0 12px;
}

.filter-tab.active {
  background: #e8f5ec;
  border-color: #b8dfc2;
  color: var(--primary-strong);
}

.filter-empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-top: 10px;
  padding: 14px;
}

.sku-cell {
  font-weight: 700;
}

.order-cell {
  font-weight: 700;
  min-width: 150px;
}

.order-cell span {
  display: block;
}

.order-pill {
  border: 1px solid #b8d6d0;
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  margin-top: 5px;
  padding: 2px 7px;
}

.multi-order-row.group-0 td {
  background: #f7fbfb;
}

.multi-order-row.group-1 td {
  background: #f9fbff;
}

.multi-order-row td:first-child {
  border-left: 4px solid var(--primary);
}

.multi-order-row + .multi-order-row td {
  border-top-color: #cbd8e3;
}

.row-failed {
  background: #fffafa;
}

.row-failed td,
.multi-order-row.row-failed td {
  background: #fffafa;
}

.link-action {
  white-space: nowrap;
}

.action-cell {
  min-width: 180px;
}

.action-cell form,
.inline-actions form {
  margin: 0;
}

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

.error-block {
  color: var(--danger);
  margin-bottom: 16px;
  padding: 12px 14px;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.auth-panel {
  padding: 24px;
  width: min(420px, calc(100vw - 32px));
}

.stack {
  display: grid;
  gap: 12px;
}

.error {
  color: var(--danger);
}

@media (max-width: 760px) {
  .topbar,
  .app-navbar .container-xl,
  .page-header,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .nav,
  .app-nav {
    flex-wrap: wrap;
  }

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

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

  .workflow {
    grid-template-columns: 1fr;
  }

  .progress-copy {
    align-items: flex-start;
    flex-direction: column;
  }

  .next-action-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .next-action-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .confirm-import-panel,
  .confirm-import-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .download-name-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .user-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .resource-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .resource-form button {
    grid-column: auto;
    justify-self: stretch;
  }

  .quota-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .quota-form button {
    grid-column: auto;
    justify-self: stretch;
  }

  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .batch-download-name-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 24px;
  }
}

.extension-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  padding: 18px;
}

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

.extension-grid div {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.extension-grid span {
  display: block;
  font-size: 20px;
  font-weight: 700;
}

.extension-grid label {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.extension-diagnostics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.extension-diagnostics[hidden] {
  display: none;
}

.extension-diagnostics div {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
  padding: 10px;
}

.extension-diagnostics span {
  display: block;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.extension-diagnostics label {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

@media (max-width: 720px) {
  .extension-diagnostics {
    grid-template-columns: 1fr;
  }
}

.extension-copy {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.extension-copy code {
  background: #eef2f7;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 6px 8px;
  white-space: nowrap;
}

.extension-copy span {
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.extension-note {
  background: #fff7e6;
  border: 1px solid #f0cf8a;
  border-radius: var(--radius);
  color: #684400;
  font-size: 14px;
  margin-top: 12px;
  padding: 10px 12px;
}

.fallback-panel {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  padding: 12px 14px;
}

.fallback-panel summary {
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.fallback-panel p {
  font-size: 14px;
  margin-top: 8px;
}

.fallback-actions,
.fallback-actions form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}
