/* Promiso R6 adoption: page layout and state styles; shared palette in promiso-tokens.css. */
/* 泰文字体（T5.4）：自托管 Noto Sans Thai variable font（wght 100~900，单文件）。
   泰文有上下叠字/声调符号，系统默认字体易错位，须专门引入。 */
* {
  box-sizing:border-box;
  margin:0;
  padding:0;
}

html,
body {
  height:100%;
}

body {
  font-family:var(--font);
  font-size:1rem;
  line-height:1.6;
  color:var(--text);
  background:var(--paper);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}

/* 布局容器 */
.page {
  max-width:720px;
  margin:0 auto;
  padding:24px var(--inset) 56px;
  display:flex;
  flex-direction:column;
  gap:24px;
}

/* 品牌区 */
.brand {
  text-align:center;
}

.brand-logo {
  width:52px;
  height:52px;
  margin:0 auto 12px;
  border-radius:var(--radius);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:26px;
  font-weight:600;
  color:var(--text-invert);
  background:var(--accent);
  box-shadow:none;
}

.brand-name {
  font-size:24px;
  font-weight:600;
  letter-spacing:normal;
}

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

/* 玻璃拟态卡片 */
.card {
  background:transparent;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  border:0;
  border-radius:0;
  box-shadow:none;
  padding:0;
}

.card-title {
  font-size:22px;
  font-weight:600;
}

.card-subtitle {
  font-size:14px;
  color:var(--text-muted);
  margin:4px 0 20px;
}

/* 表单 */
.form {
  display:flex;
  flex-direction:column;
  gap:16px;
}

.field {
  display:flex;
  flex-direction:column;
  gap:6px;
}

.field-label {
  font-size:.875rem;
  font-weight:600;
  color:var(--text-muted);
}

/* 必填标记 */
.required-mark {
  color:var(--danger);
  margin-left:2px;
  font-weight:600;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width:100%;
  min-height:46px;
  padding:0 14px;
  font-size:1rem;
  font-family:var(--font);
  color:var(--text);
  background:var(--paper);
  border:1px solid var(--input-line);
  border-radius:var(--radius-sm);
  outline:none;
  transition:border-color 0.2s, box-shadow 0.2s;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
  border-color:var(--primary);
  box-shadow:none;
}

/* 按钮 */
.btn {
  min-height:46px;
  padding:0 20px;
  font-size:1rem;
  font-weight:600;
  font-family:var(--font);
  border:none;
  border-radius:var(--radius-sm);
  cursor:pointer;
  transition:transform 0.15s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
}

.btn:active {
  transform:translateY(1px);
}

.btn:disabled {
  opacity:0.6;
  cursor:not-allowed;
}

.btn-primary {
  color:var(--text-invert);
  background:var(--accent);
  box-shadow:none;
}

.btn-primary:hover:not(:disabled) {
  box-shadow:none;
  background:var(--accent);
}

.btn-ghost {
  color:var(--text);
  background:var(--paper);
  border:1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background:var(--paper);
  box-shadow:none;
}

/* 提示 / 错误 */
.hint {
  font-size:.875rem;
  color:var(--text-muted);
}

.error {
  min-height:20px;
  margin-top:12px;
  font-size:.875rem;
  color:var(--danger);
}

.loading {
  color:var(--text-muted);
  text-align:center;
  padding:24px 0;
}

/* 页头（向导） */
.wizard-header .brand-row {
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:16px;
}

.wizard-header .brand-logo {
  width:44px;
  height:44px;
  margin:0;
  font-size:22px;
  border-radius:var(--radius);
}

.wizard-header .brand-name {
  font-size:18px;
}

.wizard-header .brand-sub {
  font-size:.875rem;
}

.wizard-title {
  font-size:24px;
  font-weight:600;
}

.wizard-subtitle {
  font-size:14px;
  color:var(--text-muted);
  margin-top:2px;
}

/* 步骤指示器 */
.steps {
  list-style:none;
  display:flex;
  gap:0;
  padding:0 4px;
}

.step {
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  position:relative;
  font-size:.875rem;
  color:var(--text-muted);
}

.step:not(:last-child)::after {
  content:"";
  position:absolute;
  top:15px;
  left:calc(50% + 16px);
  right:calc(-50% + 16px);
  height:2px;
  background:var(--wash);
  transition:background 0.3s;
}

