/**
 * SaaS polish — 全站正规产品化视觉（顶栏、落地页、工作流页、Toast、页脚）
 * 仅叠加样式，不覆盖业务逻辑；与 design-tokens / landing 协同
 */

/* ── 顶栏：毛玻璃 + 分段导航 ── */
.app-header {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 8px 32px rgba(15, 23, 42, 0.04);
}

body.app-theme-dark .app-header {
  background: rgba(2, 6, 23, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 40px rgba(0, 0, 0, 0.35);
}

.header-inner {
  padding: 12px 20px 12px 16px;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-lane-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

body.app-theme-dark .nav-lane-switch {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-lane-tab {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--orbvop-text-muted, #64748b);
  transition: color var(--orb-duration-fast), background var(--orb-duration-fast), box-shadow var(--orb-duration-fast);
}

.nav-lane-tab.is-active {
  color: var(--orbvop-text, #0f172a);
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

body.app-theme-dark .nav-lane-tab.is-active {
  color: #f1f5f9;
  background: rgba(51, 65, 85, 0.9);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.nav-item {
  font-weight: 500;
  color: #64748b;
  transition: color var(--orb-duration-fast);
}

.nav-item.active {
  color: var(--orb-primary, #6366f1);
  font-weight: 600;
}

.nav-cross-link .nav-cross-btn {
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: rgba(99, 102, 241, 0.06);
  transition: background var(--orb-duration-fast), border-color var(--orb-duration-fast);
}

.nav-cross-link .nav-cross-btn:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.35);
}

.header-right .header-auth-entry {
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
  transition: transform var(--orb-duration-fast), box-shadow var(--orb-duration-fast);
}

.header-right .header-auth-entry:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

/* ── 落地页 Hero：信任条 + CTA ── */
.hero-trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 4px;
  row-gap: 12px;
  margin: 4px 0 22px;
  max-width: 640px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.86);
  letter-spacing: 0.01em;
  padding: 0 12px;
  line-height: 1.2;
}

.hero-trust-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.95;
  color: #67e8f9;
}

.hero-trust-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.55);
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .hero-trust-dot {
    display: none;
  }
  .hero-trust-item {
    padding: 0 6px;
  }
}

.hero-upload.hero-cta-primary {
  border-radius: 18px;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(99, 102, 241, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-upload.hero-cta-primary:hover {
  transform: translateY(-3px);
  box-shadow:
    0 26px 70px rgba(99, 102, 241, 0.28),
    0 0 0 1px rgba(99, 102, 241, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.lp-section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

/* 落地页大标题：覆盖上方通用缩小规则，与 --lp-section-title-size 对齐 */
.landing-page .lp-section-header h2,
.landing-page .orbvop-compare-header h2 {
  font-size: var(--lp-section-title-size, clamp(28px, 3.6vw, 40px));
  font-weight: var(--lp-section-title-weight, 800);
  letter-spacing: var(--lp-section-title-tracking, -0.03em);
  line-height: var(--lp-section-title-line, 1.22);
}

.lp-section-header p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(203, 213, 225, 0.88);
}

.stat-item,
.feature-card,
.lp-case-card {
  border-radius: var(--orb-radius-lg, 16px);
  transition: transform var(--orb-duration-normal) var(--orb-ease-out),
    box-shadow var(--orb-duration-normal) var(--orb-ease-out);
}

.stat-item:hover,
.feature-card:hover {
  transform: translateY(-2px);
}

/* ── 页脚：多栏 SaaS 布局 ── */
.site-footer.saas-footer {
  padding: 56px 24px 72px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.5) 100%);
}

.saas-footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  text-align: left;
}

@media (min-width: 768px) {
  .saas-footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    align-items: start;
  }
}

.saas-footer-brand-block .footer-brand {
  font-size: 1.25rem;
  display: inline-block;
  margin-bottom: 10px;
}

.saas-footer-tagline {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(203, 213, 225, 0.75);
  max-width: 280px;
}

.saas-footer-col h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.9);
  margin-bottom: 12px;
}

.saas-footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saas-footer-links a {
  font-size: 13px;
  color: rgba(226, 232, 240, 0.78);
  text-decoration: none;
  transition: color var(--orb-duration-fast);
}

.saas-footer-links a:hover {
  color: #f8fafc;
}

