:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --accent: #0284c7;
  --accent-2: #2563eb;
  --danger: #b91c1c;
  --warning: #b45309;
  --success: #166534;
  --border: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  scroll-margin-top: 5rem;
  text-wrap: balance;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  z-index: 100;
  transform: translateY(-220%);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  border: 1px solid #94a3b8;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  transition: transform 0.12s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.25rem;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  border-bottom: 2px solid #0ea5e9;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.topbar-alert {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid;
  font-size: 0.9rem;
  line-height: 1.45;
}

.topbar-alert > div {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.topbar-alert strong {
  color: inherit;
}

.topbar-alert a {
  color: inherit;
  font-weight: 700;
  white-space: nowrap;
}

.topbar-alert-warning {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.topbar-alert-error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.topbar-brand {
  display: grid;
  gap: 0.22rem;
}

.topbar-org {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
}

.topbar-org-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topnav {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.topnav a,
.topnav-button {
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  touch-action: manipulation;
}

.topnav a:hover,
.topnav-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.topnav a.danger,
.topnav-button.danger {
  background: rgba(185, 28, 28, 0.65);
}

.topnav-form {
  margin: 0;
}

.topnav-button {
  border: 0;
  font: inherit;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
}

.org-switcher {
  display: inline-flex;
  align-items: end;
}

.org-switcher label {
  color: #fff;
  font-size: 0.84rem;
}

.org-switcher select {
  min-width: 180px;
  padding-right: 1.8rem;
}

.container {
  max-width: 1500px;
  margin: 0.42rem auto 2rem auto;
  padding: 0 1rem;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.reference-page-head {
  margin-bottom: 0.1rem;
}

.page-head h1 {
  margin: 0;
  font-size: 1.5rem;
}

.dashboard-head {
  align-items: flex-start;
  gap: 0.75rem;
}

.dashboard-head-tight {
  margin-bottom: 0.25rem;
}

.dashboard-head-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.dashboard-section-head {
  margin-bottom: 0.75rem;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.dashboard-callout {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.dashboard-kpi {
  display: grid;
  gap: 0.3rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dashboard-kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.dashboard-kpi.danger {
  border-color: #f5b4b4;
  background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
}

.dashboard-kpi.warning {
  border-color: #f3d28f;
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
}

.dashboard-kpi.info {
  border-color: #b7dbf7;
  background: linear-gradient(180deg, #f4faff 0%, #ffffff 100%);
}

.dashboard-kpi strong {
  font-size: 1.8rem;
}

.dashboard-kpi-label {
  font-weight: 700;
}

.dashboard-kpi-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
}

.dashboard-priority-panel {
  margin-bottom: 0.9rem;
}

.dashboard-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.summary-tile {
  display: grid;
  gap: 0.3rem;
  padding: 1.05rem 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.summary-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.summary-tile span {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.summary-tile strong {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #0f172a;
}

.summary-callout {
  font-weight: 700;
  color: var(--ink);
}

.summary-detail {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.reviewer-reference-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-tile.warning {
  border-top: 3.5px solid #f59e0b;
}

.summary-tile.info {
  border-top: 3.5px solid #0284c7;
}

.summary-tile.danger {
  border-top: 3.5px solid #ef4444;
}

.summary-tile.success {
  border-top: 3.5px solid #10b981;
}

.reference-summary-strip {
  display: grid;
  grid-template-columns: minmax(420px, 1.5fr) repeat(3, minmax(180px, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.78rem;
}

.summary-combo-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.55rem;
}

.summary-combo-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
}

.summary-combo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.summary-combo-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.summary-combo-grid strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.8rem;
  line-height: 1;
}

.queue-status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.queue-status-tile {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
  display: grid;
  gap: 0.18rem;
}

.queue-status-tile.warning {
  border-color: #f3d28f;
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
}

.queue-status-label {
  color: var(--muted);
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-queue-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 1rem;
}

.dashboard-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.dashboard-queue-main {
  display: grid;
  gap: 0.85rem;
}

.dashboard-queue-side {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.queue-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem;
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.queue-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.08);
}

.queue-item.warning {
  border-left: 4.5px solid #f59e0b;
}

.queue-item.info {
  border-left: 4.5px solid #0284c7;
}

.queue-item.danger {
  border-left: 4.5px solid #ef4444;
}

.queue-item.success {
  border-left: 4.5px solid #10b981;
}

.queue-step {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 0.1rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.22);
}

.queue-item.warning .queue-step {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.22);
}

.queue-item.info .queue-step {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.22);
}

.queue-item.danger .queue-step {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.22);
}

.queue-item.success .queue-step {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.22);
}

.queue-item-body {
  display: grid;
  gap: 0.75rem;
}

.queue-item-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.queue-item-top h2,
.queue-side-card h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.queue-item-count {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1;
  white-space: nowrap;
}

.queue-item-actions,
.queue-side-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.queue-aging-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.6rem;
}

.queue-aging-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: inherit;
  text-decoration: none;
  font-size: 0.88rem;
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.queue-aging-chip:hover {
  border-color: #0284c7;
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.queue-aging-chip-warning {
  border-color: #fde68a;
  background: #fffdf5;
}

.queue-side-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 14px;
}

.queue-side-list {
  display: grid;
  gap: 0.7rem;
}

.queue-side-list-item {
  display: grid;
  gap: 0.14rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #e7edf4;
}

.queue-side-list-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.upload-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.upload-status-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.upload-status-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.dashboard-side-card {
  position: sticky;
  top: 84px;
}

.upload-workflow-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(440px, 1.2fr);
  gap: 1.25rem;
}

.upload-guide {
  display: grid;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.upload-guide h2,
.upload-form-card h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.upload-guide-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.9rem;
}

.template-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.upload-form-card {
  display: grid;
  gap: 0.85rem;
}

.upload-meta-list {
  display: grid;
  gap: 0.55rem;
}

.upload-meta-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  background: #fff;
}

.upload-meta-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.upload-meta-list strong {
  font-size: 0.85rem;
  color: #0f172a;
}

.upload-hint {
  align-self: end;
  padding-bottom: 0.2rem;
}

.reference-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.head-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfe0f2;
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  background: #f4f9ff;
  color: #48637f;
  font-size: 0.82rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.temu-sync-panel {
  border-radius: 8px;
  border-color: #e5e7eb;
  border-top: 3px solid #ff6900;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  padding: 0;
  overflow: hidden;
}

.temu-sync-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem 0.9rem;
}

.temu-sync-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.temu-sync-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: 0;
  color: #111827;
}

.temu-sync-subtitle {
  margin: 0;
  max-width: 760px;
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.45;
}

.temu-sync-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.temu-sync-button {
  min-height: 34px;
  border: 1px solid #ff6900;
  border-radius: 6px;
  background: #ff6900;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.42rem 0.85rem;
  cursor: pointer;
}

.temu-sync-button:hover:not(:disabled) {
  background: #e85d00;
  border-color: #e85d00;
}

.temu-sync-button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.temu-sync-secondary {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.temu-sync-progress {
  position: relative;
  height: 3px;
  overflow: hidden;
  background: #fff1e6;
}

.temu-sync-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 36%;
  background: #ff6900;
  animation: temu-sync-progress 1.05s ease-in-out infinite;
}

@keyframes temu-sync-progress {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(280%);
  }
}

.temu-sync-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #eef0f2;
  background: #fafafa;
}

.temu-sync-meta-grid > div {
  min-width: 0;
  padding: 0.72rem 0.9rem;
  border-right: 1px solid #eef0f2;
}

.temu-sync-meta-grid > div:last-child {
  border-right: 0;
}

.temu-sync-meta-grid span {
  display: block;
  color: #6b7280;
  font-size: 0.72rem;
  line-height: 1.25;
  margin-bottom: 0.18rem;
}

.temu-sync-meta-grid strong {
  display: block;
  color: #111827;
  font-size: 0.85rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.temu-sync-inline-status,
.temu-sync-error {
  border-top: 1px solid #eef0f2;
  padding: 0.65rem 1.1rem;
  font-size: 0.84rem;
  font-weight: 600;
}

.temu-sync-inline-status.info {
  color: #075985;
  background: #f0f9ff;
}

.temu-sync-inline-status.success {
  color: #166534;
  background: #f0fdf4;
}

.temu-sync-inline-status.error,
.temu-sync-error {
  color: #991b1b;
  background: #fef2f2;
}

@media (max-width: 900px) {
  .temu-sync-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .temu-sync-meta-grid > div:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 640px) {
  .temu-sync-header {
    flex-direction: column;
  }

  .temu-sync-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .temu-sync-meta-grid {
    grid-template-columns: 1fr;
  }

  .temu-sync-meta-grid > div {
    border-right: 0;
    border-bottom: 1px solid #eef0f2;
  }

  .temu-sync-meta-grid > div:last-child {
    border-bottom: 0;
  }
}

.empty-state-panel {
  max-width: 680px;
  margin: 3rem auto;
  padding: 3rem 2.5rem;
  text-align: center;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06);
}

.empty-state-panel .badge {
  display: inline-block;
  width: auto;
  margin: 0 auto;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.empty-state-panel h2 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0.8rem 0 0.5rem 0;
}

.empty-state-panel p.muted {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 1.5rem auto;
}

.empty-state-panel .queue-aging-list {
  max-width: 500px;
  margin: 1.5rem auto;
  text-align: left;
}

.empty-state-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
}

.upload-row {
  display: grid;
  grid-template-columns: 2.3fr 1.1fr auto;
  gap: 0.8rem;
  align-items: end;
  background: #f8fafc;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s ease;
}

.upload-row:hover {
  border-color: #cbd5e1;
}

.upload-row input[type="file"] {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  background: #ffffff;
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
}

.upload-row input[type="file"]::file-selector-button {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 0.6rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.upload-row input[type="file"]::file-selector-button:hover {
  background: #0369a1;
}

.panel-admin-form {
  max-width: 960px;
}

.temu-connection-panel {
  max-width: 980px;
}

.temu-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.85rem 0;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.temu-status-strip span {
  display: block;
  margin-bottom: 0.2rem;
}

.temu-status-strip strong {
  overflow-wrap: anywhere;
}

.temu-settings-block {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.temu-compact-actions,
.temu-inline-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.temu-diagnostics {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.temu-diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 0.8rem;
  margin-top: 0.55rem;
  font-size: 0.86rem;
}

.temu-diagnostics details {
  margin-top: 0.55rem;
}

.temu-diagnostics pre,
.temu-diagnostic-box {
  overflow: auto;
  max-width: 100%;
  padding: 0.65rem;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  white-space: pre-wrap;
}

.temu-diagnostic-box span,
.temu-diagnostic-box strong,
.temu-diagnostic-box small {
  display: block;
}

.temu-diagnostic-box small {
  margin-top: 0.25rem;
  color: #cbd5e1;
}

.panel-admin-filters {
  max-width: 1050px;
}

.panel-section-header {
  margin-bottom: 1.15rem;
}

.panel-section-header h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.form-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem 1.4rem;
  align-items: start;
}

.form-grid-full {
  grid-column: 1 / -1;
}

.form-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 1rem 1.25rem;
  align-items: end;
}