.step.done:not(:last-child)::after,
.step.active:not(:last-child)::after {
  background:var(--primary-light);
}

.step-dot {
  width:30px;
  height:30px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.875rem;
  font-weight:600;
  background:var(--wash);
  color:var(--text-muted);
  transition:all 0.3s;
}

.step.active .step-dot {
  background:var(--paper);
  color:var(--paper);
  box-shadow:none;
}

.step.done .step-dot {
  background:var(--success);
  color:var(--paper);
}

.step.active .step-label {
  color:var(--primary-dark);
  font-weight:600;
}

/* ⚠️ [hidden] 兜底：HTML hidden 属性的默认 display:none 会被 .panel/.section 等
   display:flex 类规则覆盖，导致带 hidden 的步骤面板全部平铺显示（T4.2 生产事故）。
   这里用 !important 强制：凡带 hidden 属性的元素一律不显示。 */
[hidden] {
  display:none !important;
}

/* 面板 */
.panel {
  display:flex;
  flex-direction:column;
  gap:16px;
}

.panel-title {
  font-size:18px;
  font-weight:600;
}

.panel-actions {
  display:flex;
  gap:12px;
  justify-content:space-between;
  margin-top:4px;
}

.panel-actions .btn {
  flex:1;
}

.panel-actions .btn:only-child {
  flex:none;
  width:100%;
}

/* 协议 iframe */
.agreement-wrap {
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  overflow:hidden;
  background:var(--paper);
}

.agreement-frame {
  width:100%;
  height:420px;
  border:none;
  display:block;
}

/* 同意复选框行 */
.agree-row {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:14px;
  cursor:pointer;
  user-select:none;
}

.agree-row input {
  width:18px;
  height:18px;
  accent-color:var(--primary);
}

/* 开关 */
.switch-row {
  display:flex;
  align-items:center;
  gap:12px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  user-select:none;
}

.switch-row input {
  display:none;
}

.switch-ui {
  width:46px;
  height:26px;
  border-radius:3px;
  background:var(--wash);
  position:relative;
  transition:background 0.25s;
  flex-shrink:0;
}

.switch-ui::after {
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:20px;
  height:20px;
  border-radius:50%;
  background:var(--paper);
  box-shadow:none;
  transition:transform 0.25s;
}

.switch-row input:checked + .switch-ui {
  background:var(--primary);
}

.switch-row input:checked + .switch-ui::after {
  transform:translateX(20px);
}

/* 上传 */
.upload-row {
  display:flex;
  flex-direction:column;
  gap:8px;
}

.upload-actions {
  display:flex;
  align-items:center;
  gap:12px;
}

.upload-status {
  font-size:.875rem;
  color:var(--success);
}

/* 签名区（步骤三）：页面内直接签名，锁竖屏 */
.signature-wrap {
  border:2px dashed var(--line);
  border-radius:var(--radius-sm);
  background:var(--paper);
  overflow:hidden;
}

.signature-canvas {
  width:100%;
  height:200px;
  display:block;
  touch-action:none;  /* 防移动端触摸时页面滚动/缩放 */
  cursor:crosshair;
}

.signature-toolbar {
  display:flex;
  justify-content:flex-start;
}

@media (max-width: 480px) {
  .signature-canvas {
    height:220px;
  }
}

/* 汇总 */
.summary {
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:10px;
  background:var(--wash);
  border-radius:var(--radius-sm);
  padding:16px 18px;
}

.summary li {
  display:flex;
  justify-content:space-between;
  font-size:14px;
}

.summary-key {
  color:var(--text-muted);
}

.summary-val {
  font-weight:600;
}

/* 完成标记 */
.done-mark {
  width:64px;
  height:64px;
  margin:8px auto 4px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:32px;
  color:var(--paper);
  background:var(--paper);
  box-shadow:none;
  animation:pop 0.4s ease;
}

@keyframes pop {
  0% {
    transform:scale(0.6);
    opacity:0;
  }
  100% {
    transform:scale(1);
    opacity:1;
  }
}

