/* ==========================================================================
   style.css —— 商户端全局样式（T4.2）
   现代商务 · 玻璃拟态 · 蓝色主色（用户指定 rgb 98,172,225 / 182,221,246）· 引导式向导
   ⚠️ 手写 CSS（不引 Tailwind CDN）：第三方 CDN 是供应链风险（生产待办清单工程化项）。
   ========================================================================== */

/* 泰文字体（T5.4）：自托管 Noto Sans Thai variable font（wght 100~900，单文件）。
   泰文有上下叠字/声调符号，系统默认字体易错位，须专门引入。 */
@font-face {
  font-family: "Noto Sans Thai";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/NotoSansThai.woff2") format("woff2");
}

:root {
  --primary: #62ace1;          /* rgb(98,172,225) 主色 */
  --primary-light: #7fb9e7;
  --primary-dark: #4a96cf;
  --primary-pale: #b6ddf6;     /* rgb(182,221,246) 浅色 */
  --bg: #f4f9fd;
  --bg-accent: #e6f3fb;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --text-invert: #ffffff;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --border: rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(98, 172, 225, 0.12);
  --shadow-lg: 0 24px 60px rgba(98, 172, 225, 0.2);
  --font: "Noto Sans Thai", "PingFang SC", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Helvetica Neue", sans-serif;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(98, 172, 225, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(182, 221, 246, 0.35), transparent 55%),
    linear-gradient(160deg, #e6f3fb 0%, #f4f9fd 45%, #ffffff 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* 布局容器 */
.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.brand-logo {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-invert);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  box-shadow: 0 8px 20px rgba(98, 172, 225, 0.35);
}

.brand-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

/* 玻璃拟态卡片 */
.card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px;
}

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

.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: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

/* 必填标记 */
.required-mark {
  color: #ef4444;
  margin-left: 2px;
  font-weight: 700;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  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: 0 0 0 3px rgba(98, 172, 225, 0.14);
}

/* 按钮 */
.btn {
  min-height: 46px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  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: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  box-shadow: 0 8px 20px rgba(98, 172, 225, 0.3);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 12px 26px rgba(98, 172, 225, 0.4);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
}

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

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

.error {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  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: 14px;
}

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

.wizard-header .brand-sub {
  font-size: 12px;
}

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

.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: 12px;
  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: rgba(15, 23, 42, 0.1);
  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: 13px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-muted);
  transition: all 0.3s;
}

.step.active .step-dot {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(98, 172, 225, 0.4);
}

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

.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: 700;
}

.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: #fff;
}

.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: 999px;
  background: rgba(15, 23, 42, 0.15);
  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: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  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: 13px;
  color: var(--success);
}

/* 签名区（步骤三）：页面内直接签名，锁竖屏 */
.signature-wrap {
  border: 2px dashed rgba(98, 172, 225, 0.5);
  border-radius: var(--radius-sm);
  background: #fff;
  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: rgba(182, 221, 246, 0.28);
  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: #fff;
  background: linear-gradient(135deg, var(--success) 0%, #34d399 100%);
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.4);
  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: 24px 18px;
  }

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

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

.home-signout {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 13px;
  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: rgba(255, 255, 255, 0.7);
  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: 0 8px 20px rgba(98, 172, 225, 0.16);
  border-color: var(--primary);
}

.home-menu-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  flex-shrink: 0;
}

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

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

.home-menu-desc {
  font-size: 13px;
  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: 13px;
  text-align: center;
}

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

/* 下拉 / 数字输入：对齐既有 input 样式 */
select,
input[type="number"] {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  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: 0 0 0 3px rgba(98, 172, 225, 0.14);
}

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: 700;
  margin-bottom: 4px;
}

.order-section-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  flex-shrink: 0;
}

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

.device-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: rgba(255, 255, 255, 0.55);
  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: 700;
  color: var(--primary-dark);
}

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

.btn-remove:hover {
  background: rgba(239, 68, 68, 0.08);
}

.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: 999px;
  background: rgba(182, 221, 246, 0.18);
  font-size: 13px;
  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, #2e86de);
}