.form-actions-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.form-action-note {
  margin: 0;
  color: var(--muted);
}

.form-submit-cell {
  padding-bottom: 0.05rem;
}

.filter-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 1rem 1.25rem;
  align-items: end;
}

.filter-action-cell {
  padding-bottom: 0.05rem;
}

button.btn-primary,
.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  padding: 0.58rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  white-space: nowrap;
  width: auto;
  align-self: start;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.btn-primary:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

button.btn-secondary,
.btn-secondary {
  background: #ffffff;
  color: #0f172a !important;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  white-space: nowrap;
  width: auto;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.btn-secondary:hover,
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.inline-form {
  display: flex;
  gap: 0.7rem;
  align-items: end;
  flex-wrap: wrap;
}

/* Ensure form buttons in panels and grids do not stretch full width */
.form-grid button[type="submit"],
.form-grid button[type="button"],
.panel form button[type="submit"],
.panel form button[type="button"],
.onboarding-panel button[type="submit"] {
  width: auto;
  min-width: 140px;
  justify-self: start;
  align-self: start;
}

/* Auth card compact centered forms keep full width */
.center-card .form-grid button[type="submit"],
.auth-panel .form-grid button[type="submit"],
.login-card .form-grid button[type="submit"] {
  width: 100%;
  min-width: 100%;
  justify-self: stretch;
}

/* Overrides for table cell action buttons so they remain compact */
.table-wrap button,
table button,
td button,
td form button,
.inline-form button.btn-secondary,
.inline-form button.button-secondary {
  min-width: unset !important;
  width: auto !important;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Secondary button variant synonyms */
button.button-secondary,
.button-secondary {
  background: #ffffff;
  color: #0f172a !important;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  white-space: nowrap;
  width: auto;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.button-secondary:hover,
.button-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

button.button-secondary.danger,
.button-secondary.danger {
  border-color: #fca5a5;
  color: #991b1b !important;
}

button.button-secondary.danger:hover,
.button-secondary.danger:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

/* Billing choice cards in Account */
.billing-choice-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.25rem;
}

.billing-choice-panel h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.billing-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.billing-choice-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  gap: 0.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.billing-choice-card:hover {
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.billing-choice-card strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.billing-choice-card span {
  color: #64748b;
  font-size: 0.9rem;
}

.billing-choice-card button {
  margin-top: 0.75rem;
  width: 100% !important;
  min-width: 100% !important;
}

/* Form input focus state across the app */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

/* Export page action buttons */
.export-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  padding: 0.58rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  width: auto;
}

.export-btn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.export-btn[data-mode="delta"] {
  background: #ffffff;
  color: #0f172a !important;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.export-btn[data-mode="delta"]:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

/* Settings Appeal Reasons Table */
.settings-reasons-table {
  max-width: 900px;
}

.settings-reasons-table th:nth-child(1) { width: 60px; }
.settings-reasons-table th:nth-child(2) { width: 420px; }
.settings-reasons-table th:nth-child(3) { width: 110px; }
.settings-reasons-table th:nth-child(4) { width: 110px; }
.settings-reasons-table th:nth-child(5) { width: 100px; }

.settings-reasons-table input[name="reason_name"] {
  width: 100%;
  max-width: 380px;
}

.settings-reasons-table input[name="sort_order"] {
  width: 90px;
}

.form-choice-group {
  display: grid;
  gap: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
}

.form-choice-group legend {
  padding: 0 0.35rem;
  font-weight: 700;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.92rem;
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.field {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  background: #fff;
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  touch-action: manipulation;
}

button:hover {
  filter: brightness(1.05);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

button.danger {
  background: #b91c1c;
}

.inline-button-form {
  display: inline;
  margin: 0;
}

.inline-button-link {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.inline-button-link:hover {
  filter: none;
  text-decoration: underline;
}

.inline-button-link.danger-link {
  color: #b91c1c;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem;
  display: grid;
  gap: 0.2rem;
}

.kpi span {
  color: var(--muted);
  font-size: 0.86rem;
}

.kpi strong {
  font-size: 1.25rem;
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-md, 14px);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
  background: var(--card, #ffffff);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 950px;
}

th,
td {
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  padding: 0.65rem 0.85rem;
  vertical-align: middle;
  font-size: 0.88rem;
}

th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 2px solid var(--border);
}

tbody tr {
  transition: background-color 0.12s ease;
}

tbody tr:hover {
  background-color: rgba(241, 245, 249, 0.7);
}

.alert {
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  margin: 0.75rem 0 1rem 0;
  font-size: 0.92rem;
  line-height: 1.5;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.alert.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4.5px solid #16a34a;
  color: #15803d;
}

.alert.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4.5px solid #dc2626;
  color: #b91c1c;
}

.alert.info {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 4.5px solid #0284c7;
  color: #0369a1;
}

.alert.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4.5px solid #d97706;
  color: #b45309;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid transparent;
}

.badge.success {
  background: #ecfdf3;
  border-color: #9ee2b6;
  color: #166534;
}

.badge.warning {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.badge.error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.badge.processing {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e3a8a;
}

.badge.failed {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.badge.info {
  background: #f0f9ff;
  border-color: #7dd3fc;
  color: #075985;
}

.security-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: 18rem;
}

.muted {
  color: var(--muted);
}

.tiny {
  font-size: 0.78rem;
}

.tiny-list {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.78rem;
}

.row-form {
  display: contents;
}

.center-card {
  max-width: 460px;
  margin: 6rem auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

.actions {
  display: flex;
  justify-content: flex-start;
  gap: 0.6rem;
}

.flow {
  margin: 0;
  padding-left: 1.2rem;
}

.login-actions,
.public-hero-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.public-hero {
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.pricing-card {
  display: grid;
  gap: 0.8rem;
}

.pricing-value {
  font-size: 1.9rem;
  line-height: 1.1;
}

.simple-list {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.1rem;
  margin: 0;
}

.simple-list li {
  color: var(--ink);
}

@media (max-width: 900px) {
  .upload-row {
    grid-template-columns: 1fr;
  }

  .temu-status-strip,
  .temu-diagnostics-grid {
    grid-template-columns: 1fr;
  }

  .topbar-alert {
    align-items: stretch;
    flex-direction: column;
    padding: 0.65rem 0.8rem;
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-head > * {
    width: 100%;
  }

  .topnav {
    gap: 0.4rem;
  }

  .container {
    padding: 0 0.6rem;
  }

  .topbar-right {
    width: 100%;
    justify-content: flex-start;
  }

  .org-switcher select {
    min-width: 0;
    width: 100%;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
}


.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.segments,
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  font-size: 0.85rem;
}

.seg-btn.active {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0c4a6e;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  padding: 0.04rem 0.34rem;
  border-radius: 999px;
  background: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 700;
}

.compare-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 0.8rem;
  align-items: end;
}

.compare-actions {
  display: flex;
  justify-content: flex-start;
  align-items: end;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 0.8rem;
}

.key-list {
  margin: 0;
  padding-left: 1.1rem;
  max-height: 320px;
  overflow: auto;
}

.key-list li {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  margin: 0.18rem 0;
}

.pager {
  margin-top: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.pager-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  color: #1e293b;
  background: #ffffff;
  font-size: 0.86rem;
  font-weight: 500;
  touch-action: manipulation;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn-link:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1px);
}

.btn-link-strong {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  border-color: #0284c7;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-link-strong:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  border-color: #0369a1;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.45);
  outline-offset: 2px;
}

@media (max-width: 1200px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .compare-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }
}

@media (max-width: 900px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}


.subpanel {
  background: #f8fbff;
}

.column-chooser summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.chooser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.35rem 0.7rem;
}

.top-gap {
  margin-top: 0.7rem;
}

.modern-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
  max-height: 70vh;
}

.modern-table {
  min-width: 1400px;
}

.modern-table thead th {
  background: linear-gradient(180deg, #f1f7ff 0%, #e6eef9 100%);
  border-bottom: 1px solid #d0dceb;
}

.modern-table tbody tr:nth-child(odd) {
  background: #fcfeff;
}

.modern-table tbody tr:hover {
  background: #eef7ff;
}

.sortable {
  cursor: pointer;
  user-select: none;
}

.sortable::after {
  content: ' ?';
  color: #64748b;
  font-size: 0.75rem;
}

.inline-row-form {
  display: contents;
}

.inline-row-form input[type="text"],
.inline-row-form select {
  min-width: 140px;
}

/* Reference page polish */
.ref-head {
  align-items: flex-start;
}

.ref-subpanel {
  padding: 0.85rem;
}

.ref-table-wrap {
  max-height: 68vh;
  border-radius: 12px;
}

.ref-table {
  min-width: 1650px;
}

.ref-table th,
.ref-table td {
  padding: 0.62rem 0.62rem;
}

.ref-table td {
  vertical-align: middle;
}

.ref-table th:nth-child(1),
.ref-table td:nth-child(1),
.ref-table th:nth-child(2),
.ref-table td:nth-child(2) {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f8fbff;
}

.ref-table th:nth-child(2),
.ref-table td:nth-child(2) {
  left: 120px;
}

.ref-table th:nth-child(1),
.ref-table td:nth-child(1) {
  min-width: 120px;
  max-width: 120px;
}

.ref-table th:nth-child(2),
.ref-table td:nth-child(2) {
  min-width: 160px;
  max-width: 160px;
}

.ref-table th:nth-child(3),
.ref-table td:nth-child(3) {
  min-width: 160px;
  max-width: 160px;
}

.ref-table th:nth-child(4),
.ref-table td:nth-child(4) {
  min-width: 280px;
  max-width: 280px;
}

.ref-table th:nth-child(12),
.ref-table td:nth-child(12),
.ref-table th:nth-child(13),
.ref-table td:nth-child(13),
.ref-table th:nth-child(14),
.ref-table td:nth-child(14) {
  min-width: 220px;
}

.cell-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.cell-input {
  width: 100%;
  min-width: 160px;
  max-width: 260px;
  padding: 0.42rem 0.52rem;
  box-sizing: border-box;
}

.reason-input {
  min-width: 170px;
}

.save-btn {
  white-space: nowrap;
  padding: 0.45rem 0.72rem;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid #a7d8fb;
  background: #eef8ff;
  color: #0c4a6e;
  font-size: 0.82rem;
}

.compact-links {
  display: grid;
  gap: 0.22rem;
  list-style: none;
  padding: 0;
}

.compact-links a {
  font-size: 0.78rem;
}

.sortable::after {
  content: ' \2195';
  color: #64748b;
  font-size: 0.74rem;
}

.sortable.sort-asc::after {
  content: ' \2191';
  color: #0f172a;
}

.sortable.sort-desc::after {
  content: ' \2193';
  color: #0f172a;
}

@media (max-width: 1200px) {
  .ref-table {
    min-width: 1350px;
  }

  .cell-input {
    min-width: 140px;
  }
}

/* Responsive topbar and table defaults */
.table-wrap {
  width: 100%;
  max-width: 100%;
}

table {
  min-width: 780px;
}

.sortable::after {
  content: ' <> ';
}

.sortable.sort-asc::after {
  content: ' ^';
}

.sortable.sort-desc::after {
  content: ' v';
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.65rem 0.6rem;
  }

  .brand {
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .topnav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
  }

  .topnav a {
    white-space: nowrap;
    font-size: 0.86rem;
  }

  .segmented {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  table {
    min-width: 700px;
  }

  .ref-table {
    min-width: 1200px;
  }

  .ref-table th:nth-child(1),
  .ref-table td:nth-child(1),
  .ref-table th:nth-child(2),
  .ref-table td:nth-child(2) {
    position: static;
    left: auto;
  }
}

html, body {
  overflow-x: hidden;
}

/* Reference defaults requested by user */
.ref-table {
  min-width: 1500px;
}

.ref-table th:nth-child(1),
.ref-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #f8fbff;
  min-width: 320px;
  max-width: 320px;
}

.ref-table th:nth-child(n+2),
.ref-table td:nth-child(n+2) {
  position: static;
  left: auto;
}

.ref-table th:nth-child(2),
.ref-table td:nth-child(2) {
  min-width: 100px;
}

.ref-table th:nth-child(3),
.ref-table td:nth-child(3),
.ref-table th:nth-child(4),
.ref-table td:nth-child(4) {
  min-width: 150px;
}

.ref-table th:nth-child(5),
.ref-table td:nth-child(5) {
  min-width: 100px;
}

.ref-kpi-grid {
  margin-bottom: 0.5rem;
}

/* Keep Save visible in default reference columns */
.ref-table th:nth-child(7),
.ref-table td:nth-child(7) {
  min-width: 180px;
  max-width: 220px;
}

.ref-table th:nth-child(8),
.ref-table td:nth-child(8) {
  min-width: 90px;
  max-width: 100px;
}

.ref-table td:nth-child(8) .save-btn {
  width: 74px;
  text-align: center;
}

/* Final reference page overrides */
.kpi-link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.kpi-link:hover {
  border-color: #7dd3fc;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.12);
  transform: translateY(-1px);
}

.kpi-link.active {
  border-color: #0ea5e9;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}

.ref-table {
  min-width: 1640px;
}

.ref-table th:nth-child(1),
.ref-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #f8fbff;
  min-width: 340px;
  max-width: 340px;
}

.ref-table th:nth-child(n+2),
.ref-table td:nth-child(n+2) {
  position: static;
  left: auto;
}

.ref-table th:nth-child(2),
.ref-table td:nth-child(2) { min-width: 90px; }
.ref-table th:nth-child(3),
.ref-table td:nth-child(3),
.ref-table th:nth-child(4),
.ref-table td:nth-child(4) { min-width: 140px; }
.ref-table th:nth-child(5),
.ref-table td:nth-child(5) { min-width: 95px; }
.ref-table th:nth-child(6),
.ref-table td:nth-child(6) { min-width: 90px; }
.ref-table th:nth-child(7),
.ref-table td:nth-child(7) { min-width: 170px; }
.ref-table th:nth-child(8),
.ref-table td:nth-child(8) { min-width: 190px; }
.ref-table th:nth-child(9),
.ref-table td:nth-child(9) { min-width: 90px; max-width: 90px; }

.ref-table td:nth-child(9) .save-btn {
  width: 72px;
  text-align: center;
}

.sortable::after {
  content: ' <> ';
  color: #64748b;
  font-size: 0.74rem;
}

.sortable.sort-asc::after {
  content: ' ^';
  color: #0f172a;
}

.sortable.sort-desc::after {
  content: ' v';
  color: #0f172a;
}

/* Reference fit fix: keep default working columns visible on desktop */
.ref-table-wrap {
  max-height: 66vh;
}

.ref-table {
  min-width: 1420px;
}

.ref-table th,
.ref-table td {
  padding: 0.5rem 0.5rem;
}

.ref-table th:nth-child(1),
.ref-table td:nth-child(1) {
  min-width: 290px;
  max-width: 290px;
}

.ref-table th:nth-child(2),
.ref-table td:nth-child(2) { min-width: 78px; }
.ref-table th:nth-child(3),
.ref-table td:nth-child(3),
.ref-table th:nth-child(4),
.ref-table td:nth-child(4) { min-width: 130px; }
.ref-table th:nth-child(5),
.ref-table td:nth-child(5) { min-width: 86px; }
.ref-table th:nth-child(6),
.ref-table td:nth-child(6) { min-width: 80px; }
.ref-table th:nth-child(7),
.ref-table td:nth-child(7) { min-width: 165px; }
.ref-table th:nth-child(8),
.ref-table td:nth-child(8) { min-width: 165px; }
.ref-table th:nth-child(9),
.ref-table td:nth-child(9) { min-width: 78px; max-width: 78px; }

.cell-input {
  min-width: 120px;
  max-width: 180px;
}

.reason-input {
  min-width: 130px;
}

.cell-title {
  -webkit-line-clamp: 2;
}

.ref-table td:nth-child(9) .save-btn {
  width: 64px;
  padding: 0.4rem 0.45rem;
}

/* Reference header compact + better proportioning */
.ref-table {
  min-width: 1360px;
}

.ref-table th:nth-child(1),
.ref-table td:nth-child(1) {
  min-width: 420px;
  max-width: 420px;
}

.ref-table th:nth-child(3),
.ref-table td:nth-child(3),
.ref-table th:nth-child(4),
.ref-table td:nth-child(4) {
  min-width: 98px;
}

.ref-table th:nth-child(5),
.ref-table td:nth-child(5) {
  min-width: 84px;
}

.ref-table th:nth-child(6),
.ref-table td:nth-child(6) {
  min-width: 78px;
}

.ref-table th,
.ref-table td {
  font-size: 0.88rem;
}

.ref-table thead th {
  white-space: nowrap;
}

.cell-title {
  -webkit-line-clamp: 2;
}

/* Clean reference header layout */
.clean-kpis .kpi {
  min-height: 74px;
}

.compact-head {
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.ref-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.55fr) minmax(112px, 0.72fr) minmax(132px, 0.84fr) minmax(132px, 0.84fr) minmax(112px, 0.72fr) minmax(170px, 1.06fr) max-content;
  gap: 0.4rem 0.55rem;
  align-items: end;
}

.ref-filters.reviewer-filters {
  grid-template-columns: minmax(220px, 1.62fr) minmax(112px, 0.72fr) minmax(132px, 0.84fr) minmax(132px, 0.84fr) minmax(182px, 1.08fr) max-content;
}

.ref-actions {
  justify-content: space-between;
}

.ref-filters label {
  min-width: 0;
}

.ref-filters .field {
  min-width: 0;
}

.ref-filters input,
.ref-filters select {
  width: 100%;
}

.ref-filters button,
.ref-filters .btn-link {
  align-self: end;
  white-space: nowrap;
}

.filter-submit-group {
  display: inline-flex;
  gap: 0.45rem;
  align-items: end;
  justify-self: end;
}

@media (max-width: 1400px) {
  .ref-filters {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
  }
}
/* Reference page final layout overrides */
.ref-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.55fr) minmax(112px, 0.72fr) minmax(132px, 0.84fr) minmax(132px, 0.84fr) minmax(112px, 0.72fr) minmax(170px, 1.06fr) max-content;
  gap: 0.48rem;
  align-items: end;
}