/* 响应式 */
@media (max-width: 480px) {
  .page {
    padding:24px 14px 48px;
  }

  .card {
    padding:0;
  }

  .agreement-frame {
    height:360px;
  }
}

/* ==========================================================================
   工作台主页（T4.7）
   ========================================================================== */

.home-signout {
  margin-left:auto;
  flex-shrink:0;
  font-size:.875rem;
  padding:6px 12px;
}

.home-menu {
  display:flex;
  flex-direction:column;
  gap:14px;
}

.home-menu-item {
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--paper);
  text-decoration:none;
  color:var(--text);
  transition:transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.home-menu-item:hover {
  transform:translateY(-2px);
  box-shadow:none;
  border-color:var(--primary);
}

.home-menu-icon {
  width:44px;
  height:44px;
  border-radius:var(--radius);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  line-height:1;
  color:var(--paper);
  background:var(--paper);
  flex-shrink:0;
}

.home-menu-body {
  display:flex;
  flex-direction:column;
  gap:3px;
  flex:1;
}

.home-menu-title {
  font-size:16px;
  font-weight:600;
}

.home-menu-desc {
  font-size:.875rem;
  color:var(--text-muted);
}

.home-menu-arrow {
  font-size:22px;
  color:var(--text-muted);
  flex-shrink:0;
}

.home-coming {
  margin-top:14px;
  color:var(--text-muted);
  font-size:.875rem;
  text-align:center;
}

/* ==========================================================================
   进件页（T4.7）
   ========================================================================== */

/* 下拉 / 数字输入：对齐既有 input 样式 */
select,
input[type="number"] {
  width:100%;
  min-height:46px;
  padding:0 14px;
  font-size:1rem;
  font-family:var(--font);
  color:var(--text);
  background:var(--paper);
  border:1px solid var(--input-line);
  border-radius:var(--radius-sm);
  outline:none;
  transition:border-color 0.2s, box-shadow 0.2s;
  appearance:none;
  -webkit-appearance:none;
}

select {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2362ace1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  padding-right:40px;
  cursor:pointer;
}

select:focus,
input[type="number"]:focus {
  border-color:var(--primary);
  box-shadow:none;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance:none;
  margin:0;
}

/* 进件表单容器 */
.order-form {
  display:flex;
  flex-direction:column;
  gap:26px;
}

.order-section {
  display:flex;
  flex-direction:column;
  gap:12px;
}

/* 进件页分组标题 */
.order-section-title {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:16px;
  font-weight:600;
  margin-bottom:4px;
}

.order-section-num {
  width:22px;
  height:22px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:.875rem;
  font-weight:600;
  color:var(--paper);
  background:var(--paper);
  flex-shrink:0;
}

/* 多设备卡片 */
.device-list {
  display:flex;
  flex-direction:column;
  gap:14px;
}