.saas-footer-meta {
  max-width: 1100px;
  margin: 36px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.saas-footer-compliance {
  max-width: 36rem;
  margin: 0 auto 10px;
  font-size: 11px;
  line-height: 1.55;
  color: rgba(148, 163, 184, 0.68);
}

.saas-footer-bottom {
  margin: 0;
  padding-top: 0;
  border-top: none;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.75);
}

/* ── 工作流页通用壳（上传 / 处理同宽，避免点击「开始处理」后卡片跳宽） ── */
:root {
  --orb-workflow-shell-max: 72rem;
}

.saas-page-shell {
  max-width: var(--orb-workflow-shell-max);
  margin-left: auto;
  margin-right: auto;
}

.saas-page-header {
  margin-bottom: 1.75rem;
}

.saas-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orb-primary, #6366f1);
  margin-bottom: 8px;
}

body.app-theme-dark .saas-eyebrow {
  color: #a5b4fc;
}

.saas-page-header h1 {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--orbvop-text, #0f172a);
  line-height: 1.2;
}

body.app-theme-dark .saas-page-header h1 {
  color: #f1f5f9;
}

.saas-page-header .saas-lead {
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--orbvop-text-muted, #64748b);
  max-width: 36rem;
}

.saas-empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
}

.saas-empty-state .saas-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orb-primary-muted, rgba(99, 102, 241, 0.12));
  color: var(--orb-primary, #6366f1);
}

body[data-view="upload-flow"] .upload-flow {
  max-width: min(var(--orb-workflow-shell-max), calc(100vw - 1.25rem));
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  body[data-view="upload-flow"] .upload-flow {
    max-width: min(var(--orb-workflow-shell-max), calc(100vw - 2rem));
  }
}

body[data-view="upload-flow"] .upload-flow-atmo--surface {
  box-shadow: var(--orb-shadow-md);
}

body[data-view="processing"] .processing-phase-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── 玻璃面板统一质感 ── */
.glass,
.glass.rounded-2xl,
.glass.rounded-3xl {
  box-shadow: var(--orb-shadow-sm);
  border: 1px solid var(--orb-glass-border, rgba(255, 255, 255, 0.1));
}