.ref-filters.reviewer-filters {
  grid-template-columns: minmax(220px, 1.62fr) minmax(112px, 0.72fr) minmax(132px, 0.84fr) minmax(132px, 0.84fr) minmax(182px, 1.08fr) max-content;
}

.ref-actions {
  display: flex;
  gap: 0.45rem;
  align-items: end;
  flex-wrap: wrap;
}

.ref-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: nowrap;
}

.ref-primary-actions,
.ref-view-actions {
  display: flex;
  align-items: end;
  gap: 0.45rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.ref-primary-actions {
  flex: 1 1 auto;
}

.ref-view-actions {
  margin-left: auto;
}

.ref-primary-actions .btn-link,
.ref-primary-actions button,
.ref-view-actions .btn-link,
.ref-view-actions button,
.ref-view-actions select {
  white-space: nowrap;
}

.ref-table {
  min-width: 1380px;
}

.ref-table th,
.ref-table td {
  position: static;
  left: auto;
  font-size: 0.88rem;
  padding: 0.38rem 0.45rem;
}

.ref-table th[data-col="title"],
.ref-table td[data-col="title"] {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #f8fbff;
  min-width: 460px;
  max-width: 460px;
}

.ref-table th[data-col="current"],
.ref-table td[data-col="current"],
.ref-table th[data-col="recommended"],
.ref-table td[data-col="recommended"],
.ref-table th[data-col="pct_diff"],
.ref-table td[data-col="pct_diff"],
.ref-table th[data-col="retail_price"],
.ref-table td[data-col="retail_price"],
.ref-table th[data-col="temu_stock"],
.ref-table td[data-col="temu_stock"],
.ref-table th[data-col="latest_link"],
.ref-table td[data-col="latest_link"] {
  min-width: 90px;
  max-width: 90px;
  white-space: nowrap;
}

.ref-table th[data-col="sku"],
.ref-table td[data-col="sku"],
.ref-table th[data-col="sku_id"],
.ref-table td[data-col="sku_id"],
.ref-table th[data-col="goods_id"],
.ref-table td[data-col="goods_id"] {
  min-width: 120px;
  max-width: 120px;
}

.ref-table th[data-col="appeal_reason"],
.ref-table td[data-col="appeal_reason"],
.ref-table th[data-col="comment"],
.ref-table td[data-col="comment"] {
  min-width: 180px;
}

.ref-table th[data-col="appealed"],
.ref-table td[data-col="appealed"] {
  min-width: 82px;
  max-width: 82px;
  white-space: nowrap;
}

.ref-table th[data-col="appeal_date"],
.ref-table td[data-col="appeal_date"] {
  min-width: 118px;
  max-width: 118px;
}

.ref-table td[data-col="appealed"] label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.ref-table td[data-col="appealed"] input[type="checkbox"] {
  margin: 0;
}

.ref-table th[data-col="save"],
.ref-table td[data-col="save"] {
  min-width: 80px;
  max-width: 80px;
}

@media (max-width: 1400px) {
  .ref-filters {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 1100px) {
  .dashboard-summary-strip,
  .dashboard-columns,
  .dashboard-review-layout,
  .upload-workflow-grid,
  .dashboard-queue-layout,
  .queue-status-strip,
  .form-grid-2col,
  .form-grid-3col,
  .filter-toolbar-grid {
    grid-template-columns: 1fr;
  }
}



/* Ensure only title is sticky on reference grid */
.ref-table th[data-col="temu_stock"],
.ref-table td[data-col="temu_stock"] {
  position: static !important;
  left: auto !important;
  z-index: auto !important;
}


/* Inline save UX states */
.save-feedback {
  display: inline-block;
  min-width: 120px;
  margin-left: 0.45rem;
}

.save-feedback.success { color: #166534; }
.save-feedback.error { color: #991b1b; }
.save-feedback.warning { color: #9a3412; }

.row-dirty td { background: #fffdf5; }
.row-saving td { background: #f8fbff; }
.row-error td { background: #fff7f7; }
.row-saved td { background: #f6fffa; }
.row-locked td {
  background: #f3f4f6 !important;
  color: #64748b;
}
.row-locked {
  opacity: 0.76;
}
.row-self-locked td {
  box-shadow: inset 0 0 0 1px rgba(14, 116, 144, 0.12);
}

.save-toast {
  position: sticky;
  top: 70px;
  z-index: 40;
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #ffffff;
  color: #0f172a;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.save-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.save-toast.success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.save-toast.error {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}


.recheck-alert-link {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 700;
  animation: recheckPulse 1.2s ease-in-out infinite;
}

.recheck-alert-link:hover {
  color: #7f1d1d;
  text-decoration: none;
  background: #fecaca;
}

.ref-table tr.recheck-row td {
  background: #fff9f9;
}

.why-note {
  display: block;
  margin-top: 0.2rem;
}

@keyframes recheckPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.00); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.00); }
}

/* Review workflow final pass */
.ref-filters {
  grid-template-columns:
    minmax(220px, 1.32fr)
    minmax(92px, 0.54fr)
    minmax(108px, 0.62fr)
    minmax(116px, 0.66fr)
    minmax(110px, 0.64fr)
    minmax(110px, 0.64fr)
    minmax(150px, 0.88fr)
    minmax(78px, 0.4fr)
    max-content !important;
}

/* Embedded public marketing layer */
body.marketing-body {
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(14, 165, 233, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(99, 102, 241, 0.08), transparent),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f1f5f9 100%);
  color: #0f172a;
  min-height: 100vh;
}

body.marketing-body h1,
body.marketing-body h2,
body.marketing-body h3,
body.marketing-body .brand-link {
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif);
  letter-spacing: -0.03em;
}

body.marketing-body .brand-link {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
}

body.marketing-body .marketing-topbar {
  padding: 0.95rem 1.25rem;
  background: rgba(16, 26, 43, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

body.marketing-body .topbar-tagline {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

body.marketing-body .marketing-topbar-right {
  gap: 1rem;
}

body.marketing-body .marketing-nav {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

body.marketing-body .marketing-menu {
  position: relative;
}

body.marketing-body .marketing-menu-summary {
  list-style: none;
  cursor: pointer;
  color: #fff;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  font-size: 0.92rem;
  transition: background 0.2s ease, color 0.2s ease;
}

body.marketing-body .marketing-menu-summary::-webkit-details-marker {
  display: none;
}

body.marketing-body .marketing-menu-summary::after {
  content: " +";
  color: rgba(255, 255, 255, 0.64);
}

body.marketing-body .marketing-menu:hover .marketing-menu-summary,
body.marketing-body .marketing-menu[open] .marketing-menu-summary,
body.marketing-body .marketing-menu.is-current .marketing-menu-summary {
  background: rgba(255, 255, 255, 0.12);
}

body.marketing-body .marketing-menu-panel {
  position: absolute;
  top: calc(100% + 0.8rem);
  left: 0;
  min-width: 300px;
  display: none;
  gap: 0.4rem;
  padding: 0.7rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(20, 35, 58, 0.08);
  box-shadow: 0 22px 48px rgba(17, 33, 57, 0.18);
}

body.marketing-body .marketing-menu:hover .marketing-menu-panel,
body.marketing-body .marketing-menu[open] .marketing-menu-panel {
  display: grid;
}

body.marketing-body .marketing-menu-link {
  display: grid;
  gap: 0.12rem;
  padding: 0.82rem 0.88rem;
  border-radius: 16px;
  color: #173151;
  text-decoration: none;
  background: transparent;
  transition: transform 0.18s ease, background 0.18s ease;
}

body.marketing-body .marketing-menu-link span {
  font-size: 0.8rem;
  color: #55657b;
  line-height: 1.4;
}

body.marketing-body .marketing-menu-link:hover,
body.marketing-body .marketing-menu-link.is-active {
  background: #f4f8ff;
  transform: translateY(-1px);
}

body.marketing-body .marketing-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

body.marketing-body .marketing-plain-link {
  color: #15304f;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
}

body.marketing-body .marketing-main {
  max-width: 1240px;
  padding-top: 1.2rem;
  padding-bottom: 0;
}

body.marketing-body .marketing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  background: rgba(242, 207, 164, 0.38);
  color: #8b5528;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.73rem;
  font-weight: 700;
}

body.marketing-body .marketing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 2rem;
  align-items: center;
  margin: 0.6rem 0 1.35rem;
  padding: 1.8rem 0 1rem;
}

body.marketing-body .marketing-hero-compact {
  padding-top: 1rem;
}

body.marketing-body .marketing-hero-compact .marketing-hero-copy h1 {
  font-size: clamp(2.45rem, 4.2vw, 4rem);
}

body.marketing-body .marketing-hero-copy h1 {
  margin: 1rem 0 0.9rem;
  font-size: clamp(2.8rem, 5vw, 4.9rem);
  line-height: 0.98;
  color: #13263f;
}

body.marketing-body .marketing-hero-copy h2 {
  margin: 0;
}

body.marketing-body .marketing-lede {
  max-width: 44rem;
  font-size: 1.08rem;
  line-height: 1.72;
  color: #42566f;
}

body.marketing-body .marketing-button-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

body.marketing-body .marketing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.78rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

body.marketing-body .marketing-button:hover {
  transform: translateY(-1px);
}

body.marketing-body .marketing-button.primary {
  background: linear-gradient(135deg, #16304f 0%, #204a70 100%);
  color: #fff;
  box-shadow: 0 16px 28px rgba(19, 44, 74, 0.22);
}

body.marketing-body .marketing-button.secondary {
  background: rgba(255, 255, 255, 0.84);
  color: #15304f;
  border-color: rgba(21, 48, 79, 0.14);
}

body.marketing-body .marketing-link-arrow {
  color: #173151;
  text-decoration: none;
  font-weight: 700;
}

body.marketing-body .marketing-link-arrow::after {
  content: " ->";
}

body.marketing-body .marketing-proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

body.marketing-body .marketing-proof-strip span {
  padding: 0.48rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(21, 48, 79, 0.08);
  color: #33455c;
  font-size: 0.83rem;
}

body.marketing-body .marketing-hero-visual {
  display: grid;
  gap: 1rem;
  align-items: center;
}

body.marketing-body .marketing-image-frame {
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 248, 255, 0.92) 100%);
  border: 1px solid rgba(24, 44, 69, 0.08);
  box-shadow: 0 24px 48px rgba(18, 38, 63, 0.12);
}

body.marketing-body .marketing-image-frame img {
  display: block;
  width: 100%;
  height: auto;
}

body.marketing-body .marketing-image-frame.is-soft {
  background: linear-gradient(180deg, #fbfcff 0%, #fff6ec 100%);
}

body.marketing-body .marketing-floating-card,
body.marketing-body .marketing-status-panel {
  padding: 1.1rem 1.2rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(20, 35, 58, 0.08);
  box-shadow: 0 16px 30px rgba(18, 38, 63, 0.12);
}

body.marketing-body .marketing-floating-card strong,
body.marketing-body .marketing-status-panel h2 {
  display: block;
  margin: 0.5rem 0 0.45rem;
  font-size: 1.2rem;
  color: #173151;
}

body.marketing-body .marketing-floating-card p,
body.marketing-body .marketing-status-panel p {
  margin: 0;
  color: #55657b;
  line-height: 1.6;
}

body.marketing-body .marketing-section,
body.marketing-body .marketing-showcase {
  margin: 1.2rem 0;
  padding: 1.45rem 0 0.3rem;
}

body.marketing-body .marketing-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  gap: 1.4rem;
  align-items: center;
}

body.marketing-body .marketing-section-head {
  max-width: 48rem;
  margin-bottom: 1rem;
}

body.marketing-body .marketing-section-head h2 {
  margin: 0.7rem 0 0.6rem;
  font-size: clamp(2rem, 3vw, 3rem);
  color: #13263f;
}

body.marketing-body .marketing-section-head p,
body.marketing-body .marketing-showcase-copy p {
  color: #4a5f76;
  line-height: 1.7;
  font-size: 1rem;
}

body.marketing-body .marketing-card-grid,
body.marketing-body .marketing-pricing-grid,
body.marketing-body .marketing-legal-grid {
  display: grid;
  gap: 1rem;
}

body.marketing-body .marketing-card-grid,
body.marketing-body .marketing-pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.marketing-body .marketing-card-grid-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.marketing-body .marketing-card,
body.marketing-body .marketing-price-card,
body.marketing-body .marketing-legal-card,
body.marketing-body .marketing-contact-panel,
body.marketing-body .marketing-contact-sidebar .marketing-card {
  padding: 1.25rem;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 35, 58, 0.08);
  box-shadow: 0 14px 28px rgba(18, 38, 63, 0.08);
}

body.marketing-body .marketing-card h3,
body.marketing-body .marketing-price-card h2,
body.marketing-body .marketing-legal-card h2 {
  margin: 0 0 0.55rem;
  color: #13263f;
}

body.marketing-body .marketing-price-card h2 {
  font-size: 2rem;
}

body.marketing-body .marketing-card p,
body.marketing-body .marketing-price-card p,
body.marketing-body .marketing-legal-card p,
body.marketing-body .marketing-contact-panel p {
  margin: 0;
  color: #55657b;
  line-height: 1.65;
}

body.marketing-body .marketing-check-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.62rem;
}

body.marketing-body .marketing-check-list.is-large {
  max-width: 52rem;
}

body.marketing-body .marketing-check-list li {
  position: relative;
  padding-left: 1.6rem;
  color: #33475d;
  line-height: 1.55;
}

body.marketing-body .marketing-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #76c3b5 0%, #3fa692 100%);
}

body.marketing-body .marketing-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

body.marketing-body .marketing-step-card {
  padding: 1.2rem;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 251, 255, 0.92) 100%);
  border: 1px solid rgba(20, 35, 58, 0.08);
}