.part-chip:has(input:checked) {
  background: rgba(98, 172, 225, 0.28);
  border-color: var(--primary, #2e86de);
}

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

/* 添加设备按钮 */
.btn-add {
  width: 100%;
  min-height: 46px;
  border: 1.5px dashed rgba(98, 172, 225, 0.6);
  background: rgba(182, 221, 246, 0.18);
  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: rgba(182, 221, 246, 0.35);
}

/* 方案概览 */
.preview {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(182, 221, 246, 0.28);
  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: rgba(255, 255, 255, 0.75);
  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: linear-gradient(135deg, rgba(98, 172, 225, 0.16) 0%, rgba(182, 221, 246, 0.26) 100%);
}

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

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

.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 rgba(148, 163, 184, 0.18);
}

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

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

.quote-lines .quote-total {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  border-bottom: none;
  margin-top: 2px;
}

.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: 13px;
  color: var(--text-muted);
  border-bottom: 1px dashed rgba(148, 163, 184, 0.16);
}

.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 rgba(148, 163, 184, 0.2);
}

.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::before {
  content: "▸";
  transition: transform 0.15s;
  font-size: 13px;
  color: var(--primary);
}

.quote-commission[open] summary::before {
  transform: rotate(90deg);
}

.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: #10b981;
  font-size: 16px;
}

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

/* 底部操作区（sticky，随滚动固定） */
.order-actions {
  display: flex;
  gap: 12px;
  position: sticky;
  bottom: 0;
  padding: 14px 0 4px;
  background: linear-gradient(transparent, rgba(244, 249, 253, 0.95) 45%);
}

.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: 700;
  color: var(--primary-dark);
  letter-spacing: 0.02em;
  background: rgba(182, 221, 246, 0.35);
  border-radius: 10px;
  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: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--primary-dark);
  background: linear-gradient(135deg, rgba(98, 172, 225, 0.18) 0%, rgba(182, 221, 246, 0.32) 100%);
}

.orders-empty-mark--error {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.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: 13px;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}

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

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

.filter-chip--active .filter-chip-count {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.2);
}

.filter-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.15);
  border-radius: 999px;
}

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

.pager-btn,
.pager-num {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  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: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

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

.order-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  padding: 16px;
  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: 0 8px 20px rgba(98, 172, 225, 0.16);
  border-color: var(--primary);
}

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

.order-card-no {
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 0.01em;
  word-break: break-all;
}

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

.order-status--pending {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}

.order-status--ongoing {
  color: var(--primary-dark);
  background: rgba(98, 172, 225, 0.16);
}

.order-status--done {
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
}

.order-status--danger {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}

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

.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: 12px;
}

.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 rgba(148, 163, 184, 0.2);
}

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

.order-card-key {
  font-size: 12px;
  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: linear-gradient(135deg, rgba(98, 172, 225, 0.1) 0%, rgba(182, 221, 246, 0.2) 100%);
  border: 1px solid rgba(98, 172, 225, 0.2);
}

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

.dashboard-label {
  font-size: 12px;
  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: 12px;
  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 rgba(98, 172, 225, 0.45);
  border-radius: var(--radius-sm);
  background: rgba(182, 221, 246, 0.12);
  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: rgba(182, 221, 246, 0.24);
}

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

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

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

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

.photo-remove:hover {
  background: rgba(239, 68, 68, 0.1);
}

.photo-slot-box {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  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: 12px;
  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: 11px;
  font-weight: 600;
  color: #047857;
  background: rgba(16, 185, 129, 0.16);
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

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

/* 卡片内小按钮（订单卡入口 / 上传页局部操作） */
.btn-sm {
  min-height: 36px;
  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: linear-gradient(135deg, rgba(98, 172, 225, 0.1) 0%, rgba(182, 221, 246, 0.2) 100%);
  border: 1px solid rgba(98, 172, 225, 0.2);
}

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

.upload-order-bar-no {
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 14px;
  font-weight: 700;
  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: rgba(255, 255, 255, 0.7);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.upload-device-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
}

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