.device-card {
  border:0;
  border-radius:0;
  padding:0;
  background:transparent;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.device-card-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.device-card-title {
  font-size:14px;
  font-weight:600;
  color:var(--primary-dark);
}

.btn-remove {
  font-size:.875rem;
  font-weight:600;
  color:var(--danger);
  background:none;
  border:none;
  cursor:pointer;
  padding:4px 8px;
  border-radius:var(--radius);
}

.btn-remove:hover {
  background:var(--wash);
}

.device-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.field-span-2 {
  grid-column:1 / -1;
}

/* 更换零件多选 */
.replaced-parts {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.part-chip {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 12px;
  border:1px solid var(--border);
  border-radius:3px;
  background:var(--wash);
  font-size:.875rem;
  cursor:pointer;
  user-select:none;
  transition:background 0.2s, border-color 0.2s;
}

.part-chip input[type="checkbox"] {
  width:16px;
  height:16px;
  margin:0;
  accent-color:var(--primary, var(--accent));
}

.part-chip:has(input:checked) {
  background:var(--wash);
  border-color:var(--primary, var(--accent));
}

.part-other-input {
  flex-basis:100%;
  margin-top:4px;
}

/* 添加设备按钮 */
.btn-add {
  width:100%;
  min-height:46px;
  border:1.5px dashed var(--line);
  background:var(--wash);
  border-radius:var(--radius-sm);
  color:var(--primary-dark);
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:background 0.2s;
}

.btn-add:hover {
  background:var(--wash);
}

/* 方案概览 */
.preview {
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:10px;
  background:var(--wash);
  border-radius:var(--radius-sm);
  padding:16px 18px;
}

.preview li {
  display:flex;
  justify-content:space-between;
  font-size:14px;
}

.preview-key {
  color:var(--text-muted);
}

.preview-val {
  font-weight:600;
}

.preview-val.preview-val--accent {
  color:var(--primary-dark);
  font-size:16px;
}

/* 报价单 */
.quote {
  background:var(--paper);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  overflow:hidden;
}

.quote-hero {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  padding:20px 16px 16px;
  background:var(--paper);
}

.quote-hero-label {
  font-size:.875rem;
  color:var(--text-muted);
}

.quote-hero-amount {
  font-size:30px;
  font-weight:600;
  color:var(--primary-dark);
  letter-spacing:normal;
}

.quote-lines {
  list-style:none;
  padding:4px 16px;
  margin:0;
}

.quote-lines li {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:11px 0;
  font-size:14px;
  border-bottom:1px solid var(--line);
}

.quote-lines li:last-child {
  border-bottom:none;
}

.quote-lines li b {
  font-weight:600;
}

.quote-lines .quote-total {
  border-top:0;
  border-bottom:none;
  margin-top:0;
}

.quote-lines .quote-total b {
  color:var(--primary-dark);
  font-size:16px;
}

/* 逐期明细 */
.quote-schedule {
  padding:0 16px 12px;
}

.quote-schedule-list {
  list-style:none;
  margin:0;
  padding:0;
  max-height:220px;
  overflow-y:auto;
}

.quote-schedule-list li {
  display:flex;
  justify-content:space-between;
  padding:8px 0;
  font-size:.875rem;
  color:var(--text-muted);
  border-bottom:1px dashed var(--line);
}

.quote-schedule-list li:last-child {
  border-bottom:none;
}

.quote-schedule-list li span:last-child {
  color:var(--text);
  font-weight:500;
}

/* 门店佣金（默认折叠） */
.quote-commission {
  border-top:1px solid var(--line);
}

.quote-commission summary {
  list-style:none;
  cursor:pointer;
  padding:12px 16px;
  font-size:14px;
  font-weight:600;
  color:var(--text-muted);
  display:flex;
  align-items:center;
  gap:6px;
  user-select:none;
}

.quote-commission summary::-webkit-details-marker {
  display:none;
}

.quote-commission-body {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 16px 14px;
  font-size:14px;
}

.quote-commission-body b {
  color:var(--success);
  font-size:16px;
}

/* 空态 */
.order-empty {
  color:var(--text-muted);
  font-size:.875rem;
  text-align:center;
  padding:12px 0;
}

/* 底部操作区（sticky，随滚动固定） */
.order-actions {
  display:flex;
  gap:12px;
  position:sticky;
  bottom:0;
  padding:14px 0 4px;
  background:var(--paper);
}

.order-actions .btn {
  flex:1;
}

/* 进件终态 */
.order-done {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  text-align:center;
  padding:12px 0;
}

.order-no {
  font-size:16px;
  font-weight:600;
  color:var(--primary-dark);
  letter-spacing:normal;
  background:var(--wash);
  border-radius:var(--radius);
  padding:10px 18px;
}

@media (max-width: 480px) {
  .device-grid {
    grid-template-columns:1fr;
  }

  .field-span-2 {
    grid-column:auto;
  }
}

/* ==========================================================================
   订单列表页（T4.8）
   ========================================================================== */

/* 三态容器 */
.orders-state {
  min-height:120px;
}

/* 空态 / 错误态 */
.orders-empty {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  text-align:center;
  padding:28px 8px;
}

.orders-empty-mark {
  width:60px;
  height:60px;
  border-radius:var(--radius);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  color:var(--primary-dark);
  background:var(--paper);
}

.orders-empty-mark--error {
  color:var(--danger);
  background:var(--wash);
}

.orders-empty .btn {
  margin-top:6px;
  min-width:180px;
}

/* 订单列表 */
.order-list {
  display:flex;
  flex-direction:column;
  gap:14px;
}

/* 状态筛选栏 */
.order-filter {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:14px;
}

.filter-chip {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 12px;
  font-size:.875rem;
  font-weight:500;
  color:var(--text);
  background:var(--paper);
  border:1px solid var(--border);
  border-radius:3px;
  cursor:pointer;
  transition:all 0.15s;
}

.filter-chip:hover {
  border-color:var(--primary);
  color:var(--primary-dark);
}

.filter-chip--active {
  color:var(--paper);
  background:var(--primary);
  border-color:var(--primary);
}

.filter-chip--active .filter-chip-count {
  color:var(--paper);
  background:var(--paper);
}

.filter-chip-count {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 5px;
  font-size:.875rem;
  font-weight:600;
  color:var(--text-muted);
  background:var(--wash);
  border-radius:3px;
}

/* 底部分页条 */
.order-pagination {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin-top:16px;
}

.pager-btn,
.pager-num {
  min-width:var(--target);
  min-height:var(--target);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
  font-size:.875rem;
  font-weight:500;
  color:var(--text);
  background:var(--paper);
  border:1px solid var(--border);
  border-radius:var(--radius);
  cursor:pointer;
  transition:all 0.15s;
}

.pager-btn:hover:not(:disabled),
.pager-num:hover {
  border-color:var(--primary);
  color:var(--primary-dark);
}

.pager-btn:disabled {
  opacity:0.4;
  cursor:not-allowed;
}

.pager-num--active {
  color:var(--paper);
  background:var(--primary);
  border-color:var(--primary);
}

.pager-ellipsis {
  color:var(--text-muted);
  padding:0 2px;
}

.order-card {
  border:0;
  border-radius:0;
  background:transparent;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:12px;
  transition:transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.order-card:hover {
  transform:translateY(-2px);
  box-shadow:none;
  border-color:var(--primary);
}

.order-card-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.order-card-no {
  font-family:var(--font);
  font-size:14px;
  font-weight:600;
  color:var(--primary-dark);
  letter-spacing:normal;
  word-break:break-all;
}

/* 状态徽章：四组配色 */
.order-status {
  flex-shrink:0;
  font-size:.875rem;
  font-weight:600;
  padding:4px 10px;
  border-radius:3px;
  white-space:nowrap;
}

.order-status--pending {
  color:var(--warning);
  background:var(--wash);
}

.order-status--ongoing {
  color:var(--primary-dark);
  background:var(--wash);
}

.order-status--done {
  color:var(--success);
  background:var(--wash);
}

.order-status--danger {
  color:var(--danger);
  background:var(--wash);
}

/* 客户 + 时间行 */
.order-card-meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-size:.875rem;
}

.order-card-meta-left {
  display:flex;
  flex-direction:column;
  gap:2px;
}

.order-card-customer {
  font-weight:600;
  color:var(--text);
}

.order-card-id {
  color:var(--text-muted);
  font-size:.875rem;
}

.order-card-time {
  color:var(--text-muted);
  flex-shrink:0;
}

/* 键值摘要网格 */
.order-card-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px 16px;
  padding-top:12px;
  border-top:1px dashed var(--line);
}

.order-card-kv {
  display:flex;
  flex-direction:column;
  gap:2px;
}

.order-card-key {
  font-size:.875rem;
  color:var(--text-muted);
}

.order-card-val {
  font-size:14px;
  font-weight:600;
  color:var(--text);
}

@media (max-width: 480px) {
  .order-card-meta {
    flex-direction:column;
    align-items:flex-start;
    gap:2px;
  }

  .order-card-grid {
    grid-template-columns:1fr;
  }
}

/* ==========================================================================
   工作台经营概览仪表盘（T4.8）
   ========================================================================== */
.dashboard {
  margin-bottom:16px;
}

.dashboard .panel-title {
  margin-bottom:14px;
}

.dashboard-grid {
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:12px;
}

.dashboard-cell {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  padding:16px 8px;
  border-radius:var(--radius-sm);
  background:var(--paper);
  border:1px solid var(--line);
}

.dashboard-num {
  font-size:26px;
  font-weight:600;
  color:var(--primary-dark);
  letter-spacing:normal;
}

.dashboard-label {
  font-size:.875rem;
  color:var(--text-muted);
}

@media (max-width: 640px) {
  .dashboard-grid {
    grid-template-columns:repeat(2, 1fr);
  }
}

/* ==========================================================================
   进件页设备照片上传区（T4.9.3）
   ========================================================================== */
.photo-section {
  margin-top:2px;
}

.photo-hint {
  font-size:.875rem;
  color:var(--text-muted);
  line-height:1.5;
  margin:0;
}

.photo-grid {
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:10px;
  margin-top:8px;
}

.photo-slot {
  border:1.5px dashed var(--line);
  border-radius:var(--radius-sm);
  background:var(--wash);
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:6px;
  cursor:pointer;
  transition:border-color 0.2s, background 0.2s;
}

.photo-slot:hover {
  border-color:var(--primary);
  background:var(--wash);
}

.photo-slot-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
}