body.marketing-body .marketing-step-card span {
  display: inline-flex;
  margin-bottom: 0.8rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  background: #173151;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

body.marketing-body .marketing-step-card h3 {
  margin: 0 0 0.45rem;
  color: #13263f;
}

body.marketing-body .marketing-step-card p {
  margin: 0;
  color: #55657b;
  line-height: 1.6;
}

body.marketing-body .marketing-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  margin: 1.45rem 0 0;
  padding: 1.35rem 1.45rem;
  border-radius: 30px;
  background: linear-gradient(135deg, #173151 0%, #275078 100%);
  color: #fff;
}

body.marketing-body .marketing-band h2 {
  margin: 0.5rem 0;
  color: #fff;
}

body.marketing-body .marketing-band .marketing-eyebrow,
body.marketing-body .marketing-footer .marketing-eyebrow {
  background: rgba(255, 255, 255, 0.12);
  color: #ffe5c3;
}

body.marketing-body .marketing-band p {
  margin: 0;
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

body.marketing-body .marketing-pricing-grid {
  margin-bottom: 1rem;
}

body.marketing-body .marketing-price-card.is-accent {
  background: linear-gradient(180deg, #fff3e3 0%, #ffffff 100%);
}

body.marketing-body .marketing-price-label {
  display: inline-flex;
  margin-bottom: 0.8rem;
  color: #8b5528;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 800;
}

body.marketing-body .marketing-inline-form {
  margin-top: 1rem;
}

body.marketing-body .marketing-metric-stack {
  display: grid;
  gap: 0.85rem;
}

body.marketing-body .marketing-metric-card {
  display: grid;
  gap: 0.18rem;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(20, 35, 58, 0.08);
}

body.marketing-body .marketing-metric-card strong {
  font-size: 1.35rem;
  color: #173151;
}

body.marketing-body .marketing-metric-card span {
  color: #31455e;
  font-weight: 700;
}

body.marketing-body .marketing-metric-card small {
  color: #65778e;
  line-height: 1.5;
}

body.marketing-body .marketing-faq-list {
  display: grid;
  gap: 0.8rem;
}

body.marketing-body .marketing-faq-item {
  padding: 0.1rem 1.15rem 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(20, 35, 58, 0.08);
}

body.marketing-body .marketing-faq-item summary {
  cursor: pointer;
  padding: 1rem 0 0.35rem;
  font-weight: 700;
  color: #173151;
  list-style: none;
}

body.marketing-body .marketing-faq-item summary::-webkit-details-marker {
  display: none;
}

body.marketing-body .marketing-faq-item p {
  margin: 0.4rem 0 0;
  color: #55657b;
  line-height: 1.65;
}

body.marketing-body .marketing-legal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

body.marketing-body .marketing-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

body.marketing-body .marketing-contact-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

body.marketing-body .marketing-contact-form label {
  display: grid;
  gap: 0.38rem;
  color: #213650;
  font-weight: 700;
}

body.marketing-body .marketing-contact-form input,
body.marketing-body .marketing-contact-form select,
body.marketing-body .marketing-contact-form textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(20, 35, 58, 0.14);
  background: #fffdfb;
  color: #173151;
  padding: 0.85rem 0.95rem;
  font: inherit;
}

body.marketing-body .marketing-contact-sidebar {
  display: grid;
  gap: 1rem;
}

body.marketing-body .marketing-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

body.marketing-body .marketing-footer {
  margin-top: 2.2rem;
  padding: 2rem 1rem 2.3rem;
  background: linear-gradient(180deg, rgba(16, 26, 43, 0.98) 0%, rgba(24, 37, 58, 0.98) 100%);
  color: #fff;
}

body.marketing-body .marketing-footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 0.7fr));
  gap: 1.4rem;
}

