/* 云票达 · 发票上传（生产）— 样式复制自 preview-home-99 定稿，无 preview-strip */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #3b6df0;
  --primary-light: #e8edfe;
  --primary-dark: #2b54c8;
  --surface: #ffffff;
  --bg: #f5f6fa;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(59,109,240,0.12);
  --shadow-xl: 0 20px 48px rgba(0,0,0,0.12);
  --preview-h: 0px;
  --sidebar-w: 248px;
  --content-max: 920px;
  --help-rail-min: 280px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  overflow: hidden;
  padding-top: 0;
}

a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* 预览条（正式版无） */
.preview-strip {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--preview-h);
  background: linear-gradient(90deg, #2b54c8, var(--primary));
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 1100;
}
.preview-strip a { color: #fff; text-decoration: underline; }

/* 侧栏 */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10;
}
.sidebar-logo {
  padding: 18px 22px 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.sidebar-logo .brand { font-size: 21px; font-weight: 700; }
.sidebar-logo .sub { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 8px 14px; list-style: none; display: flex; flex-direction: column; }
.sidebar-nav a,
.sidebar-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  margin-bottom: 2px;
  transition: all 0.15s;
  cursor: pointer;
  font-family: inherit;
}
.sidebar-nav a:hover,
.sidebar-nav button:hover { background: var(--primary-light); color: var(--primary); }
.sidebar-nav a.active,
.sidebar-nav button.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}
.sidebar-nav .dot-badge {
  margin-left: auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  display: none;
}
.sidebar-nav .dot-badge.show { display: block; }
.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.sidebar-footer button {
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
}
.sidebar-footer button:hover { color: var(--danger); }

/* 侧栏右侧：收窄主区 + 右侧帮助留白 */
.app-shell {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  height: 100vh;
  display: flex;
  overflow: hidden;
}