body.app-theme-light .glass {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

/* ── 主按钮 ── */
.grad-btn,
.cta-btn {
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 12px;
  transition: transform var(--orb-duration-fast), box-shadow var(--orb-duration-fast);
}

.grad-btn:hover:not(:disabled),
.cta-btn:hover {
  transform: translateY(-1px);
}

/* ── Toast：产品级通知（挂 #toast-root，整层高于 #modal-root） ── */
.orb-toast {
  position: fixed;
  top: calc(var(--app-header-offset, 90px) + 12px);
  right: 16px;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--orb-shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.orb-toast--success {
  background: rgba(6, 78, 59, 0.92);
  color: #ecfdf5;
  border-color: rgba(52, 211, 153, 0.35);
}

.orb-toast--error {
  background: rgba(127, 29, 29, 0.92);
  color: #fef2f2;
  border-color: rgba(248, 113, 113, 0.35);
}

.orb-toast--warning {
  background: rgba(120, 53, 15, 0.92);
  color: #fffbeb;
  border-color: rgba(251, 191, 36, 0.35);
}

.orb-toast--info {
  background: rgba(30, 41, 59, 0.94);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.25);
}

body.app-theme-light .orb-toast--info {
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  border-color: rgba(15, 23, 42, 0.1);
}

.orb-toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.orb-toast__message {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.orb-toast__close {
  flex-shrink: 0;
  padding: 4px;
  border-radius: 8px;
  opacity: 0.75;
  transition: opacity var(--orb-duration-fast), background var(--orb-duration-fast);
}

.orb-toast__close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

/* ── 账户页卡片 ── */
.auth-page-wrap .auth-card,
.auth-page-wrap .glass {
  border-radius: 20px;
  box-shadow: var(--orb-shadow-lg);
}

/* ── 视图切换更顺滑 ── */
.view-enter-active,
.view-leave-active {
  transition: opacity var(--orb-duration-normal) var(--orb-ease-out),
    transform var(--orb-duration-normal) var(--orb-ease-out);
}

.view-enter-from,
.view-leave-to {
  opacity: 0;
  transform: translateY(8px);
}

/* ── CTA 区块强化 ── */
.cta-section .cta-btn {
  min-height: 52px;
  padding-left: 28px;
  padding-right: 28px;
  font-size: 15px;
  border-radius: 14px;
}

/* ── 草稿表格：表头更像 SaaS 列表 ── */
.drafts-page table thead tr {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.drafts-page tbody tr {
  cursor: pointer;
}

.drafts-page tbody tr:focus-within {
  outline: 2px solid rgba(99, 102, 241, 0.35);
  outline-offset: -2px;
}

/* 草稿列表：比上传壳更宽，八语文案/多按钮时避免表格拉塌裁切 */
.drafts-page.saas-page-shell,
.drafts-page-shell {
  max-width: min(96rem, calc(100vw - 1.5rem));
  width: 100%;
}

.drafts-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.drafts-table {
  min-width: 1280px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.drafts-table th,
.drafts-table td {
  vertical-align: top;
}

.drafts-table th {
  white-space: nowrap;
}

.drafts-table th:nth-child(1),
.drafts-table td:nth-child(1) {
  min-width: 14rem;
  max-width: 22rem;
}

.drafts-table th:nth-child(2),
.drafts-table td:nth-child(2) {
  min-width: 8.5rem;
}

.drafts-table th:nth-child(3),
.drafts-table td:nth-child(3) {
  min-width: 6.5rem;
}

.drafts-table th:nth-child(4),
.drafts-table td:nth-child(4) {
  min-width: 4rem;
}

.drafts-table th:nth-child(5),
.drafts-table td:nth-child(5) {
  min-width: 10.5rem;
}

.drafts-table th:nth-child(6),
.drafts-table td:nth-child(6) {
  min-width: 11rem;
}

.drafts-table th:nth-child(7),
.drafts-table td:nth-child(7) {
  min-width: 22rem;
}

.drafts-table td:nth-child(7) {
  overflow: visible;
}

.drafts-table .draft-appeal-cell {
  min-width: 10.5rem;
}

.draft-file-cell {
  min-width: 0;
}

.draft-file-cell__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.35;
}

.draft-file-cell__id {
  display: block;
  margin-top: 0.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.3;
  color: rgb(100, 116, 139);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

body.app-theme-dark .draft-file-cell__id {
  color: rgb(148, 163, 184);
}

/* 封面就绪摘要：横向胶囊，避免表列挤压时竖排绿条 */
.draft-cover-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin-top: 0.375rem;
}

.draft-cover-chip {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  max-width: 100%;
  padding: 0.15rem 0.55rem 0.15rem 0.4rem;
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.95);
  color: rgb(51, 65, 85);
  font-size: 11px;
  font-weight: 550;
  line-height: 1.25;
  white-space: nowrap;
}

.draft-cover-chip__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: rgb(16, 185, 129);
  flex-shrink: 0;
}

.draft-cover-chip__text {
  overflow: hidden;
  text-overflow: ellipsis;
}

body.app-theme-dark .draft-cover-chip {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.75);
  color: rgb(203, 213, 225);
}

body.app-theme-dark .draft-cover-chip__dot {
  background: rgb(52, 211, 153);
}

.draft-cover-meta__link {
  font-size: 11px;
  font-weight: 600;
  color: rgb(79, 70, 229);
  white-space: nowrap;
  flex: 0 0 auto;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.draft-cover-meta__link:hover {
  text-decoration: underline;
}

.draft-cover-meta__link--gallery {
  color: rgb(71, 85, 105);
}

.draft-cover-meta__link--muted {
  color: rgb(100, 116, 139);
  font-weight: 600;
}

body.app-theme-dark .draft-cover-meta__link {
  color: rgb(165, 180, 252);
}

body.app-theme-dark .draft-cover-meta__link--gallery,
body.app-theme-dark .draft-cover-meta__link--muted {
  color: rgb(148, 163, 184);
}

/* ── Upload / editor wizard polish ── */
.upload-wizard-footer {
  position: static;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem 1.125rem;
  margin-top: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: #fafafa;
  backdrop-filter: none;
  flex-shrink: 0;
}

body.app-theme-dark .upload-wizard-footer {
  border-top-color: rgba(255, 255, 255, 0.06);
  background: rgba(15, 23, 42, 0.45);
}

.saas-page-header--upload {
  margin-bottom: 0;
}

.saas-page-header--upload .saas-lead {
  max-width: 32rem;
}

.saas-page-header--upload .saas-lead-sub {
  display: none;
}

.editor-header-row {
  flex-wrap: nowrap;
}

@media (max-width: 639px) {
  .editor-header-row {
    flex-wrap: wrap;
  }
}