body.marketing-body .marketing-footer-brand h2 {
  margin: 0.75rem 0 0.6rem;
  color: #fff;
}

body.marketing-body .marketing-footer-brand p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.7;
}

body.marketing-body .marketing-footer-column h3 {
  margin: 0 0 0.75rem;
  color: #fff;
  font-size: 1rem;
}

body.marketing-body .marketing-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

body.marketing-body .marketing-footer-links a,
body.marketing-body .marketing-footer-inline a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

body.marketing-body .marketing-footer-bar {
  max-width: 1240px;
  margin: 1.6rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

body.marketing-body .marketing-footer-bar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
}

body.marketing-body .marketing-footer-inline {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  flex-wrap: wrap;
}

body.marketing-body .marketing-inline-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  cursor: pointer;
}

body.marketing-body .marketing-consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: 24px;
  background: rgba(16, 26, 43, 0.96);
  color: #fff;
  box-shadow: 0 28px 52px rgba(16, 26, 43, 0.24);
}

body.marketing-body .marketing-consent-banner p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.78);
}

body.marketing-body .marketing-consent-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

body.marketing-body .marketing-consent-banner .marketing-button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
}

body.marketing-body .center-card {
  max-width: 620px;
  margin: 2rem auto 0;
  padding: 1.4rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 35, 58, 0.08);
  box-shadow: 0 18px 36px rgba(18, 38, 63, 0.12);
}

@media (max-width: 1080px) {
  body.marketing-body .marketing-hero,
  body.marketing-body .marketing-showcase,
  body.marketing-body .marketing-contact-layout,
  body.marketing-body .marketing-footer-grid {
    grid-template-columns: 1fr;
  }

  body.marketing-body .marketing-card-grid,
  body.marketing-body .marketing-pricing-grid,
  body.marketing-body .marketing-timeline,
  body.marketing-body .marketing-legal-grid {
    grid-template-columns: 1fr;
  }

  body.marketing-body .marketing-band,
  body.marketing-body .marketing-footer-bar,
  body.marketing-body .marketing-consent-banner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  body.marketing-body .marketing-topbar {
    align-items: flex-start;
  }

  body.marketing-body .marketing-topbar-right,
  body.marketing-body .marketing-actions,
  body.marketing-body .marketing-nav {
    width: 100%;
  }

  body.marketing-body .marketing-nav {
    flex-direction: column;
    align-items: stretch;
  }

  body.marketing-body .marketing-menu-panel {
    position: static;
    min-width: 0;
    margin-top: 0.45rem;
  }

  body.marketing-body .marketing-menu,
  body.marketing-body .marketing-menu-summary {
    width: 100%;
  }

  body.marketing-body .marketing-menu-summary {
    background: rgba(255, 255, 255, 0.08);
  }

  body.marketing-body .marketing-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  body.marketing-body .marketing-hero-copy h1 {
    font-size: clamp(2.35rem, 10vw, 3.6rem);
  }
}

@media (max-width: 640px) {
  body.marketing-body .marketing-main {
    padding-top: 0.8rem;
  }

  body.marketing-body .marketing-section,
  body.marketing-body .marketing-showcase {
    padding-top: 0.9rem;
  }

  body.marketing-body .marketing-band,
  body.marketing-body .marketing-card,
  body.marketing-body .marketing-price-card,
  body.marketing-body .marketing-legal-card,
  body.marketing-body .marketing-contact-panel,
  body.marketing-body .marketing-contact-sidebar .marketing-card,
  body.marketing-body .marketing-step-card,
  body.marketing-body .marketing-floating-card,
  body.marketing-body .marketing-status-panel {
    border-radius: 22px;
  }
}
    minmax(250px, 1.8fr)
    minmax(130px, 0.78fr)
    minmax(150px, 0.95fr)
    minmax(145px, 0.88fr)
    minmax(140px, 0.88fr)
    minmax(140px, 0.88fr)
    minmax(220px, 1.18fr)
    90px
    auto
    auto;
}

.ref-table {
  min-width: 1520px;
}

.ref-table th[data-col="latest_link"],
.ref-table td[data-col="latest_link"] {
  min-width: 110px;
  max-width: 110px;
}

.ref-table th[data-col="review"],
.ref-table td[data-col="review"] {
  min-width: 132px;
  max-width: 132px;
}

.ref-table th[data-col="appeal_reason"],
.ref-table td[data-col="appeal_reason"] {
  min-width: 190px;
  max-width: 190px;
}

.ref-table th[data-col="comment"],
.ref-table td[data-col="comment"] {
  min-width: 176px;
  max-width: 176px;
}

.link-pill {
  justify-content: center;
  min-width: 76px;
  font-weight: 600;
}

.review-dependent.is-hidden {
  display: none !important;
}

.ref-table td[data-col="review"] .cell-input,
.ref-table td[data-col="appeal_reason"] .cell-input,
.ref-table td[data-col="comment"] .cell-input,
.ref-table td[data-col="appeal_date"] .cell-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

.ref-table td[data-col="review"],
.ref-table td[data-col="appeal_reason"],
.ref-table td[data-col="comment"],
.ref-table td[data-col="appeal_date"] {
  overflow: hidden;
}

.review-no-appeal td[data-col="appeal_reason"],
.review-no-appeal td[data-col="comment"],
.review-no-appeal td[data-col="appealed"],
.review-no-appeal td[data-col="appeal_date"] {
  background: #fbfcfe;
}

@media (max-width: 1400px) {
  .reference-summary-strip {
    grid-template-columns: 1fr 1fr;
  }
}

.reference-page-head .reference-title-row {
  row-gap: 0.3rem;
}

.ref-head .ref-actions {
  gap: 0.4rem;
}

/* Final desktop override: account manager reference summary and filter layout */
.reference-summary-strip {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(210px, 1fr)) minmax(180px, 0.82fr) !important;
  gap: 0.62rem !important;
  align-items: stretch !important;
  margin-bottom: 0.65rem;
}

.reference-summary-strip > * {
  min-width: 0;
}

.reference-summary-strip .summary-combo-card,
.reference-summary-strip .summary-tile {
  width: auto !important;
  height: 100%;
}

.summary-combo-card {
  padding: 0.72rem 0.82rem !important;
}

.reference-summary-strip .summary-combo-card,
.reference-summary-strip .summary-tile {
  min-height: 84px;
  gap: 0.14rem;
}

.reference-summary-strip .summary-tile strong {
  font-size: 1.42rem;
}

.reference-summary-strip .summary-tile small {
  font-size: 0.77rem;
  line-height: 1.34;
}

.summary-combo-heading {
  font-size: 0.88rem;
}

.source-equation,
.source-equation-labels,
.source-equation-figures {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.32rem;
}

.source-equation-figures {
  margin-top: 0.08rem;
}