.photo-slot-label {
  font-size:.875rem;
  font-weight:600;
  color:var(--primary-dark);
}

.photo-slot-hint {
  font-size:.875rem;
  color:var(--text-muted);
  line-height:1.4;
}

.photo-remove {
  font-size:.875rem;
  font-weight:600;
  color:var(--danger);
  background:none;
  border:none;
  cursor:pointer;
  padding:2px 6px;
  border-radius:var(--radius);
}

.photo-remove:hover {
  background:var(--wash);
}

.photo-slot-box {
  position:relative;
  aspect-ratio:4 / 3;
  border-radius:var(--radius);
  background:var(--paper);
  overflow:hidden;
}

.photo-preview {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}

.photo-cta,
.photo-status {
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  font-size:.875rem;
  color:var(--text-muted);
  pointer-events:none;
  white-space:nowrap;
}

.photo-status {
  color:var(--primary-dark);
  font-weight:600;
}

.photo-badge {
  position:absolute;
  right:6px;
  bottom:6px;
  z-index:2;
  font-size:.875rem;
  font-weight:600;
  color:var(--success);
  background:var(--wash);
  padding:3px 8px;
  border-radius:3px;
  backdrop-filter:none;
}

/* ==========================================================================
   订单卡片「上传影像」入口 + 上传影像页（T4.9.4）
   ========================================================================== */