.main {
  flex: 0 1 var(--content-max);
  width: 100%;
  max-width: var(--content-max);
  min-width: 0;
  height: 100%;
  padding: 20px 28px 14px;
  background: transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.help-rail {
  flex: 1;
  min-width: var(--help-rail-min);
  position: relative;
  background: transparent;
}

.help-panel {
  position: absolute;
  top: 20px;
  left: 12px;
  right: 12px;
  bottom: 96px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px 18px;
  overflow-y: auto;
  transform: translateX(105%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
  z-index: 2;
}
.help-rail.open .help-panel {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.help-panel h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.help-panel .help-close {
  border: none;
  background: var(--bg);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
}
.help-panel .help-close:hover { color: var(--text); }
.help-panel ul {
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.help-panel li { margin-bottom: 10px; padding-left: 14px; position: relative; }
.help-panel li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}
.help-panel a { font-weight: 600; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.topbar h1 { font-size: 22px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 16px; }

.current-client {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}
.current-client:hover { box-shadow: var(--shadow-sm); }
.current-client .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.current-client .name {
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-badge {
  font-size: 12px;
  color: var(--success);
  background: #ecfdf5;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card .label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.stat-card .value { font-size: 22px; font-weight: 700; }
.stat-card .sub { font-size: 11px; color: var(--success); margin-top: 4px; }

.process-flow {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 24px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.process-flow .title { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; font-weight: 500; }
.process-flow-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.process-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.process-steps::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 60px;
  right: 60px;
  height: 4px;
  background: #bdc1c6;
  border-radius: 3px;
  z-index: 0;
}
.process-steps::after {
  content: '';
  position: absolute;
  top: 24px;
  left: 60px;
  width: var(--progress, 0%);
  height: 4px;
  background: #3b6df0;
  border-radius: 3px;
  z-index: 1;
  transition: width 0.5s ease;
  box-shadow: 0 0 6px rgba(59, 109, 240, 0.35);
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  flex: 1;
}
.step-item .num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.3s;
}
.step-item.active .num {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59,109,240,0.3);
}
.step-item.completed .num {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}
.step-item .label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.step-item.active .label { color: var(--primary); font-weight: 600; }

.upload-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.recognize-result {
  margin: 18px;
  padding: 28px 24px 24px;
  text-align: center;
  border: 1.5px solid #bbf7d0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
  animation: recognizeResultIn 0.35s ease;
}

@keyframes recognizeResultIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.recognize-result-icon { font-size: 44px; margin-bottom: 12px; }
.recognize-result h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.recognize-result-lead {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.recognize-result-next {
  font-size: 13px;
  line-height: 1.55;
  color: var(--primary);
  background: var(--primary-light);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.recognize-result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.recognize-result-actions .btn-primary {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
}
.recognize-result-actions .btn-ghost { width: 100%; }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  margin: 18px 18px 0;
  padding: 24px 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafbfc;
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-lg);
}
.upload-zone.has-files {
  border-style: solid;
  border-color: var(--success);
  background: #f0fdf4;
  padding: 28px;
}
.upload-zone.has-files .sample-preview { display: none; }
.upload-zone .icon-upload {
  width: 64px; height: 64px;
  margin: 0 auto 12px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: transform 0.3s;
}
.upload-zone:hover .icon-upload { transform: scale(1.1); }
.upload-zone h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.upload-zone p { font-size: 14px; color: var(--text-secondary); margin-bottom: 2px; }
.upload-zone .formats { font-size: 12px; color: #9ca3af; margin-top: 12px; }
.upload-zone .paste-hint { font-size: 12px; color: #9ca3af; margin-top: 8px; }
.upload-zone .paste-hint kbd {
  background: #e5e7eb;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  border: 1px solid #d1d5db;
}
.upload-zone .demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s;
}
.upload-zone .demo-btn:hover { background: var(--primary-light); border-color: var(--primary); }

.sample-preview {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  flex-shrink: 0;
}
.sample-preview .sample-img {
  width: 72px; height: 88px;
  background: linear-gradient(135deg, #e8edfe 0%, #f0f4ff 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border: 1px dashed var(--border);
  transform: rotate(-5deg);
  animation: float 3s ease-in-out infinite;
}
.sample-preview .sample-img:nth-child(2) { transform: rotate(3deg); animation-delay: 0.5s; }
.sample-preview .sample-img:nth-child(3) { transform: rotate(-8deg); animation-delay: 1s; }
.upload-zone.has-files .sample-preview { display: none; }

@keyframes float {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50% { transform: rotate(-5deg) translateY(-8px); }
}

.file-list { margin: 0 28px 20px; display: none; }
.file-list.show { display: block; }
.file-list .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.file-list .header span { font-size: 14px; font-weight: 600; }
.file-list .header .count { color: var(--primary); }
.file-items { max-height: 240px; overflow-y: auto; }
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 14px;
}
.file-item .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-item .fsize { color: var(--text-secondary); font-size: 12px; }
.file-item .remove { cursor: pointer; color: var(--text-secondary); font-size: 20px; border: none; background: none; }
.file-item .remove:hover { color: var(--danger); }

.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px 16px;
  gap: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: #3b6df0;
  color: #fff;
  font-size: 15px;
  padding: 12px 36px;
  box-shadow: 0 4px 12px rgba(59, 109, 240, 0.35);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 109, 240, 0.45);
}
.btn-primary:not(:disabled) {
  opacity: 1;
}
.btn-primary:disabled {
  background: #3b6df0;
  color: #fff;
  opacity: 0.9;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 3px 10px rgba(59, 109, 240, 0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-weight: 500;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.help-fab {
  position: absolute;
  bottom: 32px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 20px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 3;
}
.help-fab:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}
.help-rail.open .help-fab {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 引导弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
  padding: 16px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 90%;
  max-width: 540px;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 { font-size: 19px; font-weight: 700; }
.modal-header .header-actions { display: flex; align-items: center; gap: 8px; }
.modal-header .skip-later {
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: none;
}
.modal-header .skip-later:hover { background: var(--bg); color: var(--text); }
.modal-header .skip-done {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--primary-light);
}
.modal-header .skip-done:hover { background: #dce6fd; }
.guide-finish-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 14px;
  line-height: 1.5;
}
.modal-body { padding: 24px 28px; }
.onboarding-step { display: none; text-align: center; }
.onboarding-step.active { display: block; }
.onboarding-step .icon {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}
.onboarding-step h3 { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.onboarding-step p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 0; }
.onboarding-step p kbd {
  background: #e5e7eb;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  border: 1px solid #d1d5db;
}
.onboarding-step .gif-area {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin: 16px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.onboarding-step .gif-area .arrow {
  font-size: 22px;
  color: var(--primary);
  animation: guidePulse 1.5s ease-in-out infinite;
}
.onboarding-step .gif-chip {
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}
.onboarding-step .gif-chip.ok {
  background: #d1fae5;
  border-color: #a7f3d0;
  color: #065f46;
}
.onboarding-step .gif-chip.brand {
  background: var(--primary-light);
  border-color: #c7d6fc;
  color: var(--primary);
}
@keyframes guidePulse {
  0%, 100% { opacity: 0.45; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(4px); }
}
.modal-footer {
  padding: 12px 28px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.modal-footer .footer-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.modal-footer .btn-prev {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
}
.modal-footer .btn-prev:hover:not(:disabled) { background: var(--bg); color: var(--text); }
.modal-footer .btn-prev:disabled { opacity: 0.4; cursor: not-allowed; }
.guide-step-badge {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}
.step-dots { display: flex; gap: 8px; }
.step-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: all 0.3s; }
.step-dots span.on { width: 24px; border-radius: 4px; background: var(--primary); }

.toast {
  position: fixed;
  top: calc(var(--preview-h) + 16px);
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s;
  pointer-events: none;
  z-index: 999;
  max-width: 360px;
}
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast.success { border-color: var(--success); background: #ecfdf5; }
.toast.warn { border-color: var(--warning); background: #fef7e0; }
.toast.err { background: var(--danger); color: #fff; border-color: var(--danger); }
.toast .undo { margin-left: 8px; color: var(--primary); font-weight: 600; border: none; background: none; cursor: pointer; }

.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 600; overflow: hidden; }
.confetti-piece { position: absolute; font-size: 22px; animation: confetti 1.8s ease-in forwards; }
@keyframes confetti {
  0% { opacity: 1; transform: translateY(0) rotate(0); }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

.mobile-upload-btns { display: none; gap: 10px; margin: 0 28px 16px; }
.mobile-upload-btns .mob-btn {
  flex: 1;
  padding: 14px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
}
.mob-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  z-index: 150;
}
.mob-nav button {
  flex: 1;
  border: none;
  background: none;
  font-size: 10px;
  color: var(--text-secondary);
  padding: 6px 4px;
}
.mob-nav button.active { color: var(--primary); font-weight: 600; }

@media (min-width: 1400px) {
  :root { --content-max: 960px; --help-rail-min: 320px; }
}
@media (max-width: 768px) {
  body { overflow: auto; height: auto; min-height: 100vh; }
  .sidebar { width: 64px; }
  .sidebar-logo .brand, .sidebar-logo .sub { display: none; }
  .sidebar-nav button span.txt,
  .sidebar-nav a span.txt { display: none; }
  .app-shell {
    margin-left: 64px;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .main {
    flex: none;
    max-width: none;
    height: auto;
    overflow: visible;
    padding: 16px 16px calc(80px + env(safe-area-inset-bottom));
  }
  .help-rail { display: none; }
  .upload-card { flex: none; }
  .upload-zone { flex: none; min-height: 200px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .status-badge { display: none; }
  .mobile-upload-btns { display: flex; }
  .mob-nav { display: flex; }
  .help-fab { bottom: calc(72px + env(safe-area-inset-bottom)); right: 16px; }
  .help-fab-mob {
    display: flex;
    position: fixed;
    right: 16px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow);
    font-size: 20px;
    color: var(--primary);
    align-items: center;
    justify-content: center;
    z-index: 100;
  }
  .action-bar { flex-direction: column; }
  .btn-primary { width: 100%; justify-content: center; }
}
.help-fab-mob { display: none; }


/* 生产：隐藏预览 Demo 按钮 */
.demo-btn, #btnLoadDemo { display: none !important; }

/* 生产：客户选择（topbar） */
.current-client .client-select {
  border: none; background: transparent; font-size: 14px; font-weight: 600;
  font-family: inherit; color: var(--text); max-width: 160px;
  cursor: pointer; outline: none;
}
.client-add-inline {
  border: none; background: var(--primary-light); color: var(--primary);
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  margin-left: 4px; flex-shrink: 0;
}
.client-add-inline:hover { background: #d4defb; }
.status-badge.demo { color: var(--warning); background: #fef7e0; }

/* 生产：配额 / 引导 / 票种提示 */
.yunpia-banner-slot { flex-shrink: 0; margin-bottom: 10px; }
.yunpia-banner-slot:empty { display: none; margin: 0; }
.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 8px; line-height: 1.5; }
.alert-danger { background: #fce8e6; color: #c5221f; border: 1px solid #f5c6c2; }
.alert-warn { background: #fef7e0; color: #b06000; border: 1px solid #f9e6b8; }
.alert-info { background: #e8f0fe; color: #1a56db; border: 1px solid #c2d7f7; }
.onboard-welcome { font-size: 14px; color: #0d47a1; margin-bottom: 10px; font-weight: 600; }
.onboard-card { background: linear-gradient(135deg, #e8f0fe, #fff); border: 1px solid #c2d7f7; border-radius: 14px; padding: 14px 16px; }
.onboard-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.onboard-dismiss { border: none; background: transparent; color: #5f6368; font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0; }
.onboard-steps { display: flex; flex-direction: column; gap: 8px; }
.onboard-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid #e8eaed; }
.onboard-step.done { opacity: .85; border-color: #c6e7c9; }
.onboard-step.optional { border-style: dashed; }
.onboard-step-num { width: 28px; height: 28px; border-radius: 50%; background: #e8eaed; color: #5f6368; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.onboard-step.done .onboard-step-num { background: #e6f4ea; color: #137333; }
.onboard-step-body { flex: 1; min-width: 0; }
.onboard-step-title { font-size: 14px; font-weight: 600; }
.onboard-step-hint { font-size: 11px; color: #80868b; margin-top: 2px; }
.onboard-go { flex-shrink: 0; white-space: nowrap; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; text-decoration: none; color: var(--text); }
.photo-tips-card { margin-top: 12px; padding: 0; background: #f8fbff; border: 1px solid #c2d7f7; border-radius: 12px; overflow: hidden; }
.photo-tips-summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; }
.photo-tips-summary::-webkit-details-marker { display: none; }
.photo-tips-toggle-wrap { margin-left: auto; font-size: 12px; color: var(--primary); }
.photo-tips-list { margin: 0; padding: 8px 12px 12px 28px; font-size: 12px; color: var(--text-secondary); line-height: 1.7; }
.ticket-types-hint { flex-shrink: 0; font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.ticket-types-hint summary { cursor: pointer; color: var(--primary); }
.upload-progress { display: none; margin: 0 18px 8px; }
.upload-progress .bar-wrap { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.upload-progress .bar-fill { height: 100%; width: 0%; background: var(--primary); transition: width 0.2s; }
.upload-progress .txt { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.pending-inline { font-size: 13px; color: var(--text-secondary); }
.pending-inline a { font-weight: 600; }
#photoTipsMount { margin-top: 12px; font-size: 13px; color: var(--text-secondary); }
#photoTipsMount:empty { display: none; }

/* 生产：添加客户弹窗（沿用 app 表单类名） */
.modal-overlay.prod-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center;
  z-index: 2000; backdrop-filter: blur(4px); padding: 16px;
}
.modal-overlay.prod-modal.show { display: flex; }
.prod-modal .modal-card {
  background: var(--surface); border-radius: var(--radius);
  width: 100%; max-width: 480px; max-height: 90vh; overflow: auto;
  box-shadow: var(--shadow-xl); padding: 20px;
}
.prod-modal .card-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.prod-modal .form-group { margin-bottom: 14px; }
.prod-modal .form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.prod-modal .form-group input, .prod-modal .form-group select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
}
.prod-modal .modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.prod-modal .hint-text { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }

@media (max-width: 768px) {
  .sidebar-nav a span.txt,
  .sidebar-nav button span.txt { display: none; }
}