.source-equation-figures strong {
  font-size: 1.42rem;
  line-height: 1;
  text-align: center;
}

.source-equation-labels {
  margin-top: 0.02rem;
}

.source-equation-labels span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.2;
  text-align: center;
}

.source-equation-symbol {
  color: #7c8ea3;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.source-summary-link {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.source-summary-link:hover,
.source-summary-link:visited,
.source-summary-link:active {
  color: inherit;
  text-decoration: none;
}

.source-summary-link:focus-visible {
  outline: 2px solid rgba(10, 122, 164, 0.45);
  outline-offset: 2px;
}

.ref-filters,
.ref-filters.reviewer-filters {
  display: grid !important;
  align-items: end !important;
}

.ref-filters {
  grid-template-columns:
    minmax(220px, 1.32fr)
    minmax(92px, 0.54fr)
    minmax(108px, 0.62fr)
    minmax(116px, 0.66fr)
    minmax(110px, 0.64fr)
    minmax(110px, 0.64fr)
    minmax(150px, 0.88fr)
    minmax(78px, 0.4fr)
    max-content !important;
}

.ref-filters.reviewer-filters {
  grid-template-columns:
    minmax(210px, 1.34fr)
    minmax(94px, 0.54fr)
    minmax(110px, 0.62fr)
    minmax(116px, 0.64fr)
    minmax(126px, 0.72fr)
    minmax(160px, 0.9fr)
    minmax(86px, 0.42fr)
    max-content !important;
}

.filter-submit-group {
  display: inline-flex;
  align-self: end;
  justify-self: end;
  gap: 0.45rem;
  white-space: nowrap;
}

@media (max-width: 1450px) {
  .reference-summary-strip {
    grid-template-columns: repeat(2, minmax(260px, 1fr)) !important;
  }
}

.ref-head .ref-actions .btn-link,
.ref-head .ref-actions button,
.ref-head .ref-actions select {
  white-space: nowrap;
}

/* Final reference collaboration/layout overrides */
.reference-page-head {
  margin-bottom: 0.35rem;
}

.reference-page-head .reference-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.reference-page-head h1 {
  margin: 0;
}

.reviewer-reference-summary {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(200px, 0.95fr) minmax(180px, 0.72fr) !important;
  gap: 0.58rem !important;
  margin-bottom: 0.58rem;
}

.reviewer-reference-summary .summary-tile {
  min-height: 84px;
  padding: 0.64rem 0.76rem;
  gap: 0.14rem;
}

.reviewer-reference-summary .summary-detail {
  line-height: 1.35;
  font-size: 0.75rem;
}

.reviewer-reference-summary .summary-tile strong {
  font-size: 1.42rem;
}

.reviewer-source-card {
  justify-content: flex-start;
}

.summary-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
}

.summary-title-note {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

@media (max-width: 1450px) {
  .reviewer-reference-summary {
    grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
  }
}

@media (max-width: 1100px) {
  .source-equation-figures,
  .source-equation-labels {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .source-equation-symbol {
    justify-self: center;
  }
}

.compact-head {
  gap: 0.75rem;
}

.ref-filters,
.ref-filters.reviewer-filters {
  grid-auto-rows: auto;
}

.ref-filters label {
  margin: 0;
}

.filter-submit-group {
  align-self: end;
  justify-self: end;
  min-height: 42px;
  margin-bottom: 1px;
}

.ref-table td[data-col="review"] .cell-input {
  max-width: 150px;
}

.ref-table td[data-col="appeal_reason"] .cell-input {
  max-width: 210px;
}

.ref-table td[data-col="comment"] .cell-input {
  max-width: 210px;
}

.save-feedback {
  display: block;
  min-width: 0;
  margin-left: 0;
  margin-top: 0.28rem;
  line-height: 1.3;
}

.row-locked .save-feedback {
  color: #475569;
}

.row-lock-banner {
  margin-top: 0.26rem;
  color: #9a3412;
  font-weight: 600;
}

.row-lock-banner.is-hidden {
  display: none;
}

/* Final spacing and desktop filter-fit normalization */
.container {
  margin: 0 auto 2rem;
  padding: 0.75rem 1rem 0;
}

.page-head,
.reference-page-head,
.dashboard-head,
.dashboard-head-tight {
  margin-bottom: 0.6rem;
}

.panel {
  margin-bottom: 0.85rem;
}

.compact-head {
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.ref-filters {
  grid-template-columns:
    minmax(190px, 1.42fr)
    minmax(86px, 0.48fr)
    minmax(102px, 0.58fr)
    minmax(112px, 0.62fr)
    minmax(102px, 0.58fr)
    minmax(116px, 0.64fr)
    minmax(116px, 0.66fr)
    minmax(142px, 0.88fr)
    minmax(72px, 0.34fr)
    max-content !important;
  gap: 0.42rem 0.5rem;
}

.ref-filters.reviewer-filters {
  grid-template-columns:
    minmax(190px, 1.5fr)
    minmax(86px, 0.48fr)
    minmax(102px, 0.58fr)
    minmax(112px, 0.62fr)
    minmax(116px, 0.64fr)
    minmax(150px, 0.9fr)
    minmax(72px, 0.34fr)
    max-content !important;
  gap: 0.42rem 0.5rem;
}

.ref-actions {
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
  align-items: end;
}

.ref-actions label {
  margin-left: auto;
}

.ref-actions .field {
  margin-left: auto;
}

.ref-toolbar .ref-view-actions label {
  margin-left: 0;
}

.ref-toolbar .ref-view-actions .field {
  margin-left: 0;
}

@media (max-width: 1500px) {
  .ref-filters {
    grid-template-columns: repeat(5, minmax(170px, 1fr)) !important;
  }

  .ref-filters.reviewer-filters {
    grid-template-columns: repeat(4, minmax(170px, 1fr)) !important;
  }

  .ref-actions label {
    margin-left: 0;
  }

  .ref-toolbar {
    flex-wrap: wrap;
  }

  .ref-primary-actions,
  .ref-view-actions {
    flex-wrap: wrap;
  }

  .ref-view-actions {
    margin-left: 0;
  }
}

.checkbox-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start;
  gap: 0.65rem;
}

.checkbox-row input[type="checkbox"] {
  margin: 0 !important;
}

.checkbox-row input[type="radio"] {
  width: auto !important;
  margin: 0 !important;
}

.billing-choice-panel {
  display: grid;
  gap: 0.75rem;
}

.billing-choice-panel h3 {
  margin: 0;
  font-size: 1rem;
}

.billing-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
}

.billing-choice-card {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
  background: var(--card);
}

.billing-choice-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.inline-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 0.75rem;
}

.inline-stats span {
  color: #334155;
  font-size: 0.95rem;
}

.field-error {
  color: #991b1b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.field-hint {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.validation-summary {
  display: grid;
  gap: 0.45rem;
}

.validation-summary ul {
  margin: 0;
  padding-left: 1.1rem;
}

body.marketing-body .public-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: #173151;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

body.marketing-body .public-nav-link:hover,
body.marketing-body .public-nav-link.is-active {
  background: rgba(23, 49, 81, 0.08);
}

body.marketing-body .public-actions .public-nav-link {
  color: #173151;
}

body.marketing-body .public-footer-grid {
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.8fr));
}

/* UI/UX remediation: app shell, responsive data, confirmations, and polished nav */
.brand-link {
  color: #fff;
  text-decoration: none;
}

.brand-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.22rem;
}

.topnav a.is-active,
.topnav a[aria-current="page"] {
  background: rgba(14, 165, 233, 0.22);
  color: #fff;
  box-shadow: inset 0 -2px 0 #38bdf8;
}

.app-menu-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.48rem 0.72rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.app-menu-toggle-bars,
.app-menu-toggle-bars::before,
.app-menu-toggle-bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.app-menu-toggle-bars {
  position: relative;
}

.app-menu-toggle-bars::before,
.app-menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.app-menu-toggle-bars::before {
  top: -0.36rem;
}

.app-menu-toggle-bars::after {
  top: 0.36rem;
}

body.marketing-body .marketing-topbar .public-nav-link,
body.marketing-body .marketing-topbar .marketing-plain-link,
body.marketing-body .marketing-topbar .public-actions .public-nav-link {
  color: rgba(255, 255, 255, 0.94);
}

body.marketing-body .marketing-topbar .public-nav-link:hover,
body.marketing-body .marketing-topbar .public-nav-link.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.confirm-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.48);
}

.confirm-dialog-backdrop[hidden] {
  display: none;
}

