:root {
  --ink: #17211d;
  --muted: #69756f;
  --faint: #909b96;
  --line: #dce3df;
  --line-strong: #c9d3ce;
  --surface: #ffffff;
  --canvas: #eef1ef;
  --soft: #f5f7f6;
  --brand: #d8681d;
  --brand-dark: #a8480f;
  --brand-soft: #fff1e7;
  --green: #0d7864;
  --green-soft: #e8f5f1;
  --blue: #315da8;
  --blue-soft: #edf2fb;
  --amber: #aa6208;
  --amber-soft: #fff4df;
  --red: #b42318;
  --red-soft: #fff0ed;
  --shadow: 0 14px 40px rgba(20, 32, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
}

html {
  background: var(--canvas);
}

body {
  height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

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

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}

[hidden] {
  display: none !important;
}

.app-stage {
  display: flex;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  justify-content: center;
  overflow: hidden;
}

.phone-shell {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--soft);
}

.app-header {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: 66px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(220, 227, 223, 0.8);
  background: rgba(255, 255, 255, 0.97);
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 5px 14px rgba(216, 104, 29, 0.22);
}

.app-title {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.app-title strong {
  overflow: hidden;
  font-size: 17px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-title small {
  overflow: hidden;
  max-width: 250px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #43504a;
  background: #fff;
}

.icon-button:active {
  background: var(--soft);
}

.icon-button.loading svg {
  animation: spin 0.8s linear infinite;
}

.app-main {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 14px calc(22px + env(safe-area-inset-bottom));
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: #c8d1cc transparent;
}

.tab-bar {
  position: relative;
  z-index: 30;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -8px 24px rgba(23, 33, 29, 0.05);
}

.tab-item {
  position: relative;
  display: grid;
  min-height: 48px;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-radius: 8px;
  color: #77837d;
  background: transparent;
  font-size: 11px;
}

.tab-item.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.tab-item.active svg {
  stroke-width: 2.2;
}

.tab-count {
  position: absolute;
  top: 3px;
  left: calc(50% + 7px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 9px;
  color: #fff;
  background: var(--red);
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}

.stack {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.section-block {
  display: grid;
  min-width: 0;
  gap: 9px;
}

.section-heading {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.section-heading p,
.section-heading span {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.store-band {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 12px;
  overflow: hidden;
  padding: 16px;
  border-radius: 8px;
  color: #fff;
  background: #1c2a25;
}

.store-band::after {
  position: absolute;
  top: -30px;
  right: -24px;
  width: 112px;
  height: 112px;
  border: 22px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.store-band-top,
.store-band-foot {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.store-band-top > div,
.store-band-foot > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.store-band small {
  color: #b5c3bd;
  font-size: 11px;
}

.store-band strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

  .store-role {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #f6e5d8;
  background: rgba(255, 255, 255, 0.08);
    font-size: 11px;
  }


.sync-label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: #d8e1dd !important;
  white-space: nowrap;
}

.sync-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #54c3a3;
  box-shadow: 0 0 0 4px rgba(84, 195, 163, 0.12);
}

.environment-panel {
  display: grid;
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid #d8e3df;
  border-radius: 8px;
  background: #fff;
}

.environment-panel.ready {
  border-color: #add8cd;
  background: var(--green-soft);
}

.environment-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
}

.environment-panel.ready .environment-icon {
  background: rgba(255, 255, 255, 0.72);
}

.environment-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.environment-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.environment-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.environment-state {
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.environment-panel.ready .environment-state {
  color: var(--green);
  background: #fff;
}

.metric-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.metric-tile {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric-top {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.metric-top svg {
  width: 17px;
  height: 17px;
  color: var(--brand);
}

.metric-tile strong {
  overflow: hidden;
  font-size: 21px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-tile small {
  overflow: hidden;
  color: var(--faint);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.todo-tile {
  display: grid;
  min-width: 0;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.todo-tile:active {
  border-color: var(--line-strong);
  background: var(--soft);
}

.todo-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
}

.todo-tile.warning .todo-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.todo-tile.primary .todo-icon {
  color: var(--brand);
  background: var(--brand-soft);
}

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

.todo-tile.neutral .todo-icon {
  color: var(--green);
  background: var(--green-soft);
}

.todo-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.todo-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-copy small {
  color: var(--muted);
  font-size: 10px;
}

.todo-value {
  color: var(--ink) !important;
  font-size: 16px !important;
  font-weight: 800;
}

.todo-arrow {
  color: #a5afa9;
}

.compact-list {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.compact-order {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
}

.compact-order:last-child {
  border-bottom: 0;
}

.compact-order:active {
  background: var(--soft);
}

.compact-order-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.compact-order-main strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-order-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-order-side {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 5px;
}

.compact-order-side strong {
  font-size: 12px;
}

.status-pill,
.soft-pill {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 6px;
  color: var(--muted);
  background: #edf1ef;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

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

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

.page-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-heading > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.page-heading h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.filter-strip {
  display: flex;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-strip::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.filter-chip.active {
  border-color: #1c2a25;
  color: #fff;
  background: #1c2a25;
}

.order-list {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.order-card {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.order-card:active {
  border-color: var(--line-strong);
}

.order-card-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.order-card-head > span:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.order-card-head strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-card-head small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-meta {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.order-meta > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.order-meta span {
  color: var(--muted);
  font-size: 10px;
}

.order-meta strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-card-foot {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.order-next {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.order-next svg {
  width: 14px;
  height: 14px;
  color: var(--brand);
}

.text-button {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-size: 11px;
  font-weight: 800;
}

.text-button.secondary {
  border: 1px solid var(--line);
  color: #394640;
  background: #fff;
}

.text-button.danger {
  background: var(--red);
}

.profile-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  color: #fff;
  background: #1c2a25;
}

.profile-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #ffe6d6;
  background: rgba(255, 255, 255, 0.08);
}

.profile-card-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.profile-card-copy strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-card-copy span {
  overflow: hidden;
  color: #c5d0cb;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-group {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.profile-row {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

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

.profile-row-label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.profile-row-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 7px;
  color: var(--green);
  background: var(--green-soft);
}

.profile-row-label > span:last-child {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.profile-row-label strong {
  font-size: 12px;
}

.profile-row-label small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-row-value {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  word-break: break-all;
}

.profile-row-value strong {
  color: var(--ink);
  font-size: 12px;
}

.gate-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.gate-item {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
}

.gate-item span {
  color: var(--muted);
  font-size: 10px;
}

.gate-item strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gate-note {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 10px;
  word-break: break-word;
}

.empty-state,
.error-state {
  display: grid;
  min-height: 210px;
  place-items: center;
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.empty-state > div,
.error-state > div {
  display: grid;
  max-width: 280px;
  justify-items: center;
  gap: 9px;
}

.empty-icon,
.error-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: var(--soft);
}

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

.empty-state strong,
.error-state strong {
  font-size: 14px;
}

.empty-state p,
.error-state p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.skeleton-stack {
  display: grid;
  gap: 12px;
}

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

.skeleton {
  min-height: 86px;
  overflow: hidden;
  border: 1px solid #e3e8e5;
  border-radius: 8px;
  background: #e8ece9;
}

.skeleton::after {
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  content: "";
  transform: translateX(-120%);
  animation: shimmer 1.35s infinite;
}

.skeleton-hero {
  min-height: 138px;
}

.skeleton-list {
  min-height: 180px;
}

.sheet-root {
  position: absolute;
  z-index: 80;
  inset: 0;
  pointer-events: none;
}

.sheet-root:empty {
  display: none;
}

.sheet-layer {
  position: absolute;
  display: flex;
  inset: 0;
  align-items: flex-end;
  justify-content: center;
  pointer-events: auto;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 20, 0.43);
  animation: fade-in 0.18s ease-out;
}

.bottom-sheet {
  position: relative;
  display: flex;
  width: 100%;
  max-height: 91%;
  min-height: 220px;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  background: var(--soft);
  box-shadow: 0 -16px 44px rgba(17, 27, 23, 0.18);
  animation: slide-up 0.2s ease-out;
}

.sheet-grabber {
  width: 34px;
  height: 4px;
  flex: 0 0 4px;
  margin: 7px auto 2px;
  border-radius: 3px;
  background: #c8d1cc;
}

.sheet-header {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px 11px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.sheet-header > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.sheet-header strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-header small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #4a5650;
  background: #fff;
}

.sheet-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 14px calc(18px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}

.detail-stack {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.detail-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-section-title {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.detail-section-title strong {
  font-size: 12px;
}

.detail-section-title span {
  color: var(--muted);
  font-size: 10px;
}

.detail-rows {
  display: grid;
  min-width: 0;
}

.detail-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf0ee;
}

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

.detail-row dt {
  color: var(--muted);
  font-size: 11px;
}

.detail-row dd {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.detail-row dd small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.timeline {
  display: grid;
  gap: 0;
  padding: 3px 12px 5px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 0;
}

.timeline-item:not(:last-child)::before {
  position: absolute;
  top: 23px;
  bottom: -8px;
  left: 5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 1px #e0b797;
}

.timeline-item:first-child .timeline-dot {
  background: var(--green);
  box-shadow: 0 0 0 1px #aad2c7;
}

.timeline-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.timeline-copy strong {
  font-size: 11px;
  font-weight: 700;
  word-break: break-word;
}

.timeline-copy small {
  color: var(--muted);
  font-size: 10px;
}

.action-panel {
  display: grid;
  min-width: 0;
  gap: 9px;
  padding: 12px;
  border: 1px solid #eed8c7;
  border-radius: 8px;
  background: var(--brand-soft);
}

.action-panel-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.action-panel-head span {
  color: var(--muted);
  font-size: 10px;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.primary-button:active {
  background: var(--brand-dark);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: #394640;
  background: #fff;
}

.danger-button {
  background: var(--red);
}

.action-buttons {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.confirm-box {
  display: grid;
  min-width: 0;
  gap: 9px;
  padding-top: 2px;
}

.confirm-box p {
  margin: 0;
  color: #713c18;
  font-size: 11px;
  line-height: 1.55;
}

.field-stack {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.field {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.field span {
  color: var(--muted);
  font-size: 10px;
}

.field input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  background: #fff;
  font-size: 12px;
}

.field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(216, 104, 29, 0.12);
}

.no-action {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  text-align: center;
}

.utility-case {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.utility-case:last-child {
  border-bottom: 0;
}

.utility-case-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.utility-case-head strong {
  min-width: 0;
  font-size: 13px;
  word-break: break-word;
}

.utility-case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: var(--muted);
  font-size: 10px;
}

.toast {
  position: absolute;
  z-index: 120;
  right: 22px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  left: 22px;
  max-width: 386px;
  margin: 0 auto;
  padding: 11px 13px;
  border: 1px solid #bfdbd3;
  border-radius: 8px;
  color: #0b6352;
  background: #edf8f4;
  box-shadow: 0 10px 28px rgba(20, 32, 27, 0.16);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  animation: fade-in 0.16s ease-out;
}

.toast.error {
  border-color: #efc3bd;
  color: var(--red);
  background: var(--red-soft);
}

@keyframes shimmer {
  to {
    transform: translateX(270%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes slide-up {
  from {
    transform: translateY(18px);
    opacity: 0.6;
  }
}

@media (min-width: 720px) {
  body {
    padding: 24px 0;
    background:
      linear-gradient(rgba(23, 33, 29, 0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(23, 33, 29, 0.035) 1px, transparent 1px),
      #e9eeeb;
    background-size: 28px 28px;
  }

  .app-stage {
    height: calc(100dvh - 48px);
    min-height: 650px;
  }

  .phone-shell {
    height: min(880px, calc(100dvh - 48px));
    min-height: 650px;
    border: 1px solid #cbd4cf;
    border-radius: 28px;
    box-shadow: var(--shadow);
  }

  .app-header {
    padding-top: 13px;
  }

  .toast {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) {
  .app-main {
    padding-right: 11px;
    padding-left: 11px;
  }

  .metric-grid,
  .todo-grid,
  .gate-grid {
    grid-template-columns: 1fr;
  }

  .todo-tile {
    grid-template-columns: 34px minmax(0, 1fr) 16px;
  }

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

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

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

/* ===== deepened wechat merchant console (expert-library driven) ===== */

button.profile-row,
.profile-row[type="button"] {
  width: 100%;
  border: 0;
  text-align: left;
  background: #fff;
}

.profile-row-value i {
  width: 16px;
  height: 16px;
  color: var(--faint);
}

.filter-block {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.filter-label {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0;
}

.search-field {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.search-field i {
  color: var(--faint);
}

.search-field input {
  min-width: 0;
  flex: 1 1 auto;
  height: 42px;
  border: 0;
  outline: none;
  background: transparent;
}

.funnel {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.funnel-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 62px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
}

.funnel-label {
  color: var(--muted);
  font-size: 12px;
}

.funnel-track {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--soft);
}

.funnel-fill {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--brand), #e5883f);
}

.funnel-value {
  text-align: right;
  font-size: 12px;
  font-weight: 600;
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.segment {
  min-height: 44px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}

.segment.active {
  color: #fff;
  background: #1c2a25;
}

.conversation-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: #fff;
}

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

.conversation-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--brand);
  background: var(--brand-soft);
}

.conversation-copy {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 3px;
}

.conversation-copy strong {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.conversation-tag {
  color: var(--faint);
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
}

.conversation-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-side {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 3px;
  color: var(--faint);
  font-size: 11px;
}

.conversation-badge {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  color: #fff;
  background: var(--red);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.conversation-owner {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #1c2a25, #35544a);
}

.account-card-head {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.account-card-head span {
  opacity: 0.78;
  font-size: 12px;
}

.account-card-head strong {
  font-size: 22px;
}

.account-split {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.account-split > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.account-split small {
  opacity: 0.76;
  font-size: 11px;
}

.account-split strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.account-foot {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 8px;
  opacity: 0.84;
  font-size: 11px;
}

.account-mini {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.account-mini > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.account-mini small {
  color: var(--muted);
  font-size: 11px;
}

.account-mini strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.finance-totals {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.finance-totals > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.finance-totals small {
  color: var(--muted);
  font-size: 11px;
}

.finance-totals strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.settlement-row {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

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

.settlement-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.settlement-meta,
.settlement-amount {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 11px;
}

.settlement-amount strong {
  color: var(--ink);
  font-size: 12px;
}

.fund-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

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

.fund-main,
.fund-side {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.fund-main small,
.fund-side small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fund-side {
  flex: 0 0 auto;
  text-align: right;
}

.fund-side .in {
  color: var(--green);
}

.fund-side .out {
  color: var(--red);
}

.withdraw-head {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.withdraw-available {
  display: grid;
  gap: 3px;
}

.withdraw-available small {
  color: var(--muted);
  font-size: 12px;
}

.withdraw-available strong {
  font-size: 22px;
}

.withdraw-rules {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
}

.score-board {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #1c2a25, #35544a);
}

.score-main {
  display: grid;
  gap: 3px;
}

.score-main small {
  opacity: 0.8;
  font-size: 12px;
}

.score-main strong {
  font-size: 30px;
}

.score-main span {
  opacity: 0.82;
  font-size: 12px;
}

.score-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.score-tile {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.score-tile small {
  opacity: 0.76;
  font-size: 11px;
}

.score-tile strong {
  font-size: 14px;
}

.score-tile span {
  opacity: 0.7;
  font-size: 10px;
}

.suggestion-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  background: #fff;
}

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

.suggestion-level {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 11px;
}

.suggestion-level.p1 {
  color: var(--red);
  background: var(--red-soft);
}

.quick-reply {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  background: #fff;
}

.quick-reply:last-child {
  border-bottom: 0;
}

.quick-reply i {
  color: var(--brand);
}

.chat-body {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.chat-messages {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.chat-bubble {
  display: grid;
  max-width: 84%;
  gap: 3px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.chat-bubble small {
  opacity: 0.62;
  font-size: 10px;
}

.chat-bubble.in {
  justify-self: start;
  background: #fff;
  border: 1px solid var(--line);
}

.chat-bubble.out {
  justify-self: end;
  color: #fff;
  background: var(--green);
}

.chat-form {
  display: flex;
  min-width: 0;
  gap: 8px;
}

.chat-form input {
  min-width: 0;
  flex: 1 1 auto;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.chat-form .primary-button {
  flex: 0 0 auto;
}

.order-list.is-loading {
  opacity: 0.55;
}

.withdraw-form {
  display: flex;
  min-width: 0;
  gap: 8px;
}

.withdraw-form input {
  min-width: 0;
  flex: 1 1 auto;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  background: #fff;
  font-size: 12px;
}

.field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(216, 104, 29, 0.12);
}

.chip-button {
  min-height: 36px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
}

.chip-button:active {
  background: var(--soft);
}

/* 惠租式导语（与经营后台/平台后台同一套组件类名） */
.hz-intro {
  margin: 0 0 10px;
}

.hz-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.hz-flow span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}

.hz-flow span i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--brand);
  font-size: 10px;
  font-style: normal;
}

.hz-flow code {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.hz-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hz-focus span {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  color: var(--muted);
}

.wz-action-queue {
  display: grid;
  gap: 8px;
}

.wz-action-list {
  display: grid;
  gap: 7px;
}

.wz-action-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  padding: 11px 10px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e4e9e6;
  border-radius: 8px;
}

.wz-action-priority {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
}

.wz-action-priority.red {
  color: var(--red);
  background: var(--red-soft);
}

.wz-action-priority.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.wz-action-priority.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.wz-action-copy,
.wz-action-side {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.wz-action-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-action-copy small,
.wz-action-side small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-action-side {
  justify-items: end;
}

.wz-action-side strong {
  color: var(--brand-dark);
  font-size: 11px;
  white-space: nowrap;
}

.wz-action-row > svg {
  width: 16px;
  height: 16px;
  color: var(--faint);
}

@media (max-width: 360px) {
  .wz-action-row {
    grid-template-columns: auto minmax(0, 1fr) 16px;
  }

  .wz-action-side {
    display: none;
  }
}

.wz-service-center {
  min-width: 0;
}

.wz-service-list {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 12px;
  background: var(--soft);
}

.wz-service-card {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.wz-service-card-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.wz-service-card-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.wz-service-card-head strong {
  font-size: 14px;
}

.wz-service-card-head small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-service-card-facts {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 9px;
  background: var(--soft);
}

.wz-service-card-facts > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.wz-service-card-facts small {
  color: var(--muted);
  font-size: 10px;
}

.wz-service-card-facts strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-service-card-reason {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.wz-service-card-actions {
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
}

.wz-service-center .quick-reply {
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
}

@media (max-width: 360px) {
  .wz-service-card-facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

.wz-login-gate {
  display: grid;
  width: min(100%, 360px);
  min-height: 420px;
  align-content: center;
  justify-items: start;
  gap: 16px;
  margin: 0 auto;
  padding: 28px 22px;
}

.wz-login-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
  font-size: 24px;
  font-weight: 800;
}

.wz-login-gate > div {
  display: grid;
  gap: 5px;
}

.wz-login-gate small {
  color: var(--muted);
  font-size: 11px;
}

.wz-login-gate h1 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  letter-spacing: 0;
}

.wz-login-gate p {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.wz-login-gate .primary-button {
  width: 100%;
}

.wz-login-error {
  color: var(--danger) !important;
}

.wz-login-boundary {
  line-height: 1.55;
}