.order-card-action {
  display:flex;
  justify-content:flex-end;
  padding-top:12px;
  border-top:1px dashed var(--line);
}

/* 卡片内小按钮（订单卡入口 / 上传页局部操作） */
.btn-sm {
  min-height:44px;
  padding:0 16px;
  font-size:14px;
}

/* 订单信息条（上传页顶部回显订单号） */
.upload-order-bar {
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  margin-bottom:16px;
  border-radius:var(--radius-sm);
  background:var(--paper);
  border:1px solid var(--line);
}

.upload-order-bar-label {
  font-size:.875rem;
  font-weight:600;
  color:var(--text-muted);
}

.upload-order-bar-no {
  font-family:var(--font);
  font-size:14px;
  font-weight:600;
  color:var(--primary-dark);
  word-break:break-all;
}

/* 设备列表（上传页） */
.upload-device-list {
  display:flex;
  flex-direction:column;
  gap:16px;
}

.upload-device-card {
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--paper);
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.upload-device-head {
  display:flex;
  flex-direction:column;
  gap:2px;
}

.upload-device-title {
  font-size:1rem;
  font-weight:600;
  color:var(--primary-dark);
}

.upload-device-meta {
  font-size:.875rem;
  color:var(--text-muted);
}

/* Shared samples: open sections, predictable field rhythm and natural mobile scrolling. */
.wizard-header{padding:0 0 24px;border-bottom:1px solid var(--line);text-align:left}
.brand-row{gap:16px;flex-wrap:wrap}.brand-name{margin:0}.brand-sub{font-size:.875rem}
.card+.card,.form-section+.form-section,.order-card+.order-card{border-top:1px solid var(--line);padding-top:28px}
.form-section{padding-bottom:28px}.form-field{margin-bottom:20px}.form-row{gap:20px}
.form-input{min-height:48px;border-color:var(--input-line);font-size:1rem;background:var(--paper)}
.btn{padding:11px 18px;min-height:48px;font-size:1rem;line-height:1.6}.btn-primary{background:var(--accent);color:var(--on-accent)}
.btn-ghost,.btn-outline{background:transparent;border:1px solid var(--input-line);color:var(--accent)}
.form-actions,.actions{gap:12px;flex-wrap:wrap}.signature-pad,.signature-canvas{background:var(--paper);border:1px solid var(--input-line)}
@media(max-width:600px){.form-row,.form-grid{grid-template-columns:minmax(0,1fr)}.page{width:100%;padding-inline:var(--inset)}.brand-row{gap:12px}}