.confirm-dialog {
  width: min(440px, 100%);
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.confirm-dialog h2,
.confirm-dialog p {
  margin: 0;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.modal-open {
  overflow: hidden;
}

.async-status {
  display: inline-block;
  min-height: 1.25rem;
  margin-left: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.async-status.success {
  color: var(--success);
}

.async-status.error {
  color: var(--danger);
}

label,
input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
}

.empty-state-panel {
  max-width: 760px;
  display: grid;
  gap: 0.85rem;
  margin-top: 0.8rem;
}

.empty-state-panel h2,
.empty-state-panel p {
  margin: 0;
}

.empty-state-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.org-list-section {
  display: grid;
  gap: 1rem;
}

.org-list-section > h2 {
  margin: 0;
}

.mfa-setup-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.mfa-enrollment-layout {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 1rem;
  align-items: start;
}

.mfa-qr-panel {
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

.mfa-qr-panel svg {
  display: block;
  width: min(100%, 196px);
  height: auto;
}

.mfa-setup-guide > div {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.mfa-setup-guide code {
  overflow-wrap: anywhere;
}

.secret-reveal {
  display: grid;
  gap: 0.5rem;
}

.secret-reveal summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.copy-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

.copy-row.compact {
  margin-top: 0.55rem;
}

.copy-row input {
  flex: 1 1 18rem;
  min-width: 0;
}

.copy-button {
  padding: 0.4rem 0.65rem;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.copy-button:hover {
  background: #f8fafc;
  filter: none;
}

.copy-status {
  min-width: 4.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.copy-status.success {
  color: var(--success);
}

.copy-status.error {
  color: var(--danger);
}

.recovery-code-list {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.1rem;
}

.recovery-code-list li {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.workflow-preview {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  border: 1px solid rgba(23, 49, 81, 0.12);
  box-shadow: 0 24px 60px rgba(17, 33, 57, 0.12);
}

.workflow-preview-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dbe6f1;
}

.workflow-preview-step {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-weight: 800;
}

.workflow-preview-title {
  display: grid;
  gap: 0.12rem;
}

.workflow-preview-title strong,
.workflow-preview-title span {
  line-height: 1.25;
}

.workflow-preview-title span {
  color: var(--muted);
  font-size: 0.9rem;
}

.workflow-preview-status {
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 900px) {
  body:not(.marketing-body) .topbar {
    position: sticky;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  body:not(.marketing-body) .topbar-brand {
    min-width: 0;
  }

  body:not(.marketing-body) .topbar-right {
    display: contents;
  }

  body:not(.marketing-body) .org-switcher {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0.35rem;
  }

  body:not(.marketing-body) .org-switcher label,
  body:not(.marketing-body) .org-switcher select {
    width: 100%;
  }

  .app-menu-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .topnav.app-nav {
    position: fixed;
    top: 4.7rem;
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    box-sizing: border-box;
    z-index: 120;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    max-height: calc(100dvh - 6rem);
    overflow-y: auto;
    padding: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 14px;
    background: #111827;
    box-shadow: 0 22px 58px rgba(15, 23, 42, 0.32);
  }

  .topnav.app-nav.is-open {
    display: grid;
  }

  .topnav.app-nav a,
  .topnav.app-nav .topnav-button {
    display: flex;
    align-items: center;
    min-height: 44px;
    width: 100%;
    padding: 0.65rem 0.75rem;
    white-space: normal;
  }

  .topnav-form {
    grid-column: 1 / -1;
  }

  .mfa-enrollment-layout {
    grid-template-columns: 1fr;
  }

  .mfa-setup-guide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .inline-form label,
  .inline-form .field,
  .inline-form input,
  .inline-form select,
  .inline-form textarea,
  .inline-form button {
    width: 100%;
  }

  .table-wrap {
    overflow: visible;
  }

  .table-wrap table:not(.ref-table) {
    min-width: 0;
    display: block;
  }

  .table-wrap table:not(.ref-table) thead {
    display: none;
  }

  .table-wrap table:not(.ref-table) tbody,
  .table-wrap table:not(.ref-table) tr,
  .table-wrap table:not(.ref-table) td {
    display: block;
    width: 100%;
  }

  .table-wrap table:not(.ref-table) tr {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  }

  .table-wrap table:not(.ref-table) tr + tr {
    margin-top: 0.75rem;
  }

  .table-wrap table:not(.ref-table) td {
    border: 0;
    padding: 0.48rem 0;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .table-wrap table:not(.ref-table) td:not([colspan]) {
    display: grid;
    grid-template-columns: minmax(7.4rem, 38%) minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
  }

  .table-wrap table:not(.ref-table) td:not([colspan])::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .table-wrap table:not(.ref-table) td > *,
  .table-wrap table:not(.ref-table) .muted,
  .table-wrap table:not(.ref-table) .tiny,
  .table-wrap table:not(.ref-table) .badge {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .table-wrap table:not(.ref-table) .badge {
    white-space: normal;
    text-align: left;
  }

  .table-wrap table:not(.ref-table) td[colspan] {
    padding: 0.7rem 0;
  }

  .table-wrap table:not(.ref-table) .inline-form {
    display: grid;
    gap: 0.45rem;
    align-items: start;
  }

  .table-wrap table:not(.ref-table) .inline-form button,
  .table-wrap table:not(.ref-table) .inline-form select,
  .table-wrap table:not(.ref-table) .inline-form input {
    width: 100%;
  }
}

body.marketing-body .public-shell {
  display: grid;
  gap: 1.4rem;
  padding-bottom: 1rem;
}

body.marketing-body .public-copy-block {
  max-width: 46rem;
  display: grid;
  gap: 0.8rem;
}

body.marketing-body .public-copy-block-wide {
  max-width: 54rem;
}

body.marketing-body .public-kicker,
body.marketing-body .public-card-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.2);
  color: #0284c7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 800;
}

body.marketing-body .public-copy-block h1,
body.marketing-body .public-hero-copy h1 {
  margin: 0;
  color: #0f172a;
  line-height: 1.14;
  font-size: clamp(2.1rem, 3.3vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

body.marketing-body .public-copy-block h2,
body.marketing-body .public-section-head h2,
body.marketing-body .public-band h2 {
  margin: 0;
  color: #13263f;
}

body.marketing-body .public-lede,
body.marketing-body .public-copy,
body.marketing-body .public-section-head p,
body.marketing-body .public-card p,
body.marketing-body .public-step-card p,
body.marketing-body .public-side-card p,
body.marketing-body .public-price-card p,
body.marketing-body .public-legal-card p,
body.marketing-body .public-faq-item p {
  margin: 0;
  color: #4a5f76;
  line-height: 1.7;
}

body.marketing-body .public-action-row,
body.marketing-body .public-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

body.marketing-body .public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  gap: 2.25rem;
  align-items: center;
  padding: 1.25rem 0 1.75rem;
}

body.marketing-body .public-hero-copy,
body.marketing-body .public-hero-panel {
  display: grid;
  gap: 1rem;
}

body.marketing-body .public-hero-card,
body.marketing-body .public-card,
body.marketing-body .public-side-card,
body.marketing-body .public-form-card,
body.marketing-body .public-price-card,
body.marketing-body .public-legal-card,
body.marketing-body .public-status-card {
  padding: 1.3rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(20, 35, 58, 0.08);
  box-shadow: 0 18px 34px rgba(18, 38, 63, 0.08);
}

body.marketing-body .public-hero-card strong,
body.marketing-body .public-price-card h2,
body.marketing-body .public-status-card h3,
body.marketing-body .public-legal-card h2,
body.marketing-body .public-card h3,
body.marketing-body .public-side-card h3 {
  display: block;
  margin: 0.6rem 0 0.45rem;
  color: #13263f;
}

body.marketing-body .public-metric-grid,
body.marketing-body .public-metric-row,
body.marketing-body .public-card-grid,
body.marketing-body .public-step-grid,
body.marketing-body .public-pricing-grid,
body.marketing-body .public-contact-grid,
body.marketing-body .public-legal-meta {
  display: grid;
  gap: 1rem;
}

body.marketing-body .public-metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.marketing-body .public-metric-grid article,
body.marketing-body .public-metric-card {
  display: grid;
  gap: 0.18rem;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 35, 58, 0.08);
}

body.marketing-body .public-metric-grid strong,
body.marketing-body .public-metric-card strong {
  color: #173151;
  font-size: 1.35rem;
}

body.marketing-body .public-metric-grid span,
body.marketing-body .public-metric-card span {
  color: #31455e;
  font-weight: 700;
}

body.marketing-body .public-metric-card small {
  color: #65778e;
}

body.marketing-body .public-metric-row,
body.marketing-body .public-card-grid,
body.marketing-body .public-step-grid,
body.marketing-body .public-pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.marketing-body .public-section-block {
  display: grid;
  gap: 1rem;
}

body.marketing-body .public-section-block-split {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.86fr);
  align-items: start;
}

body.marketing-body .public-section-head {
  max-width: 48rem;
  display: grid;
  gap: 0.7rem;
}

body.marketing-body .public-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

body.marketing-body .public-check-list-large {
  max-width: 52rem;
}

body.marketing-body .public-check-list li {
  position: relative;
  padding-left: 1.5rem;
  color: #33475d;
  line-height: 1.58;
}

body.marketing-body .public-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #76c3b5 0%, #3fa692 100%);
}

body.marketing-body .public-step-card span {
  display: inline-flex;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  background: #173151;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

body.marketing-body .public-step-card h3 {
  margin: 0.8rem 0 0.45rem;
}

body.marketing-body .public-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  padding: 1.35rem 1.45rem;
  border-radius: 28px;
  background: linear-gradient(135deg, #173151 0%, #275078 100%);
  color: #fff;
}

body.marketing-body .public-band .public-kicker {
  background: rgba(255, 255, 255, 0.12);
  color: #ffe5c3;
}

body.marketing-body .public-band h2 {
  color: #fff;
  margin-bottom: 0.45rem;
}

body.marketing-body .public-band p {
  margin: 0;
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

body.marketing-body .public-price-card h2 {
  font-size: 2.2rem;
}

body.marketing-body .public-price-card h2 span {
  font-size: 0.95rem;
  color: #64748b;
  margin-left: 0.3rem;
}

body.marketing-body .public-price-card-trial {
  background: linear-gradient(180deg, #fff7ec 0%, rgba(255, 255, 255, 0.96) 100%);
}

body.marketing-body .public-price-card-paid {
  background: rgba(255, 255, 255, 0.96);
}

body.marketing-body .public-price-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

body.marketing-body .public-price-card .public-check-list {
  margin-bottom: 0.25rem;
}

body.marketing-body .public-price-card .marketing-button,
body.marketing-body .public-price-card .marketing-inline-form {
  margin-top: auto;
}

body.marketing-body .public-status-strip {
  display: grid;
}

body.marketing-body .public-contact-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

body.marketing-body .public-form-card,
body.marketing-body .public-side-stack {
  display: grid;
  gap: 1rem;
}

body.marketing-body .public-form-head {
  display: grid;
  gap: 0.45rem;
}

body.marketing-body .public-form-head h2 {
  margin: 0;
}

body.marketing-body .public-form-grid,
body.marketing-body .public-form-grid label {
  display: grid;
  gap: 0.45rem;
}

body.marketing-body .public-form-grid {
  gap: 0.95rem;
}

body.marketing-body .public-form-grid label > span {
  color: #213650;
  font-weight: 700;
}

body.marketing-body .public-form-grid input,
body.marketing-body .public-form-grid select,
body.marketing-body .public-form-grid textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(20, 35, 58, 0.14);
  background: #fffdfb;
  color: #173151;
  font: inherit;
}

body.marketing-body .public-form-grid input[aria-invalid="true"],
body.marketing-body .public-form-grid select[aria-invalid="true"],
body.marketing-body .public-form-grid textarea[aria-invalid="true"] {
  border-color: #d13f3f;
  box-shadow: 0 0 0 4px rgba(209, 63, 63, 0.08);
}

body.marketing-body .public-form-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

body.marketing-body .public-captcha-block {
  display: grid;
  gap: 0.65rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid rgba(20, 35, 58, 0.08);
}

body.marketing-body .public-captcha-head {
  display: grid;
  gap: 0.2rem;
}

body.marketing-body .public-captcha-head strong {
  color: #13263f;
}

body.marketing-body .public-captcha-head span {
  color: #64748b;
  font-size: 0.84rem;
}

body.marketing-body altcha-widget {
  width: 100%;
}

body.marketing-body .public-side-copy {
  color: #4a5f76;
  line-height: 1.7;
}

body.marketing-body .public-faq-list,
body.marketing-body .public-legal-stack {
  display: grid;
  gap: 1rem;
}

body.marketing-body .public-faq-item {
  padding: 0.1rem 1.15rem 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(20, 35, 58, 0.08);
}

body.marketing-body .public-faq-item summary {
  cursor: pointer;
  padding: 1rem 0 0.35rem;
  font-weight: 700;
  color: #173151;
  list-style: none;
}

body.marketing-body .public-faq-item summary::-webkit-details-marker {
  display: none;
}

body.marketing-body .public-legal-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.marketing-body .public-legal-stack {
  grid-template-columns: 1fr;
}

.onboarding-layout {
  align-items: start;
}

.onboarding-panel {
  height: 100%;
}

@media (max-width: 1080px) {
  body.marketing-body .public-hero,
  body.marketing-body .public-section-block-split,
  body.marketing-body .public-contact-grid,
  body.marketing-body .public-legal-meta,
  body.marketing-body .public-footer-grid {
    grid-template-columns: 1fr;
  }

  body.marketing-body .public-card-grid,
  body.marketing-body .public-step-grid,
  body.marketing-body .public-pricing-grid,
  body.marketing-body .public-metric-row,
  body.marketing-body .public-metric-grid {
    grid-template-columns: 1fr;
  }

  body.marketing-body .public-band,
  body.marketing-body .marketing-footer-bar,
  body.marketing-body .marketing-consent-banner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  body.marketing-body .public-form-split {
    grid-template-columns: 1fr;
  }

  body.marketing-body .public-nav {
    flex-wrap: wrap;
  }

  body.marketing-body .public-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* ==========================================================================
   Modern Marketing & Workflow Preview Enhancements
   ========================================================================== */

body.marketing-body .topbar-tagline {
  font-size: 0.8rem;
  font-weight: 500;
  color: #93c5fd;
  letter-spacing: 0.01em;
}

body.marketing-body .public-nav-link {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

body.marketing-body .public-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

body.marketing-body .public-nav-link.is-active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  font-weight: 600;
}

body.marketing-body .hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

body.marketing-body .hero-subbadge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.28);
  color: #0284c7;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body.marketing-body .hero-trust-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  padding-top: 0.65rem;
  font-size: 0.86rem;
  color: #475569;
}

body.marketing-body .trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
}

body.marketing-body .trust-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
}

/* Workflow Preview Widget (Simulated Temu Live Queue) */
body.marketing-body .workflow-preview {
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.marketing-body .workflow-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.08);
}

body.marketing-body .workflow-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.15rem;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.marketing-body .preview-dot-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.marketing-body .preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

body.marketing-body .dot-red {
  background: #ef4444;
}

body.marketing-body .dot-yellow {
  background: #f59e0b;
}

body.marketing-body .dot-green {
  background: #10b981;
}

body.marketing-body .preview-title-bar {
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.02em;
}

body.marketing-body .preview-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.marketing-body .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: live-dot-pulse 2s infinite ease-in-out;
}

@keyframes live-dot-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.85);
  }
}

