/* =========================================================
   窗管家 · 门窗订单管理
   纯本地单文件应用样式
   ========================================================= */

:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #172235;
  --ink-2: #334156;
  --muted: #6f7c90;
  --muted-2: #94a0b2;
  --line: #e3e8f0;
  --line-strong: #d3dbe7;

  --navy: #0d1b2f;
  --navy-2: #142743;
  --brand: #2161b5;
  --brand-deep: #174a8b;
  --brand-soft: #eaf1fb;
  --brand-softer: #f4f8fe;

  --green: #137e65;
  --green-soft: #e9f7f1;
  --amber: #a7680c;
  --amber-soft: #fdf3df;
  --red: #bc3d3d;
  --red-soft: #fceeee;
  --violet: #6e4bb0;
  --violet-soft: #f2eefa;
  --cyan: #176f89;
  --cyan-soft: #eaf6f9;

  --shadow-xs: 0 1px 2px rgba(18, 36, 63, 0.04);
  --shadow-sm: 0 1px 2px rgba(18, 36, 63, 0.04), 0 8px 24px rgba(18, 36, 63, 0.035);
  --shadow-md: 0 14px 45px rgba(18, 36, 63, 0.11);
  --shadow-lg: 0 32px 90px rgba(10, 24, 45, 0.24);

  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 244px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-num: "SF Pro Display", "Helvetica Neue", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 92% -14%, rgba(33, 97, 181, 0.07), transparent 68%),
    var(--bg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

a {
  color: inherit;
}

svg {
  display: block;
}

::selection {
  background: #d8e7fb;
}

:focus-visible {
  outline: 3px solid rgba(33, 97, 181, 0.24);
  outline-offset: 2px;
}

/* ---------- 布局骨架 ---------- */

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  padding: 22px 15px 18px;
  overflow-y: auto;
  color: #fff;
  background:
    radial-gradient(420px 220px at 0% 0%, rgba(71, 132, 212, 0.18), transparent 70%),
    linear-gradient(178deg, #12243e 0%, #0c182a 74%, #0a1525 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 7px 22px;
}

.brand-mark {
  position: relative;
  display: grid;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  place-items: center;
  color: #eaf2ff;
  background: linear-gradient(145deg, #2f78d5, #184a8c);
  border: 1px solid rgba(155, 196, 246, 0.32);
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 7px 18px rgba(0, 0, 0, 0.2);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.brand-copy span {
  margin-top: 1px;
  color: #8ba0bb;
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.side-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 43px;
  margin: 0 0 12px;
  padding: 0 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, #2b70c8, #1d56a1);
  border: 1px solid rgba(142, 187, 246, 0.26);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(4, 18, 37, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.side-cta:hover {
  background: linear-gradient(135deg, #357dd8, #2262b5);
  box-shadow: 0 10px 26px rgba(4, 18, 37, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.side-cta svg {
  width: 16px;
  height: 16px;
}

.nav-group {
  margin-top: 6px;
}

.nav-label {
  padding: 13px 10px 7px;
  color: #6f849e;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 41px;
  padding: 9px 11px;
  color: #aab9cc;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 9px;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(56, 125, 218, 0.31), rgba(56, 125, 218, 0.09));
  box-shadow: inset 0 0 0 1px rgba(118, 170, 240, 0.16);
}

.nav-item.active::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 17px;
  content: "";
  background: #71a9f2;
  border-radius: 0 3px 3px 0;
  transform: translateY(-50%);
}

.nav-icon {
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  opacity: 0.92;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.nav-item .nav-badge {
  min-width: 19px;
  height: 19px;
  margin-left: auto;
  padding: 0 5px;
  color: #cfe4ff;
  font-size: 10px;
  font-weight: 600;
  line-height: 19px;
  text-align: center;
  background: rgba(115, 168, 239, 0.2);
  border: 1px solid rgba(131, 179, 242, 0.18);
  border-radius: 999px;
}

.sidebar-spacer {
  flex: 1;
  min-height: 24px;
}

.side-note {
  margin: 0 2px 12px;
  padding: 12px;
  color: #94a9c2;
  font-size: 11px;
  line-height: 1.65;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 10px;
}

.side-note strong {
  display: block;
  margin-bottom: 2px;
  color: #c7d6e8;
  font-size: 11.5px;
  font-weight: 600;
}

.side-footer {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.shop-chip {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 9px;
  padding: 8px;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 9px;
  transition: background 0.16s ease;
}

.shop-chip:hover {
  background: rgba(255, 255, 255, 0.05);
}

.shop-avatar {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #d8e9ff;
  font-size: 12px;
  font-weight: 700;
  background: rgba(87, 148, 225, 0.18);
  border: 1px solid rgba(128, 181, 246, 0.19);
  border-radius: 8px;
}

.shop-copy {
  min-width: 0;
}

.shop-copy strong {
  display: block;
  overflow: hidden;
  color: #d5dfeb;
  font-size: 11.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-copy span {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
  color: #7288a2;
  font-size: 9.5px;
}

.shop-copy span::before {
  width: 4px;
  height: 4px;
  content: "";
  background: #46b792;
  border-radius: 50%;
}

.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: var(--sidebar-w);
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
  padding: 0 32px;
  background: rgba(243, 245, 249, 0.84);
  border-bottom: 1px solid rgba(219, 226, 236, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 11.5px;
  white-space: nowrap;
}

.crumb-sep {
  color: #c3ccd9;
}

.crumb-current {
  color: var(--ink-2);
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.save-state {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 5px;
  color: #8490a1;
  font-size: 10.5px;
  white-space: nowrap;
}

.save-state::before {
  width: 5px;
  height: 5px;
  content: "";
  background: #2da47d;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(45, 164, 125, 0.1);
}

.demo-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 13px 32px -7px;
  padding: 8px 12px;
  color: #775b20;
  font-size: 11.5px;
  line-height: 1.5;
  background: #fff9ea;
  border: 1px solid #f0dfb4;
  border-radius: 9px;
}

.demo-banner .demo-dot {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  background: #d79a28;
  border-radius: 50%;
}

.demo-banner strong {
  font-weight: 600;
}

.demo-banner .demo-action {
  margin-left: auto;
  padding: 2px 0;
  color: #8b620e;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(139, 98, 14, 0.35);
}

.demo-banner .demo-action:hover {
  color: #5e4205;
}

#view {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 27px 32px 54px;
  flex: 1;
}

/* ---------- 通用控件 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 39px;
  padding: 0 15px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow-xs);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  border-color: #bfcbda;
  transform: translateY(-1px);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2869bd, #1d549e);
  border-color: #1d549e;
  box-shadow: 0 4px 12px rgba(33, 97, 181, 0.18);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2d74cc, #1b4f97);
  border-color: #1b4f97;
  box-shadow: 0 6px 16px rgba(33, 97, 181, 0.25);
}

.btn-ghost:hover {
  background: #fbfcfe;
}

.btn-soft {
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-color: transparent;
  box-shadow: none;
}

.btn-soft:hover {
  background: #e0ebf9;
  border-color: transparent;
}

.btn-danger {
  color: var(--red);
  background: #fff;
  border-color: #efd2d2;
}

.btn-danger:hover {
  background: #fff8f8;
  border-color: #e2b5b5;
}

.btn-danger-solid {
  color: #fff;
  background: #b43c3c;
  border-color: #b43c3c;
}

.btn-danger-solid:hover {
  background: #a23131;
  border-color: #a23131;
}

.btn-sm {
  height: 32px;
  padding: 0 10px;
  font-size: 11.5px;
  border-radius: 8px;
}

.btn-sm svg {
  width: 14px;
  height: 14px;
}

.btn-lg {
  height: 45px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: #66758a;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.icon-btn:hover {
  color: var(--brand);
  background: #fbfcfe;
  border-color: #bfcbda;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn.danger:hover {
  color: var(--red);
  background: #fff8f8;
  border-color: #eccdcd;
}

.icon-btn.plain {
  width: 29px;
  height: 29px;
  background: transparent;
  border-color: transparent;
}

.icon-btn.plain:hover {
  background: rgba(39, 97, 170, 0.06);
  border-color: transparent;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
  background: transparent;
  border: 0;
}

.link-btn:hover {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn svg {
  width: 13px;
  height: 13px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.muted {
  color: var(--muted);
}

.text-danger {
  color: var(--red) !important;
}

.text-success {
  color: var(--green) !important;
}

.nowrap {
  white-space: nowrap;
}

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

/* ---------- 页头 ---------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 23px;
}

.page-head-copy {
  min-width: 0;
}

.page-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 5px;
  color: var(--brand);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-eyebrow::after {
  width: 21px;
  height: 1px;
  content: "";
  background: #a9c5e7;
}

.page-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.3;
}

.page-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.page-head p strong {
  color: var(--ink-2);
  font-weight: 600;
}

.page-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  padding: 0;
  color: var(--muted);
  font-size: 11.5px;
  background: transparent;
  border: 0;
}

.back-link:hover {
  color: var(--brand);
}

.back-link svg {
  width: 13px;
  height: 13px;
}

/* ---------- KPI ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 15px;
}

.kpi {
  position: relative;
  min-width: 0;
  padding: 17px 17px 14px;
  overflow: hidden;
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.kpi-icon {
  display: grid;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9px;
}

.kpi-icon svg {
  width: 16px;
  height: 16px;
}

.kpi-icon.green {
  color: var(--green);
  background: var(--green-soft);
}

.kpi-icon.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.kpi-icon.violet {
  color: var(--violet);
  background: var(--violet-soft);
}

.kpi-value {
  margin: 12px 0 7px;
  color: var(--ink);
  font-family: var(--font-num);
  font-size: clamp(23px, 2.1vw, 29px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.kpi-value .unit {
  margin-left: 2px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
}

.kpi-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 16px;
  color: var(--muted-2);
  font-size: 10.5px;
  white-space: nowrap;
}

.kpi-foot strong {
  color: var(--ink-2);
  font-weight: 600;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 5px;
  font-family: var(--font-num);
  font-size: 9.5px;
  font-weight: 600;
  border-radius: 4px;
}

.delta.up {
  color: var(--green);
  background: var(--green-soft);
}

.delta.down {
  color: var(--red);
  background: var(--red-soft);
}

.delta.flat {
  color: var(--muted);
  background: #f2f4f7;
}

.kpi-primary {
  color: #fff;
  background:
    radial-gradient(210px 120px at 100% 0%, rgba(92, 157, 242, 0.24), transparent 72%),
    linear-gradient(140deg, #1d4573 0%, #16345a 60%, #112946 100%);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(17, 42, 74, 0.18);
}

.kpi-primary::after {
  position: absolute;
  top: -38px;
  right: -46px;
  width: 148px;
  height: 148px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 26px;
  transform: rotate(22deg);
}

.kpi-primary .kpi-head,
.kpi-primary .kpi-foot {
  color: #9fb6d1;
}

.kpi-primary .kpi-value {
  color: #fff;
}

.kpi-primary .kpi-value .unit {
  color: #a9bdd4;
}

.kpi-primary .kpi-icon {
  color: #d5e8ff;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.kpi-primary .delta {
  color: #b9e7d6;
  background: rgba(73, 169, 137, 0.18);
}

.kpi-primary .delta.down {
  color: #f3c1c1;
  background: rgba(194, 80, 80, 0.18);
}

.kpi-primary .delta.flat {
  color: #c1cfdf;
  background: rgba(255, 255, 255, 0.08);
}

.kpi-primary .kpi-foot strong {
  color: #d7e7f9;
}

/* ---------- 仪表盘 ---------- */

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(290px, 0.82fr);
  gap: 15px;
  margin-bottom: 15px;
}

.dash-grid.equal {
  grid-template-columns: minmax(0, 1.72fr) minmax(290px, 0.82fr);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 0;
}

.card-title {
  margin: 0;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.card-sub {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  background: var(--brand);
  border-radius: 2px;
}

.legend-dot.green {
  background: #32a58a;
}

.chart-box {
  padding: 8px 13px 13px;
}

.chart-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-empty {
  display: grid;
  min-height: 248px;
  place-items: center;
  color: var(--muted-2);
  font-size: 11.5px;
  text-align: center;
}

.chart-empty svg {
  width: 29px;
  height: 29px;
  margin: 0 auto 8px;
  color: #b6c4d5;
}

.todo-card {
  display: flex;
  flex-direction: column;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px 10px;
}

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 9px 9px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.todo-item:hover {
  background: #f7f9fc;
}

.todo-marker {
  display: grid;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  margin-top: 1px;
  place-items: center;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 8px;
}

.todo-marker.blue {
  color: var(--brand);
  background: var(--brand-soft);
}

.todo-marker.red {
  color: var(--red);
  background: var(--red-soft);
}

.todo-marker.green {
  color: var(--green);
  background: var(--green-soft);
}

.todo-marker svg {
  width: 14px;
  height: 14px;
}

.todo-copy {
  min-width: 0;
  flex: 1;
}

.todo-title {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
}

.todo-title .tiny-tag {
  flex: 0 0 auto;
  padding: 0 4px;
  color: var(--amber);
  font-size: 8.5px;
  font-weight: 600;
  line-height: 14px;
  background: var(--amber-soft);
  border-radius: 3px;
}

.todo-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-meta strong {
  color: var(--muted);
  font-weight: 500;
}

.todo-side {
  padding-top: 2px;
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 9.5px;
  white-space: nowrap;
}

.todo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 10px 17px;
  color: var(--muted);
  font-size: 10.5px;
  background: #fbfcfe;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}

.todo-foot strong {
  color: var(--ink-2);
  font-weight: 600;
}

.todo-foot .link-btn {
  font-size: 10.5px;
}

.recent-card {
  overflow: hidden;
}

.recent-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 10px 13px;
  color: #7b889b;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-align: left;
  white-space: nowrap;
  background: #fafbfd;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.data-table td {
  padding: 11px 13px;
  color: var(--ink-2);
  font-size: 11.5px;
  vertical-align: middle;
  border-bottom: 1px solid #edf1f6;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background 0.13s ease;
}

.data-table tbody tr:hover {
  background: #fbfcfe;
}

.data-table .align-right {
  text-align: right;
}

.data-table .align-center {
  text-align: center;
}

.order-link {
  padding: 0;
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 600;
  background: transparent;
  border: 0;
  white-space: nowrap;
}

.order-link:hover {
  color: var(--brand);
}

.cell-sub {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9.5px;
  white-space: nowrap;
}

.person {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.avatar {
  display: grid;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--brand-deep);
  font-size: 10px;
  font-weight: 600;
  background: #edf4fd;
  border-radius: 7px;
}

.avatar.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.avatar.green {
  color: var(--green);
  background: var(--green-soft);
}

.avatar.violet {
  color: var(--violet);
  background: var(--violet-soft);
}

.person-copy {
  min-width: 0;
}

.person-copy strong {
  display: block;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
}

.person-copy span {
  display: block;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.45;
}

.money-strong {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.money-sub {
  margin-top: 1px;
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 9.5px;
  white-space: nowrap;
}

.product-brief {
  max-width: 178px;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 7px;
  color: #687589;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  background: #f2f4f7;
  border: 1px solid transparent;
  border-radius: 999px;
}

.pill::before {
  flex: 0 0 4px;
  width: 4px;
  height: 4px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.pill.no-dot::before {
  display: none;
}

.pill.gray {
  color: #647286;
  background: #f2f4f7;
}

.pill.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.pill.blue {
  color: var(--brand);
  background: var(--brand-soft);
}

.pill.purple {
  color: var(--violet);
  background: var(--violet-soft);
}

.pill.cyan {
  color: var(--cyan);
  background: var(--cyan-soft);
}

.pill.green {
  color: var(--green);
  background: var(--green-soft);
}

.pill.teal {
  color: #0d776c;
  background: #e7f6f4;
}

.pill.red {
  color: var(--red);
  background: var(--red-soft);
}

.pill.outline {
  color: var(--muted);
  background: transparent;
  border-color: var(--line-strong);
}

.collection-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.collection-body {
  padding: 3px 19px 16px;
}

.donut-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 16px;
}

.donut {
  position: relative;
  display: grid;
  width: 140px;
  height: 140px;
  place-items: center;
  background: conic-gradient(var(--green) calc(var(--p, 0) * 1%), #edf1f6 0);
  border-radius: 50%;
}

.donut::before {
  position: absolute;
  inset: 14px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #f1f4f8;
}

.donut-core {
  position: relative;
  z-index: 1;
  text-align: center;
}

.donut-value {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.donut-value small {
  margin-left: 1px;
  font-size: 12px;
  font-weight: 600;
}

.donut-label {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.collection-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 2px;
}

.collection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed #edf0f5;
}

.collection-row:last-child {
  border-bottom: 0;
}

.collection-row span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
}

.collection-row i {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 2px;
}

.collection-row i.pending {
  background: #d5dce6;
}

.collection-row strong {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.collection-row strong.pending {
  color: var(--amber);
}

.collection-foot {
  padding: 11px 19px;
  background: #fbfcfe;
  border-top: 1px solid var(--line);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 38px 22px;
  color: var(--muted);
  text-align: center;
}

.empty-state.compact {
  padding: 24px 18px;
}

.empty-icon {
  display: grid;
  width: 43px;
  height: 43px;
  margin-bottom: 10px;
  place-items: center;
  color: #9fb3cb;
  background: #f4f7fb;
  border: 1px solid #e8edf5;
  border-radius: 13px;
}

.empty-icon svg {
  width: 21px;
  height: 21px;
}

.empty-state strong {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.empty-state p {
  max-width: 310px;
  margin: 4px 0 12px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.6;
}

.empty-state .btn {
  margin-top: 2px;
}

.onboarding-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: 23px 24px;
  background:
    radial-gradient(380px 180px at 100% 0%, rgba(59, 133, 225, 0.14), transparent 70%),
    linear-gradient(135deg, #f8fbff, #eff5fd);
  border: 1px solid #dce7f5;
  border-radius: var(--radius);
}

.onboarding-card h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.onboarding-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
}

.onboarding-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

/* ---------- 订单台账 ---------- */

.page-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
  padding: 10px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 210px;
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 15px;
  height: 15px;
  color: #94a2b5;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 37px;
  padding: 0 12px 0 34px;
  color: var(--ink);
  font-size: 12px;
  background: #f8fafc;
  border: 1px solid #e7ecf3;
  border-radius: 8px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.search-input::placeholder {
  color: #a1adbd;
}

.search-input:focus {
  background: #fff;
  border-color: #a9c7e8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(33, 97, 181, 0.08);
}

.filter-select {
  height: 37px;
  min-width: 128px;
  padding: 0 29px 0 11px;
  color: #4f5e72;
  font-size: 11.5px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23738093' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.filter-select:focus {
  border-color: #a9c7e8;
  box-shadow: 0 0 0 3px rgba(33, 97, 181, 0.08);
}

.filter-summary {
  margin-left: auto;
  padding-right: 5px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.filter-summary strong {
  color: var(--ink-2);
  font-weight: 600;
}

.table-card {
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.orders-table {
  min-width: 960px;
}

.orders-table th {
  padding: 11px 12px;
}

.orders-table td {
  padding: 12px;
}

.orders-table .col-actions {
  width: 76px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.orders-table tr.is-hidden {
  display: none;
}

.table-empty-row td {
  padding: 0 !important;
}

.table-empty-row .empty-state {
  padding: 54px 20px;
}

.totals-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 10px;
}

.totals-note svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

/* ---------- 开单表单 ---------- */

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 326px;
  align-items: start;
  gap: 16px;
}

.form-main {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}

.form-side {
  position: sticky;
  top: 87px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-card {
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  background: #fcfdff;
  border-bottom: 1px solid var(--line);
}

.step-no {
  display: grid;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--brand);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 700;
  background: var(--brand-soft);
  border-radius: 7px;
}

.section-title-wrap {
  min-width: 0;
  flex: 1;
}

.section-title {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-desc {
  margin: 2px 0 0;
  color: var(--muted-2);
  font-size: 9.5px;
}

.section-extra {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.form-body {
  padding: 16px 18px 18px;
}

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

.field-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

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

.field.span-3 {
  grid-column: span 3;
}

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

.field-label {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #526075;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
}

.req {
  color: #cc5a5a;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 11.5px;
  background: #fff;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: #a8b2c1;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #ccd6e3;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #8db5e3;
  box-shadow: 0 0 0 3px rgba(33, 97, 181, 0.08);
}

.select {
  padding-right: 29px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23738093' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  appearance: none;
  -webkit-appearance: none;
}

.textarea {
  min-height: 78px;
  line-height: 1.6;
  resize: vertical;
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
  background: #fffafa;
  border-color: #dc8d8d;
  box-shadow: 0 0 0 3px rgba(188, 61, 61, 0.06);
}

.input-group {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.input-group .input {
  border-radius: 8px 0 0 8px;
}

.input-suffix {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 9px;
  color: #8290a2;
  font-size: 9.5px;
  white-space: nowrap;
  background: #f6f8fb;
  border: 1px solid #dfe5ee;
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.field-hint {
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.45;
}

.item-editor {
  margin-bottom: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e0e7f0;
  border-radius: 11px;
}

.item-editor:last-of-type {
  margin-bottom: 0;
}

.item-editor.is-invalid {
  border-color: #dc8d8d;
}

.item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #f8fafd;
  border-bottom: 1px solid #e8edf4;
}

.item-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-no {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 600;
}

.item-no strong {
  color: var(--brand);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 700;
}

.item-summary {
  color: var(--muted-2);
  font-size: 9.5px;
}

.item-head-right {
  display: flex;
  align-items: center;
  gap: 7px;
}

.item-body {
  padding: 12px;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.item-grid .span-2 {
  grid-column: span 2;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #edf1f6;
}

.amount-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 58px;
  padding: 6px 10px;
  background: var(--brand-softer);
  border: 1px solid #e1ebf8;
  border-radius: 8px;
}

.amount-label {
  color: #7e91aa;
  font-size: 8.5px;
  line-height: 1.4;
  white-space: nowrap;
}

.amount-value {
  margin-top: 1px;
  color: var(--brand-deep);
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.3;
  white-space: nowrap;
}

.area-value {
  color: var(--muted);
  font-size: 9.5px;
}

.add-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding: 9px;
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 600;
  background: #fbfcff;
  border: 1px dashed #c8d8ea;
  border-radius: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.add-line:hover {
  background: var(--brand-softer);
  border-color: #a9c4e4;
}

.add-line svg {
  width: 14px;
  height: 14px;
}

.fee-list {
  min-height: 12px;
}

.fee-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 156px 32px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.fee-row .input {
  min-height: 34px;
}

.quick-fees {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 2px 0 12px;
}

.quick-fees > span {
  margin-right: 1px;
  color: var(--muted-2);
  font-size: 9px;
}

.chip-btn {
  padding: 3px 8px;
  color: #64758a;
  font-size: 9.5px;
  background: #f7f9fc;
  border: 1px solid #e5eaf2;
  border-radius: 999px;
}

.chip-btn:hover {
  color: var(--brand);
  background: var(--brand-softer);
  border-color: #ccdcef;
}

.fee-empty {
  padding: 7px 0 11px;
  color: var(--muted-2);
  font-size: 10px;
}

.notes-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.55fr);
  gap: 14px;
}

.discount-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 11px;
  background: #fbfcfe;
  border: 1px dashed #e0e6ef;
  border-radius: 9px;
}

.discount-box .field-label {
  margin-bottom: 5px;
}

.quote-card {
  padding: 18px;
}

.quote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quote-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.quote-head span {
  color: var(--muted-2);
  font-size: 9px;
}

.quote-total {
  margin: 8px 0 2px;
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 33px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  line-height: 1.18;
}

.quote-total-prefix {
  margin-right: 2px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  vertical-align: 3px;
}

.quote-caption {
  color: var(--muted-2);
  font-size: 9.5px;
}

.summary-rows {
  margin-top: 14px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  color: var(--muted);
  font-size: 10.5px;
}

.summary-row strong {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.summary-row.discount strong {
  color: var(--green);
}

.summary-divider {
  height: 1px;
  margin: 7px 0;
  background: var(--line);
}

.summary-row.total {
  padding: 4px 0;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
}

.summary-row.total strong {
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 700;
}

.pay-box {
  margin: 12px 0 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e9eef5;
  border-radius: 10px;
}

.pay-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-bottom: 9px;
}

.pay-box-head strong {
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 600;
}

.pay-box-head span {
  color: var(--muted-2);
  font-size: 8.5px;
}

.pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.pay-grid .field {
  gap: 3px;
}

.pay-grid .field.full {
  grid-column: 1 / -1;
}

.pay-grid .field-label {
  font-size: 9px;
}

.pay-grid .input,
.pay-grid .select {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 10.5px;
}

.pay-grid .select {
  padding-right: 26px;
  background-position: right 8px center;
}

.deposit-quick {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
}

.deposit-quick button {
  padding: 2px 6px;
  color: var(--brand);
  font-size: 8.5px;
  background: #fff;
  border: 1px solid #d9e5f3;
  border-radius: 4px;
}

.deposit-quick button:hover {
  background: var(--brand-soft);
}

.deposit-hint {
  min-height: 12px;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.45;
}

.edit-pay-summary {
  margin: 12px 0;
  padding: 11px;
  background: #f8fafc;
  border: 1px solid #e9eef5;
  border-radius: 9px;
}

.edit-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
  color: var(--muted);
  font-size: 10px;
}

.edit-pay-row strong {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-weight: 600;
}

.edit-pay-note {
  margin: 6px 0 0;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}

.form-notice {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.55;
}

.form-notice svg {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  margin-top: 1px;
}

.order-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 10px;
}

.order-meta-strip span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.order-meta-strip strong {
  color: var(--ink-2);
  font-weight: 600;
}

.order-meta-strip svg {
  width: 12px;
  height: 12px;
  color: var(--muted-2);
}

.datalist-note {
  display: none;
}

.mobile-form-bar {
  display: none;
}

/* ---------- 订单详情 ---------- */

.detail-hero {
  position: relative;
  margin-bottom: 15px;
  padding: 21px 22px 0;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(550px 220px at 99% -10%, rgba(96, 159, 240, 0.23), transparent 70%),
    linear-gradient(120deg, #152d4b 0%, #1b3d64 52%, #1b4a7c 100%);
  border-radius: 17px;
  box-shadow: 0 14px 36px rgba(18, 43, 74, 0.18);
}

.detail-hero::after {
  position: absolute;
  top: -88px;
  right: 3%;
  width: 230px;
  height: 230px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 35px;
  transform: rotate(23deg);
  pointer-events: none;
}

.hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.hero-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.hero-no {
  color: #b3ccea;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.hero-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 5px 0 0;
  color: #a1b8d2;
  font-size: 10.5px;
}

.hero-sub span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-sub svg {
  width: 12px;
  height: 12px;
  opacity: 0.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  position: relative;
  z-index: 2;
}

.hero-actions .btn {
  height: 33px;
  padding: 0 11px;
  color: #dbe8f7;
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(190, 214, 241, 0.18);
  box-shadow: none;
}

.hero-actions .btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(190, 214, 241, 0.28);
}

.hero-actions .btn-light {
  color: #17375b;
  background: #f3f8ff;
  border-color: #f3f8ff;
}

.hero-actions .btn-light:hover {
  color: #0f2a49;
  background: #fff;
  border-color: #fff;
}

.hero-actions .btn svg {
  width: 13px;
  height: 13px;
}

.hero-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding: 15px 0 17px;
  border-top: 1px solid rgba(206, 226, 249, 0.14);
}

.hero-metric {
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid rgba(206, 226, 249, 0.12);
}

.hero-metric:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero-metric span {
  display: block;
  overflow: hidden;
  color: #94aecb;
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-metric strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #fff;
  font-family: var(--font-num);
  font-size: 19px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-metric strong.green {
  color: #8fe1c8;
}

.hero-metric strong.amber {
  color: #f5cf8a;
}

.hero-metric small {
  display: block;
  margin-top: 1px;
  color: #819bb7;
  font-size: 8.5px;
}

.hero-metric .hero-pay-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
}

.hero-metric .hero-pay-line .pill {
  display: inline-flex;
  width: auto;
  padding: 1px 6px;
  font-size: 8.5px;
}

.hero-progress {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -22px;
  padding: 9px 22px;
  color: #95aec9;
  font-size: 9px;
  background: rgba(5, 17, 33, 0.16);
  border-top: 1px solid rgba(206, 226, 249, 0.08);
}

.progress-track {
  flex: 1;
  height: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}

.progress-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #45b996, #72d2b3);
  border-radius: inherit;
}

.hero-progress strong {
  color: #c8dbef;
  font-family: var(--font-num);
  font-weight: 600;
  white-space: nowrap;
}

.status-select-hero {
  height: 24px;
  padding: 0 25px 0 8px;
  color: #d9e8f8;
  font-size: 9.5px;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.09);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23d9e8f8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  border: 1px solid rgba(206, 226, 249, 0.18);
  border-radius: 999px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.status-select-hero option {
  color: var(--ink);
  background: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 15px;
}

.detail-main,
.detail-side {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}

.panel-title svg {
  width: 15px;
  height: 15px;
  color: #8a9aaf;
}

.panel-title .count-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 9px;
  font-weight: 600;
  background: #f1f4f8;
  border-radius: 99px;
}

.panel-body {
  padding: 15px 17px;
}

.item-view {
  padding: 15px 0;
  border-bottom: 1px solid #edf1f6;
}

.item-view:first-child {
  padding-top: 2px;
}

.item-view:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.item-view-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.item-view-name {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}

.item-index {
  display: grid;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  margin-top: 1px;
  place-items: center;
  color: var(--brand);
  font-family: var(--font-num);
  font-size: 8.5px;
  font-weight: 700;
  background: var(--brand-soft);
  border-radius: 6px;
}

.item-view h4 {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.item-view h4 em {
  margin-left: 5px;
  color: var(--muted-2);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 400;
}

.item-view-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.item-view-spec span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.item-view-spec svg {
  width: 10px;
  height: 10px;
}

.item-view-price {
  flex: 0 0 auto;
  text-align: right;
}

.item-view-price strong {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.item-view-price span {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 8.5px;
  white-space: nowrap;
}

.config-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  margin: 10px 0 0 32px;
  padding: 9px 11px;
  background: #fafbfd;
  border: 1px solid #edf1f6;
  border-radius: 8px;
}

.config-pair {
  min-width: 0;
  color: var(--ink-2);
  font-size: 9.5px;
  line-height: 1.55;
}

.config-pair b {
  display: inline-block;
  min-width: 38px;
  margin-right: 4px;
  color: #8a97a8;
  font-weight: 500;
}

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

.detail-note {
  margin: 12px 0 0;
  padding: 10px 11px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
  white-space: pre-line;
  background: #fbfaf5;
  border: 1px solid #f0ebdd;
  border-radius: 8px;
}

.empty-inline {
  padding: 18px 0;
  color: var(--muted-2);
  font-size: 10px;
  text-align: center;
}

.info-list {
  display: flex;
  flex-direction: column;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px dashed #edf1f6;
}

.info-row:last-child {
  border-bottom: 0;
}

.info-icon {
  display: grid;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  place-items: center;
  color: #8496aa;
  background: #f6f8fb;
  border-radius: 7px;
}

.info-icon svg {
  width: 12px;
  height: 12px;
}

.info-copy {
  min-width: 0;
  flex: 1;
}

.info-label {
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.5;
}

.info-value {
  margin-top: 1px;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.info-value.strong {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.schedule-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
}

.schedule-dot {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 50%;
}

.schedule-dot.done {
  color: var(--green);
  background: var(--green-soft);
}

.schedule-dot.warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.schedule-dot svg {
  width: 11px;
  height: 11px;
}

.schedule-copy {
  flex: 1;
  min-width: 0;
}

.schedule-copy span {
  display: block;
  color: var(--muted-2);
  font-size: 8.5px;
}

.schedule-copy strong {
  display: block;
  margin-top: 1px;
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 600;
}

.schedule-copy small {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 8px;
}

.payment-table {
  width: 100%;
  border-collapse: collapse;
}

.payment-table th {
  padding: 0 0 7px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 500;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.payment-table td {
  padding: 8px 0;
  color: var(--ink-2);
  font-size: 9.5px;
  border-bottom: 1px dashed #edf1f6;
  vertical-align: middle;
}

.payment-table tr:last-child td {
  border-bottom: 0;
}

.payment-table .pay-amount {
  color: var(--green);
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.payment-table .pay-action {
  width: 27px;
  text-align: right;
}

.payment-table .pay-date {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 9px;
  white-space: nowrap;
}

.as-record {
  padding: 10px 0;
  border-bottom: 1px dashed #edf1f6;
}

.as-record:first-child {
  padding-top: 0;
}

.as-record:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.as-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.as-record-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.as-record-title strong {
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 600;
}

.as-record-date {
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 8.5px;
}

.as-record-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.as-record-resolution {
  margin: 4px 0 0;
  padding: 5px 7px;
  color: var(--green);
  font-size: 9px;
  line-height: 1.55;
  background: #f5fbf8;
  border-radius: 5px;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* ---------- 售后页 ---------- */

.mini-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.mini-kpi {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
}

.mini-kpi-icon {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9px;
}

.mini-kpi-icon.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.mini-kpi-icon.green {
  color: var(--green);
  background: var(--green-soft);
}

.mini-kpi-icon.violet {
  color: var(--violet);
  background: var(--violet-soft);
}

.mini-kpi-icon svg {
  width: 15px;
  height: 15px;
}

.mini-kpi-copy span {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}

.mini-kpi-copy strong {
  display: block;
  margin-top: 1px;
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 9px 10px;
  margin-bottom: 13px;
  overflow-x: auto;
}

.filter-tab {
  padding: 6px 11px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 7px;
}

.filter-tab:hover {
  color: var(--ink-2);
  background: #f7f9fc;
}

.filter-tab.active {
  color: var(--brand);
  font-weight: 600;
  background: var(--brand-soft);
}

.filter-tab .tab-count {
  margin-left: 4px;
  color: inherit;
  font-family: var(--font-num);
  font-size: 8.5px;
  opacity: 0.75;
}

.as-table {
  min-width: 900px;
}

.as-table th {
  padding: 11px 14px;
}

.as-table td {
  padding: 12px 14px;
}

.as-issue-cell {
  max-width: 310px;
}

.as-issue {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.as-solution {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.5;
}

.as-date {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 10px;
  white-space: nowrap;
}

.as-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

/* ---------- 设置 ---------- */

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  align-items: start;
  gap: 15px;
}

.settings-main,
.settings-side {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}

.settings-card {
  overflow: hidden;
}

.store-preview {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 16px 18px 0;
  padding: 13px;
  overflow: hidden;
  background: #f8fafd;
  border: 1px solid #e8edf5;
  border-radius: 10px;
}

.store-preview::after {
  position: absolute;
  top: -25px;
  right: -20px;
  width: 90px;
  height: 90px;
  content: "";
  border: 1px solid #e8eef7;
  border-radius: 18px;
  transform: rotate(18deg);
}

.store-preview-mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(145deg, #2d6cba, #1a4b87);
  border-radius: 10px;
}

.store-preview-copy {
  min-width: 0;
}

.store-preview-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-preview-copy span {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 18px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.data-stat {
  padding: 10px;
  background: #fbfcfe;
}

.data-stat span {
  display: block;
  color: var(--muted-2);
  font-size: 8.5px;
}

.data-stat strong {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 600;
}

.data-action-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 18px 16px;
}

.data-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #eef2f7;
}

.data-action-row:last-child {
  border-bottom: 0;
}

.data-action-copy {
  min-width: 0;
  flex: 1;
}

.data-action-copy strong {
  display: block;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 600;
}

.data-action-copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.5;
}

.settings-note {
  margin: 0 18px 18px;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.65;
  background: #fbfcfe;
  border: 1px dashed #e1e8f1;
  border-radius: 7px;
}

.danger-zone .section-title {
  color: var(--red);
}

.about-card {
  padding: 17px;
}

.about-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.about-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #2d6cba, #1a4b87);
  border-radius: 8px;
}

.about-mark svg {
  width: 18px;
  height: 18px;
}

.about-brand strong {
  display: block;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
}

.about-brand span {
  display: block;
  color: var(--muted-2);
  font-size: 8.5px;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.about-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 9px;
  color: var(--muted-2);
  font-size: 8.5px;
  border-top: 1px solid #edf1f6;
}

.save-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 0 0;
}

/* ---------- 弹窗 ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 20, 37, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade-in 0.16s ease both;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 15px;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal.modal-lg {
  max-width: 660px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 19px 0;
}

.modal-title {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-sub {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.modal-close {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-top: -3px;
  place-items: center;
  color: #8592a4;
  background: #f7f9fc;
  border: 0;
  border-radius: 7px;
}

.modal-close:hover {
  color: var(--ink-2);
  background: #eef2f7;
}

.modal-close svg {
  width: 14px;
  height: 14px;
}

.modal-body {
  padding: 16px 19px 18px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 19px 16px;
  background: #fbfcfe;
  border-top: 1px solid var(--line);
  border-radius: 0 0 15px 15px;
}

.modal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

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

.modal-form-grid .field-label {
  font-size: 10px;
}

.modal-form-grid .input,
.modal-form-grid .select,
.modal-form-grid .textarea {
  min-height: 35px;
  font-size: 11px;
}

.modal-form-grid .textarea {
  min-height: 68px;
}

.payment-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  padding: 10px 11px;
  background: var(--brand-softer);
  border: 1px solid #e2ebf7;
  border-radius: 8px;
}

.payment-context span {
  color: #77899e;
  font-size: 9.5px;
}

.payment-context strong {
  color: var(--brand-deep);
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
}

.payment-context .context-balance {
  text-align: right;
}

.payment-context .context-balance strong {
  display: block;
  margin-top: 1px;
}

.modal-tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 11px;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.55;
}

.modal-tip svg {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  margin-top: 1px;
}

.quick-amount {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: -4px;
}

.quick-amount button {
  padding: 2px 7px;
  color: var(--brand);
  font-size: 8.5px;
  background: #fff;
  border: 1px solid #d8e4f3;
  border-radius: 4px;
}

.quick-amount button:hover {
  background: var(--brand-soft);
}

.confirm-content {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 4px 2px 2px;
}

.confirm-icon {
  display: grid;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  place-items: center;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 11px;
}

.confirm-icon.danger {
  color: var(--red);
  background: var(--red-soft);
}

.confirm-icon.brand {
  color: var(--brand);
  background: var(--brand-soft);
}

.confirm-icon svg {
  width: 19px;
  height: 19px;
}

.confirm-copy {
  min-width: 0;
}

.confirm-copy h3 {
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.confirm-copy p {
  margin: 1px 0 0;
  color: #59677a;
  font-size: 11.5px;
  line-height: 1.7;
}

.confirm-extra {
  margin-top: 10px;
  padding: 8px 9px;
  color: #8a6117;
  font-size: 9.5px;
  line-height: 1.55;
  background: #fff9ec;
  border: 1px solid #f2e5c9;
  border-radius: 6px;
}

/* ---------- 提示 ---------- */

.toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 10px 13px;
  color: #eaf2fb;
  font-size: 11px;
  line-height: 1.5;
  background: #14263e;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  box-shadow: 0 12px 30px rgba(5, 16, 30, 0.25);
  animation: toast-in 0.22s ease both;
}

.toast.success {
  background: #133f35;
  border-color: rgba(100, 209, 177, 0.18);
}

.toast.error {
  background: #4a1f24;
  border-color: rgba(240, 160, 160, 0.2);
}

.toast svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.toast.leaving {
  animation: toast-out 0.18s ease both;
}

/* ---------- 打印预览 ---------- */

.print-layer {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #e8ecf2;
}

.print-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #dce2eb;
  box-shadow: 0 2px 12px rgba(18, 36, 63, 0.05);
}

.print-toolbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.print-toolbar-title strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.print-hint {
  color: var(--muted-2);
  font-size: 9.5px;
}

.print-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.print-scroll {
  display: flex;
  flex: 1;
  align-items: flex-start;
  justify-content: center;
  padding: 26px 20px 60px;
  overflow: auto;
}

.print-paper {
  width: 210mm;
  min-height: 297mm;
  padding: 13mm 13mm 11mm;
  color: #1d1d1d;
  background: #fff;
  box-shadow: 0 12px 48px rgba(14, 31, 55, 0.18);
  font-family: "Songti SC", "SimSun", "STSong", serif;
  font-size: 10px;
  line-height: 1.55;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.print-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 9px;
  border-bottom: 2px solid #1f1f1f;
}

.print-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.print-mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #222;
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 700;
  border: 1.4px solid #222;
  border-radius: 3px;
}

.print-brand-copy {
  min-width: 0;
}

.print-brand-copy h1 {
  margin: 0;
  color: #111;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
}

.print-brand-copy p {
  margin: 1px 0 0;
  color: #555;
  font-family: var(--font-sans);
  font-size: 8px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.print-contact {
  flex: 0 0 auto;
  color: #444;
  font-family: var(--font-sans);
  font-size: 8px;
  line-height: 1.65;
  text-align: right;
}

.print-contact strong {
  display: block;
  color: #1d1d1d;
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.print-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 9px;
}

.print-title-copy h2 {
  margin: 0;
  color: #111;
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.35;
}

.print-title-copy span {
  display: block;
  margin-top: 1px;
  color: #888;
  font-family: Arial, sans-serif;
  font-size: 6px;
  letter-spacing: 0.18em;
}

.print-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  color: #555;
  font-family: var(--font-sans);
  font-size: 8px;
}

.print-meta div {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.print-meta span {
  color: #888;
}

.print-meta strong {
  color: #1a1a1a;
  font-family: var(--font-num);
  font-size: 9px;
  font-weight: 600;
}

.print-info-table {
  width: 100%;
  margin-bottom: 8px;
  border-collapse: collapse;
  table-layout: fixed;
}

.print-info-table td {
  padding: 4px 6px;
  color: #222;
  font-size: 8.5px;
  line-height: 1.5;
  vertical-align: top;
  border: 1px solid #777;
  overflow-wrap: anywhere;
}

.print-info-table .plabel {
  width: 13%;
  color: #555;
  background: #f5f5f5;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.print-table thead {
  display: table-header-group;
}

.print-table tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-table th {
  padding: 4px 3px;
  color: #222;
  font-family: var(--font-sans);
  font-size: 7.5px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  background: #f2f2f2;
  border: 1px solid #666;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.print-table td {
  padding: 4px 4px;
  color: #222;
  font-size: 7.8px;
  line-height: 1.5;
  vertical-align: top;
  border: 1px solid #999;
  overflow-wrap: anywhere;
}

.print-table .p-center {
  text-align: center;
}

.print-table .p-right {
  text-align: right;
}

.print-item-type {
  display: block;
  margin-bottom: 1px;
  color: #777;
  font-size: 7px;
}

.print-item-name {
  display: block;
  color: #111;
  font-family: var(--font-sans);
  font-size: 8.2px;
  font-weight: 600;
  line-height: 1.45;
}

.print-item-place {
  display: block;
  margin-top: 1px;
  color: #777;
  font-size: 7px;
}

.print-spec {
  color: #222;
  font-family: var(--font-num);
  font-size: 7.6px;
  white-space: nowrap;
}

.print-dim {
  display: block;
  color: #444;
  font-size: 7.2px;
  white-space: nowrap;
}

.print-config {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.print-config-row {
  display: flex;
  gap: 2px;
  color: #222;
  line-height: 1.5;
}

.print-config-row b {
  flex: 0 0 27px;
  color: #777;
  font-weight: 400;
}

.print-money {
  font-family: var(--font-num);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.print-subtotal {
  color: #111;
  font-family: var(--font-num);
  font-size: 8.2px;
  font-weight: 600;
  white-space: nowrap;
}

.print-summary-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 9px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-notes-block {
  flex: 1;
  min-width: 0;
}

.print-section-title {
  margin: 0 0 4px;
  color: #222;
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.print-note-text {
  margin: 0;
  color: #444;
  font-size: 7.8px;
  line-height: 1.65;
  white-space: pre-line;
}

.print-terms {
  margin-top: 7px;
}

.print-terms ol {
  margin: 0;
  padding-left: 13px;
  color: #555;
  font-size: 7.3px;
  line-height: 1.65;
}

.print-terms li {
  margin-bottom: 1px;
}

.print-totals {
  flex: 0 0 39%;
  min-width: 220px;
  padding-top: 1px;
}

.print-total-table {
  width: 100%;
  border-collapse: collapse;
}

.print-total-table td {
  padding: 2.5px 0;
  color: #555;
  font-size: 8.2px;
}

.print-total-table td:last-child {
  color: #222;
  font-family: var(--font-num);
  font-size: 8.4px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.print-total-table tr.discount td:last-child {
  color: #16755c;
}

.print-total-table tr.grand td {
  padding-top: 5px;
  color: #111;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  border-top: 1px solid #222;
}

.print-total-table tr.grand td:last-child {
  color: #111;
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
}

.print-total-table tr.pay td {
  color: #555;
  border-top: 1px solid #ccc;
}

.print-total-table tr.balance td {
  color: #111;
  font-weight: 700;
}

.print-total-table tr.balance td:last-child {
  color: #a33c2e;
  font-size: 10px;
}

.print-upper {
  margin: 4px 0 0;
  color: #333;
  font-size: 7.4px;
  line-height: 1.5;
  text-align: right;
}

.print-payment-block {
  margin-top: 9px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-pay-table {
  width: 100%;
  border-collapse: collapse;
}

.print-pay-table th {
  padding: 3px 4px;
  color: #555;
  font-family: var(--font-sans);
  font-size: 7.2px;
  font-weight: 600;
  text-align: left;
  border-top: 1px solid #bbb;
  border-bottom: 1px solid #999;
}

.print-pay-table td {
  padding: 3px 4px;
  color: #333;
  font-size: 7.5px;
  border-bottom: 1px dotted #ccc;
}

.print-pay-table .p-right {
  text-align: right;
}

.print-pay-empty {
  padding: 5px 2px;
  color: #777;
  font-size: 7.5px;
  border-bottom: 1px dotted #ccc;
}

.print-signatures {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-top: 18px;
  padding-top: 9px;
  border-top: 1px solid #ccc;
  break-inside: avoid;
  page-break-inside: avoid;
}

.sign-block {
  color: #333;
  font-size: 8.3px;
  line-height: 2;
}

.sign-line {
  display: inline-block;
  min-width: 95px;
  margin-left: 3px;
  border-bottom: 1px solid #888;
}

.sign-block small {
  color: #888;
  font-size: 7px;
}

.print-footer-band {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 17px;
  padding-top: 6px;
  color: #999;
  font-family: var(--font-sans);
  font-size: 6.5px;
  line-height: 1.5;
  border-top: 1px solid #ddd;
}

.print-footer-band strong {
  color: #666;
  font-weight: 500;
}

.print-thanks {
  color: #777;
  font-size: 7.2px;
  text-align: right;
}

.print-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 21px;
  margin-left: 5px;
  padding: 0 4px;
  color: #a33c2e;
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1.2px solid #a33c2e;
  border-radius: 2px;
  transform: rotate(-5deg);
}

/* ---------- 补充细节 ---------- */

body.print-open {
  overflow: hidden;
}

.topbar-date {
  padding: 2px 8px;
  color: var(--muted-2);
  font-size: 10px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(221, 228, 238, 0.85);
  border-radius: 999px;
}

.recent-table {
  min-width: 640px;
}

.item-note {
  margin-top: 10px;
}

.fee-row .input-group .input {
  border-radius: 8px 0 0 8px;
}

.detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.detail-topline .back-link {
  margin-bottom: 0;
}

.detail-updated {
  color: var(--muted-2);
  font-size: 9.5px;
  white-space: nowrap;
}

.order-price-summary {
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.payment-summary-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 9px;
  padding-top: 9px;
  color: var(--muted);
  font-size: 9.5px;
  border-top: 1px dashed #edf1f6;
}

.payment-summary-line strong {
  margin-left: 3px;
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
}

.as-search {
  flex: 0 1 245px;
  min-width: 180px;
  margin-left: auto;
  padding-left: 6px;
}

.as-search .search-input {
  height: 32px;
  font-size: 10.5px;
}

.filter-tabs .as-search {
  padding-left: 0;
}

.settings-note svg {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 3px;
  vertical-align: -1px;
}

.field-hint svg,
.section-desc svg {
  display: inline-block;
  width: 10px;
  height: 10px;
  vertical-align: -1px;
}

/* 订单详情页的小屏边距与打印优化 */
@media (max-width: 820px) {
  .topbar-date {
    display: none;
  }

  .detail-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .as-search {
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
    padding-left: 0;
  }

  .filter-tabs {
    flex-wrap: wrap;
  }

  .payment-summary-line {
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .detail-updated {
    display: none;
  }

  .recent-table {
    min-width: 560px;
  }

  .filter-summary {
    line-height: 1.5;
  }

  .order-price-summary .summary-row {
    font-size: 10px;
  }
}

/* ---------- 动画 ---------- */

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(9px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(5px); }
}

/* ---------- 移动端趋势与表格提示 ---------- */

.mobile-trend {
  display: none;
}

.table-scroll-hint {
  display: none;
}

.chart-desktop {
  width: 100%;
}

.mtrend-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 60px;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px dashed #eef2f7;
}

.mtrend-row:last-child {
  border-bottom: 0;
}

.mtrend-month {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 9.5px;
  text-align: right;
}

.mtrend-month.current {
  color: var(--brand);
  font-weight: 700;
}

.mtrend-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mtrend-track {
  display: block;
  height: 4px;
  overflow: hidden;
  background: #f0f4f9;
  border-radius: 99px;
}

.mtrend-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.mtrend-track i.signed {
  background: linear-gradient(90deg, #3a78c5, #2161b5);
}

.mtrend-track i.received {
  background: linear-gradient(90deg, #4bb79c, #2b9b80);
}

.mtrend-values {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.mtrend-values strong {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.mtrend-values em {
  color: #5c9e8b;
  font-family: var(--font-num);
  font-size: 8.5px;
  font-style: normal;
  line-height: 1.4;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .table-scroll-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 13px;
    color: var(--muted-2);
    font-size: 9px;
    background: #fbfcfe;
    border-bottom: 1px solid var(--line);
  }

  .table-scroll-hint svg {
    width: 11px;
    height: 11px;
  }
}

@media (max-width: 700px) {
  .chart-desktop {
    display: none;
  }

  .mobile-trend {
    display: block;
    padding: 2px 0 4px;
  }

  .chart-box {
    padding: 12px 16px 14px;
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1280px) {
  :root {
    --sidebar-w: 228px;
  }

  #view {
    padding-right: 25px;
    padding-left: 25px;
  }

  .topbar {
    padding: 0 25px;
  }

  .demo-banner {
    margin-right: 25px;
    margin-left: 25px;
  }

  .form-layout {
    grid-template-columns: minmax(0, 1fr) 308px;
  }

  .config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .item-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .item-grid .span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 1120px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-value {
    font-size: 27px;
  }

  .dash-grid,
  .dash-grid.equal {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 286px;
  }

  .form-layout {
    grid-template-columns: 1fr;
  }

  .form-side {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .quote-card {
    padding: 17px;
  }

  .form-side .quote-card {
    grid-row: auto;
  }

  .settings-layout {
    grid-template-columns: minmax(0, 1fr) 292px;
  }

  .mini-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .dash-grid,
  .dash-grid.equal {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 18px;
  }

  .hero-actions {
    max-width: 250px;
  }

  .hero-metric strong {
    font-size: 17px;
  }

  .topbar .save-state {
    display: none;
  }
}

@media (max-width: 820px) {
  :root {
    --sidebar-w: 0px;
  }

  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: 64px;
    padding: 6px 9px calc(6px + env(safe-area-inset-bottom));
    overflow: visible;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-right: 0;
    background: #102036;
    box-shadow: 0 -6px 24px rgba(8, 22, 40, 0.14);
  }

  .brand,
  .side-cta,
  .nav-label,
  .sidebar-spacer,
  .side-note,
  .side-footer {
    display: none;
  }

  .nav-group,
  .sidebar-nav {
    display: contents;
  }

  .sidebar {
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
  }

  .sidebar-nav {
    display: flex;
    flex: 1;
    flex-direction: row;
    justify-content: space-around;
    gap: 2px;
    max-width: 520px;
  }

  .nav-item {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    max-width: 105px;
    min-height: 52px;
    padding: 4px 7px;
    font-size: 9.5px;
    text-align: center;
    border-radius: 8px;
  }

  .nav-item .nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 22px);
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    font-size: 8px;
    line-height: 15px;
  }

  .nav-item.active::before {
    display: none;
  }

  .nav-item .nav-icon {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
  }

  .nav-item .nav-icon svg {
    width: 17px;
    height: 17px;
  }

  .main {
    margin-left: 0;
    padding-bottom: 68px;
  }

  .topbar {
    min-height: 62px;
    padding: 0 18px;
  }

  #view {
    padding: 21px 18px 36px;
  }

  .demo-banner {
    margin: 12px 18px -3px;
    font-size: 10.5px;
  }

  .crumb-root,
  .crumb-sep {
    display: none;
  }

  .page-head {
    gap: 14px;
    margin-bottom: 18px;
  }

  .page-head h1 {
    font-size: 23px;
  }

  .page-head p {
    font-size: 11.5px;
  }

  .kpi-grid {
    gap: 10px;
    margin-bottom: 12px;
  }

  .kpi {
    padding: 14px 14px 12px;
  }

  .kpi-value {
    margin-top: 10px;
    font-size: 24px;
  }

  .kpi-foot {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dash-grid {
    gap: 12px;
    margin-bottom: 12px;
  }

  .form-side {
    display: flex;
  }

  .form-side .quote-card {
    grid-row: auto;
  }

  .item-editor .item-grid > .field:first-child {
    grid-column: span 2;
  }

  .item-editor .amount-box:last-child {
    grid-column: span 2;
  }

  #orderForm {
    padding-bottom: 64px;
  }

  .mobile-form-bar {
    position: fixed;
    right: 0;
    bottom: 64px;
    left: 0;
    z-index: 32;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(14, 32, 56, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .mobile-form-total {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
  }

  .mobile-form-total span {
    color: var(--muted-2);
    font-size: 8.5px;
    line-height: 1.35;
  }

  .mobile-form-total strong {
    overflow: hidden;
    color: var(--ink);
    font-family: var(--font-num);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-form-bar .btn {
    flex: 0 0 auto;
    height: 39px;
  }

  .hero-top {
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions {
    max-width: none;
    justify-content: flex-start;
  }

  .detail-hero {
    padding: 18px 17px 0;
  }

  .hero-progress {
    margin: 0 -17px;
    padding-right: 17px;
    padding-left: 17px;
  }

  .hero-metrics {
    gap: 0;
  }

  .hero-metric {
    padding-left: 10px;
  }

  .hero-metric strong {
    font-size: 16px;
  }

  .detail-side {
    display: flex;
  }

  .settings-side {
    display: flex;
  }

  .page-toolbar {
    flex-wrap: wrap;
    padding: 9px;
  }

  .search-box {
    flex-basis: 100%;
  }

  .filter-select {
    flex: 1;
    min-width: 0;
  }

  .filter-summary {
    flex-basis: 100%;
    margin-left: 0;
    padding: 1px 2px 0;
  }

  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .item-grid .span-2 {
    grid-column: span 2;
  }

  .config-grid {
    grid-template-columns: 1fr;
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .field.span-2,
  .field.span-3 {
    grid-column: span 2;
  }

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

  .form-body,
  .section-head {
    padding-right: 14px;
    padding-left: 14px;
  }

  .quote-total {
    font-size: 31px;
  }

  .print-toolbar {
    flex-wrap: wrap;
    gap: 7px;
    padding: 9px 14px;
  }

  .print-hint {
    display: none;
  }

  .print-scroll {
    padding: 14px 10px 40px;
  }

  .print-paper {
    width: 100%;
    min-height: 0;
    padding: 19px 16px;
    font-size: 9.5px;
  }

  .print-head {
    align-items: flex-start;
  }

  .print-contact {
    display: none;
  }

  .print-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .print-meta {
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .print-info-table td {
    padding: 4px 5px;
    font-size: 8px;
  }

  .print-table th {
    font-size: 6.5px;
  }

  .print-table td {
    font-size: 6.8px;
    padding: 3px;
  }

  .print-summary-layout {
    flex-direction: column;
    gap: 9px;
  }

  .print-totals {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  .print-signatures {
    gap: 10px;
  }

  .print-stamp {
    display: none;
  }

  .toast-root {
    right: 14px;
    bottom: 78px;
    left: 14px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }
}

@media (max-width: 560px) {
  #view {
    padding: 18px 14px 30px;
  }

  .topbar {
    padding: 0 14px;
  }

  .topbar-actions .btn-primary {
    width: 36px;
    padding: 0;
    font-size: 0;
    border-radius: 9px;
  }

  .topbar-actions .btn-primary svg {
    width: 17px;
    height: 17px;
  }

  .topbar-actions .icon-btn {
    display: none;
  }

  .demo-banner {
    align-items: flex-start;
    margin-right: 14px;
    margin-left: 14px;
    padding: 8px 9px;
    font-size: 9.5px;
    line-height: 1.5;
  }

  .demo-banner .demo-action {
    white-space: normal;
    text-align: right;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .page-head h1 {
    font-size: 22px;
  }

  .page-actions {
    width: 100%;
  }

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

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .kpi {
    display: block;
    padding: 12px 11px 10px;
    border-radius: 13px;
  }

  .kpi-head {
    font-size: 10px;
    line-height: 1.35;
  }

  .kpi-icon {
    flex-basis: 25px;
    width: 25px;
    height: 25px;
    border-radius: 7px;
  }

  .kpi-icon svg {
    width: 13px;
    height: 13px;
  }

  .kpi-value {
    margin: 8px 0 4px;
    font-size: clamp(19px, 5.3vw, 23px);
    letter-spacing: -0.045em;
  }

  .kpi-value .unit {
    font-size: 9.5px;
  }

  .kpi-foot {
    display: block;
    min-height: 28px;
    font-size: 8.5px;
    line-height: 1.5;
    white-space: normal;
  }

  .kpi-foot .delta {
    display: inline-block;
    margin-right: 3px;
    font-size: 8.5px;
  }

  .card-head {
    padding: 15px 15px 0;
  }

  .legend {
    gap: 8px;
    font-size: 9px;
  }

  .chart-box {
    padding-right: 7px;
    padding-left: 7px;
  }

  .todo-foot {
    padding-right: 14px;
    padding-left: 14px;
  }

  .page-toolbar {
    padding: 8px;
  }

  .form-body,
  .section-head {
    padding-right: 12px;
    padding-left: 12px;
  }

  .section-head {
    gap: 8px;
  }

  .section-extra {
    display: none;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .field.span-2,
  .field.span-3,
  .field.span-full {
    grid-column: 1;
  }

  .item-body {
    padding: 10px;
  }

  .item-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .item-grid .span-2 {
    grid-column: span 2;
  }

  .item-grid .amount-box {
    min-height: 55px;
  }

  .fee-row {
    grid-template-columns: 1fr 108px 28px;
    gap: 5px;
  }

  .quick-fees {
    gap: 4px;
  }

  .chip-btn {
    font-size: 8.5px;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    max-height: 91vh;
    border-radius: 16px 16px 0 0;
    animation: modal-in-mobile 0.2s ease both;
  }

  .modal-foot {
    border-radius: 0;
  }

  .modal-form-grid {
    grid-template-columns: 1fr;
  }

  .modal-form-grid .span-2 {
    grid-column: 1;
  }

  .mini-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .mini-kpi {
    padding: 10px;
  }

  .mini-kpi-icon {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
  }

  .mini-kpi-copy strong {
    font-size: 16px;
  }

  .hero-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 12px 0;
    padding-bottom: 13px;
  }

  .hero-metric:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .hero-metric strong {
    font-size: 17px;
  }

  .hero-title {
    font-size: 17px;
  }

  .hero-sub {
    font-size: 9.5px;
  }

  .hero-actions .btn {
    font-size: 9.5px;
  }

  .config-view {
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .config-pair.span-2 {
    grid-column: 1;
  }

  .item-view-top {
    gap: 7px;
  }

  .item-view-price strong {
    font-size: 11.5px;
  }

  .item-view-price span {
    max-width: 115px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .panel-head {
    padding: 12px 13px;
  }

  .panel-body {
    padding: 13px;
  }

  .settings-side {
    display: flex;
  }

  .data-stats {
    margin-right: 13px;
    margin-left: 13px;
  }

  .data-action-list {
    padding-right: 13px;
    padding-left: 13px;
  }

  .settings-note {
    margin-right: 13px;
    margin-left: 13px;
  }

  .print-paper {
    padding: 14px 11px;
  }

  .print-brand {
    gap: 6px;
  }

  .print-mark {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .print-brand-copy h1 {
    font-size: 13px;
  }

  .print-brand-copy p {
    font-size: 6px;
  }

  .print-title-copy h2 {
    font-size: 16px;
    letter-spacing: 0.1em;
  }

  .print-table th {
    font-size: 5.8px;
    padding: 3px 2px;
  }

  .print-table td {
    font-size: 6.2px;
    padding: 3px 2px;
  }

  .print-item-name {
    font-size: 6.8px;
  }

  .print-money,
  .print-subtotal {
    font-size: 6.3px;
  }

  .print-info-table td {
    font-size: 6.8px;
  }

  .print-summary-layout {
    flex-direction: column;
  }

  .print-footer-band {
    font-size: 5.5px;
  }

  .onboarding-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    padding: 17px;
  }
}

@keyframes modal-in-mobile {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 打印 ---------- */

@media print {
  @page {
    size: A4 portrait;
    margin: 9mm 10mm 9mm;
  }

  html,
  body {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .app-shell,
  .sidebar,
  .topbar,
  .demo-banner,
  #view,
  .toast-root,
  .modal-backdrop,
  .print-toolbar {
    display: none !important;
  }

  body,
  html {
    overflow: visible !important;
  }

  .print-layer {
    position: static !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
  }

  .print-layer[hidden] {
    display: none !important;
  }

  .print-scroll {
    display: block !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .print-paper {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-size: 10px;
  }

  .print-table {
    page-break-inside: auto;
  }

  .print-table thead {
    display: table-header-group;
  }

  .print-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-summary-layout,
  .print-payment-block,
  .print-signatures,
  .print-footer-band {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-stamp {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* =========================================================
   云端版：登录页、同步状态、账号安全
   ========================================================= */

body.auth-mode {
  min-height: 100vh;
  background: #0e1e34;
}

body.auth-mode .app-shell,
body.auth-mode .print-layer,
body.auth-mode #modalRoot {
  display: none !important;
}

body:not(.auth-mode) .auth-screen {
  display: none !important;
}

.auth-screen {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: #f3f6fa;
}

.auth-visual {
  position: relative;
  display: flex;
  flex: 1 1 54%;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  overflow: hidden;
  padding: 40px 52px 28px;
  color: #fff;
  background:
    radial-gradient(520px 360px at 84% 8%, rgba(76, 145, 231, 0.26), transparent 68%),
    radial-gradient(460px 300px at 4% 96%, rgba(48, 111, 191, 0.2), transparent 72%),
    linear-gradient(145deg, #10243e 0%, #142f50 50%, #0d1c31 100%);
}

.auth-glow {
  position: absolute;
  border: 1px solid rgba(148, 190, 246, 0.12);
  border-radius: 32px;
  transform: rotate(26deg);
  pointer-events: none;
}

.auth-glow-a {
  top: 8%;
  right: -110px;
  width: 410px;
  height: 410px;
}

.auth-glow-b {
  bottom: -170px;
  left: 8%;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  opacity: 0.6;
}

.auth-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
}

.auth-brand-mark {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #eaf3ff;
  background: linear-gradient(145deg, #347ed9, #194b8e);
  border: 1px solid rgba(164, 202, 250, 0.32);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 26px rgba(0, 0, 0, 0.22);
}

.auth-brand-mark svg {
  width: 25px;
  height: 25px;
}

.auth-brand-copy {
  display: flex;
  flex-direction: column;
}

.auth-brand-copy strong {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.auth-brand-copy span {
  margin-top: 1px;
  color: #90a8c5;
  font-size: 10px;
  letter-spacing: 0.09em;
}

.auth-cloud-tag {
  margin-left: 4px;
  padding: 3px 7px;
  color: #b9d8fc;
  font-family: var(--font-num);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  background: rgba(91, 159, 245, 0.15);
  border: 1px solid rgba(124, 178, 246, 0.2);
  border-radius: 5px;
}

.auth-copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin: auto 0;
  padding: 44px 0 32px;
}

.auth-kicker {
  margin: 0 0 14px;
  color: #7fa8d4;
  font-family: var(--font-num);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.auth-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.25;
}

.auth-copy h1 span {
  color: #9bc7fb;
}

.auth-lead {
  max-width: 430px;
  margin: 20px 0 0;
  color: #a9bdd5;
  font-size: 12.5px;
  line-height: 1.85;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: 11px;
}

.auth-feature-icon {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #a7cdf8;
  background: rgba(99, 158, 234, 0.11);
  border: 1px solid rgba(137, 184, 245, 0.14);
  border-radius: 9px;
}

.auth-feature-icon svg {
  width: 15px;
  height: 15px;
}

.auth-features strong {
  display: block;
  color: #dce8f7;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
}

.auth-features small {
  display: block;
  margin-top: 1px;
  color: #829bb7;
  font-size: 9.5px;
  line-height: 1.5;
}

.auth-visual-window {
  position: absolute;
  right: 9%;
  bottom: 7%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 7px;
  width: 190px;
  height: 142px;
  transform: rotate(-4deg);
  opacity: 0.32;
  pointer-events: none;
}

.auth-visual-window span {
  border: 1px solid #7ca6d2;
  border-radius: 3px;
  background: rgba(128, 177, 232, 0.08);
}

.auth-visual-window span:nth-child(2),
.auth-visual-window span:nth-child(4) {
  margin-left: 12px;
}

.auth-visual-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  color: #6f87a1;
  font-size: 8.5px;
  letter-spacing: 0.04em;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.auth-form-panel {
  display: flex;
  flex: 0 0 46%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 34px 32px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(55, 121, 204, 0.075), transparent 75%),
    #f3f6fa;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 410px;
  padding: 31px 30px 23px;
  background: #fff;
  border: 1px solid #e5eaf2;
  border-radius: 19px;
  box-shadow: 0 24px 70px rgba(25, 47, 78, 0.12), 0 2px 4px rgba(25, 47, 78, 0.03);
}

.auth-loading,
.auth-unavailable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  text-align: center;
}

.auth-loading strong {
  margin-top: 17px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.auth-loading p,
.auth-unavailable p {
  margin: 5px 0 0;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.7;
}

.auth-spinner {
  width: 29px;
  height: 29px;
  border: 2px solid #dfe8f5;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-unavailable-icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 13px;
  place-items: center;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 14px;
}

.auth-unavailable-icon svg {
  width: 24px;
  height: 24px;
}

.auth-unavailable h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.auth-unavailable .btn {
  margin-top: 18px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.auth-eyebrow {
  margin: 0 0 5px;
  color: var(--brand);
  font-family: var(--font-num);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.auth-form h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.3;
}

.auth-sub {
  margin: 7px 0 19px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.auth-notice {
  margin: 0 0 16px;
  padding: 8px 10px;
  color: #346291;
  font-size: 10px;
  line-height: 1.6;
  background: #eff6ff;
  border: 1px solid #d8e7fa;
  border-radius: 7px;
}

.auth-notice[data-tone="warning"] {
  color: #865f17;
  background: #fff9e9;
  border-color: #f0dfb9;
}

.auth-notice[data-tone="info"] {
  color: #356054;
  background: #eff9f5;
  border-color: #d5eee5;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.auth-field > span:first-child {
  color: #536176;
  font-size: 10px;
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  color: var(--ink);
  font-size: 12px;
  background: #fbfcfe;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.auth-field input::placeholder {
  color: #a5b0bf;
}

.auth-field input:focus {
  background: #fff;
  border-color: #8eb6e4;
  box-shadow: 0 0 0 3px rgba(33, 97, 181, 0.08);
}

.auth-field input:disabled {
  color: #97a4b4;
  background: #f5f7fa;
}

.auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-password-wrap {
  position: relative;
  display: block;
}

.auth-password-wrap input {
  padding-right: 48px;
}

.auth-eye {
  position: absolute;
  top: 50%;
  right: 7px;
  padding: 3px 5px;
  color: #8090a4;
  font-size: 9.5px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  transform: translateY(-50%);
}

.auth-eye:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.auth-error {
  margin: 0 0 12px;
  padding: 8px 10px;
  color: #a63f3f;
  font-size: 10px;
  line-height: 1.6;
  background: #fdf0f0;
  border: 1px solid #f2d6d6;
  border-radius: 7px;
}

.auth-submit {
  margin-top: 5px;
}

.auth-submit:disabled {
  opacity: 0.72;
}

.auth-help {
  margin: 13px 0 0;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.65;
}

.auth-help code {
  padding: 1px 4px;
  color: #58697e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8.5px;
  background: #f2f5f9;
  border-radius: 3px;
}

.auth-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 13px;
  color: #a2adbc;
  font-size: 8.5px;
  border-top: 1px solid #eef2f7;
}

.auth-copyright {
  margin: 19px 0 0;
  color: #a0acbb;
  font-size: 8.5px;
  letter-spacing: 0.02em;
}

.auth-form.is-busy {
  opacity: 0.72;
}

/* ---------- 云端同步状态 ---------- */

button.save-state {
  height: auto;
  padding: 3px 7px;
  color: #7b8798;
  font-family: var(--font-sans);
  font-size: 10.5px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
}

button.save-state:hover {
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--line);
}

.save-state[data-state="synced"]::before {
  background: #2da47d;
  box-shadow: 0 0 0 3px rgba(45, 164, 125, 0.1);
}

.save-state[data-state="saving"]::before,
.save-state[data-state="connecting"]::before {
  background: #d79a28;
  box-shadow: 0 0 0 3px rgba(215, 154, 40, 0.1);
  animation: sync-pulse 1.2s ease-in-out infinite;
}

.save-state[data-state="offline"]::before,
.save-state[data-state="conflict"]::before {
  background: #c34a4a;
  box-shadow: 0 0 0 3px rgba(195, 74, 74, 0.1);
}

.save-state[data-state="remote"]::before {
  background: #2f79ca;
  box-shadow: 0 0 0 3px rgba(47, 121, 202, 0.1);
}

.save-state[data-state="conflict"] {
  color: #a33b3b;
}

.save-state[data-state="offline"] {
  color: #9d6b22;
}

@keyframes sync-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.cloud-account-body {
  padding: 14px 18px 16px;
}

.cloud-account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 2px 0 11px;
}

.cloud-account-avatar {
  display: grid;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  place-items: center;
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 700;
  background: var(--brand-soft);
  border: 1px solid #dbe8f8;
  border-radius: 10px;
}

.cloud-account-copy {
  min-width: 0;
  flex: 1;
}

.cloud-account-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-account-copy span {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.cloud-sync-dot {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
}

.cloud-sync-dot[data-state="offline"],
.cloud-sync-dot[data-state="conflict"] {
  background: var(--red);
}

.cloud-sync-dot[data-state="saving"] {
  background: var(--amber);
}

.cloud-sync-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  padding: 8px 9px;
  color: var(--muted);
  font-size: 8.5px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e9eef5;
  border-radius: 7px;
}

.cloud-sync-line:hover {
  color: var(--ink-2);
  background: #f4f8fd;
  border-color: #dbe5f1;
}

.cloud-sync-line span:last-child {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  color: var(--brand);
}

.cloud-sync-line svg {
  width: 11px;
  height: 11px;
}

.cloud-account-card .data-action-list {
  padding: 7px 0 0;
}

.cloud-account-card .settings-note {
  margin-top: 0;
}

.sync-info-list {
  display: flex;
  flex-direction: column;
  margin-top: 15px;
  border: 1px solid #e9eef5;
  border-radius: 8px;
  overflow: hidden;
}

.sync-info-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 11px;
  border-bottom: 1px solid #eef2f7;
}

.sync-info-list > div:last-child {
  border-bottom: 0;
}

.sync-info-list span {
  color: var(--muted);
  font-size: 9.5px;
}

.sync-info-list strong {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 600;
  text-align: right;
}

.sync-conflict-note {
  margin-top: 12px;
  padding: 9px 10px;
  color: #8d5d16;
  font-size: 10px;
  line-height: 1.65;
  background: #fff9eb;
  border: 1px solid #f0e1c1;
  border-radius: 7px;
}

.sync-note-box,
.sync-error-box {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 11px;
  padding: 8px 9px;
  color: #365e88;
  font-size: 9px;
  line-height: 1.6;
  background: #f2f8ff;
  border: 1px solid #dce9f8;
  border-radius: 7px;
}

.sync-error-box {
  color: #8f4141;
  background: #fff6f6;
  border-color: #f1dbdb;
}

.sync-note-box svg,
.sync-error-box svg {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 1px;
}

@media (max-width: 960px) {
  .topbar .save-state {
    display: inline-flex;
  }
}

@media (max-width: 900px) {
  .auth-screen {
    flex-direction: column;
  }

  .auth-visual {
    flex: 0 0 auto;
    min-height: 0;
    padding: 18px 21px;
    border-radius: 0 0 22px 22px;
  }

  .auth-copy,
  .auth-visual-window,
  .auth-visual-foot {
    display: none;
  }

  .auth-brand-mark {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .auth-brand-mark svg {
    width: 20px;
    height: 20px;
  }

  .auth-brand-copy strong {
    font-size: 16px;
  }

  .auth-brand-copy span {
    font-size: 8.5px;
  }

  .auth-form-panel {
    flex: 1;
    justify-content: flex-start;
    padding: 22px 16px 35px;
    background: #f3f6fa;
  }

  .auth-card {
    max-width: 430px;
    padding: 23px 19px 18px;
    border-radius: 15px;
  }

  .auth-form h2 {
    font-size: 22px;
  }

  .auth-loading,
  .auth-unavailable {
    min-height: 300px;
  }

  .auth-card-foot {
    margin-top: 17px;
  }
}

@media (max-width: 560px) {
  .auth-visual {
    padding: 15px 16px;
  }

  .auth-form-panel {
    padding: 15px 11px 28px;
  }

  .auth-card {
    padding: 20px 15px 16px;
  }

  .auth-field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .auth-copyright {
    margin-top: 13px;
  }

  .topbar .save-state {
    width: 28px;
    height: 28px;
    padding: 0;
    margin-right: 1px;
    justify-content: center;
    font-size: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    flex: 0 0 28px;
  }

  .topbar .save-state::before {
    width: 7px;
    height: 7px;
  }

  .cloud-account-body {
    padding-right: 13px;
    padding-left: 13px;
  }

  .cloud-sync-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

/* 空状态允许放更多迁移操作 */
.onboarding-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 560px) {
  .onboarding-actions {
    justify-content: stretch;
    width: 100%;
  }

  .onboarding-actions .btn {
    flex: 1 1 auto;
  }
}

/* ---------- 多产品 / 其他产品 ---------- */

.field-unit {
  display: inline-block;
  margin-left: 2px;
  padding: 0 3px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1.4;
  background: #f2f5f9;
  border-radius: 3px;
}

.add-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 12px;
}

.add-actions .add-line {
  flex: 1;
  margin-top: 0;
}

.add-line.alt {
  color: #5c6f85;
  background: #f8fafc;
  border-color: #d8e2ee;
}

.add-line.alt:hover {
  color: var(--brand);
  background: var(--brand-softer);
  border-color: #a9c4e4;
}

.add-hint {
  margin: 7px 0 0;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.print-count-line {
  margin-top: 5px;
  color: #555;
  font-size: 8px;
  line-height: 1.5;
  text-align: right;
}

@media (max-width: 560px) {
  .add-actions {
    flex-direction: column;
    gap: 7px;
  }

  .add-actions .add-line {
    width: 100%;
  }

  .add-hint {
    text-align: left;
  }

  .print-count-line {
    font-size: 7px;
  }
}