@media(min-width:860px){.page{max-width:1120px}}
.dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border-top:1px solid var(--line)}
.dashboard-cell{padding:22px 12px 12px;background:transparent;border:0;border-radius:0}.dashboard-num{font-size:clamp(1rem,4vw,1.45rem);overflow-wrap:anywhere;color:var(--ink)}
.home-menu{display:grid;gap:12px}.home-primary-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.home-primary-actions .home-menu-item{min-width:0;flex-wrap:nowrap;align-items:center}.home-primary-actions .home-menu-body{min-width:0}.home-primary-actions .home-menu-arrow{display:none}.order-done-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;margin-top:24px}.order-done-actions .btn{width:100%;min-width:0;white-space:normal;text-align:center}.home-menu-item{border:1px solid var(--input-line);padding:16px;border-radius:var(--radius);background:transparent}
.home-menu-item[href="/orders"]{background:var(--accent);color:var(--on-accent)}.home-menu-item[href="/orders"] .home-menu-desc{color:var(--on-accent)}
.home-menu-title{font-size:1rem}.home-menu-desc{font-size:.875rem}.home-followup{border-top:1px solid var(--line);padding-top:28px}
.home-followup article{padding:18px 0;border-bottom:1px solid var(--line)}.home-followup p{margin:6px 0}.home-followup a{display:inline-flex;min-height:44px;align-items:center}
@media(max-width:600px){.order-card{padding-block:22px}.orders-filter{gap:8px}.order-card-header{flex-wrap:wrap}.order-card-info{grid-template-columns:minmax(0,1fr)}.home-menu{grid-template-columns:minmax(0,1fr)}}

.home-follow-up{margin:0;padding:0}.home-follow-up+.home-follow-up{margin-top:24px;border-top:1px solid var(--line);padding-top:24px}.home-follow-up-item:last-child{border-bottom:0}#home-error:empty{display:none}.home-follow-up-item{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:18px 0;border-bottom:1px solid var(--line);text-decoration:none}.home-follow-up-item>span:first-child{color:var(--ink);overflow-wrap:anywhere}.home-follow-up-item>span:last-child{font-weight:500}

@media(max-width:480px){.home-primary-actions{gap:8px}.home-primary-actions .home-menu-item{padding:10px}.home-primary-actions .home-menu-desc{display:none}.home-primary-actions .home-menu-title{font-size:var(--font-sm,14px);overflow-wrap:anywhere}}

/* 仅进件成功页收紧页头和内容距离；新建时恢复原向导布局。 */
.order-submitted .wizard-header{padding-bottom:12px}
.order-submitted > .page{gap:0}
.order-submitted #order-feedback{display:none}
.order-submitted #order-done-view{padding:24px 0 0;margin:0}
.order-submitted .order-done-heading{display:flex;align-items:center;gap:12px}
.order-submitted .order-done-heading h3{margin:0;font-size:22px;font-weight:600}
.order-submitted .order-done-heading>img{width:48px;height:48px;flex:none}

.session-end-reason{display:grid;gap:8px;margin-block:16px;min-width:0}.session-end-reason textarea{box-sizing:border-box;width:100%;min-height:96px}.session-end-reason>span::after{content:' *';color:var(--danger,#a32929)}

.merchant-context-navigation{margin-left:auto;display:flex;justify-content:flex-end;max-width:100%}.merchant-context-navigation .btn{max-width:100%;white-space:normal;text-align:center;overflow-wrap:anywhere;min-height:48px}
.merchant-header-tools{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:12px;margin-bottom:16px}.merchant-header-tools #language-slot{margin:0}.merchant-home-link{min-height:44px}

.settlement-detail-link{display:inline-flex;margin-top:16px}

.home-menu-icon .promiso-icon{display:flex;align-items:center;justify-content:center;line-height:1}
.order-done-heading{margin-bottom:20px}