body.marketing-body .workflow-preview .table-wrap {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: transparent;
}

body.marketing-body .workflow-preview-table {
  width: 100%;
  min-width: 0 !important;
  font-size: 0.82rem;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

body.marketing-body .workflow-preview-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.65rem 0.65rem;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

body.marketing-body .workflow-preview-table td {
  padding: 0.65rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  white-space: nowrap;
}

body.marketing-body .sku-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.marketing-body .mono-sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.72rem;
  color: #64748b;
}

body.marketing-body .badge-temu {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #fff1ee;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

body.marketing-body .status-ready {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

body.marketing-body .status-audit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

body.marketing-body .status-live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

body.marketing-body .workflow-preview-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.15rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 0.82rem;
  color: #64748b;
}

body.marketing-body .preview-stat strong {
  color: #0f172a;
}

/* Feature Cards & Icon Badges */
body.marketing-body .feature-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.marketing-body .feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 38px rgba(18, 38, 63, 0.12);
  border-color: rgba(14, 165, 233, 0.35);
}

body.marketing-body .card-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border: 1px solid #7dd3fc;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

/* Live Triage Preview Toolbar & Table Styling */
body.marketing-body .workflow-preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

body.marketing-body .preview-search-mock {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.78rem;
  color: #64748b;
  min-width: 180px;
}

body.marketing-body .preview-filter-chips {
  display: flex;
  gap: 0.4rem;
}

body.marketing-body .filter-chip {
  display: inline-flex;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
}

body.marketing-body .filter-chip.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

body.marketing-body .sku-title {
  font-weight: 600;
  color: #0f172a;
}

body.marketing-body .price-cut {
  color: #dc2626;
  font-weight: 700;
}

body.marketing-body .price-cut small {
  font-size: 0.72rem;
  color: #ef4444;
}

body.marketing-body .price-floor {
  color: #059669;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body.marketing-body .badge-comp {
  display: inline-flex;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
}

body.marketing-body .preview-stat.highlight strong {
  color: #059669;
}

/* ==========================================================================
   Bento Grid Architecture Section
   ========================================================================== */
body.marketing-body .bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

body.marketing-body .bento-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.marketing-body .bento-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.12);
  border-color: rgba(2, 132, 199, 0.3);
}

body.marketing-body .bento-wide {
  grid-column: span 2;
}

body.marketing-body .bento-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 0.75rem;
}

body.marketing-body .bento-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0284c7;
  margin-bottom: 0.2rem;
}

body.marketing-body .bento-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #0f172a;
}

body.marketing-body .bento-card p {
  margin: 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.6;
}

body.marketing-body .formula-preview-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.9rem 1.15rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin-top: 1.1rem;
}

body.marketing-body .formula-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

body.marketing-body .formula-label {
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
}

body.marketing-body .formula-val {
  font-size: 1.05rem;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body.marketing-body .formula-op {
  font-size: 1.25rem;
  font-weight: 800;
  color: #94a3b8;
}

body.marketing-body .formula-step.highlight {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
}

body.marketing-body .formula-step.highlight .formula-val {
  color: #047857;
  font-weight: 800;
}

body.marketing-body .lock-visual-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
  margin-top: 1.1rem;
}

body.marketing-body .lock-pulse {
  font-size: 1.4rem;
}

body.marketing-body .lock-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.marketing-body .lock-text strong {
  font-size: 0.86rem;
  color: #92400e;
}

body.marketing-body .lock-text small {
  font-size: 0.76rem;
  color: #b45309;
}

body.marketing-body .marketplace-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

body.marketing-body .market-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}

body.marketing-body .role-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

body.marketing-body .role-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0369a1;
}

/* ==========================================================================
   Marketplace Comparison Table Section
   ========================================================================== */
body.marketing-body .comparison-table-wrap {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

body.marketing-body .comparison-table {
  width: 100%;
  border-collapse: collapse;
}

body.marketing-body .comparison-table th {
  padding: 1.1rem 1.35rem;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  color: #475569;
}

body.marketing-body .comparison-table th.highlight-col {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-bottom: 2px solid #0284c7;
}

body.marketing-body .comparison-table td {
  padding: 1.05rem 1.35rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  font-size: 0.92rem;
}

body.marketing-body .comparison-table td.highlight-col {
  background: rgba(2, 132, 199, 0.04);
  border-left: 2px solid rgba(2, 132, 199, 0.15);
  border-right: 2px solid rgba(2, 132, 199, 0.15);
}

body.marketing-body .pos-text {
  color: #059669;
  font-weight: 700;
}

body.marketing-body .neg-text {
  color: #64748b;
  font-weight: 500;
}

/* ==========================================================================
   3-Step Connected Workflow Pipeline
   ========================================================================== */
body.marketing-body .pipeline-flow {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.9rem;
  margin-top: 0.75rem;
}

body.marketing-body .pipeline-step {
  flex: 1;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  padding: 1.5rem;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.marketing-body .pipeline-step:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 35px -5px rgba(15, 23, 42, 0.1);
}

body.marketing-body .pipeline-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

body.marketing-body .pipeline-step-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  color: #0f172a;
}

body.marketing-body .pipeline-step-body p {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.6;
}

body.marketing-body .pipeline-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #94a3b8;
  font-weight: 800;
  padding: 0 0.4rem;
}

/* ==========================================================================
   High-Impact Conversion CTA Banner
   ========================================================================== */
body.marketing-body .public-cta-banner {
  border-radius: 28px;
  background: linear-gradient(135deg, #090d16 0%, #0f172a 45%, #0369a1 100%);
  padding: 3rem 2.5rem;
  color: #ffffff;
  box-shadow: 0 24px 50px -10px rgba(15, 23, 42, 0.35);
  margin-top: 1.25rem;
  position: relative;
  overflow: hidden;
}

body.marketing-body .cta-banner-content {
  max-width: 48rem;
  display: grid;
  gap: 1rem;
}

body.marketing-body .cta-banner-content h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.75rem);
  color: #ffffff;
  line-height: 1.15;
}

body.marketing-body .cta-banner-content p {
  margin: 0;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

body.marketing-body .cta-kicker {
  background: rgba(255, 255, 255, 0.15);
  color: #7dd3fc;
}

body.marketing-body .cta-primary {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 0.85rem 1.6rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.4);
}

body.marketing-body .cta-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.85rem 1.6rem;
  border-radius: 12px;
}

body.marketing-body .cta-plain {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
  margin-left: 0.4rem;
}

/* ==========================================================================
   Pricing Page Featured Badge & Feature Matrix Table
   ========================================================================== */
body.marketing-body .pricing-card-featured {
  border: 2px solid #0284c7 !important;
  position: relative;
  box-shadow: 0 20px 40px -8px rgba(2, 132, 199, 0.22) !important;
}

body.marketing-body .pricing-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

body.marketing-body .pricing-badge-save {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.75rem;
  font-weight: 800;
  border: 1px solid #a7f3d0;
}

body.marketing-body .pricing-table-wrap {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

body.marketing-body .pricing-matrix-table {
  width: 100%;
  border-collapse: collapse;
}

body.marketing-body .pricing-matrix-table th {
  padding: 1.1rem 1.35rem;
  font-size: 0.86rem;
  font-weight: 700;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  text-align: left;
  color: #475569;
}

body.marketing-body .pricing-matrix-table th.highlight-col {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
}

body.marketing-body .pricing-matrix-table td {
  padding: 1rem 1.35rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
  vertical-align: middle;
}

body.marketing-body .pricing-matrix-table td.highlight-col {
  background: rgba(2, 132, 199, 0.04);
  font-weight: 600;
  border-left: 2px solid rgba(2, 132, 199, 0.15);
  border-right: 2px solid rgba(2, 132, 199, 0.15);
}

/* ==========================================================================
   Responsive Adaptations for New Components
   ========================================================================== */
@media (max-width: 1080px) {
  body.marketing-body .bento-grid {
    grid-template-columns: 1fr;
  }

  body.marketing-body .bento-wide {
    grid-column: span 1;
  }

  body.marketing-body .pipeline-flow {
    flex-direction: column;
  }

  body.marketing-body .pipeline-connector {
    transform: rotate(90deg);
    padding: 0.2rem 0;
  }
}

