:root {
  --bg: #f6f6f7;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #8a8a8e;
  --line: #ececee;
  --primary: #111111;
  --primary-hover: #000000;
  --primary-text: #ffffff;
  --ok: #1d9e75;
  --warn: #e6a800;
  --danger: #d13b3b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  --shadow-hover: 0 2px 6px rgba(0,0,0,.06), 0 10px 28px rgba(0,0,0,.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  transition: all .18s ease;
}
.btn:hover { border-color: #d0d0d3; background: #fafafa; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-hover); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.btn.danger { color: var(--danger); border-color: #f2cfcf; }
.btn.danger:hover { background: #fdf3f3; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

input, select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #b0b0b5;
  box-shadow: 0 0 0 3px rgba(0,0,0,.05);
}
textarea { resize: vertical; min-height: 72px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field { margin-bottom: 15px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  animation: rise .55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: "SFMono-Regular", Consolas, "Courier New", monospace; }

.topbar {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .brand { font-weight: 600; font-size: 16px; letter-spacing: .2px; }
.topbar .brand small { color: var(--muted); font-weight: 400; margin-left: 8px; }
.topbar .actions { display: flex; gap: 8px; align-items: center; }

.container { max-width: 1080px; margin: 0 auto; padding: 24px 18px 70px; }

.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.dashboard-page {
  display: grid;
  gap: 14px;
  width: min(1280px, calc(100vw - 36px));
  margin-left: 50%;
  transform: translateX(-50%);
}
.dash-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.dash-kpi-card {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid rgba(24,37,56,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 12px 34px rgba(18,25,38,.06), inset 0 1px 0 rgba(255,255,255,.86);
}
button.dash-kpi-card {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button.dash-kpi-card:hover {
  border-color: rgba(37,99,235,.28);
  box-shadow: 0 14px 34px rgba(18,25,38,.09), inset 0 1px 0 rgba(255,255,255,.9);
  transform: translateY(-1px);
}
.dash-kpi-card span,
.dash-total-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.dash-kpi-card b {
  display: block;
  color: var(--text);
  font-size: 26px;
  line-height: 1.15;
  font-weight: 780;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-kpi-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.dash-kpi-card.primary { border-color: rgba(37,99,235,.18); background: linear-gradient(180deg, rgba(245,249,255,.92), rgba(255,255,255,.78)); }
.dash-kpi-card.warn { border-color: rgba(230,200,79,.42); background: linear-gradient(180deg, rgba(255,251,225,.88), rgba(255,255,255,.78)); }
.dashboard-card { padding-bottom: 18px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.dash-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-meta-item { min-width: 108px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fafafa; }
.dash-meta-item .k { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.dash-meta-item b { font-size: 18px; font-weight: 600; }
.dash-panels { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; margin-top: 16px; }
.dash-panel { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 14px; min-width: 0; }
.dash-main-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .72fr); gap: 14px; }
.dash-panel.wide { min-width: 0; }
.dashboard-access-note {
  display: grid;
  gap: 6px;
  border-color: rgba(37,99,235,.16);
  background: linear-gradient(180deg, rgba(248,251,255,.94), #fff);
}
.dashboard-memo-panel {
  padding: 0;
  overflow: hidden;
}
.dashboard-memo-panel .memo-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(250,251,253,.9), #fff);
}
.dashboard-memo-panel.is-collapsed .memo-head {
  border-bottom: 0;
}
.dashboard-memo-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  position: relative;
}
.dashboard-memo-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.dashboard-memo-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  flex: 1 1 520px;
  min-width: 0;
}
.dashboard-memo-filters input,
.dashboard-memo-filters select {
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 13px;
}
.dashboard-memo-filters input:focus,
.dashboard-memo-filters select:focus {
  border-color: rgba(37,99,235,.34);
  box-shadow: 0 0 0 3px rgba(37,99,235,.08);
  outline: none;
}
.dashboard-memo-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}
.memo-list .memo-item,
.dashboard-memo-list .memo-item {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  content-visibility: auto;
  contain-intrinsic-size: 320px;
  contain: layout paint style;
}
.memo-item.trashed .chat-bubble {
  opacity: .9;
}
.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.chat-row.own {
  flex-direction: row-reverse;
}
.chat-avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  margin-top: 2px;
}
.chat-bubble {
  min-width: 0;
  max-width: min(920px, calc(100% - 56px));
  border: 1px solid rgba(26,32,44,.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 13px 16px;
}
.chat-bubble.has-media {
  width: min(100%, 760px);
}
.chat-row.own .chat-bubble {
  background: linear-gradient(180deg, rgba(245,249,255,.96), #fff);
  border-color: rgba(37,99,235,.12);
}
.dashboard-memo-item.is-unread .chat-bubble,
.dashboard-reply-item.is-unread .chat-bubble {
  border-color: rgba(239,68,68,.20);
  background: linear-gradient(180deg, rgba(255,247,247,.98), #fff);
}
.dashboard-memo-item.is-highlighted .chat-bubble,
.dashboard-reply-item.is-highlighted .chat-bubble {
  animation: memoFlash 1.1s ease 1;
}
@keyframes memoFlash {
  0% { box-shadow: 0 0 0 0 rgba(37,99,235,0), var(--shadow); }
  35% { box-shadow: 0 0 0 4px rgba(37,99,235,.18), 0 12px 26px rgba(37,99,235,.12); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0), var(--shadow); }
}
.chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.chat-head-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.chat-head-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.memo-head-menu {
  display: inline-flex;
  align-items: center;
}
.chat-head b {
  font-size: 14px;
  line-height: 1.4;
}
.chat-time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.chat-content {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.memo-search-hit {
  padding: 0 2px;
  border-radius: 4px;
  background: rgba(250,204,21,.28);
  color: inherit;
}
.chat-media-grid {
  display: flex;
  flex-wrap: wrap;
  --memo-media-thumb-size: 104px;
  gap: 8px;
  margin-top: 10px;
  justify-content: start;
  width: 100%;
  max-width: 100%;
  align-items: stretch;
}
.chat-media-thumb {
  width: var(--memo-media-thumb-size, 104px);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.chat-media-thumb .memo-asset-frame {
  aspect-ratio: 1 / 1;
}
.chat-media-thumb small {
  display: block;
  padding: 8px 8px 10px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.memo-quote,
.memo-compose-quote {
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(245,249,255,.96), rgba(255,255,255,.96));
  padding: 8px 10px;
  margin-top: 8px;
}
.memo-quote {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.memo-quote b {
  font-size: 12px;
  color: #1f2937;
}
.memo-quote span {
  font-size: 13px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.memo-quote small {
  font-size: 11px;
  color: var(--muted);
}
.memo-compose-quote-slot:empty {
  display: none;
}
.memo-compose-quote {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  justify-content: space-between;
  margin: 0 0 10px;
}
.memo-compose-quote .memo-quote {
  margin-top: 0;
  flex: 1;
}
.bubble-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}
.bubble-reply-btn {
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(26,32,44,.10);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.bubble-reply-btn:hover {
  border-color: rgba(37,99,235,.28);
  background: #f7faff;
  box-shadow: 0 4px 14px rgba(37,99,235,.08);
}
.bubble-menu {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
}
.bubble-menu > summary {
  list-style: none;
}
.bubble-menu > summary::-webkit-details-marker {
  display: none;
}
.bubble-menu-trigger {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(37,99,235,.12);
  border-radius: 999px;
  background: #fff;
  color: #4f68a4;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.bubble-menu-trigger:hover,
.bubble-menu[open] .bubble-menu-trigger {
  background: #f5f9ff;
  border-color: rgba(37,99,235,.22);
  color: #2563eb;
}
.bubble-menu-trigger svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bubble-menu-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 6;
  display: grid;
  gap: 4px;
  min-width: 92px;
  padding: 6px;
  border: 1px solid rgba(26,32,44,.10);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16,24,40,.12);
}
.bubble-menu-item {
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.bubble-menu-item:hover {
  background: rgba(37,99,235,.08);
}
.bubble-menu-item.danger {
  color: var(--danger);
}
.bubble-menu-item.danger:hover {
  background: rgba(239,68,68,.08);
}
.dashboard-memo-panel .memo-list {
  min-height: 320px;
  max-height: 78vh;
  overflow: auto;
  resize: vertical;
}
.dashboard-memo-item {
  box-shadow: none;
  background: linear-gradient(180deg, #fff, #fbfcfd);
}
.dashboard-memo-attachments {
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
  width: 100%;
  max-width: 100%;
}
.dashboard-reply-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 0 18px;
  padding-left: 14px;
  border-left: 2px solid rgba(37, 99, 235, .10);
}
.dashboard-reply-item {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(26, 32, 44, .08);
  border-radius: 10px;
  background: #fbfcfd;
  content-visibility: auto;
  contain-intrinsic-size: 180px;
  contain: layout paint style;
}
.dashboard-reply-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.dashboard-reply-compose {
  margin: 12px 0 0 14px;
  padding: 12px 0 0 12px;
  border-left: 2px solid rgba(37, 99, 235, .10);
  border-top: 1px dashed var(--line);
}
.dashboard-memo-compose textarea {
  min-height: 76px;
}
.memo-notify-badge {
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid rgba(239,68,68,.18);
  border-radius: 999px;
  background: rgba(254,242,242,.95);
  color: #b91c1c;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
.memo-notify-badge:hover {
  border-color: rgba(239,68,68,.30);
  background: #fff5f5;
}
.memo-notify-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  line-height: 1;
}
.dashboard-memo-jump {
  position: absolute;
  right: 20px;
  bottom: 92px;
  z-index: 4;
  padding: 8px 12px;
  border: 1px solid rgba(37,99,235,.18);
  border-radius: 999px;
  background: rgba(37,99,235,.96);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(37,99,235,.18);
  cursor: pointer;
}
.dashboard-memo-jump:hover {
  background: #1d4ed8;
}
.panel-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-title-sub { color: var(--muted); font-size: 12px; font-weight: 400; }
.dash-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th, .dash-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.dash-table th { color: var(--muted); font-size: 12px; font-weight: 500; }
.dash-table.performance {
  min-width: 0;
  table-layout: fixed;
}
.dash-table.performance th,
.dash-table.performance td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-table.performance th:nth-child(1) { width: 14%; }
.dash-table.performance th:nth-child(2),
.dash-table.performance th:nth-child(3),
.dash-table.performance th:nth-child(4),
.dash-table.performance th:nth-child(5) { width: 8%; }
.dash-table.performance th:nth-child(6),
.dash-table.performance th:nth-child(7),
.dash-table.performance th:nth-child(8) { width: 18%; }
.dash-table .pos { color: var(--ok); font-weight: 700; }
.dash-table .neg { color: var(--danger); font-weight: 700; }
.dash-money-cell { display: grid; gap: 6px; min-width: 0; }
.dash-inline-bar,
.dash-status-track {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(24,37,56,.08);
}
.dash-inline-bar i,
.dash-status-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #358cff, #8bc7ff);
}
.dash-status-list { display: grid; gap: 12px; }
.dash-status-row {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  grid-template-columns: minmax(90px, .95fr) minmax(92px, 1fr) minmax(76px, 76px);
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 7px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}
.dash-status-row:hover {
  background: rgba(37,99,235,.055);
  transform: translateX(1px);
}
.dash-status-label { min-width: 0; }
.dash-status-label b { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }
.dash-status-label span,
.dash-status-money { color: var(--muted); font-size: 12px; white-space: nowrap; }
.dash-status-money {
  min-width: 0;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-trend-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  min-height: 156px;
  align-items: end;
  padding-top: 8px;
}
.dash-trend-col { display: grid; gap: 6px; justify-items: center; min-width: 0; color: var(--muted); font-size: 12px; }
.dash-trend-bars {
  height: 110px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  border-bottom: 1px solid var(--line);
}
.dash-trend-bars i {
  width: 14px;
  min-height: 8px;
  border-radius: 8px 8px 2px 2px;
  background: #dce6f6;
  transition: height .32s var(--ease);
}
.dash-trend-bars i.orders,
.dash-legend i.orders { background: #2563eb; }
.dash-trend-bars i.money,
.dash-legend i.money { background: #f0cd8f; }
.dash-trend-col b { color: var(--text); font-size: 12px; white-space: nowrap; }
.dash-legend { display: flex; justify-content: center; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.dash-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dash-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dash-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(24,37,56,.09);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(247,249,253,.62));
  color: var(--muted);
  font-size: 13px;
}
.dash-total-row b { color: var(--text); font-size: 17px; font-weight: 750; }
.dash-reminder-panel {
  border-color: rgba(230,168,0,.25);
  background: linear-gradient(180deg, rgba(255,251,235,.94), rgba(255,255,255,.9));
  box-shadow: 0 14px 34px rgba(143,96,0,.07);
}
.dash-reminder-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.dash-reminder-item {
  border: 1px solid rgba(230,168,0,.22);
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(255,255,255,.82);
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.dash-reminder-item:hover {
  border-color: rgba(230,168,0,.46);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(143,96,0,.08);
}
.dash-reminder-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.dash-reminder-note {
  margin-top: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}
.dash-reminder-empty {
  padding: 16px;
  border: 1px dashed rgba(230,168,0,.35);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.58);
}
.performance-panel {
  padding: 18px;
}
.performance-panel .panel-title {
  font-size: 15px;
  margin-bottom: 14px;
}
.performance-panel .dash-table-wrap {
  overflow-x: visible;
}
.performance-panel.dash-panel.wide {
  overflow-x: visible;
}
.performance-panel tbody tr {
  cursor: pointer;
}
.performance-panel tbody tr:hover {
  background: rgba(37,99,235,.045);
}
.dash-total-list { display: grid; gap: 10px; }
.dash-total-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfcfd;
}
.dash-total-list span { margin-bottom: 0; }
.dash-total-list b { color: var(--text); font-size: 15px; white-space: nowrap; }

.list-filter-stats {
  margin-bottom: 18px;
}
.list-stat-card {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  border-color: rgba(24,37,56,.08);
  background: rgba(255,255,255,.9);
}
.list-stat-card .num {
  color: var(--text);
}
.danger-text {
  color: var(--danger) !important;
}

.batch-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 0 12px; margin-bottom: 14px; border-bottom: 1px dashed var(--line); }
.batch-left { color: var(--muted); font-size: 13px; }
.batch-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.order-card.selected {
  border-color: rgba(37, 99, 235, .28);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, .08), 0 10px 28px rgba(18,25,38,.10), var(--shadow-hover);
  transform: translateY(-1px);
}
.order-batch-check {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(24, 37, 56, .10);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255,255,255,.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  overflow: hidden;
  transition: transform .24s var(--ease-spring), box-shadow .24s var(--ease), border-color .24s var(--ease), background .24s var(--ease);
}
.order-card-cover-wrap .order-batch-check,
.tian-cover-wrap .order-batch-check {
  left: 12px;
  top: 12px;
}
.order-batch-check:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .12), inset 0 1px 0 rgba(255,255,255,.86);
}
.order-batch-check:active {
  transform: scale(.96);
}
.order-batch-check input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.order-batch-check-ui {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fff, #f6f8fb);
  border: 1.5px solid rgba(24, 37, 56, .22);
  color: transparent;
  transition: transform .24s var(--ease-spring), background .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.order-batch-check-ui::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(37,99,235,.18), transparent 66%);
  opacity: 0;
  transform: scale(.4);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}
.order-batch-check svg {
  width: 14px;
  height: 14px;
  display: block;
}
.order-batch-check .batch-ring {
  stroke: rgba(24, 37, 56, .35);
  stroke-width: 1.8;
  fill: none;
}
.order-batch-check .batch-mark {
  stroke: #fff;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset .26s var(--ease-spring);
}
.order-batch-check input:checked + .order-batch-check-ui {
  background: linear-gradient(180deg, #2f79df, #245fbc);
  border-color: rgba(37, 99, 235, .46);
  box-shadow: 0 0 0 6px rgba(37, 99, 235, .10), 0 8px 18px rgba(37, 99, 235, .18);
  transform: scale(1.03);
}
.order-batch-check input:checked + .order-batch-check-ui .batch-ring {
  stroke: rgba(255,255,255,.70);
}
.order-batch-check input:checked + .order-batch-check-ui .batch-mark {
  stroke-dashoffset: 0;
}
.order-batch-check input:checked + .order-batch-check-ui::after {
  opacity: 1;
  transform: scale(1.4);
  animation: batch-ripple .58s ease-out;
}
@keyframes batch-ripple {
  0% { transform: scale(.72); opacity: 0; }
  35% { opacity: .55; }
  100% { transform: scale(1.55); opacity: 0; }
}

.stat { padding: 18px; position: relative; overflow: hidden; }
.stat .num { font-size: 28px; font-weight: 600; letter-spacing: 0; }
.stat .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-clickable { cursor: pointer; transition: all .18s ease; }
.stat-clickable:hover { border-color: #d0d0d3; transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-clickable.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,0,0,.06); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }

.rowlink { cursor: pointer; transition: background .15s ease; }
.rowlink:hover { background: #fafafa; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid #d9e3f2;
  background: #eff3fb;
  color: #1a3da5;
  white-space: nowrap;
}
.badge.ok { color: var(--ok); border-color: #c4eadb; background: #edf8f3; }
.badge.warn { color: #b98600; border-color: #f4e3b4; background: #fff8e6; }
.badge.danger { color: var(--danger); border-color: #f2caca; background: #fdf0f0; }
.badge.dark { color: #fff; background: #3a3a3c; border-color: #3a3a3c; }

.phase-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 9px;
  border-radius: 20px;
  font-size: 11px;
  border: 1px solid #c4eadb;
  background: #edf8f3;
  color: var(--ok);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s ease;
}
.phase-tag.order { color: #6b6b70; border-color: #e0e0e3; background: #f4f4f5; }
.phase-tag:hover { opacity: .75; }

.progressbar { height: 7px; background: #efeff1; border-radius: 6px; overflow: hidden; }
.progressbar > i { display: block; height: 100%; background: var(--ok); border-radius: 6px; width: var(--w, 0%); animation: grow 1s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes grow { from { width: 0; } }

.thumb {
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover;
  background: #f0f0f2; flex-shrink: 0; display: block;
}
.thumb-ph {
  display: flex; align-items: center; justify-content: center;
  color: #c3c3c7; background: #f2f2f4; border: 1px dashed #d8d8dc;
}
.cell-main { display: flex; align-items: center; gap: 12px; }
.cell-title { font-weight: 500; }

.cover-preview {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 12px; object-fit: cover;
  background: #f2f2f4; border: 1px solid var(--line);
}
.cover-ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: #b8b8bd; font-size: 13px;
}

/* 款式多图轮播 */
.img-carousel { position: relative; width: 100%; height: auto; border-radius: 12px; overflow: hidden; background: #f2f2f4; border: 1px solid var(--line); }
.img-carousel .img-stage { width: 100%; }
.img-carousel .img-stage img { width: 100%; height: auto; object-fit: contain; display: block; }
.img-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; padding: 0; }
.img-nav:hover { background: rgba(0,0,0,.55); }
.img-nav.prev { left: 8px; }
.img-nav.next { right: 8px; }
.img-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.img-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); }
.img-dots i.on { background: #fff; }
.img-count { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.45); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.img-del { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.45); color: #fff; border: none; border-radius: 8px; font-size: 12px; padding: 3px 8px; cursor: pointer; }
.img-del:hover { background: rgba(220,60,60,.8); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 0 26px; margin-bottom: 18px; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 6px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #d9d9dd; border: 2px solid #fff; box-shadow: 0 0 0 1px #d9d9dd;
  transition: background .2s ease;
}
.timeline li.done::before { background: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.timeline li.doing::before { background: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.timeline li::after {
  content: ""; position: absolute; left: 9px; top: 20px; bottom: -18px;
  width: 1px; background: var(--line);
}
.timeline li:last-child::after { display: none; }
.timeline .node-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timeline .node-name { font-weight: 500; }
.timeline .node-note { color: var(--muted); font-size: 12px; margin-top: 2px; }
.timeline .node-time { font-size: 12px; color: var(--muted); }

.file-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px;
  transition: border-color .15s ease;
}
.file-item:hover { border-color: #d8d8dc; }
.file-item .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabs { display: flex; flex-wrap: nowrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 11px 16px; cursor: pointer; font-size: 14px; color: var(--muted);
  font-family: inherit; transition: color .15s ease, border-color .15s ease;
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--primary); font-weight: 500; }

.order-detail-actions {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.order-detail-actions::-webkit-scrollbar { display: none; }
.order-detail-actions .btn {
  flex: 0 0 auto;
}
.status-edit,
.badge,
.me-chip,
.view-toggle button,
.qresult-actions .btn {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.overview-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.overview-main { min-width: 0; }
.overview-side { min-width: 0; position: sticky; top: 78px; }
.memo-page { max-width: 1240px; margin: 0 auto; }
.memo-page .memo-panel { max-height: none; min-height: 560px; overflow: visible; }
.memo-page .memo-list { min-height: 360px; max-height: 72vh; overflow: auto; resize: vertical; }
.memo-page .memo-compose textarea { min-height: 112px; }
.memo-panel { display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 106px); overflow: hidden; padding: 16px; }
.memo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.memo-switch { display: flex; gap: 8px; flex-wrap: wrap; }
.memo-switch .btn.primary { background: var(--primary); color: var(--primary-text); }
.memo-list { display: flex; flex-direction: column; gap: 12px; overflow: auto; padding-right: 2px; min-height: 240px; height: 440px; flex: 0 0 auto; resize: vertical; max-height: 72vh; scroll-behavior: auto; overscroll-behavior: contain; }
.memo-list { overflow-anchor: none; }
.memo-list.is-refreshing-silent { visibility: hidden; }
.memo-item { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px 12px 10px; box-shadow: var(--shadow); }
.memo-item.trashed { background: #fdfdfd; opacity: .96; }
.memo-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.memo-item-title { font-weight: 600; font-size: 14px; }
.memo-item-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.memo-item-content { margin-top: 8px; font-size: 14px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.memo-item-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.memo-attachments { --memo-media-thumb-size: 104px; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; width: 100%; max-width: 100%; align-items: stretch; justify-content: start; }
.memo-record-asset, .memo-draft-item { border: 1px solid var(--line); border-radius: 10px; background: #fafafa; overflow: hidden; transition: all .15s ease; }
.memo-record-asset { cursor: pointer; display: flex; flex-direction: column; width: var(--memo-media-thumb-size, 104px); min-width: 0; }
.memo-record-asset:hover { border-color: #d0d0d3; box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.memo-asset-frame { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: #f3f4f6; overflow: hidden; }
.memo-asset-frame img, .memo-asset-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.memo-asset span { display: block; font-size: 12px; color: var(--muted); padding: 8px 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memo-asset-loading { color: var(--muted); font-size: 12px; padding: 8px; text-align: center; }
.memo-file-icon { width: 28px; height: 28px; color: var(--muted); }
.memo-file-icon svg { width: 100%; height: 100%; display: block; }
.memo-compose { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px; box-shadow: var(--shadow); }
.memo-compose.disabled { opacity: .72; background: #fcfcfc; }
.memo-compose-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.memo-compose-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.memo-compose textarea { min-height: 94px; resize: vertical; }
.memo-draft-preview { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.memo-draft-item { display: grid; grid-template-columns: 66px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; background: #fbfbfc; }
.memo-draft-item.image, .memo-draft-item.video { grid-template-columns: 72px minmax(0, 1fr) auto; }
.memo-draft-thumb { width: 66px; height: 66px; border-radius: 8px; object-fit: cover; background: #eef0f3; display: block; }
.memo-draft-file { width: 66px; height: 66px; border-radius: 8px; background: #eef0f3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 11px; padding: 6px; text-align: center; }
.memo-draft-file .memo-file-icon { width: 22px; height: 22px; }
.memo-draft-meta { min-width: 0; }
.memo-draft-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.memo-draft-name-input {
  min-width: 0;
  width: 100%;
  padding: 3px 6px;
  border-color: transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
}
.memo-draft-name-input:hover { border-color: var(--line); background: #fff; }
.memo-draft-name-input:focus { border-color: #b0b0b5; background: #fff; }
.memo-draft-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.memo-compose-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.memo-compose-hint { flex: 1 1 180px; min-width: 0; }

.authwrap { max-width: 380px; margin: 11vh auto; padding: 0 18px; }
.authwrap .card { padding: 30px; }
.authwrap h1 { font-size: 20px; font-weight: 600; margin: 0 0 6px; letter-spacing: .2px; }
.authwrap .sub { color: var(--muted); margin-bottom: 24px; font-size: 13px; }
.login-captcha-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.login-captcha-question {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(37,99,235,.18);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(239,246,255,.92), rgba(255,255,255,.92));
  color: var(--order-meta-blue);
  font-weight: 700;
  letter-spacing: .2px;
  font-variant-numeric: tabular-nums;
}

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

.hidden { display: none !important; }

.qsearch { max-width: 480px; margin: 9vh auto; padding: 0 18px; }
.qsearch h1 { font-size: 22px; font-weight: 600; margin: 0 0 6px; letter-spacing: .2px; }
.qsearch .sub { color: var(--muted); margin-bottom: 22px; }
.qresult { max-width: 720px; margin: 0 auto; }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.kv .item .k { font-size: 12px; color: var(--muted); }
.kv .item .v { font-size: 15px; margin-top: 1px; }

.item-view .k { font-size: 12px; color: var(--muted); }
.item-view .v { font-size: 15px; margin-top: 2px; font-weight: 500; }
.item-total { font-size: 18px; font-weight: 600; color: var(--text); display: inline-flex; align-items: baseline; gap: 8px; }
.item-total .k { font-size: 13px; color: var(--muted); font-weight: 500; }
.item-total b { font-size: 22px; letter-spacing: .3px; }
.it-top { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 6px; min-height: 28px; }
.cr-editor { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.cr-title { font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.cr-row { display: grid; grid-template-columns: 1fr 2fr 110px 44px; gap: 8px; margin-bottom: 8px; }
.sample-row { display: grid; grid-template-columns: 1fr 1fr 110px 44px; gap: 8px; margin-bottom: 8px; }
.cr-row input, .sample-row input { padding: 8px 10px; font-size: 13px; }
.cr-del { font-size: 14px; padding: 6px 0; text-align: center; }
.colors-read { font-size: 13px; }
.colors-read .grid-head, .colors-read .grid-cells { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-bottom: 8px; }
.colors-read .grid-cells { padding-bottom: 10px; border-bottom: 1px dashed var(--line); margin-bottom: 10px; }
.colors-read .grid-cells:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.colors-read .k { font-size: 12px; color: var(--muted); }
.colors-read .v { font-size: 15px; font-weight: 500; }

.form-card { max-width: 840px; margin: 0 auto; }
.form-title { font-size: 20px; font-weight: 600; margin-bottom: 20px; letter-spacing: .2px; }
.form-section {
  font-size: 13px; font-weight: 500; color: var(--muted);
  margin: 22px 0 12px; padding-top: 18px; border-top: 1px solid var(--line);
  letter-spacing: .5px;
}
.form-section:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }

.font-setting-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.font-preview {
  min-height: 88px;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid rgba(20,28,40,.09);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(247,249,253,.76));
  color: var(--text);
  font-size: 24px;
  line-height: 1.55;
  font-weight: 700;
}
.font-preview span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.font-current {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 14px;
  color: var(--text);
  font-weight: 600;
}
.font-current span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.font-setting-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
  align-items: end;
}
.font-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.theme-panel {
  display: grid;
  gap: 14px;
}
.theme-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.theme-head-main {
  min-width: 0;
}
.theme-version {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(37,99,235,.16);
  border-radius: 999px;
  background: #f7faff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}
.theme-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}
.theme-preview {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(20,28,40,.09);
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(247,249,253,.82));
}
.theme-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.theme-swatch-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}
.theme-swatch {
  border: 1px solid rgba(20,28,40,.08);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  min-width: 0;
}
.theme-swatch b {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.theme-swatch span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}
.theme-swatch .swatch-chip {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(20,28,40,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
  margin-bottom: 8px;
}
.theme-setting-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.theme-setting-grid .field {
  margin-bottom: 0;
}
.theme-setting-grid input[type="color"] {
  height: 40px;
  padding: 4px 6px;
}
.theme-setting-grid input[type="range"] {
  padding: 0;
}
.theme-pack-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.theme-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.theme-msg {
  min-height: 18px;
}
.theme-release-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.78);
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}
.theme-release-form {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
  align-items: end;
}
.theme-release-form .field {
  margin-bottom: 0;
}
.theme-release-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}
.theme-release-list-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.theme-release-table {
  min-width: 760px;
  border-collapse: collapse;
}
.theme-release-table th,
.theme-release-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: top;
}
.theme-release-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.theme-release-table tbody tr.theme-release-active {
  background: rgba(37,99,235,.04);
}
.theme-release-notes {
  max-width: 360px;
  white-space: pre-wrap;
  word-break: break-word;
}
.theme-release-actions-cell {
  white-space: nowrap;
}
@media (max-width: 720px) {
  .theme-release-form { grid-template-columns: 1fr; }
  .theme-release-table { min-width: 620px; }
}
@media (max-width: 720px) {
  .font-setting-grid { grid-template-columns: 1fr; }
  .font-preview { font-size: 20px; padding: 16px; }
  .theme-setting-grid { grid-template-columns: 1fr 1fr; }
}

.size-table { display: block; overflow-x: auto; }
.size-color { text-align: center; }
.size-row { display: grid; grid-template-columns: 110px repeat(var(--sz, 6), 64px) 72px 56px; gap: 8px; align-items: center; margin-bottom: 8px; }
.size-head .size-cell { font-size: 12px; color: var(--muted); font-weight: 500; text-align: center; }
.size-head .size-total { font-size: 12px; color: var(--muted); font-weight: 500; text-align: center; }
.size-color input, .size-cell input, .size-total input {
  padding: 8px 10px; text-align: center; font-size: 13px;
}
.size-total input { font-weight: 600; }
.size-add { text-align: center; }
.size-add .btn { width: 100%; }

.visually-hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.size-table-img { max-width: 260px; border: 1px solid var(--line); border-radius: 10px; display: block; margin-bottom: 8px; }

.style-block { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; background: #fcfcfc; }
.style-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.style-num { font-weight: 600; font-size: 14px; }

.style-cover-row { display: flex; gap: 12px; margin-bottom: 14px; align-items: stretch; }
.style-cover-preview { width: 320px; height: 320px; border-radius: 12px; overflow: hidden; background: #f0f0f2; flex-shrink: 0; position: relative; }
.style-cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.style-cover-ph { border: 1px dashed #d8d8dc; }

.sample-color-row { display: grid; grid-template-columns: 1fr 80px 80px 56px; gap: 8px; align-items: center; margin-bottom: 8px; }
.sample-color-head { font-size: 12px; color: var(--muted); font-weight: 500; }
.sample-color-head .sc-color, .sample-color-head .sc-size, .sample-color-head .sc-qty { text-align: left; }
.sample-color-row input { padding: 8px 10px; font-size: 13px; }

.sample-box { margin-top: 12px; padding: 12px 14px; background: #f7f8fa; border: 1px dashed var(--line); border-radius: 10px; }

.order-grid { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 980px; }
.order-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0; display: flex; flex-wrap: wrap; align-items: stretch; overflow: hidden; cursor: pointer; transition: all .18s ease; position: relative; }
.order-card:hover { border-color: #d0d0d3; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
/* 订单流程步骤条：查看详情同排右端 */
.ocr-stagebar { display: flex; align-items: center; border-top: 1px dashed var(--line); background: #fff; padding: 8px 14px 10px; margin-top: 6px; border-radius: 0 0 14px 14px; overflow: hidden; }
.ocr-stagebar .ocr-timeline-steps { flex: 1; }
.ocr-stagebar .order-card-link { color: #1a3da5; font-size: 13px; font-weight: 500; white-space: nowrap; margin-left: 14px; flex-shrink: 0; }
.order-card-cover { width: 140px; align-self: stretch; object-fit: cover; background: #f0f0f2; flex-shrink: 0; display: block; }
.order-card-cover-ph { display: flex; align-items: center; justify-content: center; color: #c3c3c7; background: #f2f2f4; border-right: 1px dashed #d8d8dc; width: 120px; align-self: stretch; }
.order-card-info { flex: 1; min-width: 0; text-align: left; padding: 14px 16px; }
.order-card-head { display: flex; align-items: center; gap: 8px; }
.order-card-no { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; color: var(--muted); }
.status-edit { border: none; background: transparent; padding: 0; margin: 0; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 3px; }
.status-edit::after { content: "▾"; font-size: 10px; color: var(--muted); opacity: .6; transition: opacity .15s ease; }
.status-edit:hover::after { opacity: 1; }
.pin-btn { border: none; background: transparent; cursor: pointer; padding: 4px; color: #d0d0d3; display: inline-flex; align-items: center; justify-content: center; line-height: 0; border-radius: 6px; transition: color .15s ease, background .15s ease; flex-shrink: 0; }
.pin-btn svg { width: 16px; height: 16px; display: block; }
.pin-btn:hover { color: #555; background: #f2f2f4; }
.pin-btn.pinned { color: #000; }
.order-card > .pin-btn { position: absolute; top: 8px; right: 8px; z-index: 2; }
.order-card-customer { color: #1a3da5; font-weight: 500; font-size: 14px; margin-bottom: 2px; }
.order-card-line { font-size: 13px; margin-top: 1px; }
.order-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.order-card-link { color: #1a3da5; font-size: 13px; }

.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.view-toggle button { background: #fff; border: none; padding: 7px 14px; font-size: 13px; color: var(--muted); cursor: pointer; font-family: inherit; transition: all .15s ease; }
.view-toggle button.active { background: var(--primary); color: #fff; }
.view-toggle button:not(.active):hover { background: #fafafa; }

.timeline-compact { list-style: none; margin: 0; padding: 0; }
.timeline-compact li { padding: 0; margin-bottom: 2px; }
.timeline-compact li::before, .timeline-compact li::after { display: none; }
.node-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 10px; transition: background .12s ease; }
.node-row:hover { background: #fafafa; }
.node-row .node-name { flex: 1; min-width: 0; font-weight: 500; }
.node-row .node-time { color: var(--muted); font-size: 12px; }
.node-row .node-status-text { font-size: 12px; color: var(--muted); }
.node-status-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #d9d9dd; background: #fff; cursor: pointer;
  padding: 0; flex-shrink: 0;
  transition: all .15s ease;
  position: relative;
}
.node-status-dot.doing { background: var(--warn); border-color: var(--warn); }
.node-status-dot.done { background: var(--ok); border-color: var(--ok); }
.node-status-dot:hover { transform: scale(1.15); box-shadow: 0 0 0 4px rgba(0,0,0,.04); }
.node-manage { display: none; padding: 4px 10px 12px 44px; }
.node-manage-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.node-note-input { margin-top: 8px; }
.timeline-compact li.open .node-manage { display: block; }
.timeline-compact li.open .node-row { background: #f6f6f7; }

.timeline-new { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline-new li { position: relative; padding: 0 0 14px 30px; }
.timeline-new li::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: -2px; width: 2px; background: var(--line); }
.timeline-new li:last-child::before { display: none; }
.node-circle { position: absolute; left: 0; top: 8px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d9d9dd; background: #fff; padding: 0; cursor: pointer; transition: all .15s ease; box-shadow: 0 0 0 3px #fff; }
.node-circle.node-circle-linked { cursor: default; opacity: .65; }
.node-circle.doing { background: var(--warn); border-color: var(--warn); }
.node-circle.done { background: var(--ok); border-color: var(--ok); }
.node-circle:hover { transform: scale(1.1); }
.node-card-body { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; transition: border-color .15s ease; }
.node-card-body:hover { border-color: #d8d8dc; }
.node-card-head { display: flex; align-items: center; gap: 10px; }
.node-card-head .node-name { font-weight: 500; flex: 1; }
.node-actions { display: flex; gap: 2px; }
.btn-icon { background: transparent; border: none; padding: 5px 7px; cursor: pointer; color: var(--muted); border-radius: 6px; line-height: 0; display: inline-flex; align-items: center; transition: background .15s ease, color .15s ease, transform .2s ease; }
.btn-icon svg { width: 15px; height: 15px; display: block; }
.btn-icon:hover { background: #f2f2f4; color: var(--text); }
.btn-icon.danger:hover { background: #fdf3f3; color: var(--danger); }
.btn-icon.expand-icon.expanded { transform: rotate(180deg); }

.timeline-new li[draggable] { cursor: grab; }
.timeline-new li.dragging { opacity: 0.4; cursor: grabbing; }
.timeline-new li.drag-over-top { box-shadow: 0 -2px 0 var(--primary); border-radius: 6px; }
.timeline-new li.drag-over-bottom { box-shadow: 0 2px 0 var(--primary); border-radius: 6px; }
.node-card-detail { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: none; font-size: 13px; line-height: 1.9; }
.node-card-detail.open { display: block; }
.node-detail-row { color: var(--text); }
.node-detail-row .muted { color: var(--muted); margin-right: 4px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 100; animation: fadeIn .2s ease; padding: 20px; }
.modal { background: var(--card); border-radius: 14px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.2); animation: rise .25s ease; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.modal-head .modal-close { background: none; border: none; font-size: 18px; color: var(--muted); cursor: pointer; }
.modal-body { padding: 18px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* PATCH START: customer notification emails */
.customer-email-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.customer-email-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.customer-email-chip {
  display: inline-flex;
  align-items: center;
  max-width: 230px;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.16);
  color: var(--order-meta-blue);
  font-size: 13px;
  line-height: 1.25;
  word-break: break-all;
}
.customer-email-dialog { max-width: 540px; }
.customer-email-textarea {
  min-height: 150px;
  line-height: 1.65;
  resize: vertical;
}

.access-owner-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.access-inline-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 20px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}
.access-inline-summary small {
  color: var(--order-meta-blue);
  font-size: 12px;
}
.order-access-dialog { max-width: 620px; }
.access-tools {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.access-summary-strong {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 2px;
}
.access-tool-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.access-user-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.access-user-chip {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.access-user-chip:hover {
  border-color: rgba(37,99,235,.32);
  background: rgba(255,255,255,.94);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(18,25,38,.08);
}
.access-user-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.access-checkmark {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(89,99,116,.26);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,247,251,.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
  transition: all .18s ease;
}
.access-checkmark::after {
  content: "";
  display: block;
  width: 8px;
  height: 4px;
  margin: 6px 0 0 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(.5);
  opacity: 0;
  transition: transform .2s ease, opacity .16s ease;
}
.access-user-chip input:checked + .access-checkmark {
  border-color: rgba(37,99,235,.58);
  background: linear-gradient(135deg, #2f80ed, #6eb7ff);
  box-shadow: 0 7px 16px rgba(37,99,235,.24), inset 0 1px 0 rgba(255,255,255,.42);
}
.access-user-chip input:checked + .access-checkmark::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}
.access-user-main { min-width: 0; display: grid; gap: 1px; }
.access-user-main b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 14px;
}
.access-user-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 640px) {
  .access-owner-row { grid-template-columns: 1fr; }
  .access-owner-row .btn { width: 100%; }
  .access-tools { flex-direction: column; align-items: stretch; }
  .access-tool-actions { justify-content: stretch; }
  .access-tool-actions .btn { flex: 1; }
  .access-user-list { grid-template-columns: 1fr; }
}
/* PATCH END */

.phase-title { font-weight: 500; margin-bottom: 8px; padding-bottom: 6px; }
.phase-empty { padding: 18px 12px; color: var(--muted); font-size: 13px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }

.round-section { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.round-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.round-list { list-style: none; padding: 0; margin: 0; }
.sample-round { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #fcfcfc; transition: background .15s ease; }
.sample-round:hover { background: #f6f6f7; }
.round-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.round-num { font-weight: 600; font-size: 15px; }
.round-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.round-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.round-detail { margin-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; align-items: center; }
.round-note { width: 100%; margin-top: 8px; min-height: 56px; resize: vertical; font-family: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-sizing: border-box; }
.round-note:focus { border-color: var(--primary); outline: none; }

.rounds-public { list-style: none; padding: 0; margin: 0; }
.round-public-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fcfcfc; }
.round-summary-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.round-meta-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
/* 样衣轮次：运单号 / 备注 白底背景框（统一样式） */
.round-field {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; margin-top: 8px; font-size: 13px;
}
.round-summary-fields .round-field,
.round-meta-fields .round-field { margin-top: 0; min-width: 0; }
.round-note-public { margin-top: 8px; }
.round-field .rf-k { color: var(--muted); flex-shrink: 0; white-space: nowrap; }
.round-field .rf-v { color: var(--text); min-width: 0; word-break: break-word; line-height: 1.5; }

.section-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; font-size: 15px; font-weight: 600; }
.section-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.quote-row { display: grid; grid-template-columns: 1fr 120px 140px 120px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.quote-row:last-of-type { border-bottom: none; }
.quote-name { font-weight: 500; }
.quote-row .field { margin-bottom: 0; }
.q-subtotal { font-size: 14px; font-weight: 600; padding-top: 6px; }

.q-header { display: flex; align-items: center; gap: 16px; }
.q-cover { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; background: #f0f0f2; flex-shrink: 0; }
.q-head-info { flex: 1; min-width: 0; }
.q-title-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 18px; }
.q-title-row .q-no { font-size: 19px; font-weight: 700; letter-spacing: .3px; color: var(--text); }
.q-title-row .q-customer { color: var(--muted); font-size: 15px; font-weight: 500; }
.q-status { flex-shrink: 0; }
.q-facts {
  display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.q-facts b { color: var(--text); font-weight: 500; }

.q-phase { padding: 4px 0; }
.q-phase-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.q-phase-label { font-weight: 500; }
.q-phase-val { font-size: 22px; font-weight: 600; letter-spacing: -.5px; }
.q-phase-status { margin-top: 10px; font-size: 13px; color: var(--muted); }
.q-phase-status.ok { color: var(--ok); }
.q-phase-divider { height: 1px; background: var(--line); margin: 18px 0; }
.q-phase-grid { display: grid; grid-template-columns: 1fr 1fr; }
.q-phase-grid .q-phase:first-child { padding-right: 20px; }
.q-phase-grid .q-phase:last-child { padding-left: 20px; border-left: 1px solid var(--line); }
@media (max-width: 520px) {
  .q-phase-grid { grid-template-columns: 1fr; }
  .q-phase-grid .q-phase:first-child { padding-right: 0; padding-bottom: 16px; }
  .q-phase-grid .q-phase:last-child { padding-left: 0; border-left: none; padding-top: 16px; border-top: 1px solid var(--line); }
}

.q-toggle {
  width: 100%; padding: 13px; border: 1px solid var(--line); background: #fff;
  border-radius: 12px; cursor: pointer; font-family: inherit; font-size: 14px; color: var(--text);
  margin-top: 14px; transition: all .15s ease;
}
.q-toggle:hover { border-color: #d0d0d3; background: #fafafa; }
.q-toggle-arrow { color: var(--muted); margin-left: 4px; display: inline-block; transition: transform .3s ease; }

.q-styles { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.q-style { padding: 14px 0; border-bottom: 1px solid var(--line); }
.q-style:last-child { border-bottom: none; padding-bottom: 0; }
.q-style:first-child { padding-top: 0; }
.q-style-head { display: flex; align-items: center; gap: 12px; }

.q-collapse {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .5s cubic-bezier(0.22, 1, 0.36, 1), opacity .35s ease;
}
.q-collapse.open { max-height: 1800px; opacity: 1; }
.q-collapse-inner { margin-top: 12px; }

@media (max-width: 640px) {
  .dashboard-page { width: 100%; margin-left: 0; transform: none; }
  .topbar { padding: 10px 12px; flex-wrap: wrap; gap: 6px 8px; }
  .topbar .brand { font-size: 14px; min-width: 0; }
  .topbar .brand small { display: none; }
  .me-chip { font-size: 11px; padding: 3px 8px; white-space: nowrap; }
  .topbar .actions { flex: 1 1 100%; overflow-x: auto; overflow-y: hidden; gap: 6px; padding-bottom: 2px; scrollbar-width: none; }
  .topbar .actions::-webkit-scrollbar { display: none; }
  .topbar .actions .btn { white-space: nowrap; flex-shrink: 0; font-size: 12px; padding: 5px 10px; }
  .dash-page-head { align-items: center; }
  .dash-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dash-kpi-card { padding: 13px 12px; border-radius: 12px; }
  .dash-kpi-card b { font-size: 20px; }
  .dash-kpi-card small { font-size: 11.5px; }
  .grid.stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .grid.stats .stat {
    padding: 10px 8px;
    border-radius: 12px;
    min-height: 78px;
  }
  .grid.stats .num {
    font-size: 16px;
    line-height: 1.1;
  }
  .grid.stats .lbl {
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dash-main-grid { grid-template-columns: 1fr; gap: 12px; }
  .dash-panel.wide { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dash-trend-chart { min-width: 540px; }
  .dash-status-row { grid-template-columns: minmax(82px, .95fr) minmax(78px, 1fr) minmax(68px, 68px); gap: 6px; padding-left: 4px; padding-right: 4px; }
  .dash-status-label b { font-size: 12px; }
  .dash-table th,
  .dash-table td { padding: 9px 8px; }
  .dashboard-memo-panel .memo-head,
  .dashboard-memo-body { padding: 12px; }
  .dashboard-memo-toolbar {
    flex-direction: column;
  }
  .dashboard-memo-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    flex: 1 1 auto;
  }
  .dashboard-memo-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .dashboard-memo-panel .memo-list {
    min-height: 180px;
    max-height: 360px;
  }
  .dashboard-memo-jump {
    right: 14px;
    bottom: 84px;
  }
  .dashboard-memo-compose textarea {
    min-height: 86px;
  }
  .chat-media-grid,
  .memo-attachments,
  .dashboard-memo-attachments {
    --memo-media-thumb-size: 88px;
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    width: 100%;
    max-width: 100%;
  }
  .chat-row {
    gap: 8px;
  }
  .chat-avatar {
    width: 32px;
    height: 32px;
  }
  .chat-bubble {
    max-width: calc(100% - 44px);
    padding: 10px 12px;
    border-radius: 14px;
  }
  .bubble-reply-btn {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 11px;
  }
  .bubble-menu-trigger {
    width: 24px;
    height: 24px;
  }
  .bubble-menu-pop {
    min-width: 84px;
  }
  .bubble-menu-item {
    padding: 5px 7px;
    font-size: 11px;
  }
  .chat-media-thumb {
    width: var(--memo-media-thumb-size, 88px);
    min-width: 0;
  }
  .dashboard-reply-list,
  .dashboard-reply-compose {
    margin-left: 6px;
    padding-left: 8px;
  }
  .order-detail-head {
    gap: 12px !important;
  }
  .order-detail-actions {
    width: 100%;
    padding-bottom: 3px;
  }
  .order-detail-actions .btn {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 8px 12px;
    line-height: 1.25;
  }
  .tabs {
    margin-left: -2px;
    margin-right: -2px;
    padding: 0 2px;
  }
  .tabs button {
    padding: 10px 18px;
    line-height: 1.25;
    flex: 0 0 auto;
    min-width: max-content;
  }
  .container { padding: 16px 12px 70px; }
  table { display: block; overflow-x: auto; }
  th, td { white-space: nowrap; }
  .grid.stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .grid.stats .stat {
    padding: 9px 7px;
    min-height: 74px;
  }
  .grid.stats .num { font-size: 15px; }
  .grid.stats .lbl { font-size: 10px; }
  .order-grid { grid-template-columns: 1fr; gap: 12px; }
  .order-card { flex-direction: column; }
  .order-card-cover-wrap { flex: 0 0 auto; aspect-ratio: 1/1; padding: 10px; background: #fafafa; }
  .order-card-cover, .order-card-cover-ph { width: 100%; height: 100%; max-height: 380px; border-right: none; border-bottom: 1px dashed #d8d8dc; object-fit: contain; background: #f2f2f4; border-radius: 10px; }
  .order-card-info { padding: 12px 14px; }
  .order-compact { display: flex; flex-direction: column; }
  .order-row { padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s ease; }
  .order-row:last-child { border-bottom: none; }
  .order-row:active { background: rgba(0,0,0,.03); }
  .order-row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
  .order-row-customer { color: #1a3da5; font-weight: 600; font-size: 14px; margin-bottom: 2px; }
  .order-row-item { font-size: 13px; color: var(--muted); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .order-row-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
  .order-row-sub b { color: var(--text); font-weight: 600; }
  .order-row-foot { display: flex; align-items: center; gap: 4px; }
  .order-row-foot .progressbar { max-width: 120px; }
  .cr-row { grid-template-columns: 1fr 1fr 70px 40px; gap: 6px; }
  .sample-row { grid-template-columns: 1fr 1fr 70px 40px; gap: 6px; }
  .quote-row { grid-template-columns: 1fr; gap: 8px; padding: 10px 0; }
  .quote-row .field input { max-width: 100%; }
  .field label { white-space: nowrap; overflow: visible; }
  .sf-grid { grid-template-columns: 1fr !important; }
  .exp-form-grid > div { grid-template-columns: 1fr 1fr !important; }
  .fee-form-grid { grid-template-columns: 1fr !important; }
  .modal-overlay { padding: 10px; }
  .modal { max-width: 100%; border-radius: 12px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .card > div[style*="grid-template-columns:1fr 1fr"],
  .modal div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  .card div[style*="flex:0 0 420px"] { flex: 0 0 100% !important; }
  .card div[style*="min-width:260px"] { flex: 1 1 100% !important; min-width: 0 !important; }
  .card { padding: 16px 14px; }
  .overview-layout { grid-template-columns: 1fr; }
  .overview-side { position: static; top: auto; }
  .memo-panel { max-height: none; }
  .memo-list { height: auto; min-height: 260px; max-height: 360px; resize: vertical; }
  .chat-media-grid,
  .memo-attachments,
  .dashboard-memo-attachments { --memo-media-thumb-size: 88px; display: flex; flex-wrap: wrap; width: 100%; max-width: 100%; justify-content: start; }
  .memo-draft-item { grid-template-columns: 58px minmax(0, 1fr); }
  .memo-draft-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .dash-panels { grid-template-columns: 1fr; }
  .batch-bar { align-items: flex-start; }
  .batch-actions { width: 100%; }
  .batch-actions .btn { flex: 1 1 auto; }
  .tpl-item, .audit-item, .history-item, .reminder-item { padding: 11px 12px; }
}

/* ---------- 系统设置：标签页 / 表格 ---------- */
.form-title { white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.seg { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin: 0 0 16px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg-btn { flex: 0 0 auto; min-width: max-content; white-space: nowrap; word-break: keep-all; background: none; border: none; padding: 10px 18px; cursor: pointer; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; transition: all 0.2s cubic-bezier(0.22,1,0.36,1); }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { color: var(--text); border-bottom-color: #000; font-weight: 600; }
.tab-pane { animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.tbl thead th { font-weight: 600; color: var(--muted); font-size: 13px; background: rgba(0,0,0,0.02); }
.tbl tbody tr:hover { background: rgba(0,0,0,0.02); }
/* 备份历史表：固定列宽 + 不换行 + 溢出省略，避免中文竖排 */
.tbl.bkTable { table-layout: fixed; }
.tbl.bkTable th, .tbl.bkTable td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 嵌套 div（如「含 56/共 64 张, 8 张跳过」「含 8 条跳过原因」等）也强制 nowrap+ellipsis */
.tbl.bkTable td > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 备份历史表外层容器：内容超出时允许横向滚动（不影响外部布局） */
.bk-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bk-table-wrap > .tbl { min-width: 700px; }
.file-trash-table-wrap { max-width: 100%; }
.file-trash-table {
  table-layout: fixed;
  min-width: 940px;
}
.file-trash-table th,
.file-trash-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.file-trash-table th:nth-child(1) { width: 28%; }
.file-trash-table th:nth-child(2) { width: 92px; }
.file-trash-table th:nth-child(3) { width: 106px; }
.file-trash-table th:nth-child(4) { width: 110px; }
.file-trash-table th:nth-child(5) { width: 92px; }
.file-trash-table th:nth-child(6) { width: 86px; }
.file-trash-table th:nth-child(7) { width: 150px; }
.file-trash-table th:nth-child(8) { width: 176px; }
.file-trash-table td:nth-child(8) {
  overflow: visible;
  text-overflow: clip;
}
.file-trash-table td:nth-child(8) .btn {
  padding-left: 10px;
  padding-right: 10px;
}
.file-trash-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-trash-name .mono { font-size: 13px; }
.file-trash-name .muted { margin-left: 4px; font-size: 12px; }

.tpl-list, .audit-list, .history-list, .reminder-list { display: grid; gap: 10px; }
.tpl-item, .audit-item, .history-item, .reminder-item { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px 14px; }
.tpl-item, .audit-item { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.tpl-main { min-width: 0; }
.tpl-actions, .reminder-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.order-template-dialog {
  width: min(1040px, calc(100vw - 36px));
  max-width: min(1040px, calc(100vw - 36px));
  height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.order-template-dialog .modal-body {
  flex: 1 1 auto;
  overflow: auto;
}
.order-template-dialog .modal-foot {
  align-items: center;
}
.order-template-dialog .modal-foot .muted {
  margin-right: auto;
}
.template-editor-tip {
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 10px;
  background: rgba(239, 246, 255, .68);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.template-basic-grid,
.template-craft-grid,
.template-craft-wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.inline-check input {
  width: auto;
}
.template-style-editor .style-block {
  background: #fff;
}
.template-craft-box {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
}
.template-craft-custom-list {
  display: grid;
  gap: 8px;
  margin: 2px 0 10px;
}
.template-craft-cf-row {
  display: grid;
  grid-template-columns: minmax(120px, .45fr) minmax(0, 1fr) 56px;
  gap: 8px;
  align-items: center;
}
.audit-head, .history-head, .reminder-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.history-changes { display: grid; gap: 6px; margin-top: 10px; }
.history-change { display: grid; grid-template-columns: minmax(96px, 140px) minmax(0, 1fr); gap: 8px; align-items: start; padding: 7px 9px; border-radius: 8px; background: #f7f8fa; font-size: 13px; }
.history-change .k { color: var(--muted); font-weight: 500; }
.history-change .v { color: var(--text); word-break: break-word; }
.reminder-item.done { opacity: .7; background: #fafafa; }
.reminder-item.done b { text-decoration: line-through; }
.reminder-item.mail-failed { border-color: rgba(239, 68, 68, .28); background: #fffafa; }
.mail-template-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
}
.mail-template-entry b { display: block; color: var(--text); margin-bottom: 4px; }
.mail-template-entry span { display: block; color: var(--muted); font-size: 13px; line-height: 1.6; }
.security-setting-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.security-check-field { display: flex; align-items: end; }
.security-tips {
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 12px;
  background: rgba(239,246,255,.62);
}
.security-tips b { display: block; margin-bottom: 4px; color: var(--text); }
.security-tips span { display: block; color: var(--muted); font-size: 13px; line-height: 1.65; }
.security-event-list { display: grid; gap: 14px; }
.security-event-group { display: grid; gap: 10px; }
.security-event-title { font-weight: 700; color: var(--text); }
.security-event {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.86);
  padding: 12px 14px;
}
.security-event.danger {
  border-color: rgba(239,68,68,.24);
  background: rgba(255,250,250,.92);
}
.security-event-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .login-captcha-row {
    grid-template-columns: 86px minmax(0, 1fr);
  }
  .login-captcha-row .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .security-setting-grid {
    grid-template-columns: 1fr;
  }
  .security-check-field {
    display: block;
  }
  .order-template-dialog {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    height: calc(100vh - 20px);
  }
  .template-basic-grid,
  .template-craft-grid,
  .template-craft-wide {
    grid-template-columns: 1fr;
  }
  .template-craft-cf-row {
    grid-template-columns: 1fr;
  }
  .template-craft-cf-row .btn {
    width: 100%;
  }
}
.mail-template-dialog {
  width: min(1180px, calc(100vw - 36px));
  max-width: min(1180px, calc(100vw - 36px));
  height: min(860px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mail-template-dialog .modal-head,
.mail-template-dialog .modal-foot { flex: 0 0 auto; }
.mail-template-dialog .modal-body { flex: 1 1 auto; overflow: hidden; }
.mailtpl-intro {
  flex: 0 0 auto;
  padding: 0 22px 14px;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.mailtpl-intro b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.mailtpl-body { display: grid; grid-template-columns: minmax(280px, 340px) minmax(560px, 1fr); gap: 16px; min-height: 0; }
.mailtpl-list { display: grid; gap: 10px; align-content: start; overflow: auto; padding-right: 6px; min-width: 0; }
.mailtpl-list-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.mailtpl-list-item:hover,
.mailtpl-list-item.active { border-color: rgba(37,99,235,.45); box-shadow: 0 10px 24px rgba(15,23,42,.08); transform: translateY(-1px); }
.mailtpl-list-item b,
.mailtpl-list-item small,
.mailtpl-list-item em,
.mailtpl-group { display: block; }
.mailtpl-group { color: var(--order-meta-blue); font-size: 12px; margin-bottom: 6px; }
.mailtpl-list-item b { color: var(--text); font-size: 14px; line-height: 1.45; margin-bottom: 5px; }
.mailtpl-list-item small { color: var(--muted); line-height: 1.5; }
.mailtpl-list-item em { margin-top: 8px; color: #475569; font-style: normal; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mailtpl-editor {
  min-width: 0;
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86);
}
.mailtpl-editor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.mailtpl-editor-head > div { min-width: 0; }
.mailtpl-title { color: var(--text); font-size: 20px; font-weight: 700; line-height: 1.35; margin-bottom: 6px; word-break: keep-all; overflow-wrap: anywhere; }
.mailtpl-current,
.mailtpl-var-insert,
.mailtpl-vars,
.mailtpl-default {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  padding: 12px;
  margin-bottom: 12px;
}
.mailtpl-current-title { font-weight: 700; color: var(--text); margin-bottom: 8px; }
.mailtpl-current pre,
.mailtpl-default pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #475569;
  font: 12px/1.65 Consolas, "SFMono-Regular", monospace;
}
.mailtpl-fields { display: grid; gap: 12px; }
.mailtpl-fields input,
.mailtpl-fields textarea { width: 100%; min-width: 0; box-sizing: border-box; }
.mailtpl-fields textarea { min-height: 160px; resize: vertical; font-family: Consolas, "SFMono-Regular", "Microsoft YaHei", monospace; line-height: 1.65; }
.mailtpl-var-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.mailtpl-var-help { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 14px; margin-top: 12px; }
.mailtpl-var-help div { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.mailtpl-var-help code { color: var(--text); background: #eef4ff; border: 1px solid #d8e6ff; border-radius: 7px; padding: 2px 6px; }
.mailtpl-var-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mailtpl-var-table {
  width: 100%;
  min-width: 680px;
  table-layout: fixed;
  border-collapse: collapse;
}
.mailtpl-var-table th,
.mailtpl-var-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.55;
}
.mailtpl-var-table th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(15,23,42,.025);
}
.mailtpl-var-table th:nth-child(1),
.mailtpl-var-table td:nth-child(1) { width: 180px; white-space: nowrap; }
.mailtpl-var-table th:nth-child(2),
.mailtpl-var-table td:nth-child(2) { width: 150px; white-space: nowrap; }
.mailtpl-var-table code {
  color: var(--text);
  background: #eef4ff;
  border: 1px solid #d8e6ff;
  border-radius: 7px;
  padding: 2px 6px;
}
.mailtpl-default summary { cursor: pointer; color: var(--text); font-weight: 700; }
.mailtpl-default-grid { display: grid; gap: 12px; margin-top: 12px; }
.mailtpl-default-grid b { display: block; margin-bottom: 6px; }
.mailtpl-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.quick-date-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.recipient-list { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  cursor: pointer;
}
.recipient-chip input { width: auto; margin: 0; }
.recipient-chip small { color: var(--muted); }
.recipient-chip.disabled { opacity: .55; cursor: not-allowed; background: #f7f8fa; }
.account-create-grid { display: grid; grid-template-columns: 1fr 1fr 1.1fr 1.2fr 1fr 110px; gap: 12px; align-items: end; }
.account-table-wrap { width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.account-table { min-width: 1106px; table-layout: fixed; }
.account-table th,
.account-table td { vertical-align: middle; }
.account-avatar-cell { width: 120px; }
.account-avatar-block { display: flex; align-items: center; gap: 8px; min-width: 0; }
.account-avatar-tools { display: grid; gap: 5px; min-width: 48px; }
.account-avatar-tools .btn { padding: 4px 8px; font-size: 12px; border-radius: 7px; }
.avatar-file-input { display: none; }
.avatar-button { border: 0; background: transparent; padding: 0; cursor: pointer; line-height: 0; border-radius: 999px; }
.avatar-button:focus-visible { outline: 2px solid rgba(37, 99, 235, .45); outline-offset: 2px; }
.user-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(26,32,44,.10);
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  color: #64748b;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-avatar svg { width: 18px; height: 18px; }
.account-avatar { width: 40px; height: 40px; flex-basis: 40px; }
.account-avatar svg { width: 20px; height: 20px; }
.account-table .user-name-input,
.account-table .user-email-input,
.account-table .user-role-select { width: 100%; min-width: 0; box-sizing: border-box; }
.account-user-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.4; }
.account-actions-cell { width: 116px; }
.account-actions { width: 104px; display: grid; gap: 6px; }
.account-actions .btn { width: 100%; justify-content: center; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
.user-name-input,
.user-email-input,
.user-role-select { min-width: 150px; height: 34px; padding: 6px 9px; font-size: 13px; }
.user-email-input { min-width: 190px; }
.user-role-select { min-width: 112px; }
@media (max-width: 980px) {
  .account-create-grid { grid-template-columns: 1fr 1fr; }
  .account-create-grid .btn { width: 100%; }
  .security-setting-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-table-wrap { margin-left: -2px; margin-right: -2px; }
  .account-table { display: table; min-width: 1040px; }
  .mail-template-entry { align-items: flex-start; flex-direction: column; }
  .mail-template-dialog {
    width: min(760px, calc(100vw - 20px));
    max-width: min(760px, calc(100vw - 20px));
    height: min(92vh, 860px);
  }
  .mailtpl-body { grid-template-columns: minmax(0, 1fr); }
  .mailtpl-list { max-height: 280px; }
  .mail-template-dialog .modal-body { overflow: auto; }
  .mailtpl-editor { overflow: visible; }
}

.me-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; background: #f3f3f3; border-radius: 999px; font-size: 12px; color: #555; margin-right: 4px; white-space: nowrap; }
.me-chip .me-avatar { width: 24px; height: 24px; flex-basis: 24px; border-color: rgba(255,255,255,.45); }
.me-chip .me-avatar svg { width: 14px; height: 14px; }
.me-chip.admin { background: #000; color: #fff; }
.me-chip.guest { background: rgba(255,230,102,.8); color: #14213d; }

/* ---------- 全屏看图 Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.93); z-index: 300; display: flex; align-items: center; justify-content: center; animation: fadeIn .18s ease; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 92vh; object-fit: contain; border-radius: 6px; box-shadow: 0 12px 48px rgba(0,0,0,.55); background: #fff; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.lightbox .lb-close { position: fixed; top: 12px; right: 14px; width: 40px; height: 40px; border: none; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; transition: background .15s ease; z-index: 2; }
.lightbox .lb-close:hover { background: rgba(255,255,255,.28); }
.lightbox .lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 40px; line-height: 1; cursor: pointer; border-radius: 10px; transition: background .15s ease; }
.lightbox .lb-nav:hover { background: rgba(255,255,255,.26); }
.lightbox .lb-nav.prev { left: 14px; }
.lightbox .lb-nav.next { right: 14px; }
.lightbox .lb-count { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.85); font-size: 13px; background: rgba(0,0,0,.4); padding: 5px 14px; border-radius: 999px; letter-spacing: .5px; }
.file-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 290;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .58);
}
.file-preview-dialog {
  width: min(1100px, 96vw);
  height: min(900px, 94vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
}
.file-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid var(--line);
}
.file-preview-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-preview-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: #f2f3f5;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.file-preview-close:hover { background: #e7e9ed; }
.file-preview-dialog iframe {
  width: 100%;
  flex: 1;
  min-height: 0;
  border: 0;
  background: #f6f7f9;
}
@media (max-width: 640px) {
  .lightbox .lb-nav { width: 40px; height: 56px; font-size: 32px; }
  .lightbox .lb-nav.prev { left: 8px; }
  .lightbox .lb-nav.next { right: 8px; }
  .file-preview-overlay { padding: 0; }
  .file-preview-dialog { width: 100vw; height: 100vh; border-radius: 0; }
}

/* ---------- 打样轮次：样衣细节实拍图 ---------- */
.sr-photo-block { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.sr-photo-label { font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.sr-photo-body { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.sr-noimg { padding: 14px 0 2px; }
.sr-carousel { width: 200px; aspect-ratio: 1 / 1; }
.sr-carousel .img-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #f6f7f9; }
.sr-carousel .img-stage img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.sr-photo-btn { margin-top: 6px; }

/* ---------- 客户查询：样衣实拍图缩略图 ---------- */
a.q-img-thumb { text-decoration: none; line-height: 0; }
a.q-img-thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }

/* ---------- 客户查询：工艺单信息区（内容完整展示，自动撑高） ---------- */
.craft-info-section { margin-top: 18px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; max-height: none; overflow: visible; }
.craft-info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; align-items: start; }
.craft-info-item {
  min-height: 74px;
  padding: 11px 12px;
  border: 1px solid rgba(20, 28, 40, .10);
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86);
}
.craft-info-item .k { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.craft-info-item .v { font-size: 14px; color: var(--text); word-break: break-word; line-height: 1.65; }
.craft-info-callout {
  margin-top: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,251,253,.98));
  border: 1px solid rgba(20, 28, 40, .12);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86);
}
.craft-info-callout-k { font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: .2px; }
.craft-info-callout-v { font-size: 14px; color: var(--text); line-height: 1.8; word-break: break-word; white-space: pre-wrap; }
.craft-info-remark { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .craft-info-section { max-height: none; overflow: visible; padding: 12px 14px; }
  .craft-info-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .craft-info-item { min-height: auto; padding: 10px 11px; }
  .craft-info-remark { grid-column: 1 / -1; }
}
/* ---------- 客户查询 / 后台详情：打样轮次正方形缩略图 ---------- */
.round-sample-grid { --round-sample-thumb: 168px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--round-sample-thumb), var(--round-sample-thumb))); gap: 12px; margin-top: 10px; justify-content: start; align-items: start; }
a.round-sample-item { display: flex; align-items: center; justify-content: center; width: var(--round-sample-thumb); aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f7f8fa; box-shadow: 0 1px 3px rgba(0,0,0,.04); transition: transform .15s ease, box-shadow .15s ease; }
a.round-sample-item:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.10); }
a.round-sample-item img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; border: none; border-radius: 0; background: #f6f7f9; }
@media (max-width: 900px) {
  .round-sample-grid { --round-sample-thumb: 148px; grid-template-columns: repeat(auto-fill, minmax(var(--round-sample-thumb), var(--round-sample-thumb))); gap: 10px; }
}
@media (max-width: 480px) {
  .round-summary-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .round-meta-fields { grid-template-columns: 1fr; gap: 6px; }
  .round-field { padding: 7px 10px; margin-top: 6px; }
  .round-summary-fields .round-field,
  .round-meta-fields .round-field { margin-top: 0; }
  .round-summary-fields .round-field { flex-direction: column; gap: 2px; padding: 6px 5px; font-size: 12px; }
  .round-summary-fields .round-field .rf-k { font-size: 11px; }
  .round-summary-fields .round-field .rf-v { line-height: 1.25; }
  .round-sample-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  a.round-sample-item { width: 100%; border-radius: 8px; }
  a.round-sample-item img { width: 100%; height: 100%; object-fit: contain; }
  .qresult-head { align-items: flex-start; }
  .qresult-actions { gap: 6px; }
  .qresult-actions .btn { padding-left: 10px; padding-right: 10px; }
}

/* ---------- 尺码/配比：清晰数据单元 ---------- */
.size-ratio-list,
.size-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(116px, max-content));
  gap: 8px;
  align-items: center;
  justify-content: start;
  max-width: 100%;
}
.size-ratio-item,
.size-chip {
  display: inline-grid;
  grid-template-columns: minmax(52px, max-content) minmax(64px, max-content);
  align-items: stretch;
  overflow: hidden;
  min-height: 32px;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.92));
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  font-size: 13px;
  line-height: 1;
  width: 100%;
  min-width: 0;
}
.size-ratio-size,
.size-chip b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 0 8px;
  background: rgba(37, 99, 235, .08);
  color: #182234;
  font-weight: 800;
  border-right: 1px solid rgba(37, 99, 235, .10);
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}
.size-ratio-qty,
.size-chip i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 0 12px;
  color: #475467;
  font-style: normal;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}
.size-ratio-qty em {
  margin-left: 2px;
  color: #8a94a6;
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
}

@media (max-width: 640px) {
  .colors-read .grid-head {
    display: none;
  }

  .colors-read .grid-cells {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .size-ratio-list,
  .size-chips {
    grid-template-columns: repeat(auto-fit, minmax(112px, max-content));
    max-width: none;
    width: 100%;
  }

  .size-ratio-item,
  .size-chip {
    grid-template-columns: minmax(46px, max-content) minmax(58px, max-content);
    font-size: clamp(11px, 3.2vw, 13px);
  }

  .size-ratio-size,
  .size-chip b {
    min-width: 46px;
    padding: 0 7px;
  }

  .size-ratio-qty,
  .size-chip i {
    min-width: 58px;
    padding: 0 9px;
  }

  .color-ratio-table {
    display: table;
    width: 100%;
    overflow: visible;
  }

  .color-ratio-table thead {
    display: none;
  }

  .color-ratio-table tbody,
  .color-ratio-table tr,
  .color-ratio-table td {
    display: block;
    width: 100%;
  }

  .color-ratio-table tr {
    padding: 10px 0 12px;
    border-bottom: 1px dashed var(--line);
  }

  .color-ratio-table tr:last-child {
    border-bottom: none;
  }

  .color-ratio-table td {
    border-bottom: none;
    padding: 0;
    white-space: normal;
  }

  .color-ratio-table td:first-child {
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 650;
  }
}
.qresult-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.qresult-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.qorder-mini-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.q-summary-card { padding: 16px 18px; }
.q-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px 14px;
}
.q-summary-item {
  min-width: 0;
}
.q-summary-item .k {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
}
.q-summary-item .v {
  display: block;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.q-summary-status .v {
  display: flex;
  align-items: center;
  min-height: 24px;
}
.q-summary-status .badge {
  font-size: 13px;
  line-height: 1.35;
}
.q-summary-progress {
  margin-top: 12px;
}
.q-brand-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
  padding: 13px 16px;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.84), rgba(247,250,255,.68)),
    rgba(255,255,255,.58);
  box-shadow: 0 10px 28px rgba(18,25,38,.06), inset 0 1px 0 rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.q-brand-copy { min-width: 0; }
.q-brand-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
}
.q-brand-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.q-brand-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.q-brand-btn {
  text-decoration: none;
  white-space: nowrap;
}
.q-brand-list-top .q-brand-entry { margin-bottom: 14px; }
@media (max-width: 640px) {
  .q-summary-card {
    padding: 12px 14px;
    margin-bottom: 10px !important;
  }
  .q-summary-card .qorder-mini-head {
    margin-bottom: 9px;
    padding-bottom: 9px;
  }
  .q-summary-grid {
    grid-template-columns: repeat(var(--q-summary-cols, 4), minmax(0, 1fr));
    gap: 5px;
  }
  .q-summary-item {
    padding: 8px 6px 7px;
    border: 1px solid rgba(24, 37, 56, .08);
    border-radius: 9px;
    background: rgba(255,255,255,.58);
  }
  .q-summary-item .k {
    margin-bottom: 4px;
    font-size: 10.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .q-summary-item .v {
    font-size: 12.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
  }
  .q-summary-status .v { min-height: 20px; }
  .q-summary-status .badge {
    max-width: 100%;
    padding: 2px 6px;
    font-size: 11.5px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .q-summary-progress {
    height: 6px;
    margin-top: 9px;
  }
  .q-brand-entry {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    margin-bottom: 12px;
  }
  .q-brand-title { font-size: 14px; }
  .q-brand-sub { font-size: 11.5px; }
  .q-brand-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .q-brand-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 38px;
  }
}

/* ---------- 报价与数量区款式 元数据 (label-value) ---------- */
.quote-meta { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.quote-meta-item { display: block; }
.quote-meta-item .k { display: inline-block; width: 50px; color: var(--muted); font-size: 12px; }
.quote-meta-item .v { display: inline-block; font-size: 13px; font-weight: 500; color: var(--text); }

/* ---------- 对比度：正文更深 ---------- */
:root { --muted: #6d6d74; }

/* ---------- 桌面端：字号整体上调 ---------- */
@media (min-width: 641px) {
  body { font-size: 15px; }
  .btn { font-size: 15px; }
  .btn.sm { font-size: 13.5px; }
  label { font-size: 13.5px; }
  input, select, textarea { font-size: 14.5px; }
  th, td { font-size: 14px; }
  th { font-size: 13px; }
  .small { font-size: 13px; }
  .order-card-no, .q-no, .kv .item .k, .item-view .k, .colors-read .k,
  .node-time, .timeline .node-time, .node-detail-row .muted,
  .sample-color-head, .size-head .size-cell, .size-head .size-total { font-size: 13px; }
  .item-view .v, .colors-read .v, .order-card-customer { font-size: 16px; }
  .order-card-line, .order-card-link, .round-detail, .node-card-detail,
  .sample-color-row input, .size-cell input, .cr-row input,
  .round-note, .quote-name, .q-customer { font-size: 14px; }
  .node-name, .round-num { font-size: 15px; }
  .order-card-line .order-card-no { font-size: 12px; }
}

/* ---------- 订单列表：竖排行卡片 ---------- */
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-row-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr 200px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: all .18s ease;
}
.order-row-card:hover { border-color: #d0d0d3; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.ocr-thumb { flex-shrink: 0; grid-column: 1; }
.ocr-cover {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  background: #f2f2f4;
  cursor: zoom-in;
  border: 1px solid var(--line);
}
.ocr-cover-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c3c3c7;
  background: #f4f5f7;
}
.ocr-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; grid-column: 2; }
.ocr-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ocr-no { font-size: 14px; color: var(--muted); font-weight: 600; }
.ocr-customer { font-size: 16px; color: #1a3da5; font-weight: 600; }
.ocr-owner { font-weight: 400; }
.ocr-line { font-size: 14px; color: var(--text); }
.ocr-qty b, .ocr-total b { font-size: 16px; }
.ocr-qty b { font-weight: 600; }
.ocr-total b { color: #d13b3b; font-weight: 700; }
.ocr-price { font-size: 13px; margin: 0 4px; }
.ocr-fee { margin-left: 8px; }
.ocr-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; grid-column: 3; }
.ocr-delivery { font-size: 13px; }
.ocr-progress { display: flex; align-items: center; width: 100%; }
.ocr-progress .progressbar { flex: 1; max-width: 140px; }
.ocr-status { align-self: flex-start; }

@media (max-width: 640px) {
  .order-row-card { grid-template-columns: 72px 1fr; gap: 10px; padding: 10px 12px; }
  .ocr-cover { width: 72px; height: 72px; }
  .ocr-thumb { grid-row: span 3; }
  .ocr-meta { grid-column: 2; flex-direction: row; flex-wrap: wrap; gap: 4px 10px; }
  .ocr-status { padding: 0; }
}

/* ---------- 瀑布流订单卡片：品名 / 款号 行 ---------- */
.order-card-row { display: flex; gap: 10px; margin-top: 2px; flex-wrap: wrap; }
.order-card-field { display: inline-flex; gap: 4px; align-items: baseline; min-width: 0; }
.order-card-field .k { font-size: 12px; color: var(--muted); }
.order-card-field .v { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }

/* ---------- 瀑布流订单卡：参考设计（信息密度 + 进度条） ---------- */
.order-card { display: flex; align-items: stretch; padding: 0; overflow: hidden; }
.order-card-cover-wrap { position: relative; flex: 0 0 220px; aspect-ratio: 1/1; background: #f4f5f7; padding: 8px; box-sizing: border-box; }
.order-card-cover-wrap .order-card-cover { width: 100%; height: 100%; object-fit: contain; background: #fff; border-radius: 8px; }
.order-card-cover-wrap .order-card-cover-ph { display: flex; align-items: center; justify-content: center; height: 100%; color: #c3c3c7; background: #fff; border-radius: 8px; }
.order-card-cover-meta { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; }
.cover-count { background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.order-card-info { flex: 1; padding: 14px 18px 12px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.order-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.order-card-head .order-card-no { margin-right: auto; }
.order-card-head .pin-btn { padding: 4px; }
.order-card-no { display: inline-flex; align-items: baseline; gap: 4px; font-size: 0; }
.order-card-no i { font-style: normal; color: var(--muted); font-size: 13px; font-weight: 500; }
.order-card-no b { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: .4px; font-family: "SFMono-Regular", Consolas, monospace; }
.order-card-head .status-edit { flex-shrink: 0; }
.order-card-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ocr-product-name { font-size: 18px; font-weight: 700; color: var(--text); }
.ocr-style-chip { background: #f0f1f3; color: var(--text); font-size: 12px; padding: 3px 10px; border-radius: 6px; white-space: nowrap; }
.order-card-grid3 { display: flex; align-items: center; gap: 0; margin-top: 6px; flex: 0 0 100%; }
.order-card-grid3.guest-grid,
.tian-grid3.guest-grid { gap: 0; }
.order-card-grid3 .ocr-cell { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; min-width: 0; padding: 2px 22px; }
.order-card-grid3 .ocr-cell:first-child { padding-left: 0; }
.order-card-grid3 .ocr-cell + .ocr-cell { border-left: 1px solid #e6e6e8; }
.ocr-cell .ocr-cell-k { font-size: 11px; color: var(--muted); margin-bottom: 1px; }
.ocr-cell .ocr-cell-v { font-size: 15px; font-weight: 700; white-space: nowrap; }
.ocr-cell .ocr-cell-u { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.ocr-cell-total .ocr-cell-v { color: #1a3da5; }
.order-card-divider { height: 1px; background: var(--line); margin: 2px 0; }
.order-card-info-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.ocr-info { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; }
.ocr-info .ocr-ico { display: inline-flex; color: var(--muted); flex-shrink: 0; }
.ocr-info .ocr-k { color: var(--muted); min-width: 56px; }
.ocr-info .ocr-v { color: var(--order-meta-blue); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-card-foot { display: flex; justify-content: flex-end; margin-top: 4px; }
.order-card-foot .order-card-link { color: #1a3da5; cursor: pointer; font-size: 13px; }
.ocr-timeline { display: flex; flex-direction: column; gap: 6px; }
.ocr-timeline-label { font-size: 12px; color: var(--muted); }
.ocr-timeline-steps { display: flex; align-items: flex-start; gap: 0; }
.ocr-step { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.ocr-step-circle {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  flex: 0 0 22px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  overflow: hidden;
}
.ocr-step.done .ocr-step-circle { background: #1d9e75; color: #fff; }
.ocr-step.current .ocr-step-circle { background: #fff; color: #1d9e75; border: 2px solid #1d9e75; }
.ocr-step.pending .ocr-step-circle { background: #fff; color: var(--muted); border: 1px solid var(--line); }
.ocr-step-body { display: flex; flex-direction: column; }
.ocr-step-name { font-size: 12px; color: var(--text); }
.ocr-step.current .ocr-step-name { color: #1d9e75; font-weight: 600; }
.ocr-step-date { font-size: 10px; color: var(--muted); }
.ocr-step-line { flex: 1; height: 2px; min-width: 18px; align-self: center; background: var(--line); margin: 0 2px; }
.ocr-step-line.done { background: #1d9e75; }

@media (max-width: 640px) {
  .order-card { flex-direction: column; }
  .order-card-cover-wrap { flex: 0 0 auto; aspect-ratio: 1/1; }
  .order-card-grid3 { gap: 22px; }
  .order-card-info-rows { grid-template-columns: 1fr; }
  .ocr-stagebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
    align-items: center;
  }
  .ocr-stagebar .ocr-timeline-steps {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    width: 100%;
  }
  .ocr-stagebar .order-card-link {
    margin-left: 0;
    justify-self: end;
    align-self: center;
  }
  .ocr-step {
    min-width: 0;
    gap: 6px;
  }
  .ocr-step-circle {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
  }
  .ocr-step-body {
    min-width: 0;
    align-items: flex-start;
    text-align: left;
  }
  .ocr-step-name {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ocr-step-line { display: none; }
}
.ocr-info-rows { grid-template-columns: 1fr !important; }
.ocr-info .ocr-v { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; max-width: none !important; }

/* ---------- 瀑布流卡片：真实节点两段进度 ---------- */
.ocr-nodebars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.ocr-nodebar-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.ocr-nodebar-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.ocr-nodebar-nums { font-size: 12px; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.ocr-nodebar-nums.done { color: #1d9e75; }
.ocr-nodebar-track { height: 6px; background: #eef0f3; border-radius: 99px; overflow: hidden; }
.ocr-nodebar-track i { display: block; height: 100%; background: #1d9e75; border-radius: 99px; transition: width .3s ease; }
@media (max-width: 640px) {
  .ocr-nodebars { grid-template-columns: 1fr; }
}

/* 缩略节点：4 大阶段（真实节点联动） */
.ocr-timeline-note { font-size: 10px; color: #b6b6bc; margin-left: 6px; font-weight: 400; }
.ocr-step-body { align-items: center; text-align: center; }
.ocr-step-num { font-size: 11px; }
.ocr-step-prog { font-size: 10px; color: var(--muted); font-weight: 500; margin-top: 1px; font-variant-numeric: tabular-nums; }
.ocr-step.done .ocr-step-prog { color: #1d9e75; font-weight: 700; }
.ocr-step.current .ocr-step-circle .ocr-step-num { color: #1d9e75; font-weight: 700; }
.ocr-step .ocr-step-circle svg { display: block; }
.ocr-step .ocr-step-circle svg {
  width: 12px;
  height: 12px;
}

/* ---------- 报价与数量：左侧品名/款号大字号加粗两行 ---------- */
.quote-meta-big { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; min-width: 0; }
.quote-meta-big-row { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.quote-meta-big-row .k { font-size: 14px; color: var(--muted); font-weight: 600; flex-shrink: 0; }
.quote-meta-big-row .v { font-size: 17px; color: var(--text); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.quote-total {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  text-align: right;
}
.quote-total span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.quote-total strong {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  color: var(--text);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* ---------- 预计成本动态行 ---------- */
.est-cost-card { position: relative; }
.est-cost-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.est-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; margin-bottom: 8px; align-items: center; }
.est-row input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.est-row .est-name { font-weight: 500; }
.est-cost-summary {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(220px, 1fr);
  justify-content: end;
  align-items: end;
  gap: 18px 28px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: right;
}
.est-cost-unit,
.est-cost-grand {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
}
.est-cost-unit-line {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
  max-width: 100%;
  white-space: nowrap;
}
.est-cost-unit span,
.est-cost-grand span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.est-cost-unit b {
  margin-top: 0;
  color: var(--text);
  font-size: 23px;
  line-height: 1.1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.est-cost-unit small {
  color: var(--muted);
  font-size: 13px;
  margin-top: 0;
  font-weight: 600;
  flex: 0 0 auto;
  line-height: 1;
  transform: translateY(1px);
}
.est-cost-grand strong {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  color: var(--text);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* ---------- 利润汇总两列 ---------- */
.pl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 6px 0; font-size: 14px; }
.pl-row .k { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; }
.pl-row .k i { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 400; }
.pl-row .v { font-size: 14px; color: var(--text); }
.pl-row .v.strong { font-weight: 700; }
.pl-row .v.small-muted { color: var(--muted); font-size: 13px; }
.pl-row .v.big { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pl-row .v.big small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.pl-row .v.pos { color: #1d9e75; }
.pl-row .v.neg { color: var(--danger); }
.pl-row.est, .pl-row.act { border-radius: 8px; padding: 10px 12px; margin: 4px -12px 0; }
.pl-row.est { background: #f2f7f4; }
.pl-row.act { background: #f7f2f4; }
.pl-row.est.loss,
.pl-row.act.loss { background: #fff1f3; }
.pl-row.est.profit,
.pl-row.act.profit { background: #f2f7f4; }
.pl-divider { height: 1px; background: var(--line); margin: 8px 0; }
.cost-craft-card { height: 100%; }
.cost-expense-summary-card { display: flex; flex-direction: column; gap: 14px; }
.cost-expense-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.cost-expense-summary-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  min-width: 0;
}
.cost-expense-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.cost-expense-summary-item b {
  display: block;
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.cost-expense-summary-item small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.cost-expense-summary-item.highlight {
  border-color: rgba(26, 71, 192, .18);
  background: #f5f8ff;
}
.cost-expense-table-wrap { overflow-x: auto; }
.cost-expense-table { min-width: 980px; table-layout: fixed; }
.cost-expense-table th,
.cost-expense-table td { vertical-align: top; }
.bulk-purchase-section {
  display: grid;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.bulk-purchase-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.bulk-purchase-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.bulk-purchase-list {
  display: grid;
  gap: 12px;
}
.bulk-purchase-category-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.bulk-purchase-category-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.bulk-purchase-category-head div {
  display: grid;
  gap: 2px;
}
.bulk-purchase-category-head span {
  color: var(--muted);
  font-size: 12px;
}
.bulk-purchase-category-head strong,
.ledger-bulk-total b {
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.bulk-purchase-table { min-width: 1120px; }
.craft-archive-page { display: flex; flex-direction: column; gap: 14px; }
.craft-archive-kpis .ledger-kpi-card b { font-size: 24px; }
.craft-archive-page-card { box-shadow: var(--shadow); }
@media (max-width: 640px) {
  .est-row { grid-template-columns: 1fr; }
  .est-row .est-del { justify-self: start; }
  .est-cost-summary {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }
  .est-cost-unit,
  .est-cost-grand { align-items: flex-end; }
  .est-cost-grand strong { font-size: 28px; }
  .pl-row .k i { display: none; }
  .quote-summary {
    flex-direction: column;
    align-items: stretch;
  }
  .quote-summary .btn { align-self: flex-start; }
  .quote-total { align-items: flex-end; }
  .quote-total strong { font-size: 28px; }
  .cost-expense-summary-grid { grid-template-columns: 1fr; }
  .cost-expense-summary-item b { font-size: 20px; }
  .bulk-purchase-form-grid { grid-template-columns: 1fr; }
}
@media (min-width: 641px) and (max-width: 1180px) {
  .cost-expense-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 总记账本 / 工艺留底 ---------- */
.ledger-page { display: flex; flex-direction: column; gap: 14px; }
.ledger-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ledger-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ledger-kpi-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.ledger-kpi-card span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.ledger-kpi-card b { display: block; font-size: 26px; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; }
.ledger-kpi-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.ledger-filter-grid,
.ledger-create-grid,
.craft-archive-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.craft-archive-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(150px, 190px);
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}
.craft-archive-toolbar input,
.craft-archive-toolbar select {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
}
.craft-archive-table-wrap {
  overflow-x: auto;
}
.craft-archive-table {
  min-width: 1120px;
  table-layout: fixed;
}
.craft-archive-table th,
.craft-archive-table td {
  vertical-align: top;
}
.craft-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.craft-main-cell b,
.craft-main-cell span,
.craft-spec-stack span,
.craft-money-cell span,
.craft-money-cell b {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.craft-main-cell b {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 4px;
}
.craft-main-cell span,
.craft-spec-stack span,
.craft-money-cell span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.craft-spec-stack {
  display: grid;
  gap: 3px;
}
.craft-money-cell {
  display: grid;
  gap: 4px;
}
.craft-money-cell b {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ledger-filter-actions,
.ledger-file-picker { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.section-title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ledger-table-wrap { overflow-x: auto; }
.ledger-table { min-width: 1100px; }
.ledger-table th,
.ledger-table td { vertical-align: top; }
.link-btn {
  border: none;
  background: transparent;
  color: #1a3da5;
  padding: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.ledger-actions { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.ledger-note-cell { max-width: 180px; white-space: normal; word-break: break-word; color: var(--muted); }
.ledger-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 42px));
  gap: 6px;
  align-items: center;
  max-width: 210px;
}
.ledger-thumb {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #f5f6f8;
}
.ledger-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ledger-file-chip {
  display: inline-flex;
  align-items: center;
  max-width: 160px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ledger-preview-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.ledger-preview-grid img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f5f6f8;
}
.ledger-edit-context {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: var(--muted);
}
.ledger-edit-context b { color: var(--text); }
.ledger-edit-modal { max-width: 760px; }
.ledger-bulk-card { display: grid; gap: 12px; }
.ledger-bulk-total {
  display: grid;
  justify-items: end;
  gap: 2px;
}
.ledger-bulk-total span {
  color: var(--muted);
  font-size: 12px;
}
.bulk-ledger-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.bulk-ledger-stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.bulk-ledger-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.bulk-ledger-stat b {
  display: block;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.bulk-ledger-stat small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.ledger-bulk-table { min-width: 1180px; }

@media (max-width: 900px) {
  .ledger-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-filter-grid,
  .ledger-create-grid,
  .craft-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .craft-archive-toolbar { grid-template-columns: 1fr 1fr; }
  .craft-archive-toolbar input { grid-column: 1 / -1; }
  .bulk-ledger-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .ledger-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ledger-kpi-card { padding: 12px; border-radius: 10px; }
  .ledger-kpi-card b { font-size: 20px; }
  .ledger-filter-grid,
  .ledger-create-grid,
  .craft-archive-grid { grid-template-columns: 1fr; }
  .craft-archive-toolbar { grid-template-columns: 1fr; }
  .ledger-table { min-width: 980px; }
  .craft-archive-table { min-width: 980px; }
  .ledger-head-actions { width: 100%; }
  .bulk-ledger-stats { grid-template-columns: 1fr; }
  .ledger-bulk-total { justify-items: start; }
}

/* 阶段名字号与圆圈协调 */
.ocr-step-name { font-size: 14px; line-height: 22px; }
.ocr-step.done .ocr-step-name { color: var(--text); }

/* ---------- 工艺单：自定义字段 ---------- */
.craft-cf-row { display: grid; grid-template-columns: 180px 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.craft-cf-row input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
@media (max-width: 640px) {
  .craft-cf-row { grid-template-columns: 1fr; }
}

/* ---------- 打样轮次：寄出运单号 ---------- */
.round-track-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.round-track-label { font-size: 12px; color: var(--muted); font-weight: 600; flex-shrink: 0; }
.round-track { flex: 1; max-width: 340px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.round-track-row:has(.round-track:not(:placeholder-shown)) .round-track-label { color: #1d9e75; }
@media (max-width: 640px) {
  .round-track-row { flex-wrap: wrap; }
  .round-track { max-width: 100%; }
}

/* 样衣实拍图：左列图+上传按钮；右列运单号 */
.sr-photo-grid { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: flex-start; }
.sr-photo-left { display: flex; flex-direction: column; }
.sr-photo-left .sr-carousel { width: 100%; }
.sr-photo-left .sr-photo-btn { margin-top: 8px; }
.sr-photo-grid .round-track-row { margin-top: 0; padding-top: 2px; flex-wrap: wrap; }
.sr-photo-grid .round-track { max-width: none; flex: 1 1 100%; }
.sr-photo-grid .round-track-label { width: auto; }
@media (max-width: 640px) {
  .sr-photo-grid { grid-template-columns: 1fr; }
}

/* 备注移入右列 + 样衣图放大 70% (200→340) */
.sr-photo-grid { grid-template-columns: 340px 1fr; }
.sr-photo-left .sr-carousel { width: 100%; }
.sr-right-col { display: flex; flex-direction: column; padding-left: 18px; min-width: 0; }
.sr-right-col .round-track-row { margin-top: 2px; }
.sr-right-col .round-note { margin-top: 10px; min-height: 84px; }
@media (max-width: 900px) {
  .sr-photo-grid { grid-template-columns: 1fr; }
  .sr-right-col { padding-left: 0; margin-top: 12px; }
}

/* ---------- 收到货款：收款人小计 ---------- */
.inc-subtotal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; background: #f7f9f7; border-radius: 10px; font-size: 13px; color: var(--muted); }
.inc-sub-chip { display: inline-flex; gap: 4px; align-items: baseline; background: #fff; border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.inc-sub-chip b { color: #1d9e75; font-weight: 700; font-size: 13px; }
.inc-sub-total { margin-left: auto; font-weight: 600; color: var(--text); }
.inc-sub-total b { color: #1d9e75; font-size: 15px; }

/* ---------- 回到顶部浮动按钮 ---------- */
#backTopBtn {
  position: fixed;
  right: 22px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(30, 30, 32, 0.30);
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, background .15s ease, visibility .2s;
  z-index: 220;
}
#backTopBtn.show { opacity: 1; visibility: visible; transform: translateY(0); }
#backTopBtn:hover { background: rgba(30, 30, 32, 0.55); }
#backTopBtn svg { width: 20px; height: 20px; display: block; }
@media (max-width: 640px) {
  #backTopBtn { right: 14px; bottom: 78px; width: 40px; height: 40px; }
}

/* ---------- 田字格视图（两列） ---------- */
.order-tian { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.order-card.tian { cursor: pointer; }
.order-tian .order-card:hover { transform: translateY(-2px); }

.order-tian .order-card.tian { display: flex; flex-direction: column; }
.tian-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px 8px; }
.tian-top .order-card-no i { font-size: 12px; }
.tian-top .order-card-no b { font-size: 14px; }
.tian-top-r { display: inline-flex; align-items: center; gap: 6px; }
.tian-top .pin-btn { padding: 3px; }

.tian-body { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 0 14px 10px; align-items: stretch; }
.tian-cover-wrap { position: relative; min-width: 0; }
.tian-cover { width: 100%; aspect-ratio: 1/1; object-fit: contain; border-radius: 10px; background: #f2f2f4; border: 1px solid var(--line); display: block; }
.tian-cover-ph { display: flex; align-items: center; justify-content: center; color: #c3c3c7; }
.tian-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }

.tian-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tian-title .ocr-product-name { font-size: 16px; }
.tian-title .ocr-style-chip { font-size: 11px; padding: 2px 8px; }
.tian-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; border: 1px solid #eef0f2; border-radius: 8px; padding: 7px 4px; background: #fbfbfc; }
.tian-grid3 .ocr-cell { padding: 0 6px; }
.tian-grid3 .ocr-cell + .ocr-cell { border-left: 1px solid #eceef0; }
.tian-grid3 .ocr-cell .ocr-cell-k { font-size: 10px; }
.tian-grid3 .ocr-cell .ocr-cell-v { font-size: 13px; }
.tian-grid3 .ocr-cell .ocr-cell-u { font-size: 10px; }

.tian-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.tian-meta-item { display: flex; gap: 5px; align-items: baseline; min-width: 0; font-size: 12px; }
.tian-meta-item .k { color: var(--muted); flex-shrink: 0; }
.tian-meta-item .v { color: #1a3da5; font-weight: 600; white-space: normal; overflow-wrap: break-word; }
.tian-meta-item.tian-meta-time .v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; word-break: normal; }

.order-card.tian .tian-bar { margin-top: auto; border-top: 1px solid var(--line); padding: 7px 12px 8px; }
.order-card.tian .ocr-step-name { font-size: 12px; line-height: 18px; }
.order-card.tian .ocr-step-circle {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  aspect-ratio: 1 / 1;
  font-size: 10px;
}
.order-card.tian .ocr-step-line { min-width: 10px; }
.order-card.tian .order-card-link { font-size: 12px; }

@media (max-width: 1080px) { .order-tian { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .tian-body { grid-template-columns: 110px 1fr; }
  .tian-cover { border-radius: 8px; }
  .order-batch-check {
    width: 30px;
    height: 30px;
    top: 10px;
    left: 10px;
  }
  .order-batch-check-ui {
    width: 20px;
    height: 20px;
  }
  .order-batch-check svg {
    width: 12px;
    height: 12px;
  }
  .ocr-step-circle {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    flex: 0 0 24px;
    aspect-ratio: 1 / 1;
  }
}

/* 田字格：去掉蓝色系，改清晰深色文字 */
.order-card.tian .tian-meta-item .v { color: #26262b; }
.order-card.tian .ocr-cell-total .ocr-cell-v { color: #c0392b; font-weight: 700; }
.order-card.tian .tian-meta-item .k { color: #8a8a90; }

@media (max-width: 640px) {
  #allOrdersView .grid.stats { display: none; }
  #allOrdersView .my-orders-panel { margin-top: 0 !important; }
}

/* ---------- 付款人小计（支出/费用） ---------- */
.pay-subtotal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; background: #f7f8fa; border-radius: 10px; font-size: 13px; color: var(--muted); }
.pay-sub-chip { display: inline-flex; gap: 4px; align-items: baseline; background: #fff; border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.pay-sub-chip b { color: var(--text); font-weight: 700; font-size: 13px; }
.pay-sub-total { margin-left: auto; font-weight: 600; color: var(--text); }
.pay-sub-total b { color: #d13b3b; font-size: 15px; }

/* ---------- 进度节点：图片凭证 ---------- */
.node-files { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.node-files-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.node-img-item { position: relative; display: inline-flex; }
.node-img-item .zoom-img { line-height: 0; }
.node-img-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
.node-img-del { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; }
.node-img-del:hover { background: var(--danger); }

/* ---------- 访客订单：后台同款卡片 ---------- */
.qlist-wrap { display: flex; flex-direction: column; gap: 12px; }
.qlist-card { cursor: pointer; }
.qlist-card .order-card-cover-wrap { flex: 0 0 200px; }
.qlist-rows { display: flex; flex-direction: column; gap: 5px; }
.qlist-rows .ocr-info { font-size: 13px; }
.qlist-rows .ocr-info .ocr-ico,
.qlist-rows .ocr-info .ocr-k,
.qlist-rows .ocr-info .ocr-v { color: var(--order-meta-blue); }
.qlist-rows .ocr-info .ocr-k { min-width: 56px; }
.qlist-rows .ocr-info .ocr-v { font-weight: 600; white-space: normal; }
.qlist-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 4px 0; }
.qlist-bar { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.qlist-bar .progressbar { flex: 1; max-width: 110px; }
.qlist-bar b { color: var(--text); font-size: 12px; min-width: 30px; text-align: right; }
.qlist-card .order-card-foot { justify-content: flex-end; }
@media (max-width: 640px) {
  .qlist-card .order-card-cover-wrap { flex: 0 0 auto; aspect-ratio: 1/1; }
}

/* 详情款式大卡（后台概览风） */
.qstyle-card { display: flex; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.qstyle-card:last-child { border-bottom: none; }
.qstyle-cover { flex: 0 0 420px; }
.qstyle-cover .img-carousel { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1 / 1; }
.qstyle-cover .img-carousel .img-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #f6f7f9; }
.qstyle-cover .img-carousel .img-stage img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.qstyle-noimg { width: 420px; height: 420px; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; color: #c3c3c7; background: #f4f5f7; border-radius: 12px; }
.qstyle-info { flex: 1; min-width: 0; }
.qstyle-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.qstyle-info table { width: 100%; }
@media (max-width: 640px) {
  .qstyle-card { flex-direction: column; }
  .qstyle-cover, .qstyle-noimg { width: 100%; max-width: 320px; }
  .qstyle-cover .img-carousel, .qstyle-noimg { height: auto; aspect-ratio: 1 / 1; }
}

/* ---------- 客户详情：款式设计稿多图展示（整卡底、点击放大） ---------- */
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.design-thumb { width: 100%; aspect-ratio: 1/1; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #f7f8fa; cursor: zoom-in; transition: transform .15s ease, box-shadow .15s ease; }
.design-thumb:hover { transform: scale(1.02); box-shadow: 0 6px 18px rgba(0,0,0,.08); }

/* ---------- 打样 / 订单 两阶段横向精简卡 ---------- */
.stage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.stage-card { padding: 18px; }
.stage-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.stage-label { font-weight: 600; font-size: 15px; }
.stage-pct { font-size: 22px; font-weight: 700; letter-spacing: -.5px; }
.stage-status { margin-top: 8px; font-size: 13px; color: var(--muted); }
.stage-status.ok { color: var(--ok); font-weight: 500; }
.stage-dots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.stage-dot { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; border: 1.5px solid #d5d5d9; color: #999; background: #fff; cursor: default; }
.stage-dot.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.stage-dot.doing { background: var(--warn); border-color: var(--warn); color: #fff; }
@media (max-width: 720px) {
  .stage-grid { grid-template-columns: 1fr; }
  .design-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ---------- 后台工艺单：多张设计稿上传网格 ---------- */
.design-admin-grid { display: flex; flex-wrap: wrap; gap: 10px; min-height: 34px; }
.design-admin-item { position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #f5f6f8; }
.design-admin-item img { width: 100%; height: 100%; object-fit: contain; display: block; }
.design-admin-del { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.design-admin-del:hover { background: var(--danger); }

/* ---------- 2026 UI polish: glass material, smoother motion, sharper typography ---------- */
:root {
  --bg: #f4f6f9;
  --card: rgba(255, 255, 255, 0.78);
  --text: #15171d;
  --muted: #667085;
  --line: rgba(26, 32, 44, 0.10);
  --primary: #101114;
  --primary-hover: #000000;
  --ok: #18a77e;
  --warn: #d99513;
  --danger: #d44747;
  --glass: rgba(255, 255, 255, 0.68);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --shadow: 0 1px 2px rgba(18, 25, 38, .04), 0 12px 32px rgba(18, 25, 38, .08);
  --shadow-hover: 0 4px 14px rgba(18, 25, 38, .08), 0 22px 52px rgba(18, 25, 38, .13);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.16, 1, .3, 1);
}

html { scroll-behavior: auto; }

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.40) 34%, rgba(244,246,249,.92) 100%),
    linear-gradient(125deg, rgba(82, 109, 140, .13) 0%, rgba(255,255,255,0) 38%, rgba(24, 167, 126, .09) 66%, rgba(255,255,255,0) 100%),
    #f4f6f9;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(rgba(255,255,255,.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.30), transparent 58%);
}

body, .btn, input, select, textarea, .badge, .order-card, .card { letter-spacing: 0; }

.card,
.order-card,
.modal,
.authwrap .card,
.qsearch .card,
.style-block,
.sample-round,
.round-public-item,
.node-card-body,
.file-item {
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.68));
  border-color: rgba(255,255,255,.58);
  box-shadow: var(--shadow);
  backdrop-filter: saturate(1.35) blur(22px);
  -webkit-backdrop-filter: saturate(1.35) blur(22px);
}

.card {
  animation: material-rise .48s var(--ease-spring) both;
}

@keyframes material-rise {
  from { opacity: 0; transform: translateY(10px) scale(.992); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.topbar {
  background: rgba(255,255,255,.68);
  border-bottom-color: rgba(255,255,255,.64);
  box-shadow: 0 10px 30px rgba(18,25,38,.07);
  backdrop-filter: saturate(1.55) blur(26px);
  -webkit-backdrop-filter: saturate(1.55) blur(26px);
}

.topbar .brand,
.qsearch h1,
.form-title,
.ocr-product-name {
  font-weight: 750;
}

.btn {
  border-color: rgba(20, 28, 40, .10);
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 1px 2px rgba(18,25,38,.04);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
}
.btn:hover {
  background: rgba(255,255,255,.92);
  border-color: rgba(20, 28, 40, .16);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 10px 24px rgba(18,25,38,.10);
}
.btn:active { transform: translateY(0) scale(.985); }
.btn.primary {
  background: linear-gradient(180deg, #25272d 0%, #0f1013 100%);
  border-color: rgba(0,0,0,.88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 10px 24px rgba(0,0,0,.18);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #1c1e23 0%, #050607 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 16px 34px rgba(0,0,0,.22);
}

input,
select,
textarea {
  background: rgba(255,255,255,.76);
  border-color: rgba(20, 28, 40, .11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
input:hover,
select:hover,
textarea:hover {
  background: rgba(255,255,255,.90);
  border-color: rgba(20, 28, 40, .18);
}
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(22, 119, 255, .34);
  background: rgba(255,255,255,.96);
  box-shadow: 0 0 0 4px rgba(22,119,255,.09), inset 0 1px 0 rgba(255,255,255,.86);
}

.badge {
  border-radius: 999px;
  font-weight: 600;
  background: rgba(242,246,255,.82);
  border-color: rgba(26,61,165,.14);
}
.badge.ok { background: rgba(236, 250, 245, .86); border-color: rgba(24,167,126,.20); }
.badge.warn { background: rgba(255, 248, 230, .90); border-color: rgba(217,149,19,.20); }
.badge.danger { background: rgba(255, 241, 241, .90); border-color: rgba(212,71,71,.20); }

.progressbar {
  height: 8px;
  background: rgba(21, 27, 38, .07);
  box-shadow: inset 0 1px 2px rgba(18,25,38,.06);
}
.progressbar > i {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #18a77e 0%, #2cc29b 52%, #5fd2b5 100%);
  box-shadow: 0 0 18px rgba(24,167,126,.24);
}
.progressbar > i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.46), transparent);
  transform: translateX(-100%);
  animation: progress-sheen 1.6s .25s var(--ease) both;
}
@keyframes progress-sheen {
  to { transform: translateX(100%); }
}

.order-card {
  border-color: rgba(255,255,255,.60);
  transition: transform .28s var(--ease-spring), box-shadow .28s var(--ease), border-color .28s var(--ease), background .28s var(--ease);
}
.order-card:hover {
  border-color: rgba(255,255,255,.84);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.order-card-cover-wrap {
  background: linear-gradient(180deg, rgba(255,255,255,.40), rgba(231,235,242,.58));
}
.order-card-cover-wrap .order-card-cover,
.order-card-cover-wrap .order-card-cover-ph,
.tian-cover,
.qstyle-noimg,
.img-carousel {
  background: rgba(255,255,255,.72);
  border-color: rgba(20, 28, 40, .08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.64);
}
.ocr-stagebar {
  background: rgba(255,255,255,.42);
  border-top-color: rgba(20, 28, 40, .08);
}
.ocr-step-circle,
.stage-dot,
.node-circle,
.node-status-dot {
  box-shadow: 0 1px 2px rgba(18,25,38,.08), inset 0 1px 0 rgba(255,255,255,.72);
}
.ocr-step.done .ocr-step-circle,
.stage-dot.done,
.node-circle.done,
.node-status-dot.done {
  background: linear-gradient(180deg, #21b58c, #118966);
  border-color: rgba(17,137,102,.18);
}
.ocr-step.current .ocr-step-circle,
.stage-dot.doing,
.node-circle.doing,
.node-status-dot.doing {
  box-shadow: 0 0 0 4px rgba(24,167,126,.10), 0 3px 10px rgba(24,167,126,.14);
}

.view-toggle {
  background: rgba(255,255,255,.58);
  border-color: rgba(20, 28, 40, .10);
  padding: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}
.view-toggle button {
  border-radius: 7px;
  background: transparent;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.view-toggle button.active {
  background: rgba(16,17,20,.94);
  color: #fff;
  box-shadow: 0 6px 14px rgba(18,25,38,.14);
}

.qsearch {
  animation: material-rise .56s var(--ease-spring) both;
}
.qsearch h1 {
  font-size: 28px;
  letter-spacing: 0;
}
.qsearch .sub {
  color: #697386;
}
.qsearch {
  font-family: "Microsoft YaHei UI", "PingFang SC", "SF Pro Text", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}
.qsearch label {
  color: #516078;
  font-weight: 600;
}
.qsearch input {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: #121926;
  font-variant-numeric: tabular-nums;
}
.qsearch input::placeholder {
  color: #8f98a8;
  opacity: 1;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: 0;
}
.qresult-head {
  position: sticky;
  top: 12px;
  z-index: 8;
  padding: 8px 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.craft-info-section,
.round-field,
.craft-info-note,
.sample-box,
.pay-subtotal,
.inc-subtotal {
  background: rgba(255,255,255,.58);
  border-color: rgba(20, 28, 40, .08);
}

.round-public-item {
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.round-public-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.84);
  box-shadow: 0 10px 26px rgba(18,25,38,.09);
}
a.round-sample-item,
.design-thumb,
.design-admin-item,
.node-img-item img {
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease), filter .22s var(--ease);
}
a.round-sample-item:hover,
.design-thumb:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 30px rgba(18,25,38,.12);
}

.modal-overlay {
  background: rgba(8, 10, 14, .36);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.modal {
  border: 1px solid rgba(255,255,255,.62);
}

#backTopBtn {
  background: rgba(20, 24, 31, .28);
  box-shadow: 0 10px 24px rgba(18,25,38,.18);
}
#backTopBtn:hover { background: rgba(20, 24, 31, .48); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(89, 99, 116, .28); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(89, 99, 116, .42); border: 3px solid transparent; background-clip: content-box; }

@media (max-width: 640px) {
  body {
    background:
      linear-gradient(180deg, rgba(255,255,255,.94) 0%, rgba(246,248,251,.76) 46%, rgba(241,244,248,.94) 100%),
      linear-gradient(135deg, rgba(82,109,140,.12), rgba(24,167,126,.06)),
      #f4f6f9;
  }
  .card,
  .order-card,
  .qsearch .card {
    border-color: rgba(255,255,255,.72);
    box-shadow: 0 1px 2px rgba(18,25,38,.04), 0 10px 28px rgba(18,25,38,.07);
  }
  .qsearch h1 { font-size: 25px; }
  .btn:hover,
  .order-card:hover,
  .round-public-item:hover,
  a.round-sample-item:hover,
  .design-thumb:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- Premium tone pass C: mist glass, deep blue-gray, ice-blue accents ---------- */
:root {
  --bg: #f3f6fa;
  --card: rgba(255, 255, 255, 0.76);
  --text: #121926;
  --muted: #657084;
  --line: rgba(24, 37, 56, 0.11);
  --primary: #182233;
  --primary-hover: #0f1724;
  --accent: #4da3ff;
  --accent-ink: #236cc7;
  --order-meta-blue: #2563EB;
  --accent-soft: rgba(77, 163, 255, 0.11);
  --price: #121926;
  --ok: #3f7f8d;
  --warn: #9b762b;
  --danger: #ad535b;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.84);
  --shadow: 0 1px 2px rgba(20, 30, 38, .035), 0 14px 34px rgba(20, 30, 38, .075);
  --shadow-hover: 0 5px 16px rgba(20, 30, 38, .08), 0 24px 54px rgba(20, 30, 38, .12);
}

body {
  background:
    linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(244,248,252,.86) 44%, rgba(236,242,249,.96) 100%),
    linear-gradient(132deg, rgba(77,163,255,.090) 0%, rgba(255,255,255,0) 42%, rgba(24,34,51,.052) 100%),
    #f3f6fa;
}

body::before {
  background:
    linear-gradient(120deg, rgba(255,255,255,.42) 0%, transparent 34%, rgba(77,163,255,.042) 100%),
    linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,0));
  background-size: auto;
  opacity: .82;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.42), transparent 66%);
}

.card,
.order-card,
.modal,
.authwrap .card,
.qsearch .card,
.style-block,
.sample-round,
.round-public-item,
.node-card-body,
.file-item {
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.66));
  border-color: rgba(255,255,255,.74);
  box-shadow: var(--shadow);
}

.topbar,
.qresult-head {
  background: rgba(248, 250, 253, .70);
  border-color: rgba(255,255,255,.70);
  box-shadow: 0 10px 30px rgba(20,30,38,.065);
}

.btn {
  color: #121926;
  border-color: rgba(24, 37, 56, .12);
  background: rgba(255,255,255,.72);
}
.btn:hover {
  background: rgba(255,255,255,.94);
  border-color: rgba(77, 163, 255, .26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88), 0 10px 24px rgba(20,30,38,.09);
}
.btn.primary,
.view-toggle button.active {
  background: linear-gradient(180deg, #263247 0%, #111a28 100%);
  border-color: rgba(17, 26, 40, .82);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 12px 28px rgba(17,26,40,.22);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #202b3d 0%, #0a111c 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.20), 0 16px 36px rgba(17,26,40,.26);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(77, 163, 255, .42);
  box-shadow: 0 0 0 4px rgba(77,163,255,.11), inset 0 1px 0 rgba(255,255,255,.86);
}

.badge {
  color: var(--accent-ink);
  background: rgba(235, 244, 255, .84);
  border-color: rgba(77, 163, 255, .22);
}
.badge.ok { color: var(--ok); background: rgba(235, 246, 248, .86); border-color: rgba(63,127,141,.20); }
.badge.warn { color: var(--warn); background: rgba(250, 246, 236, .90); border-color: rgba(155,118,43,.20); }
.badge.danger { color: var(--danger); background: rgba(251, 240, 241, .90); border-color: rgba(173,83,91,.20); }
.badge.dark { color: #fff; background: #141d2b; border-color: #141d2b; }

.progressbar > i,
.ocr-nodebar-track i {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #358cff 0%, #66b4ff 55%, #a8d7ff 100%);
  box-shadow: 0 0 18px rgba(77,163,255,.24);
}

.progressbar > i::after,
.ocr-nodebar-track i::after {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 0;
  width: 58%;
  min-width: 42px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.78) 48%, rgba(255,255,255,0) 100%);
  filter: blur(.15px);
  transform: translate3d(-150%, 0, 0) skewX(-18deg);
  will-change: transform;
  animation: progress-shine 2.2s linear infinite;
}

@keyframes progress-shine {
  from { transform: translate3d(-150%, 0, 0) skewX(-18deg); }
  to { transform: translate3d(240%, 0, 0) skewX(-18deg); }
}

.order-card-customer,
.order-card-link,
.order-card-foot .order-card-link,
.tian-meta-item .v,
.q-phase-status.ok {
  color: var(--accent);
}

.ocr-info .ocr-v {
  color: var(--order-meta-blue);
}

.ocr-cell-total .ocr-cell-v,
.ocr-total b,
.pay-sub-total b,
.order-card.tian .ocr-cell-total .ocr-cell-v {
  color: var(--price);
}

.ocr-step.done .ocr-step-circle,
.stage-dot.done,
.node-circle.done,
.node-status-dot.done {
  background: linear-gradient(180deg, #66b4ff, #2f79df);
  border-color: rgba(47,121,223,.20);
}
.ocr-step.current .ocr-step-circle {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255,255,255,.94);
}
.ocr-step.current .ocr-step-name,
.ocr-step.done .ocr-step-prog,
.ocr-step.current .ocr-step-circle .ocr-step-num,
.ocr-nodebar-nums.done {
  color: var(--accent);
}
.ocr-step-line.done {
  background: var(--accent);
}

@media (max-width: 640px) {
  body {
    background:
      linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(245,249,253,.88) 46%, rgba(237,243,250,.96) 100%),
      linear-gradient(135deg, rgba(77,163,255,.082), rgba(24,34,51,.042)),
      #f3f6fa;
  }
}

/* ---------- Soft yolk state: light active/progress marker ---------- */
:root {
  --warn: var(--muted);
  --warn-bg: rgba(255, 230, 102, .80);
  --warn-border: rgba(230, 200, 79, .80);
  --warn-ring: rgba(255, 230, 102, .24);
}

.badge.warn {
  color: var(--warn);
  background: var(--warn-bg);
  border-color: var(--warn-border);
}

.stage-dot.doing,
.node-circle.doing,
.node-status-dot.doing {
  color: var(--warn);
  background: var(--warn-bg);
  border-color: var(--warn-border);
  box-shadow: 0 0 0 4px var(--warn-ring), 0 2px 6px rgba(174, 132, 38, .12), inset 0 1px 0 rgba(255,255,255,.68);
}

.ocr-step.current .ocr-step-circle {
  color: var(--warn);
  background: var(--warn-bg);
  border: 2px solid var(--warn-border);
  box-shadow: 0 0 0 4px var(--warn-ring), 0 2px 6px rgba(174, 132, 38, .12), inset 0 1px 0 rgba(255,255,255,.68);
}

.ocr-step.current .ocr-step-name,
.ocr-step.current .ocr-step-circle .ocr-step-num {
  color: var(--warn);
}

/* ---------- Mobile anti-vertical-text guard ---------- */
.btn,
.badge,
.me-chip,
.status-edit,
.view-toggle button,
.tabs button,
.seg-btn,
.qresult-actions .btn,
.order-detail-actions .btn {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

.tabs,
.seg,
.order-detail-actions,
.topbar .actions {
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar,
.seg::-webkit-scrollbar,
.order-detail-actions::-webkit-scrollbar,
.topbar .actions::-webkit-scrollbar {
  display: none;
}

.tabs button,
.seg-btn,
.order-detail-actions .btn,
.topbar .actions .btn,
.topbar .actions .me-chip {
  flex: 0 0 auto !important;
  min-width: max-content;
}

@media (max-width: 640px) {
  .order-detail-head {
    display: block !important;
  }

  .order-detail-actions {
    width: 100%;
    margin-top: 12px;
    gap: 8px !important;
    padding-bottom: 4px;
  }

  .order-detail-actions .btn {
    padding: 8px 12px;
    line-height: 1.25;
  }

  .tabs {
    gap: 4px;
    margin-bottom: 14px;
    padding-bottom: 1px;
  }

  .tabs button {
    padding: 10px 16px;
    line-height: 1.25;
  }

  .kv .item .k,
  .item-view .k,
  .panel-title,
  .form-section,
  label {
    word-break: keep-all;
    overflow-wrap: normal;
  }
}

/* ---------- Mobile compact typography + one-line stage steps ---------- */
@media (max-width: 640px) {
  body { font-size: 14px; }
  .container { padding-left: 10px; padding-right: 10px; }
  .card { padding: 14px; }

  h1,
  h2,
  h3,
  .panel-title,
  .form-title,
  .section-divider,
  .qresult-head,
  .qorder-mini-head,
  .order-card-title,
  .tian-title {
    min-width: 0;
  }

  h1,
  h2,
  h3,
  .topbar .brand,
  .form-title,
  .panel-title,
  .qsearch h1,
  .order-card-title > *,
  .tian-title > * {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  .topbar .brand { font-size: 14px; max-width: 46vw; }
  .topbar .brand small { display: none; }
  .form-title { font-size: 18px; }
  .qsearch h1 { font-size: 22px; }
  .btn { font-size: 13px; }
  .btn.sm { font-size: 12px; padding: 6px 9px; }
  input, select, textarea { font-size: 14px; }
  label, .small, .muted.small { font-size: 12px; }

  .btn,
  .badge,
  .me-chip,
  .status-edit,
  .tabs button,
  .seg-btn,
  .view-toggle button {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tabs,
  .seg,
  .topbar .actions,
  .order-detail-actions,
  .qresult-actions {
    min-width: 0;
  }

  .order-card-info { padding: 12px 12px 10px; gap: 8px; }
  .order-card-head,
  .tian-top {
    min-width: 0;
  }
  .order-card-no,
  .tian-top .order-card-no {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }
  .order-card-no i,
  .tian-top .order-card-no i {
    font-size: 12px;
    flex: 0 0 auto;
  }
  .order-card-no b,
  .tian-top .order-card-no b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }
  .ocr-product-name,
  .tian-title .ocr-product-name {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
  }
  .ocr-style-chip,
  .tian-title .ocr-style-chip {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ocr-cell .ocr-cell-v { font-size: 14px; }
  .ocr-info { font-size: 12px; }
  .ocr-info .ocr-k { min-width: 48px; }
  .ocr-info .ocr-v,
  .tian-meta-item .v {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
  }

  .ocr-stagebar,
  .order-card.tian .tian-bar {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 7px 10px 8px;
    min-width: 0;
  }
  .ocr-stagebar .ocr-timeline-steps,
  .order-card.tian .ocr-stagebar .ocr-timeline-steps {
    flex: 1 1 auto;
    min-width: 0;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0 !important;
    align-items: start;
    width: 100%;
  }
  .ocr-stagebar .order-card-link {
    display: none;
  }
  .ocr-step {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    position: relative;
  }
  .ocr-step-line {
    display: block !important;
    position: absolute;
    top: 10px;
    left: calc(50% + 12px);
    right: calc(-50% + 12px);
    width: auto;
    min-width: 0;
    height: 2px;
    margin: 0;
    z-index: 0;
  }
  .ocr-step:last-child .ocr-step-line {
    display: none !important;
  }
  .ocr-step-circle,
  .order-card.tian .ocr-step-circle {
    position: relative;
    z-index: 1;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    flex: 0 0 22px;
    font-size: 10px;
  }
  .ocr-step-body {
    min-width: 0;
    width: 100%;
    align-items: center;
    text-align: center;
  }
  .ocr-step-name,
  .order-card.tian .ocr-step-name {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.25;
  }
}

@media (max-width: 430px) {
  body { font-size: 13.5px; }
  .container { padding-left: 9px; padding-right: 9px; }
  h1 { font-size: 22px; }
  h2 { font-size: 19px; }
  h3 { font-size: 16px; }
  .form-title { font-size: 17px; }
  .qsearch h1 { font-size: 20px; }
  .btn { font-size: 12.5px; padding-left: 10px; padding-right: 10px; }
  .btn.sm { font-size: 11.5px; padding: 5px 8px; }
  .tabs button {
    font-size: 13px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .badge,
  .status-edit {
    font-size: 12px;
  }
  .ocr-stagebar,
  .order-card.tian .tian-bar {
    gap: 4px;
  }
  .ocr-step-name,
  .order-card.tian .ocr-step-name {
    font-size: 10.5px;
  }
}

@media (max-width: 380px) {
  body { font-size: 13px; }
  .container { padding-left: 8px; padding-right: 8px; }
  .card { padding: 12px; }
  .btn.sm { font-size: 11px; padding: 5px 8px; }
  .badge { font-size: 11px; padding: 3px 8px; }
  .order-card-no i,
  .tian-top .order-card-no i { font-size: 11px; }
  .order-card-no b,
  .tian-top .order-card-no b { font-size: 13px; }
  .ocr-product-name,
  .tian-title .ocr-product-name { font-size: 15px; }
  .ocr-cell .ocr-cell-k,
  .tian-grid3 .ocr-cell .ocr-cell-k { font-size: 10px; }
  .ocr-cell .ocr-cell-v,
  .tian-grid3 .ocr-cell .ocr-cell-v { font-size: 12px; }
  .ocr-info,
  .tian-meta-item { font-size: 11px; }
  .ocr-stagebar,
  .order-card.tian .tian-bar { padding-left: 8px; padding-right: 8px; }
  .ocr-step-circle,
  .order-card.tian .ocr-step-circle {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    flex-basis: 20px;
    font-size: 9px;
  }
  .ocr-step-line {
    top: 9px;
    left: calc(50% + 10px);
    right: calc(-50% + 10px);
  }
  .ocr-step-name,
  .order-card.tian .ocr-step-name {
    font-size: 10px;
  }
}

@media (max-width: 340px) {
  body { font-size: 12.5px; }
  .container { padding-left: 6px; padding-right: 6px; }
  .card { padding: 10px; }
  .btn { font-size: 12px; padding-left: 8px; padding-right: 8px; }
  .tabs button { font-size: 12px; padding-left: 10px; padding-right: 10px; }
  .ocr-stagebar,
  .order-card.tian .tian-bar {
    padding-left: 6px;
    padding-right: 6px;
  }
  .ocr-step-circle,
  .order-card.tian .ocr-step-circle {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    flex-basis: 18px;
    font-size: 8px;
  }
  .ocr-step-line {
    top: 8px;
    left: calc(50% + 9px);
    right: calc(-50% + 9px);
  }
  .ocr-step-name,
  .order-card.tian .ocr-step-name {
    font-size: 9.5px;
  }
}
